[Copyright 1999,2002 Frank Durda IV, All Rights Reserved. Mirroring of any material on this page in any form is expressly prohibited. The official web site for this material is: http://nemesis.lonestar.org Contact this address for use clearances: clearance at nemesis.lonestar.org Comments and queries to this address: web_software_2011 at nemesis.lonestar.org]
MISOSYS EDAS-4.3 04/11/99 21:40:12 SYS10 - LS-DOS 6.2 Page 00001 00001 ;SYS10/ASM - LS-DOS 6.2 00003 ; 000D 00004 CR EQU 13 00005 ; 00006 *LIST OFF ;Get SYS0/EQU 00322 *LIST ON 0000 00323 *GET COPYCOM:3 ;Copyright message 00324 ; COPYCOM - File for Copyright COMment block 00325 ; 0000 00326 *GET BUILDVER/ASM:3 00327 ; 00328 ; Buildver/asm is a bit of a kludge since not all utilities can load 00329 ; equates from LDOS60 and still compile. LOWCORE and everybody else 00330 ; relies on this setting, and it eventually ends up in LDOS60/EQU 00331 ; for programs that can use that. 00332 ; FFFF 00333 @BLD631 EQU -1 ;<631>Build 631 distribution (LEVEL 1B) 00334 ; These switches activate patches made since the 1B release. 00335 ; It is important that all earlier patches be enabled when a higher 00336 ; patch is enabled. 00337 ; Patches C thru F were published in TMQ IV.iv, page 32 (NOTE: the 00338 ; patch addresses listed for SPOOL in SPOOL1/FIX are 19H high.) FFFF 00339 @BLD631C EQU -1 ;<631>Apply 1C patches (SETKI) FFFF 00340 @BLD631D EQU -1 ;<631>Apply 1D patches (DIR) FFFF 00341 @BLD631E EQU -1 ;<631>Apply 1E patches (DIR & MEMDISK/DCT) FFFF 00342 @BLD631F EQU -1 ;<631>Apply 1F patches (SPOOL) 00343 ; Patches G and H were published in TMQ V.i, pages 10 and 18/19. FFFF 00344 @BLD631G EQU -1 ;<631>Apply 1G patches (//KEYIN,DIR,DO *) FFFF 00345 @BLD631H EQU -1 ;<631>Apply 1H patches (MEMORY) 00346 ; 00347 ;End of BUILDVER/ASM 00348 IF @BLD631 00350 ELSE 00351 COM '<*(C) 1982,3,4,6 by LSI*>' 00352 ENDIF 00353 ; 1E00 00354 ORG 1E00H 00355 ; 1E00 E670 00356 SYS10 AND 70H ;Strip bit 7 1E02 C8 00357 RET Z ;Back on zero entry 1E03 FE10 00358 CP 10H ;Remove all for now 1E05 C0 00359 RET NZ ;Ret if any other entry 1E06 1A 00360 LD A,(DE) ;Test device/file 1E07 CB7F 00361 BIT 7,A ;File open or device? 1E09 2860 00362 JR Z,CLOSDCB ;Jump if device 1E0B CD6815 00363 CALL CKOPEN@ ;Test for open file 1E0E DD7E01 00364 LD A,(IX+1) ; & link the FCB to IX 1E11 E607 00365 AND 7 ;Test for remove access 1E13 FE02 00366 CP 2 1E15 3804 00367 JR C,REMOV1 ;Jump if access granted 1E17 3E25 00368 LD A,25H ; else init errcod 1E19 B7 00369 OR A 1E1A C9 00370 RET 1E1B DD4E06 00371 REMOV1 LD C,(IX+6) ;P/u drive # 1E1E DD4607 00372 LD B,(IX+7) ;P/u DEC 1E21 CD7418 00373 CALL @GATRD ;Read GAT => DIRBUF$ 1E24 CCBB18 00374 REMOV2 CALL Z,@DIRRD ;Read dir for this DEC 1E27 C0 00375 RET NZ ;Ret if read error 1E28 3E16 00376 LD A,22 ;Point to 1st extent 1E2A 85 00377 ADD A,L 1E2B 6F 00378 LD L,A 1E2C 5E 00379 REMOV3 LD E,(HL) ;P/u relative cylinder 1E2D 2C 00380 INC L 1E2E 56 00381 LD D,(HL) ;P/u granule allocation 1E2F ED53541E 00382 LD (EXTINFO+1),DE ;Modify later instruction 1E33 7B 00383 LD A,E ;Ck if extent in use 1E34 FEFE 00384 CP 0FEH 1E36 3006 00385 JR NC,FIXDIR ;Jump if not used 1E38 2C 00386 INC L 1E39 CD891E 00387 CALL RMVEXT ;Deallocate ext from GAT 1E3C 18EE 00388 JR REMOV3 ;Loop to next extent 00389 ; 00390 ; Deallocated last extent; clean up directory 00391 ; 1E3E 7D 00392 FIXDIR LD A,L ;Point to 1st byte 1E3F E6E0 00393 AND 0E0H ; of DIR entry 1E41 6F 00394 LD L,A 1E42 CBA6 00395 RES 4,(HL) ;Show dir entry spare 1E44 CD0318 00396 CALL @DIRWR ;Write the dir record 1E47 CC9718 00397 CALL Z,@HITRD ;Grab HIT => SBUFF$ 1E4A 261D 00398 LD H,SBUFF$<-8 ;Point to HIT entry 1E4C 68 00399 LD L,B ; & zero out DEC pos 1E4D 3600 00400 LD (HL),0 1E4F CC9818 00401 CALL Z,@HITWR ;Write HIT back to disk 1E52 C0 00402 RET NZ ;Ret if read/write error 1E53 110000 00403 EXTINFO LD DE,0 ;P/u last extent info 00404 ; 00405 ; If extended directory record in use, 00406 ; D -> DEC of FXDE record 00407 ; E -> FE if FXDE, FF if extent unused 00408 ; 1E56 42 00409 LD B,D ;Ck for FXDE in use 1E57 7B 00410 LD A,E 1E58 FEFE 00411 CP 0FEH ;X'FE' => FXDE in use 1E5A 28C8 00412 JR Z,REMOV2 ;Jump if FXDE in use 1E5C CD7518 00413 CALL @GATWR ; else write the GAT 1E5F C0 00414 RET NZ ;Ret if write error 1E60 DDE5 00415 PUSH IX ;Transfer FCB address 1E62 E1 00416 POP HL ; to HL & zero out FCB 1E63 0620 00417 LD B,32 ;Init for 32 byte field 1E65 AF 00418 XOR A ;Zero the accumulator 1E66 77 00419 ZERLP1 LD (HL),A ;Go for it! 1E67 23 00420 INC HL 1E68 10FC 00421 DJNZ ZERLP1 1E6A C9 00422 RET 00423 ; 00424 ; REMOVE will only close a logical device 00425 ; 1E6B FE10 00426 CLOSDCB CP 10H ;Is this an open DCB? 1E6D 3E26 00427 LD A,38 ;Init "file not open 1E6F C0 00428 RET NZ 1E70 CD6615 00429 CALL LNKFCB@ ;Link to DCB (DE->IX) 1E73 DD4E06 00430 LD C,(IX+6) ;Get device name 1E76 DD4607 00431 LD B,(IX+7) 1E79 DD36002A 00432 LD (IX+0),'*' ;Stuff device indicator 1E7D DD7101 00433 LD (IX+1),C ;Stuff 1st char of name 1E80 DD7002 00434 LD (IX+2),B ;Stuff 2nd char of name 1E83 DD360303 00435 LD (IX+3),3 ;Terminate with ETX 1E87 AF 00436 XOR A 1E88 C9 00437 RET 00438 ; 00439 ; Deallocate an extent 00440 ; 1E89 E5 00441 RMVEXT PUSH HL 1E8A C5 00442 PUSH BC 1E8B 3E08 00443 LD A,8 ;P/u the # of grans per 1E8D CD2B1A 00444 CALL @DCTBYT ; cylinder into reg A 1E90 07 00445 RLCA ;Shift into bits 0-2 1E91 07 00446 RLCA 1E92 07 00447 RLCA 1E93 E607 00448 AND 7 ;Remove all else 1E95 3C 00449 INC A ;Adjust for zero offset 00450 ; 00451 ; Ck for 2-sided operation 00452 ; 1E96 6F 00453 LD L,A ;Save current grans/cyl 1E97 3E04 00454 LD A,4 1E99 CD2B1A 00455 CALL @DCTBYT ;Get 2-sided flag 1E9C CB6F 00456 BIT 5,A ;Test 2-sided 1E9E 7D 00457 LD A,L ;Xfer value back 1E9F 2801 00458 JR Z,$+3 ;Bypass if 1-sided 1EA1 87 00459 ADD A,A ; else multiply by 2 1EA2 32BA1E 00460 LD (GRNSCYL+1),A ;Modify later instruction 1EA5 6B 00461 LD L,E ;Relative cylinder -> L 1EA6 2623 00462 LD H,DIRBUF$<-8 ;Point to GAT byte 1EA8 7A 00463 LD A,D ;Rel gran & # of grans 1EA9 E61F 00464 AND 1FH ;Get # of grans 1EAB 4F 00465 LD C,A ; into reg C & adjust 1EAC 0C 00466 INC C ; for zero offset 1EAD AA 00467 XOR D ;Get rel gran & shift 1EAE 07 00468 RLCA ; into bits 0-2 1EAF 07 00469 RLCA 1EB0 07 00470 RLCA 1EB1 F5 00471 RMVEX1 PUSH AF ;Save rel starting gran 1EB2 46 00472 LD B,(HL) ;P/u allocation byte 1EB3 CDC51E 00473 CALL RMVGRN ;Turn off bit for a gran 1EB6 70 00474 LD (HL),B ;Update GAT byte 1EB7 F1 00475 POP AF ;Recover starting gran 1EB8 3C 00476 INC A ;Bump up 1EB9 FE00 00477 GRNSCYL CP 0 ;Ck with grans per cyl 1EBB 2002 00478 JR NZ,DECGRNS ;Go if still on this cyl 1EBD AF 00479 XOR A ; else zero gran counter 1EBE 2C 00480 INC L ;Bump to next cyl in GAT 1EBF 0D 00481 DECGRNS DEC C ;Decrement # of grans 1EC0 20EF 00482 JR NZ,RMVEX1 ;Go if more to deallocate 1EC2 C1 00483 POP BC ; else recover regs 1EC3 E1 00484 POP HL ; & go home 1EC4 C9 00485 RET 00486 ; 00487 ; Remove a bit to deallocate & free up a gran 00488 ; 1EC5 E607 00489 RMVGRN AND 7 ;Max 8-grans per cyl 1EC7 07 00490 RLCA ;Shift to create RES 1EC8 07 00491 RLCA 1EC9 07 00492 RLCA 1ECA F680 00493 OR 80H ;Merge rest of RES code 1ECC 32D01E 00494 LD (RMVGRN1+1),A ;Stuff into the inst 1ECF CB80 00495 RMVGRN1 RES 0,B ;Reset proper bit 1ED1 C9 00496 RET 00497 ; 1ED2 00498 LAST EQU $ 00499 IFGT $,DIRBUF$ 00500 ERR 'Module too big' 00501 ENDIF 23FE 00502 ORG MAXCOR$-2 23FE D200 00503 DW LAST-SYS10 ;Overlay size 00504 ; 1E00 00505 END SYS10 1E00 is the transfer address 00000 Total errors
[Copyright 1999,2002 Frank Durda IV, All Rights Reserved. Mirroring of any material on this page in any form is expressly prohibited. The official web site for this material is: http://nemesis.lonestar.org Contact this address for use clearances: clearance at nemesis.lonestar.org Comments and queries to this address: web_software_2011 at nemesis.lonestar.org]