[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 22:46:25 SYS4 - LS-DOS 6.2 Page 00001 00001 ;SYS4/ASM - LS-DOS 6.2 000A 00003 LF EQU 10 000D 00004 CR EQU 13 00005 *LIST OFF ;Get SYS0/EQU 00321 *LIST ON 0000 00322 *GET COPYCOM:3 ;Copyright message 00323 ; COPYCOM - File for Copyright COMment block 00324 ; 0000 00325 *GET BUILDVER/ASM:3 00326 ; 00327 ; Buildver/asm is a bit of a kludge since not all utilities can load 00328 ; equates from LDOS60 and still compile. LOWCORE and everybody else 00329 ; relies on this setting, and it eventually ends up in LDOS60/EQU 00330 ; for programs that can use that. 00331 ; FFFF 00332 @BLD631 EQU -1 ;<631>Build 631 distribution (LEVEL 1B) 00333 ; These switches activate patches made since the 1B release. 00334 ; It is important that all earlier patches be enabled when a higher 00335 ; patch is enabled. 00336 ; Patches C thru F were published in TMQ IV.iv, page 32 (NOTE: the 00337 ; patch addresses listed for SPOOL in SPOOL1/FIX are 19H high.) FFFF 00338 @BLD631C EQU -1 ;<631>Apply 1C patches (SETKI) FFFF 00339 @BLD631D EQU -1 ;<631>Apply 1D patches (DIR) FFFF 00340 @BLD631E EQU -1 ;<631>Apply 1E patches (DIR & MEMDISK/DCT) FFFF 00341 @BLD631F EQU -1 ;<631>Apply 1F patches (SPOOL) 00342 ; Patches G and H were published in TMQ V.i, pages 10 and 18/19. FFFF 00343 @BLD631G EQU -1 ;<631>Apply 1G patches (//KEYIN,DIR,DO *) FFFF 00344 @BLD631H EQU -1 ;<631>Apply 1H patches (MEMORY) 00345 ; 00346 ;End of BUILDVER/ASM 00347 IF @BLD631 00349 ELSE 00350 COM '<*(C) 1982,3,4,6 by LSI*>' 00351 ENDIF 00352 ; 1E00 00353 ORG 1E00H 00354 ; 1E00 C3AF1E 00355 SYS4 JP BEGIN 00356 ; 00357 ; Sentence table - Must be totally within one page 00358 ; 1E03 01 00359 MSG0 DB 1,2+80H 82 00360 ; no error 1E05 04 00361 MSG1 DB 4,2,5,6,9+80H 02 05 06 89 00362 ; parity error during header read 1E0A 08 00363 MSG2 DB 8,2,5,9+80H 02 05 89 00364 ; seek error during read 1E0E 0B 00365 MSG3 DB 11,7,5,9+80H 07 05 89 00366 ; lost data during read 1E12 04 00367 MSG4 DB 4,2,5,9+80H 02 05 89 00368 ; parity error during read 1E16 07 00369 MSG5 DB 7,27,12,44,5,9+80H 1B 0C 2C 05 89 00370 ; data record not found during read 1E1C 0D 00371 MSG6 DB 13,9,15,7,27+80H 09 0F 07 9B 00372 ; attempted to read system data record 1E21 0D 00373 MSG7 DB 13,9,14,7,27+80H 09 0E 07 9B 00374 ; attempted to read locked/deleted data record 1E26 2A 00375 MSG8 DB 42,12,51+0C0H 0C F3 00376 ; device not available 1E29 04 00377 MSG9 DB 4,2,5,6,10+80H 02 05 06 8A 00378 ; parity error during header write 1E2E 08 00379 MSG10 DB 8,2,5,10+80H 02 05 8A 00380 ; seek error during write 1E32 0B 00381 MSG11 DB 11,7,5,10+80H 07 05 8A 00382 ; lost data during write 1E36 04 00383 MSG12 DB 4,2,5,10+80H 02 05 8A 00384 ; parity error during write 1E3A 07 00385 MSG13 DB 7,27,12,44,5,10+80H 1B 0C 2C 05 8A 00386 ; data record not found during write 1E40 0A 00387 MSG14 DB 10,21,18,19,48+80H 15 12 13 B0 00388 ; write fault on disk drive 1E45 0A 00389 MSG15 DB 10,22,19+80H 16 93 00390 ; write protected disk 1E48 17 00391 MSG16 DB 23,24,26,25+80H 18 1A 99 00392 ; illegal logical file number 1E4C 10 00393 MSG17 DB 16,9,2+80H 09 82 00394 ; directory read error 1E4F 10 00395 MSG18 DB 16,10,2+80H 0A 82 00396 ; directory write error 1E52 17 00397 MSG19 DB 23,26,41+0C0H 1A E9 00398 ; illegal file name 1E55 22 00399 MSG20 DB 34,9,2+80H 09 82 00400 ; gat read error 1E58 22 00401 MSG21 DB 34,10,2+80H 0A 82 00402 ; gat write error 1E5B 23 00403 MSG22 DB 35,9,2+80H 09 82 00404 ; hit read error 1E5E 23 00405 MSG23 DB 35,10,2+80H 0A 82 00406 ; hit write error 1E61 1A 00407 MSG24 DB 26,12,45,16+0C0H 0C 2D D0 00408 ; file not in directory 1E65 1A 00409 MSG25 DB 26,46,49+0C0H 2E F1 00410 ; file access denied 1E68 01 00411 MSG26 DB 1,16,39,51+0C0H 10 27 F3 00412 ; directory space full 1E6C 13 00413 MSG27 DB 19,39,47+80H 27 AF 00414 ; disk space full 1E6F 1C 00415 MSG28 DB 28,29,26,32+80H 1D 1A A0 00416 ; end of file encountered 1E73 1B 00417 MSG29 DB 27,25,30,29,31+80H 19 1E 1D 9F 00418 ; record number out of range 1E78 10 00419 MSG30 DB 16,47,52,26+80H 2F 34 9A 00420 ; directory full - can't extend file 1E7C 32 00421 MSG31 DB 50,12,44+0C0H 0C EC 00422 ; program not found 1E7F 17 00423 MSG32 DB 23,48,25+0C0H 30 D9 00424 ; illegal drive number 1E82 01 00425 MSG33 DB 1,42,39,51+0C0H 2A 27 F3 00426 ; no device space available 1E86 26 00427 MSG34 DB 38,26,43,2+80H 1A 2B 82 00428 ; load file format error 1E8A 11 00429 MSG35 DB 17,21+80H 95 00430 ; memory fault 1E8C 0D 00431 MSG36 DB 13,38,9,40,17+80H 26 09 28 91 00432 ; attempted to load read only memory 1E91 17 00433 MSG37 DB 23,46,13,22,26+80H 2E 0D 16 9A 00434 ; illegal access attempted to protected file 1E96 1A 00435 MSG38 DB 26,12,53+0C0H 0C F5 00436 ; file not open 1E99 2A 00437 MSG39 DB 42,45,54+80H 2D B6 00438 ; device in use 1E9C 16 00439 MSG40 DB 22,15,42+80H 0F AA 00440 ; protected system device 1E9F 1A 00441 MSG41 DB 26,57,53!0C0H 39 F5 00442 ; file already open 1EA2 18 00443 MSG42 DB 24,27,58,53,21!0C0H 1B 3A 35 D5 00444 ; logical record length open fault 1EA7 38 00445 MSG43 DB 56,20,2!80H 14 82 00446 ; SVC parameter error 1EAA 14 00447 MSG44 DB 20,2!80H 82 00448 ; Parameter error 1EAC 25 00449 MSG45 DB 37,2,33+80H 02 A1 00450 ; unknown error code 1EAF E670 00451 BEGIN AND 70H ;What's the entry? 1EB1 C8 00452 RET Z ;Back on zero 1EB2 F5 00453 PUSH AF 1EB3 3A0D00 00454 LD A,(LSVC$) ;Grab the last SVC 1EB6 325E20 00455 LD (SVSVC+1),A ; and store for later 1EB9 F1 00456 POP AF 1EBA 22461F 00457 LD (EXTEND+1),HL ;Value if extended error 1EBD E3 00458 EX (SP),HL ;Grab return address 1EBE 22BF1F 00459 LD (ERR7+1),HL ; & stuff it 1EC1 E1 00460 POP HL 1EC2 F1 00461 POP AF ;Pop off the error code 1EC3 E3 00462 EX (SP),HL ;Get user ret address 1EC4 22241F 00463 LD (USRET+1),HL ; for long dsply 1EC7 E3 00464 EX (SP),HL 1EC8 E5 00465 PUSH HL ;Save regs 1EC9 D5 00466 PUSH DE 1ECA C5 00467 PUSH BC 1ECB 2A0B00 00468 LD HL,(SVCRET$) ;Grab last SVC return 1ECE 227220 00469 LD (SVRET+1),HL ; and save for dsply 1ED1 47 00470 LD B,A 1ED2 3A7C00 00471 LD A,(SFLAG$) ;Test expanded-error 1ED5 E640 00472 AND 40H ; flag bit in system flag 1ED7 A8 00473 XOR B 1ED8 A0 00474 AND B 1ED9 47 00475 LD B,A ;Xfer the result to B 1EDA F5 00476 PUSH AF ; & save for later 1EDB E63F 00477 AND 3FH ;Strip all but error # 1EDD 4F 00478 LD C,A ;Place error code -> C 1EDE 216C00 00479 LD HL,CFLAG$ ;If system error suppress 1EE1 CB76 00480 BIT 6,(HL) ; flag is set, don't 1EE3 C2B91F 00481 JP NZ,ERR6A ; display error message. 1EE6 CB7E 00482 BIT 7,(HL) ;If error-to-buffer is 1EE8 2005 00483 JR NZ,ERR0 ; set, put to user buf 1EEA 11001D 00484 LD DE,SBUFF$ 1EED 1806 00485 JR ERR0A ;Branch around force 1EEF CBF0 00486 ERR0 SET 6,B ;Force buffer to abbrev 1EF1 F1 00487 POP AF 1EF2 CBF7 00488 SET 6,A 1EF4 F5 00489 PUSH AF 1EF5 CB70 00490 ERR0A BIT 6,B ;Expanded error display? 1EF7 0600 00491 LD B,0 1EF9 2044 00492 JR NZ,ERR2 ;Jump if abbreviated 1EFB C5 00493 PUSH BC 1EFC 21C320 00494 LD HL,ERRMSG ;Pt to "< ERRCOD =... 1EFF 0E11 00495 LD C,MLEN ; & move to buffer 1F01 EDB0 00496 LDIR 1F03 C1 00497 POP BC 1F04 EB 00498 EX DE,HL ;Buffer ptr to HL 1F05 79 00499 LD A,C ;Error code to A 1F06 362F 00500 LD (HL),2FH ;Init for digit conv 1F08 34 00501 ERR1 INC (HL) ;Bump ASCII digit 1F09 D60A 00502 SUB 10 ; count by 10 1F0B 30FB 00503 JR NC,ERR1 ;Keep bumping 10's digit 1F0D 2C 00504 INC L ;Bump buffer ptr 1F0E C63A 00505 ADD A,3AH ;Convert rmndr to unit's 1F10 77 00506 LD (HL),A ; & place in buffer 1F11 2C 00507 INC L ;Bump to next pos 1F12 362C 00508 LD (HL),',' ;Stuff a comma & bump 1F14 2C 00509 INC L 1F15 3620 00510 LD (HL),' ' ; & a space 1F17 2C 00511 INC L 1F18 EB 00512 EX DE,HL ;Buffer ptr back to DE 1F19 C5 00513 PUSH BC 1F1A 21D420 00514 LD HL,ERRMSG1 ;"Returns to X'" 1F1D 010D00 00515 LD BC,M1LEN 1F20 EDB0 00516 LDIR 1F22 EB 00517 EX DE,HL ;HL back to buffer 1F23 110000 00518 USRET LD DE,$-$ ;User ret address 1F26 CDBD07 00519 CALL @HEX16 1F29 3E27 00520 LD A,27H ;"'" 1F2B 77 00521 LD (HL),A 1F2C 23 00522 INC HL 1F2D 360A 00523 LD (HL),LF ;End the line 1F2F 23 00524 INC HL 1F30 C1 00525 POP BC 1F31 CB71 00526 BIT 6,C ;Extended error? 1F33 2009 00527 JR NZ,ERR6 ;Go if not 1F35 362A 00528 LD (HL),'*' ;Make long msg look nice 1F37 23 00529 INC HL 1F38 362A 00530 LD (HL),'*' 1F3A 23 00531 INC HL 1F3B 3620 00532 LD (HL),' ' 1F3D 23 00533 INC HL 1F3E EB 00534 ERR6 EX DE,HL ;DE back to nxt buff line 1F3F 79 00535 ERR2 LD A,C 1F40 FE3F 00536 CP 63 ;"Extended error"? 1F42 2023 00537 JR NZ,ERR2A 00538 ; 00539 ; Do extended error only 00540 ; 1F44 D5 00541 PUSH DE ;Save buffer ptr 1F45 110000 00542 EXTEND LD DE,$-$ ;Ext. error value fm HL 1F48 21BD20 00543 LD HL,EXT$ERR+26 1F4B CDBD07 00544 CALL @HEX16 1F4E 21A320 00545 LD HL,EXT$ERR ;Point to error msg 1F51 D1 00546 POP DE ;Recvr buffer 1F52 E5 00547 PUSH HL ;Save msg start 1F53 C5 00548 PUSH BC 1F54 012000 00549 LD BC,M2LEN ;Len of error 1F57 EDB0 00550 LDIR ;Move into buffer 1F59 C1 00551 POP BC 1F5A 216C00 00552 LD HL,CFLAG$ ;See if to user buffer 1F5D CB7E 00553 BIT 7,(HL) 1F5F CBBE 00554 RES 7,(HL) ;Don't logot if so 1F61 E1 00555 POP HL 1F62 CC0005 00556 CALL Z,@LOGOT 1F65 1852 00557 JR ERR6A ; and exit 00558 ; 00559 ; Do regular (non-extended) error 00560 ; 1F67 3E2D 00561 ERR2A LD A,45 ;If error code is > 43, 1F69 B9 00562 CP C ; then set to 44 (max) 1F6A D5 00563 PUSH DE ;Save ptr to 1st char 1F6B 3001 00564 JR NC,ERR3 1F6D 4F 00565 LD C,A 1F6E 217821 00566 ERR3 LD HL,CODTAB ;Pt to start of code 1F71 09 00567 ADD HL,BC ; address table & index 1F72 6E 00568 LD L,(HL) ;P/u lo-order vector 1F73 261E 00569 LD H,MSG0<-8 ;Set hi-order vector 00570 ; 00571 ; HL now points to sentence table 00572 ; 1F75 7E 00573 ERR5 LD A,(HL) ;P/u word offset 1F76 E63F 00574 AND 3FH ; & strip any flags 1F78 47 00575 LD B,A ;Xfer word # to reg B 1F79 E5 00576 PUSH HL ;Save sentence pointer 1F7A 21A621 00577 LD HL,WORDS ;Dictionary start 1F7D 7E 00578 LP1 LD A,(HL) ;Scan through the table 1F7E 07 00579 RLCA ; counting words (bit 7 1F7F 23 00580 INC HL ; denotes word end) 1F80 30FB 00581 JR NC,LP1 ; until requested word 1F82 05 00582 DEC B ; is reached 1F83 20F8 00583 JR NZ,LP1 00584 ; 00585 ; Found the start of the desired word 00586 ; 1F85 7E 00587 LP2 LD A,(HL) ;Transfer the word until 1F86 07 00588 RLCA ; bit 7 set (last char) 1F87 CB3F 00589 SRL A ; while resetting bit-7 1F89 12 00590 LD (DE),A ;Stuff letter of word 1F8A 23 00591 INC HL ; & bump pointers 1F8B 13 00592 INC DE 1F8C 30F7 00593 JR NC,LP2 1F8E 3E20 00594 LD A,' ' ;Move a space into buffer 1F90 12 00595 LD (DE),A 1F91 13 00596 INC DE 1F92 E1 00597 POP HL ;Rcvr ptr to sentence 1F93 7E 00598 LD A,(HL) ;P/u this word byte 1F94 23 00599 INC HL 1F95 07 00600 RLCA ;Was this the last word? 1F96 30DD 00601 JR NC,ERR5 ;Loop if still more to go 1F98 E3 00602 EX (SP),HL ;Get ptr to 1st char 1F99 7E 00603 LD A,(HL) 1F9A CBAF 00604 RES 5,A ;Set it to UC 1F9C 77 00605 LD (HL),A 1F9D E1 00606 POP HL ;Get back sentence ptr 1F9E F1 00607 POP AF ;Rcvr error code 1F9F F5 00608 PUSH AF 1FA0 E5 00609 PUSH HL ;Save sentence ptr 1FA1 3E0D 00610 LD A,CR 1FA3 12 00611 LD (DE),A ;Stuff end-of-line 1FA4 216C00 00612 LD HL,CFLAG$ ;If to user buffer, 1FA7 CB7E 00613 BIT 7,(HL) ; then don't LOGOT 1FA9 CBBE 00614 RES 7,(HL) 1FAB 21001D 00615 LD HL,SBUFF$ ;Display the line 1FAE CC0005 00616 CALL Z,@LOGOT 1FB1 E1 00617 POP HL 1FB2 F1 00618 POP AF ;Rcvr word index 1FB3 F5 00619 PUSH AF 1FB4 CB77 00620 BIT 6,A ;Test if a disk error 1FB6 CCC41F 00621 CALL Z,DSPSPEC ;Get filespec if it is 1FB9 F1 00622 ERR6A POP AF 1FBA C1 00623 POP BC 1FBB D1 00624 POP DE 1FBC E1 00625 POP HL 1FBD B7 00626 OR A ;Ret to user if bit 7 1FBE FA0000 00627 ERR7 JP M,0 ; of error code is set 1FC1 C3081B 00628 JP @ABORT ; else abort 00629 ; 00630 ; Routine to display the filespec 00631 ; 1FC4 DDE5 00632 DSPSPEC PUSH IX 1FC6 DD2A2400 00633 LD IX,(JDCB$) ;P/u FCB vector 1FCA 2B 00634 DEC HL 1FCB CB76 00635 BIT 6,(HL) 1FCD 2030 00636 JR NZ,DSPC2 1FCF DD4E06 00637 LD C,(IX+6) ;Device 1st char or drive 1FD2 DD4607 00638 LD B,(IX+7) ;Device 2nd char or DEC 1FD5 DDCB007E 00639 BIT 7,(IX+0) ;Test if file or device 1FD9 205D 00640 JR NZ,RCVSPEC ;Jump if it is a file 1FDB 212821 00641 LD HL,OPN$DCB 1FDE 79 00642 DSPC1 LD A,C ;Possible devspec, 1st char 1FDF FE41 00643 CP 'A' 1FE1 3815 00644 JR C,DCBUNK ;C=do unknown 1FE3 FE5B 00645 CP 'Z'+1 1FE5 3011 00646 JR NC,DCBUNK ;Again, go if bad 1FE7 78 00647 LD A,B ;Check 2nd character 1FE8 FE30 00648 CP '0' 1FEA 380C 00649 JR C,DCBUNK 1FEC FE5B 00650 CP 'Z'+1 1FEE 3008 00651 JR NC,DCBUNK 1FF0 ED433A21 00652 LD (OPN$DCB+18),BC ;Stuff the device name 1FF2 00653 DSPC1A EQU $-2 1FF4 DDE1 00654 POP IX 1FF6 185F 00655 JR RSPC6 ;Go display it 00656 ; 1FF8 213D21 00657 DCBUNK LD HL,UNK$TYP 1FFB DDE1 00658 POP IX 1FFD 1858 00659 JR RSPC6 00660 ; 1FFF DD4E01 00661 DSPC2 LD C,(IX+1) ;P/u 1st char or vector 2002 DD4602 00662 LD B,(IX+2) ;P/u 2nd char or vector 2005 DD7E00 00663 LD A,(IX+0) 2008 21EB20 00664 LD HL,DEV$NAM 200B 22F21F 00665 LD (DSPC1A),HL ;Change dsply message 200E 21E120 00666 LD HL,DEV$EQ 2011 FE2A 00667 CP '*' ;If '*', go to device 2013 28C9 00668 JR Z,DSPC1 2015 DDE5 00669 PUSH IX ; else assume file 2017 E1 00670 POP HL 2018 11F520 00671 LD DE,FILE$EQ+7 ;Init "
[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]
![]()