diff --git a/asm/include/macros.asm b/asm/include/macros.asm index 1e93ac7..c016fea 100644 --- a/asm/include/macros.asm +++ b/asm/include/macros.asm @@ -1,3 +1,11 @@ +; Load DE with immediate value, using DB+DW encoding to work around Glass +; assembler forward reference scope limitation with LD instruction. +; DB 011H + DW nn produces identical machine code to LD DE,nn. +LDDE: MACRO ?val + DB 011H + DW ?val + ENDM + ; the following is only to get the original length of 2048 bytes ALIGN: MACRO ?boundary DS ?boundary - 1 - ($ + ?boundary - 1) % ?boundary, 0FFh diff --git a/asm/include/rfs_definitions.asm b/asm/include/rfs_definitions.asm index 656f8c7..54b2fff 100644 --- a/asm/include/rfs_definitions.asm +++ b/asm/include/rfs_definitions.asm @@ -52,7 +52,7 @@ VIDEOMODULE_ENA EQU 0 ; Targe ; to the target. BUILD_ROMDISK EQU 0 ; RFS is built for the MZ-80A RomDisk card. BUILD_SFD700 EQU 0 ; RFS is built for the SFD700 Floppy Disk Controller. -BUILD_PICOZ80 EQU 1 ; RFS is built for the SFD700 Floppy Disk Controller. +BUILD_PICOZ80 EQU 1 ; RFS is built for the picoZ80 board. BUILD_MZ80A EQU 0 ; RFS is customised to operate on an MZ-80A. BUILD_MZ700 EQU 1 ; RFS is customised to operate on an MZ-700. diff --git a/asm/rfs.asm b/asm/rfs.asm index 3da3dee..5694777 100644 --- a/asm/rfs.asm +++ b/asm/rfs.asm @@ -48,111 +48,6 @@ ; Bring in additional resources. INCLUDE "rfs_definitions.asm" - IF BUILD_SFD700 = 1 - ORG 0E000H - ALIGN 0E300H - ENDIF - - ; Monitor command table (SFD700). This table contains the list of recognised commands along with the - ; handler function and bank in which it is located. - ; - ; 7 6:3 2:0 - ; MATCH BANK SIZE -CMDTABLE2: IF BUILD_SFD700 = 1 - DB 000H | 038H | 003H - DB "ASM" ; Assembler. - DW ASM_MAIN - DB 000H | 000H | 005H - DB "BASIC" ; Load and run BASIC SA-5510. - DW LOADBASIC - DB 000H | 020H | 001H - DB 'B' ; Bell. - DW SGX - DB 000H | 000H | 003H - DB "CPM" ; Load and run CPM. - DW LOADCPM - DB 000H | 018H | 002H - DB "CP" ; Copy Memory. - DW MCOPY - DB 000H | 018H | 003H - DB "DUC" ; Dump SD Card file contents (hex or text). - DW DUMPSDCARD - DB 000H | 018H | 001H - DB 'C' ; Clear Memory. - DW INITMEMX - DB 000H | 038H | 004H - DB "DASM" ; Disassembler. - DW DASM_MAIN - DB 000H | 018H | 001H - DB 'D' ; Dump Memory. - DW DUMPX - DB 000H | 008H | 002H - DB "FL" ; 'FL' RFS Floppy load. - DW FDCK - DB 000H | 008H | 002H - DB "FD" ; 'FD' Floppy directory. - DW FDDIR - DB 000H | 058H | 001H - DB 'H' ; Help screen (bank 11). - DW HELP - DB 000H | 018H | 002H ; Bank 3, 2-char command. - DB "IN" ; I/O port input. - DW INX - DB 000H | 000H | 002H - DB "IR" ; List ROM directory. - DW DIRROM - DB 000H | 000H | 001H - DB 'J' ; Jump to address. - DW GOTOX - DB 000H | 020H | 004H - DB "LTNX" ; Load from CMT without auto execution. - DW LOADTAPENX - DB 000H | 020H | 002H - DB "LT" ; Load from CMT - DW LOADTAPE - DB 000H | 000H | 004H - DB "LRNX" ; Load from ROM without auto execution. - DW LOADROMNX - DB 000H | 000H | 002H - DB "LR" ; Load from ROM - DW LOADROM - DB 000H | 020H | 001H - DB "L" ; Original Load from CMT - DW LOADTAPE - DB 000H | 018H | 001H - DB 'M' ; Edit Memory. - DW MCORX - DB 000H | 018H | 003H ; Bank 3, 3-char command. - DB "OUT" ; I/O port output. - DW OUTX - DB 000H | 018H | 001H - DB 'P' ; Printer test. - DW PTESTX - DB 000H | 020H | 001H - DB 'R' ; Memory test. - DW MEMTEST - DB 000H | 020H | 002H - DB "ST" ; Save to CMT - DW SAVEX - DB 000H | 020H | 001H - DB 'S' ; Save to CMT - DW SAVEX - DB 000H | 000H | 004H - DB "TEST" ; A test function used in debugging. - DW LOCALTEST - DB 000H | 020H | 001H - DB 'T' ; Timer test. - DW TIMERTST - DB 000H | 000H | 001H - DB 'V' ; Verify CMT Save. - DW VRFYX - DB 0FFH ; END OF TABLE - ENDIF - - IF BUILD_SFD700 = 1 - ALIGN UROMADDR - ENDIF - ;============================================================ ; ; USER ROM BANK 0 - Main RFS Entry point and functions. @@ -269,8 +164,18 @@ _PRTDBG: LD HL,RFSJMPTABLE+3 ; Bank ; Enhanced function Jump table. ; This table is generally used by the monitor ROM to call functions within the User ROM. ;------------------------------------------------------------------------------------------ + IF BUILD_ROMDISK+BUILD_PICOZ80 = 1 PRTMZF: JP _PRTMZF ; UROMADDR+A0H - Print out an MZF header stored in the IBUFE location. PRTDBG: JP _PRTDBG ; UROMADDR+A3H - Print out debug information, if enabled. + ENDIF + IF BUILD_SFD700 = 1 + ; SFD700: Use DB+DW encoding for JP — Glass cannot resolve forward + ; references to labels in IF scope blocks via JP instruction. +PRTMZF: DB 0C3H ; JP _PRTMZF + DW _PRTMZF +PRTDBG: DB 0C3H ; JP _PRTDBG + DW _PRTDBG + ENDIF CMT_RDINF: JP _CMT_RDINF ; UROMADDR+A6H - Tape/SD intercept handler - Read Header CMT_RDDATA: JP _CMT_RDDATA ; UROMADDR+A9H - Tape/SD intercept handler - Read Data CMT_WRINF: JP _CMT_WRINF ; UROMADDR+ACH - Tape/SD intercept handler - Write Header @@ -379,10 +284,10 @@ SIGNON1: CALL DPCT LD A,(TZPU) OR A JR Z,SIGNON2 - LD DE,MSGSONTZ + LDDE MSGSONTZ JR SIGNON3 ; -SIGNON2: LD DE,MSGSON ; Sign on message, +SIGNON2: LDDE MSGSON ; Sign on message, SIGNON3: LD HL,PRINTMSG CALL BKSW0to6 ; JR ST1X @@ -398,7 +303,7 @@ SIGNON3: LD HL,PRINTMSG ; Place error code in C to print as a number and report with the error message. ADD A,'0' LD C,A - LD DE,MSGSDINITER + LDDE MSGSDINITER LD HL,PRINTMSG CALL BKSW0to6 ENDIF @@ -499,7 +404,7 @@ CMDNOCMP: LD A,(BUFER+1) ; If no JR Z,CMDCMPEND CP 00DH JR Z,CMDCMPEND - LD DE,MSGBADCMD + LDDE MSGBADCMD LD HL,PRINTMSG CALL BKSW0to6 CMDCMPEND: LD A,(RESULT) @@ -728,7 +633,7 @@ SETMODE80: IF BUILD_ROMDISK+BUILD_PICOZ80 = 1 JP MONIT ENDIF -NOTZPU: LD DE,MSGNOTZINST ; No tranZPUter installed. +NOTZPU: LDDE MSGNOTZINST ; No tranZPUter installed. LD HL,PRINTMSG CALL BKSW0to6 RET @@ -961,7 +866,7 @@ DIRROM: ;DI ; Disab LD A,1 ; Account for the title. LD (TMPLINECNT),A ; - LD DE,MSGRDIRLST ; Print out header. + LDDE MSGRDIRLST ; Print out header. LD HL,PRINTMSG CALL BKSW0to6 @@ -1152,7 +1057,7 @@ MROMLOAD0: PUSH BC ; Prese PUSH AF ; Preserve 7:6 of A which is upper bank select. LD A,(ROMBK1) ; Page in monitor so we can print a message. HWSELMROM - LD DE,MSGLOAD+1 ; Skip initial file type identifier. + LDDE MSGLOAD+1 ; Skip initial file type identifier. LD BC,NAME LD HL,PRINTMSG CALL BKSW0to6 @@ -1168,7 +1073,7 @@ LROMNTFND: POP HL ; Dont LD A,(ROMBK1) HWSELMROM LD HL,PRINTMSG - LD DE,MSGNOTFND ; Not found + LDDE MSGNOTFND ; Not found CALL BKSW0to6 LOADROMEND:;EI RET @@ -1179,7 +1084,7 @@ LOADROMEND:;EI LROMLOAD: PUSH BC ; PUSH BC ; Print Loading - LD DE,MSGLOAD+1 + LDDE MSGLOAD+1 LD BC,NAME LD HL,PRINTMSG CALL BKSW0to6 @@ -1491,14 +1396,14 @@ _CMT_VERIFY:CALL SETDRIVE ; Set d RET NZ CALL CHECKCMT JR Z,_VERIFY - LD DE,MSGNOVERIFY + LDDE MSGNOVERIFY JR SD_ERRMSG _VERIFY: JP ?VRFY -SD_INVDRV: LD DE,MSGINVDRV ; Invalid drive specified. +SD_INVDRV: LDDE MSGINVDRV ; Invalid drive specified. JR SD_ERRMSG -SD_NOTFND: LD DE,MSGNOTFND +SD_NOTFND: LDDE MSGNOTFND SD_ERRMSG: LD HL,PRINTMSG CALL BKSW0to6 ; Print message that file wasnt found. LD A,1 @@ -1513,7 +1418,7 @@ _CMT_DIR: CALL SETDRIVE ; Chang LD HL,DIRSDCARD CALL BKSW0to2 ; Call the standard RFS directory command. RET -_CMT_NODIR: LD DE,MSGNOCMTDIR +_CMT_NODIR: LDDE MSGNOCMTDIR JR SD_ERRMSG ; Stub to call the ASCII to Sharp ASCII conversion routine stored in Bank 5. @@ -1585,3 +1490,111 @@ MEND: INCLUDE "rfs_bank9.asm" INCLUDE "rfs_bank10.asm" INCLUDE "rfs_bank11.asm" + + ;============================================================ + ; + ; SFD700 COMMAND TABLE + ; + ; Placed after all bank includes so DW forward references to + ; functions in various IF blocks are resolved as backward refs. + ;============================================================ + IF BUILD_SFD700 = 1 + ORG 0E000H + ALIGN 0E300H + ENDIF + + ; Monitor command table (SFD700). This table contains the list of recognised commands along with the + ; handler function and bank in which it is located. + ; + ; 7 6:3 2:0 + ; MATCH BANK SIZE +CMDTABLE2: IF BUILD_SFD700 = 1 + DB 000H | 038H | 003H + DB "ASM" ; Assembler. + DW ASM_MAIN + DB 000H | 000H | 005H + DB "BASIC" ; Load and run BASIC SA-5510. + DW LOADBASIC + DB 000H | 020H | 001H + DB 'B' ; Bell. + DW SGX + DB 000H | 000H | 003H + DB "CPM" ; Load and run CPM. + DW LOADCPM + DB 000H | 018H | 002H + DB "CP" ; Copy Memory. + DW MCOPY + DB 000H | 018H | 003H + DB "DUC" ; Dump SD Card file contents (hex or text). + DW DUMPSDCARD + DB 000H | 018H | 001H + DB 'C' ; Clear Memory. + DW INITMEMX + DB 000H | 038H | 004H + DB "DASM" ; Disassembler. + DW DASM_MAIN + DB 000H | 018H | 001H + DB 'D' ; Dump Memory. + DW DUMPX + DB 000H | 008H | 002H + DB "FL" ; 'FL' RFS Floppy load. + DW FDCK + ; NB: FD/FDDIR command not available on SFD700 — FDDIR only exists + ; for ROMDISK/picoZ80 builds (MZ-700 WD1773 FDC). SFD700 uses + ; AFI ROM at F000 via FDCK for floppy operations. + DB 000H | 058H | 001H + DB 'H' ; Help screen (bank 11). + DW HELP + DB 000H | 018H | 002H ; Bank 3, 2-char command. + DB "IN" ; I/O port input. + DW INX + DB 000H | 000H | 002H + DB "IR" ; List ROM directory. + DW DIRROM + DB 000H | 000H | 001H + DB 'J' ; Jump to address. + DW GOTOX + DB 000H | 020H | 004H + DB "LTNX" ; Load from CMT without auto execution. + DW LOADTAPENX + DB 000H | 020H | 002H + DB "LT" ; Load from CMT + DW LOADTAPE + DB 000H | 000H | 004H + DB "LRNX" ; Load from ROM without auto execution. + DW LOADROMNX + DB 000H | 000H | 002H + DB "LR" ; Load from ROM + DW LOADROM + DB 000H | 020H | 001H + DB "L" ; Original Load from CMT + DW LOADTAPE + DB 000H | 018H | 001H + DB 'M' ; Edit Memory. + DW MCORX + DB 000H | 018H | 003H ; Bank 3, 3-char command. + DB "OUT" ; I/O port output. + DW OUTX + DB 000H | 018H | 001H + DB 'P' ; Printer test. + DW PTESTX + DB 000H | 020H | 001H + DB 'R' ; Memory test. + DW MEMTEST + DB 000H | 020H | 002H + DB "ST" ; Save to CMT + DW SAVEX + DB 000H | 020H | 001H + DB 'S' ; Save to CMT + DW SAVEX + DB 000H | 000H | 004H + DB "TEST" ; A test function used in debugging. + DW LOCALTEST + DB 000H | 020H | 001H + DB 'T' ; Timer test. + DW TIMERTST + DB 000H | 000H | 001H + DB 'V' ; Verify CMT Save. + DW VRFYX + DB 0FFH ; END OF TABLE + ENDIF diff --git a/asm/rfs_bank1.asm b/asm/rfs_bank1.asm index 000b85a..c452040 100644 --- a/asm/rfs_bank1.asm +++ b/asm/rfs_bank1.asm @@ -171,7 +171,7 @@ FLOPPY: IF BUILD_ROMDISK+BUILD_PICOZ80 = 1 CP 00Dh ; JR NZ,GETBOOTDSK ; CALL DSKINIT ; Initialise disk and flags. -L000F: LD DE,MSGBOOTDRV ; +L000F: LDDE MSGBOOTDRV ; LD HL,PRINTMSG CALL BKSW1to6 LD DE,011A3H ; @@ -202,7 +202,7 @@ L0049: LD C,(HL) ; INC HL ; INC DE ; DJNZ L0049 ; - LD DE,MSGIPLLOAD ; + LDDE MSGIPLLOAD ; LD HL,PRINTMSG CALL BKSW1to6 LD DE,0CE07H ; Program name stored at 8th byte in boot sector. @@ -226,10 +226,10 @@ NOTCPM: LD HL,(0CE14H) ; G LD HL,(0CE18H) ; Get the execution address JP (HL) ; And execute. -DSKLOADERR: LD DE,MSGLOADERR ; Loading error message +DSKLOADERR: LDDE MSGLOADERR ; Loading error message JR L008F ; (+003h) -L008C: LD DE,MSGDSKNOTMST ; This is not a boot/master disk message. +L008C: LDDE MSGDSKNOTMST ; This is not a boot/master disk message. L008F: LD HL,PRINTMSG CALL BKSW1to6 LD DE,ERRTONE ; Play error tone. @@ -557,7 +557,7 @@ L0300: IN A,(0D8H) ; State CP 00DH JR NZ,FD7BOOT CALL FD7INIT ; Initialise disk and flags. -FD7PRMPT: LD DE,MSGBOOTDRV +FD7PRMPT: LDDE MSGBOOTDRV LD HL,PRINTMSG CALL BKSW1to6 LD DE,011A3H @@ -594,7 +594,7 @@ FD7CHK: LD C,(HL) DJNZ FD7CHK ; ; Valid boot disk - print loading message and program name. - LD DE,MSGIPLLOAD + LDDE MSGIPLLOAD LD HL,PRINTMSG CALL BKSW1to6 LD DE,0CF07H ; Program name in boot sector. @@ -646,9 +646,9 @@ FD7EXEC: LD BC,00200H ; Defau ; ; Error handlers. FD7NOTMST: CALL FD7INIT - LD DE,MSGDSKNOTMST + LDDE MSGDSKNOTMST JR FD7ERR -FD7LOADERR: LD DE,MSGLOADERR +FD7LOADERR: LDDE MSGLOADERR FD7ERR: LD HL,PRINTMSG CALL BKSW1to6 LD DE,ERRTONE @@ -967,7 +967,7 @@ FDDIR_GO: LD (BPARA),A ; Store ADD A,'1' LD C,A PUSH BC - LD DE,MSGFDDIR + LDDE MSGFDDIR LD HL,PRINTMSG CALL BKSW1to6 POP BC @@ -1008,7 +1008,7 @@ FDDIR_IPL: LD A,(DE) LD HL,(0CF18H) PUSH HL LD BC,(0CF14H) - LD DE,MSGFDINFO + LDDE MSGFDINFO LD HL,PRINTMSG CALL BKSW1to6 POP BC @@ -1080,7 +1080,7 @@ FDDIR_ENT: ; Check type byte at (HL). 00 = empty/deleted, FF = unused → skip INC HL LD D,(HL) PUSH DE ; Stack: exec addr. - LD DE,MSGFDINFO + LDDE MSGFDINFO LD HL,PRINTMSG CALL BKSW1to6 POP BC ; Clean exec. diff --git a/asm/rfs_bank2.asm b/asm/rfs_bank2.asm index b69811c..4bbf691 100644 --- a/asm/rfs_bank2.asm +++ b/asm/rfs_bank2.asm @@ -1060,7 +1060,7 @@ GETDIRSD3: OR A DIRSDERR: EX DE,HL ; Print error message, show HL as it contains sector number where error occurred. PUSH HL POP BC ; HL to BC as the call requires the value to be displayed in BC. - LD DE,MSGSDRERR + LDDE MSGSDRERR CALL SDPRINT ; Print out the filename. POP DE POP BC @@ -1112,7 +1112,7 @@ WRSDDIRENT: LD A,(DIRSECBUF) ; Get t XOR A WRSDDIRENT1:OR A RET -DIRSDWERR: LD DE,MSGSDWERR +DIRSDWERR: LDDE MSGSDWERR PUSH HL POP BC ; HL to BC as the call requires the value to be displayed in BC. CALL SDPRINT ; Print out the filename. @@ -1139,7 +1139,7 @@ DIRSDCARD: LD A,1 ; Setup JR Z,DIRSDP ADD A,'0' DIRSDP: LD C,A ; C is printed as a character embedded in the message. - LD DE,MSGCDIRLST ; Print out header. + LDDE MSGCDIRLST ; Print out header. CALL SDPRINT ; Print out the header. ; DIRSD0: LD E,0 ; Directory entry number @@ -1263,11 +1263,11 @@ ERASESD: CALL FINDSDX JR NZ,ERASESD1 ; Failure, the report and exit. POP BC ; Get the directory entry number. LD B,0 - LD DE,MSGERASEDIR + LDDE MSGERASEDIR XOR A ; Success. JR SDPRINTRES ERASESD1: LD A,1 - LD DE,MSGERAFAIL ; Fail, print out message. + LDDE MSGERAFAIL ; Fail, print out message. SDPRINTRES: LD (RESULT),A SDPRINT: LD HL,PRINTMSG CALL BKSW2to6 ; Print out the filename. @@ -1294,7 +1294,7 @@ LOADSD2: LD (SDCOPY),A LD (RESULT),A CALL FINDSDX JP Z,LOADSD10 -LOADSD3: LD DE,MSGNOTFND +LOADSD3: LDDE MSGNOTFND JR SDPRINT ; Helper method for the CMT replacement functions3. This method is inter bank called to locate a file pointed to by DE and set the header information. @@ -1376,7 +1376,7 @@ LOADSD9A: LD (DTADR),DE JR LOADSDX ; Exit with ok. ; LOADSD10: CALL LOADSD9 ; Modularised file find as the CMT replacement functions need it. - LD DE,MSGLOAD+1 ; Skip initial CR. + LDDE MSGLOAD+1 ; Skip initial CR. LD BC,NAME CALL SDPRINT ; Print out the filename. CALL LOADSD11 @@ -1423,7 +1423,7 @@ LOADSD14: LD A,(SDAUTOEXEC) ; Autoe JR LOADSDEXIT ; ; Load only. -LOADSD15: LD DE,MSGCMTDATA ; Indicate where the program was loaded and the execution address. +LOADSD15: LDDE MSGCMTDATA ; Indicate where the program was loaded and the execution address. LD HL,(DTADR) PUSH HL LD HL,(EXADR) @@ -1438,10 +1438,10 @@ LOADSDEXIT: LD (RESULT),A ; 0 = N RET ; Not a binary file so cannot execute. -LOADSD17: LD DE,MSGNOTBIN +LOADSD17: LDDE MSGNOTBIN JR LOADSDERR2 -LOADSDERR: LD DE,MSGSDRERR ; Print out the filename. +LOADSDERR: LDDE MSGSDRERR ; Print out the filename. LD BC,(TMPCNT) LOADSDERR2: CALL SDPRINT LOADSDXERR: LD A,2 @@ -1476,7 +1476,7 @@ SAVESD1: LD (SDCOPY),A ; Find free slot. CALL GETDIRFREE JR NC,SAVESD4 - LD DE,MSGDIRFULL ; Directory is full so abort command. + LDDE MSGDIRFULL ; Directory is full so abort command. LD A,1 ; Directory full code. JP SDPRINTRES ; @@ -1484,7 +1484,7 @@ SAVESD4: PUSH DE ; Save PUSH HL LD B,0 LD C,E - LD DE,MSGSVDIRENT + LDDE MSGSVDIRENT CALL SDPRINT ; Print out the filename. POP HL ; HL points to the directory entry buffer. LD A,080H @@ -1599,7 +1599,7 @@ SAVESD8: ; Data written, now write out the directory entry. LD A,0 ; Success. LD (RESULT),A RET -SAVESD9: LD DE,MSGSVFAIL ; Fail, print out message. +SAVESD9: LDDE MSGSVFAIL ; Fail, print out message. LD A,1 ; Write failed code. JP SDPRINTRES ; Print out the filename. diff --git a/asm/rfs_bank3.asm b/asm/rfs_bank3.asm index 88fe710..f164cc2 100644 --- a/asm/rfs_bank3.asm +++ b/asm/rfs_bank3.asm @@ -163,9 +163,9 @@ TAPE2SD: ; Load from tape into memory, filling the tape CMT header and loadin LD A,(RESULT) OR A JR NZ,TAPE2SDERR - LD DE,MSGT2SDOK + LDDE MSGT2SDOK JR TAPE2SDERR2 -TAPE2SDERR: LD DE,MSGT2SDERR +TAPE2SDERR: LDDE MSGT2SDERR TAPE2SDERR2:LD HL,PRINTMSG CALL BKSW3to6 RET @@ -187,7 +187,7 @@ SD2TAPE: ; Load from SD, fill the CMT header then call CMT save. OR A JR NZ,SD2TAPEERR RET -SD2TAPEERR: LD DE,MSGSD2TERR +SD2TAPEERR: LDDE MSGSD2TERR JR TAPE2SDERR2 RET ;------------------------------------------------------------------------------- @@ -364,7 +364,7 @@ INITMEMX: CALL _2HEX JR NC,INITMEMX1 LD A,000H INITMEMX1: PUSH AF - LD DE,MSGINITM + LDDE MSGINITM LD HL,PRINTMSG CALL BKSW1to6 LD HL,1200h @@ -400,7 +400,7 @@ GETCMTPARM: CALL READ4HEX ; Start JR C,GETCMT1 LD (EXADR),HL ; buffer CALL NL - LD DE,MSGSAVE ; 'FILENAME? ' + LDDE MSGSAVE ; 'FILENAME? ' LD HL,PRINTMSG CALL BKSW2to6 ; Print out the filename. LD DE,BUFER @@ -428,7 +428,7 @@ READ4HEX: CALL HLHEX INC DE OR A ; Clear carry flag. RET -READ4HEXERR:LD DE,MSGREAD4HEX ; Load up error message, print and exit. +READ4HEXERR:LDDE MSGREAD4HEX ; Load up error message, print and exit. READ4HEXPRE:LD HL,PRINTMSG CALL BKSW1to6 SCF @@ -608,7 +608,7 @@ DUMPSD1B: LD A,(TMPSIZE) ; Read ; Print: "filename" CR Load:XXXX, Exec:YYYY, Size:ZZZZ CR ; 0xFF=stack[0]=Load, 0xFE=stack[1]=Exec, 0xFD=stack[2]=Size ; 0xFA=filename from BC - LD DE,MSGDCHEAD + LDDE MSGDCHEAD LD HL,(DTADRSTORE) ; Original MZF load address. PUSH HL ; Stack param 1 (0xFF). LD HL,(EXADR) diff --git a/asm/rfs_bank4.asm b/asm/rfs_bank4.asm index 6e787df..6ea42fe 100644 --- a/asm/rfs_bank4.asm +++ b/asm/rfs_bank4.asm @@ -162,7 +162,7 @@ LOADTAPE2: LD (CMTCOPY),A ; Set c LD (RESULT),A CALL ?RDI JP C,?ERX2 - LD DE,MSGLOAD ; 'LOADING ' + LDDE MSGLOAD ; 'LOADING ' LD BC,NAME LD HL,PRINTMSG CALL BKSW4to6 @@ -210,7 +210,7 @@ LOADTAPELM: LD A,(MEMSW) ; Perfo LD BC,00100h LD HL,(EXADR) ; Fetch exec address and run. JP (HL) -LOADTAPE6: LD DE,MSGCMTDATA +LOADTAPE6: LDDE MSGCMTDATA PUSH HL ; Load address as parameter 2. LD HL,(EXADR) PUSH HL ; Execution address as parameter 1. @@ -254,7 +254,7 @@ CMTWRI0: JR C,CMTWRI2 PUSH HL PUSH DE PUSH BC - LD DE,MSGCMTWRITE + LDDE MSGCMTWRITE LD BC,NAME LD HL,PRINTMSG CALL BKSW4to6 @@ -322,7 +322,7 @@ SAVEX1: LD (SDCOPY),A LD (DTADR),DE SAVEX2: CALL ?WRD ; data JR C,?ERX1 - LD DE,MSGSAVEOK ; 'OK!' + LDDE MSGSAVEOK ; 'OK!' LD HL,PRINTMSG CALL BKSW4to6 LD A,0 ; Success. @@ -332,7 +332,7 @@ SAVEX2: CALL ?WRD ; data JR NZ,?ERX3 LD (RESULT),A ; Set break key pressed code. RET Z -?ERX3: LD DE,MSGE1 ; 'CHECK SUM ER.' +?ERX3: LDDE MSGE1 ; 'CHECK SUM ER.' LD HL,PRINTMSG CALL BKSW4to6 RET @@ -342,7 +342,7 @@ SAVEX2: CALL ?WRD ; data ; VRFYX: CALL ?VRFY JP C,?ERX2 - LD DE,MSGOK ; 'OK!' + LDDE MSGOK ; 'OK!' LD HL,PRINTMSG CALL BKSW4to6 RET @@ -773,7 +773,7 @@ QDGO: LD (RESULT),A ; Store JP C,QDERR_EXIT ; Error reading header ; Print "Loading " - LD DE,MSGLOAD+1 ; Skip leading CR + LDDE MSGLOAD+1 ; Skip leading CR LD BC,NAME LD HL,PRINTMSG CALL BKSW4to6 @@ -812,7 +812,7 @@ QDBOOT1: LD (QDLOADADDR),HL CALL QDMOTOR_OFF ; Display loaded file info (QD: DTADR=size, EXADR=load addr) - LD DE,MSGCMTDATA + LDDE MSGCMTDATA LD HL,(QDLOADADDR) PUSH HL ; Load address for 0FEH PUSH HL ; Exec address for 0FFH (same for QD) @@ -858,17 +858,17 @@ QDERR_EXIT: ; Common error/return handler — motor off RET NC ; No error, just return ; Display error message based on error code in A - LD DE,MSGQDERR ; Default: "QD: Read error" + LDDE MSGQDERR ; Default: "QD: Read error" CP 028H JR Z,QDERR_SHOW ; End of tape (file not found) CP 032H JR NZ,QDERR_SHOW2 - LD DE,MSGQDERR ; Not ready + LDDE MSGQDERR ; Not ready JR QDERR_SHOW QDERR_SHOW2: CP 036H JR NZ,QDERR_SHOW - LD DE,MSGQDFMT ; Unformat / bad format + LDDE MSGQDFMT ; Unformat / bad format QDERR_SHOW: LD HL,PRINTMSG CALL BKSW4to6 RET diff --git a/asm/rfs_bank7.asm b/asm/rfs_bank7.asm index 8cd5eb0..78a8027 100644 --- a/asm/rfs_bank7.asm +++ b/asm/rfs_bank7.asm @@ -195,7 +195,7 @@ DASM_SPCOUT: CALL PRNTS ; Pad with spaces to 15 bytes LD HL,ASM_BUF ; Send Assembly string EX DE,HL - LD HL,PRTSTR + LD HL,PRINTMSG CALL BKSW7to6 LD A,(COUNT_C) ; Get Row Count