diff --git a/library-asm/load.asm b/library-asm/load.asm index 838c0b15f..8f4c81391 100644 --- a/library-asm/load.asm +++ b/library-asm/load.asm @@ -1,6 +1,9 @@ #include once #include once -#include once + +#ifndef HIDE_LOAD_MSG +# include once +#endif LOAD_CODE: ; This function will implement the LOAD CODE Routine @@ -22,7 +25,9 @@ LOAD_CODE: LOCAL LD_CH_PR LOCAL LOAD_END LOCAL VR_CONTROL, VR_CONT_1, VR_CONT_2 + LOCAL MEM0 +MEM0 EQU 5C92h ; Temporary memory buffer HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage ; Must skip first 8 bytes used by ; PRINT routine @@ -134,7 +139,10 @@ LD_TYPE: cp 4 ; check if type in acceptable range 0 - 3. jr nc, LD_LOOK_H ; back to LD-LOOK-H with 4 and over. ; else A indicates type 0-3. +#ifndef HIDE_LOAD_MSG call PRINT_TAPE_MESSAGES; Print tape msg +#endif + ld hl, HEAD1 + 1 ; point HL to 1st descriptor. ld de, (TMP_HEADER) ; point DE to 2nd descriptor. ld b, 10 ; the count will be ten characters for the @@ -167,7 +175,9 @@ LD_NAME: ;; LD-CH-PR LD_CH_PR: +#ifndef HIDE_LOAD_MSG call __PRINTCHAR ; PRINT-A prints character +#endif djnz LD_NAME ; loop back to LD-NAME for ten characters. bit 7, c ; test if all matched @@ -175,8 +185,10 @@ LD_CH_PR: ; else print a terminal carriage return. +#ifndef HIDE_LOAD_MSG ld a, 0Dh ; prepare carriage return. call __PRINTCHAR ; PRINT-A outputs it. +#endif ld a, (HEAD1) cp 03 ; Only "bytes:" header is used un ZX BASIC @@ -197,7 +209,7 @@ VR_CONTROL: jr z, VR_CONT_1 ; forward to VR-CONT-1 if length unspecified ; e.g. LOAD "x" CODE sbc hl, de - jr nz, LOAD_ERROR ; Lenghts don't match + jr nz, LOAD_ERROR ; Lengths don't match VR_CONT_1: ld hl, HEAD1 + 13 ; fetch start of old data (orig. header) @@ -262,6 +274,7 @@ LD_BYTES_NOINTER: ENDP +#ifndef HIDE_LOAD_MSG PRINT_TAPE_MESSAGES: PROC @@ -310,3 +323,5 @@ PRINT_TAPE_MSG: ret ENDP + +#endif diff --git a/tests/functional/code00.asm b/tests/functional/code00.asm index e89aaf941..f1fc29575 100644 --- a/tests/functional/code00.asm +++ b/tests/functional/code00.asm @@ -496,6 +496,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ENDP #line 3 "load.asm" #line 1 "print.asm" +; vim:ts=4:sw=4:et: ; vim:ts=4:sw=4:et: ; PRINT command routine ; Does not print attribute. Use PRINT_STR or PRINT_NUM for that @@ -523,7 +524,7 @@ __SAVE_S_POSN: ; Saves ROW, COL from DE into S_POSN mem var. POSX EQU S_POSN ; Current POS X POSY EQU S_POSN + 1 ; Current POS Y ENDP -#line 6 "print.asm" +#line 7 "print.asm" #line 1 "cls.asm" ; JUMPS directly to spectrum CLS ; This routine does not clear lower screen @@ -560,7 +561,7 @@ __CLS_SCR: SCREEN_ADDR EQU (__CLS_SCR + 1) ; Address used by print and other screen routines ; to get the start of the screen ENDP -#line 7 "print.asm" +#line 8 "print.asm" #line 1 "in_screen.asm" __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -583,7 +584,7 @@ __OUT_OF_SCREEN_ERR: ld a, ERROR_OutOfScreen jp __STOP ; Saves error code and exits ENDP -#line 8 "print.asm" +#line 9 "print.asm" #line 1 "table_jump.asm" JUMP_HL_PLUS_2A: ; Does JP (HL + A*2) Modifies DE. Modifies A add a, a @@ -598,7 +599,7 @@ JUMP_HL_PLUS_DE: ; Does JP (HL + DE) ex de, hl CALL_HL: jp (hl) -#line 9 "print.asm" +#line 10 "print.asm" #line 1 "ink.asm" ; Sets ink color in ATTR_P permanently ; Parameter: Paper color in A register @@ -643,7 +644,7 @@ INK_TMP: ld de, ATTR_T jp __SET_INK ENDP -#line 10 "print.asm" +#line 11 "print.asm" #line 1 "paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register @@ -681,7 +682,7 @@ PAPER_TMP: ld de, ATTR_T jp __SET_PAPER ENDP -#line 11 "print.asm" +#line 12 "print.asm" #line 1 "flash.asm" ; Sets flash flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -716,7 +717,7 @@ FLASH_TMP: ld hl, ATTR_T jr __SET_FLASH ENDP -#line 12 "print.asm" +#line 13 "print.asm" #line 1 "bright.asm" ; Sets bright flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -751,7 +752,7 @@ BRIGHT_TMP: ld hl, ATTR_T jr __SET_BRIGHT ENDP -#line 13 "print.asm" +#line 14 "print.asm" #line 1 "over.asm" ; Sets OVER flag in P_FLAG permanently ; Parameter: OVER flag in bit 0 of A register @@ -817,7 +818,7 @@ OVER_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 14 "print.asm" +#line 15 "print.asm" #line 1 "inverse.asm" ; Sets INVERSE flag in P_FLAG permanently ; Parameter: INVERSE flag in bit 0 of A register @@ -843,7 +844,7 @@ INVERSE_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 15 "print.asm" +#line 16 "print.asm" #line 1 "bold.asm" ; Sets BOLD flag in P_FLAG permanently ; Parameter: BOLD flag in bit 0 of A register @@ -869,7 +870,7 @@ BOLD_TMP: ld (hl), a ret ENDP -#line 16 "print.asm" +#line 17 "print.asm" #line 1 "italic.asm" ; Sets ITALIC flag in P_FLAG permanently ; Parameter: ITALIC flag in bit 0 of A register @@ -897,7 +898,7 @@ ITALIC_TMP: ld (hl), a ret ENDP -#line 17 "print.asm" +#line 18 "print.asm" #line 1 "attr.asm" ; Attribute routines ; vim:ts=4:et:sw: @@ -955,7 +956,7 @@ SET_PIXEL_ADDR_ATTR: ld de, (SCREEN_ADDR) add hl, de ;; Final screen addr jp __SET_ATTR2 -#line 19 "print.asm" +#line 20 "print.asm" ; Putting a comment starting with @INIT
; will make the compiler to add a CALL to
; It is useful for initialization routines. @@ -995,14 +996,14 @@ __SCROLL: ; Scroll? ld hl, __TVFLAGS res 1, (hl) ret -#line 75 "/zxbasic/library-asm/print.asm" +#line 76 "/zxbasic/library-asm/print.asm" __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later call __SCROLL -#line 86 "/zxbasic/library-asm/print.asm" +#line 87 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1097,7 +1098,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence exx __PRINT_0Dh: ; Called WHEN printing CHR$(13) call __SCROLL -#line 209 "/zxbasic/library-asm/print.asm" +#line 210 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN __PRINT_EOL1: ; Another entry called from PRINT when next line required ld e, 0 @@ -1111,6 +1112,7 @@ __PRINT_AT1_END: ld hl, __TVFLAGS set 1, (hl) ld a, d +#line 230 "/zxbasic/library-asm/print.asm" __PRINT_EOL_END: ld d, a __PRINT_AT2_END: @@ -1323,6 +1325,7 @@ PRINT_AT: ; Changes cursor to ROW, COL ret nc ; Return if out of screen ld hl, __TVFLAGS res 1, (hl) +#line 482 "/zxbasic/library-asm/print.asm" jp __SAVE_S_POSN LOCAL __PRINT_COM LOCAL __BOLD @@ -1368,7 +1371,8 @@ __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_AT ; 22 AT DW __PRINT_TAB ; 23 TAB ENDP -#line 4 "load.asm" +#line 6 "load.asm" +#line 7 "/zxbasic/library-asm/load.asm" LOAD_CODE: ; This function will implement the LOAD CODE Routine ; Parameters in the stack are HL => String with LOAD name @@ -1387,11 +1391,13 @@ LOAD_CODE: LOCAL LD_CH_PR LOCAL LOAD_END LOCAL VR_CONTROL, VR_CONT_1, VR_CONT_2 + LOCAL MEM0 + MEM0 EQU 5C92h ; Temporary memory buffer HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage ; Must skip first 8 bytes used by ; PRINT routine TMP_HEADER EQU HEAD1 + 17 ; Temporary HEADER2 pointer storage -#line 34 "/zxbasic/library-asm/load.asm" +#line 39 "/zxbasic/library-asm/load.asm" TMP_FLAG EQU 23655 ; Uses BREG as a Temporary FLAG pop hl ; Return address pop af ; A = 1 => LOAD; A = 0 => VERIFY @@ -1476,6 +1482,7 @@ LD_TYPE: jr nc, LD_LOOK_H ; back to LD-LOOK-H with 4 and over. ; else A indicates type 0-3. call PRINT_TAPE_MESSAGES; Print tape msg +#line 145 "/zxbasic/library-asm/load.asm" ld hl, HEAD1 + 1 ; point HL to 1st descriptor. ld de, (TMP_HEADER) ; point DE to 2nd descriptor. ld b, 10 ; the count will be ten characters for the @@ -1502,12 +1509,14 @@ LD_NAME: ;; LD-CH-PR LD_CH_PR: call __PRINTCHAR ; PRINT-A prints character +#line 181 "/zxbasic/library-asm/load.asm" djnz LD_NAME ; loop back to LD-NAME for ten characters. bit 7, c ; test if all matched jr nz, LD_LOOK_H ; back to LD-LOOK-H if not ; else print a terminal carriage return. ld a, 0Dh ; prepare carriage return. call __PRINTCHAR ; PRINT-A outputs it. +#line 192 "/zxbasic/library-asm/load.asm" ld a, (HEAD1) cp 03 ; Only "bytes:" header is used un ZX BASIC jr nz, LD_LOOK_H @@ -1524,7 +1533,7 @@ VR_CONTROL: jr z, VR_CONT_1 ; forward to VR-CONT-1 if length unspecified ; e.g. LOAD "x" CODE sbc hl, de - jr nz, LOAD_ERROR ; Lenghts don't match + jr nz, LOAD_ERROR ; Lengths don't match VR_CONT_1: ld hl, HEAD1 + 13 ; fetch start of old data (orig. header) ld a, (hl) @@ -1572,7 +1581,7 @@ LD_BYTES_RET: LD_BYTES_NOINTER: ex af, af' ret -#line 262 "/zxbasic/library-asm/load.asm" +#line 274 "/zxbasic/library-asm/load.asm" ENDP PRINT_TAPE_MESSAGES: PROC @@ -1611,6 +1620,7 @@ PRINT_TAPE_MSG: pop bc ret ENDP +#line 328 "/zxbasic/library-asm/load.asm" #line 30 "code00.bas" #line 1 "loadstr.asm" ; Loads a string (ptr) from HL diff --git a/tests/functional/code01.asm b/tests/functional/code01.asm index 377ab9451..765b30625 100644 --- a/tests/functional/code01.asm +++ b/tests/functional/code01.asm @@ -496,6 +496,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ENDP #line 3 "load.asm" #line 1 "print.asm" +; vim:ts=4:sw=4:et: ; vim:ts=4:sw=4:et: ; PRINT command routine ; Does not print attribute. Use PRINT_STR or PRINT_NUM for that @@ -523,7 +524,7 @@ __SAVE_S_POSN: ; Saves ROW, COL from DE into S_POSN mem var. POSX EQU S_POSN ; Current POS X POSY EQU S_POSN + 1 ; Current POS Y ENDP -#line 6 "print.asm" +#line 7 "print.asm" #line 1 "cls.asm" ; JUMPS directly to spectrum CLS ; This routine does not clear lower screen @@ -560,7 +561,7 @@ __CLS_SCR: SCREEN_ADDR EQU (__CLS_SCR + 1) ; Address used by print and other screen routines ; to get the start of the screen ENDP -#line 7 "print.asm" +#line 8 "print.asm" #line 1 "in_screen.asm" __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -583,7 +584,7 @@ __OUT_OF_SCREEN_ERR: ld a, ERROR_OutOfScreen jp __STOP ; Saves error code and exits ENDP -#line 8 "print.asm" +#line 9 "print.asm" #line 1 "table_jump.asm" JUMP_HL_PLUS_2A: ; Does JP (HL + A*2) Modifies DE. Modifies A add a, a @@ -598,7 +599,7 @@ JUMP_HL_PLUS_DE: ; Does JP (HL + DE) ex de, hl CALL_HL: jp (hl) -#line 9 "print.asm" +#line 10 "print.asm" #line 1 "ink.asm" ; Sets ink color in ATTR_P permanently ; Parameter: Paper color in A register @@ -643,7 +644,7 @@ INK_TMP: ld de, ATTR_T jp __SET_INK ENDP -#line 10 "print.asm" +#line 11 "print.asm" #line 1 "paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register @@ -681,7 +682,7 @@ PAPER_TMP: ld de, ATTR_T jp __SET_PAPER ENDP -#line 11 "print.asm" +#line 12 "print.asm" #line 1 "flash.asm" ; Sets flash flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -716,7 +717,7 @@ FLASH_TMP: ld hl, ATTR_T jr __SET_FLASH ENDP -#line 12 "print.asm" +#line 13 "print.asm" #line 1 "bright.asm" ; Sets bright flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -751,7 +752,7 @@ BRIGHT_TMP: ld hl, ATTR_T jr __SET_BRIGHT ENDP -#line 13 "print.asm" +#line 14 "print.asm" #line 1 "over.asm" ; Sets OVER flag in P_FLAG permanently ; Parameter: OVER flag in bit 0 of A register @@ -817,7 +818,7 @@ OVER_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 14 "print.asm" +#line 15 "print.asm" #line 1 "inverse.asm" ; Sets INVERSE flag in P_FLAG permanently ; Parameter: INVERSE flag in bit 0 of A register @@ -843,7 +844,7 @@ INVERSE_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 15 "print.asm" +#line 16 "print.asm" #line 1 "bold.asm" ; Sets BOLD flag in P_FLAG permanently ; Parameter: BOLD flag in bit 0 of A register @@ -869,7 +870,7 @@ BOLD_TMP: ld (hl), a ret ENDP -#line 16 "print.asm" +#line 17 "print.asm" #line 1 "italic.asm" ; Sets ITALIC flag in P_FLAG permanently ; Parameter: ITALIC flag in bit 0 of A register @@ -897,7 +898,7 @@ ITALIC_TMP: ld (hl), a ret ENDP -#line 17 "print.asm" +#line 18 "print.asm" #line 1 "attr.asm" ; Attribute routines ; vim:ts=4:et:sw: @@ -955,7 +956,7 @@ SET_PIXEL_ADDR_ATTR: ld de, (SCREEN_ADDR) add hl, de ;; Final screen addr jp __SET_ATTR2 -#line 19 "print.asm" +#line 20 "print.asm" ; Putting a comment starting with @INIT
; will make the compiler to add a CALL to
; It is useful for initialization routines. @@ -995,14 +996,14 @@ __SCROLL: ; Scroll? ld hl, __TVFLAGS res 1, (hl) ret -#line 75 "/zxbasic/library-asm/print.asm" +#line 76 "/zxbasic/library-asm/print.asm" __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later call __SCROLL -#line 86 "/zxbasic/library-asm/print.asm" +#line 87 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1097,7 +1098,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence exx __PRINT_0Dh: ; Called WHEN printing CHR$(13) call __SCROLL -#line 209 "/zxbasic/library-asm/print.asm" +#line 210 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN __PRINT_EOL1: ; Another entry called from PRINT when next line required ld e, 0 @@ -1111,6 +1112,7 @@ __PRINT_AT1_END: ld hl, __TVFLAGS set 1, (hl) ld a, d +#line 230 "/zxbasic/library-asm/print.asm" __PRINT_EOL_END: ld d, a __PRINT_AT2_END: @@ -1323,6 +1325,7 @@ PRINT_AT: ; Changes cursor to ROW, COL ret nc ; Return if out of screen ld hl, __TVFLAGS res 1, (hl) +#line 482 "/zxbasic/library-asm/print.asm" jp __SAVE_S_POSN LOCAL __PRINT_COM LOCAL __BOLD @@ -1368,7 +1371,8 @@ __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_AT ; 22 AT DW __PRINT_TAB ; 23 TAB ENDP -#line 4 "load.asm" +#line 6 "load.asm" +#line 7 "/zxbasic/library-asm/load.asm" LOAD_CODE: ; This function will implement the LOAD CODE Routine ; Parameters in the stack are HL => String with LOAD name @@ -1387,11 +1391,13 @@ LOAD_CODE: LOCAL LD_CH_PR LOCAL LOAD_END LOCAL VR_CONTROL, VR_CONT_1, VR_CONT_2 + LOCAL MEM0 + MEM0 EQU 5C92h ; Temporary memory buffer HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage ; Must skip first 8 bytes used by ; PRINT routine TMP_HEADER EQU HEAD1 + 17 ; Temporary HEADER2 pointer storage -#line 34 "/zxbasic/library-asm/load.asm" +#line 39 "/zxbasic/library-asm/load.asm" TMP_FLAG EQU 23655 ; Uses BREG as a Temporary FLAG pop hl ; Return address pop af ; A = 1 => LOAD; A = 0 => VERIFY @@ -1476,6 +1482,7 @@ LD_TYPE: jr nc, LD_LOOK_H ; back to LD-LOOK-H with 4 and over. ; else A indicates type 0-3. call PRINT_TAPE_MESSAGES; Print tape msg +#line 145 "/zxbasic/library-asm/load.asm" ld hl, HEAD1 + 1 ; point HL to 1st descriptor. ld de, (TMP_HEADER) ; point DE to 2nd descriptor. ld b, 10 ; the count will be ten characters for the @@ -1502,12 +1509,14 @@ LD_NAME: ;; LD-CH-PR LD_CH_PR: call __PRINTCHAR ; PRINT-A prints character +#line 181 "/zxbasic/library-asm/load.asm" djnz LD_NAME ; loop back to LD-NAME for ten characters. bit 7, c ; test if all matched jr nz, LD_LOOK_H ; back to LD-LOOK-H if not ; else print a terminal carriage return. ld a, 0Dh ; prepare carriage return. call __PRINTCHAR ; PRINT-A outputs it. +#line 192 "/zxbasic/library-asm/load.asm" ld a, (HEAD1) cp 03 ; Only "bytes:" header is used un ZX BASIC jr nz, LD_LOOK_H @@ -1524,7 +1533,7 @@ VR_CONTROL: jr z, VR_CONT_1 ; forward to VR-CONT-1 if length unspecified ; e.g. LOAD "x" CODE sbc hl, de - jr nz, LOAD_ERROR ; Lenghts don't match + jr nz, LOAD_ERROR ; Lengths don't match VR_CONT_1: ld hl, HEAD1 + 13 ; fetch start of old data (orig. header) ld a, (hl) @@ -1572,7 +1581,7 @@ LD_BYTES_RET: LD_BYTES_NOINTER: ex af, af' ret -#line 262 "/zxbasic/library-asm/load.asm" +#line 274 "/zxbasic/library-asm/load.asm" ENDP PRINT_TAPE_MESSAGES: PROC @@ -1611,6 +1620,7 @@ PRINT_TAPE_MSG: pop bc ret ENDP +#line 328 "/zxbasic/library-asm/load.asm" #line 30 "code01.bas" #line 1 "loadstr.asm" ; Loads a string (ptr) from HL diff --git a/tests/functional/code02.asm b/tests/functional/code02.asm index 229692e1a..db717227b 100644 --- a/tests/functional/code02.asm +++ b/tests/functional/code02.asm @@ -496,6 +496,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ENDP #line 3 "load.asm" #line 1 "print.asm" +; vim:ts=4:sw=4:et: ; vim:ts=4:sw=4:et: ; PRINT command routine ; Does not print attribute. Use PRINT_STR or PRINT_NUM for that @@ -523,7 +524,7 @@ __SAVE_S_POSN: ; Saves ROW, COL from DE into S_POSN mem var. POSX EQU S_POSN ; Current POS X POSY EQU S_POSN + 1 ; Current POS Y ENDP -#line 6 "print.asm" +#line 7 "print.asm" #line 1 "cls.asm" ; JUMPS directly to spectrum CLS ; This routine does not clear lower screen @@ -560,7 +561,7 @@ __CLS_SCR: SCREEN_ADDR EQU (__CLS_SCR + 1) ; Address used by print and other screen routines ; to get the start of the screen ENDP -#line 7 "print.asm" +#line 8 "print.asm" #line 1 "in_screen.asm" __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -583,7 +584,7 @@ __OUT_OF_SCREEN_ERR: ld a, ERROR_OutOfScreen jp __STOP ; Saves error code and exits ENDP -#line 8 "print.asm" +#line 9 "print.asm" #line 1 "table_jump.asm" JUMP_HL_PLUS_2A: ; Does JP (HL + A*2) Modifies DE. Modifies A add a, a @@ -598,7 +599,7 @@ JUMP_HL_PLUS_DE: ; Does JP (HL + DE) ex de, hl CALL_HL: jp (hl) -#line 9 "print.asm" +#line 10 "print.asm" #line 1 "ink.asm" ; Sets ink color in ATTR_P permanently ; Parameter: Paper color in A register @@ -643,7 +644,7 @@ INK_TMP: ld de, ATTR_T jp __SET_INK ENDP -#line 10 "print.asm" +#line 11 "print.asm" #line 1 "paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register @@ -681,7 +682,7 @@ PAPER_TMP: ld de, ATTR_T jp __SET_PAPER ENDP -#line 11 "print.asm" +#line 12 "print.asm" #line 1 "flash.asm" ; Sets flash flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -716,7 +717,7 @@ FLASH_TMP: ld hl, ATTR_T jr __SET_FLASH ENDP -#line 12 "print.asm" +#line 13 "print.asm" #line 1 "bright.asm" ; Sets bright flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -751,7 +752,7 @@ BRIGHT_TMP: ld hl, ATTR_T jr __SET_BRIGHT ENDP -#line 13 "print.asm" +#line 14 "print.asm" #line 1 "over.asm" ; Sets OVER flag in P_FLAG permanently ; Parameter: OVER flag in bit 0 of A register @@ -817,7 +818,7 @@ OVER_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 14 "print.asm" +#line 15 "print.asm" #line 1 "inverse.asm" ; Sets INVERSE flag in P_FLAG permanently ; Parameter: INVERSE flag in bit 0 of A register @@ -843,7 +844,7 @@ INVERSE_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 15 "print.asm" +#line 16 "print.asm" #line 1 "bold.asm" ; Sets BOLD flag in P_FLAG permanently ; Parameter: BOLD flag in bit 0 of A register @@ -869,7 +870,7 @@ BOLD_TMP: ld (hl), a ret ENDP -#line 16 "print.asm" +#line 17 "print.asm" #line 1 "italic.asm" ; Sets ITALIC flag in P_FLAG permanently ; Parameter: ITALIC flag in bit 0 of A register @@ -897,7 +898,7 @@ ITALIC_TMP: ld (hl), a ret ENDP -#line 17 "print.asm" +#line 18 "print.asm" #line 1 "attr.asm" ; Attribute routines ; vim:ts=4:et:sw: @@ -955,7 +956,7 @@ SET_PIXEL_ADDR_ATTR: ld de, (SCREEN_ADDR) add hl, de ;; Final screen addr jp __SET_ATTR2 -#line 19 "print.asm" +#line 20 "print.asm" ; Putting a comment starting with @INIT
; will make the compiler to add a CALL to
; It is useful for initialization routines. @@ -995,14 +996,14 @@ __SCROLL: ; Scroll? ld hl, __TVFLAGS res 1, (hl) ret -#line 75 "/zxbasic/library-asm/print.asm" +#line 76 "/zxbasic/library-asm/print.asm" __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later call __SCROLL -#line 86 "/zxbasic/library-asm/print.asm" +#line 87 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1097,7 +1098,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence exx __PRINT_0Dh: ; Called WHEN printing CHR$(13) call __SCROLL -#line 209 "/zxbasic/library-asm/print.asm" +#line 210 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN __PRINT_EOL1: ; Another entry called from PRINT when next line required ld e, 0 @@ -1111,6 +1112,7 @@ __PRINT_AT1_END: ld hl, __TVFLAGS set 1, (hl) ld a, d +#line 230 "/zxbasic/library-asm/print.asm" __PRINT_EOL_END: ld d, a __PRINT_AT2_END: @@ -1323,6 +1325,7 @@ PRINT_AT: ; Changes cursor to ROW, COL ret nc ; Return if out of screen ld hl, __TVFLAGS res 1, (hl) +#line 482 "/zxbasic/library-asm/print.asm" jp __SAVE_S_POSN LOCAL __PRINT_COM LOCAL __BOLD @@ -1368,7 +1371,8 @@ __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_AT ; 22 AT DW __PRINT_TAB ; 23 TAB ENDP -#line 4 "load.asm" +#line 6 "load.asm" +#line 7 "/zxbasic/library-asm/load.asm" LOAD_CODE: ; This function will implement the LOAD CODE Routine ; Parameters in the stack are HL => String with LOAD name @@ -1387,11 +1391,13 @@ LOAD_CODE: LOCAL LD_CH_PR LOCAL LOAD_END LOCAL VR_CONTROL, VR_CONT_1, VR_CONT_2 + LOCAL MEM0 + MEM0 EQU 5C92h ; Temporary memory buffer HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage ; Must skip first 8 bytes used by ; PRINT routine TMP_HEADER EQU HEAD1 + 17 ; Temporary HEADER2 pointer storage -#line 34 "/zxbasic/library-asm/load.asm" +#line 39 "/zxbasic/library-asm/load.asm" TMP_FLAG EQU 23655 ; Uses BREG as a Temporary FLAG pop hl ; Return address pop af ; A = 1 => LOAD; A = 0 => VERIFY @@ -1476,6 +1482,7 @@ LD_TYPE: jr nc, LD_LOOK_H ; back to LD-LOOK-H with 4 and over. ; else A indicates type 0-3. call PRINT_TAPE_MESSAGES; Print tape msg +#line 145 "/zxbasic/library-asm/load.asm" ld hl, HEAD1 + 1 ; point HL to 1st descriptor. ld de, (TMP_HEADER) ; point DE to 2nd descriptor. ld b, 10 ; the count will be ten characters for the @@ -1502,12 +1509,14 @@ LD_NAME: ;; LD-CH-PR LD_CH_PR: call __PRINTCHAR ; PRINT-A prints character +#line 181 "/zxbasic/library-asm/load.asm" djnz LD_NAME ; loop back to LD-NAME for ten characters. bit 7, c ; test if all matched jr nz, LD_LOOK_H ; back to LD-LOOK-H if not ; else print a terminal carriage return. ld a, 0Dh ; prepare carriage return. call __PRINTCHAR ; PRINT-A outputs it. +#line 192 "/zxbasic/library-asm/load.asm" ld a, (HEAD1) cp 03 ; Only "bytes:" header is used un ZX BASIC jr nz, LD_LOOK_H @@ -1524,7 +1533,7 @@ VR_CONTROL: jr z, VR_CONT_1 ; forward to VR-CONT-1 if length unspecified ; e.g. LOAD "x" CODE sbc hl, de - jr nz, LOAD_ERROR ; Lenghts don't match + jr nz, LOAD_ERROR ; Lengths don't match VR_CONT_1: ld hl, HEAD1 + 13 ; fetch start of old data (orig. header) ld a, (hl) @@ -1572,7 +1581,7 @@ LD_BYTES_RET: LD_BYTES_NOINTER: ex af, af' ret -#line 262 "/zxbasic/library-asm/load.asm" +#line 274 "/zxbasic/library-asm/load.asm" ENDP PRINT_TAPE_MESSAGES: PROC @@ -1611,6 +1620,7 @@ PRINT_TAPE_MSG: pop bc ret ENDP +#line 328 "/zxbasic/library-asm/load.asm" #line 30 "code02.bas" #line 1 "loadstr.asm" ; Loads a string (ptr) from HL diff --git a/tests/functional/load02.asm b/tests/functional/load02.asm index 8013c39ac..039210f8f 100644 --- a/tests/functional/load02.asm +++ b/tests/functional/load02.asm @@ -501,6 +501,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ENDP #line 3 "load.asm" #line 1 "print.asm" +; vim:ts=4:sw=4:et: ; vim:ts=4:sw=4:et: ; PRINT command routine ; Does not print attribute. Use PRINT_STR or PRINT_NUM for that @@ -528,7 +529,7 @@ __SAVE_S_POSN: ; Saves ROW, COL from DE into S_POSN mem var. POSX EQU S_POSN ; Current POS X POSY EQU S_POSN + 1 ; Current POS Y ENDP -#line 6 "print.asm" +#line 7 "print.asm" #line 1 "cls.asm" ; JUMPS directly to spectrum CLS ; This routine does not clear lower screen @@ -565,7 +566,7 @@ __CLS_SCR: SCREEN_ADDR EQU (__CLS_SCR + 1) ; Address used by print and other screen routines ; to get the start of the screen ENDP -#line 7 "print.asm" +#line 8 "print.asm" #line 1 "in_screen.asm" __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -588,7 +589,7 @@ __OUT_OF_SCREEN_ERR: ld a, ERROR_OutOfScreen jp __STOP ; Saves error code and exits ENDP -#line 8 "print.asm" +#line 9 "print.asm" #line 1 "table_jump.asm" JUMP_HL_PLUS_2A: ; Does JP (HL + A*2) Modifies DE. Modifies A add a, a @@ -603,7 +604,7 @@ JUMP_HL_PLUS_DE: ; Does JP (HL + DE) ex de, hl CALL_HL: jp (hl) -#line 9 "print.asm" +#line 10 "print.asm" #line 1 "ink.asm" ; Sets ink color in ATTR_P permanently ; Parameter: Paper color in A register @@ -648,7 +649,7 @@ INK_TMP: ld de, ATTR_T jp __SET_INK ENDP -#line 10 "print.asm" +#line 11 "print.asm" #line 1 "paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register @@ -686,7 +687,7 @@ PAPER_TMP: ld de, ATTR_T jp __SET_PAPER ENDP -#line 11 "print.asm" +#line 12 "print.asm" #line 1 "flash.asm" ; Sets flash flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -721,7 +722,7 @@ FLASH_TMP: ld hl, ATTR_T jr __SET_FLASH ENDP -#line 12 "print.asm" +#line 13 "print.asm" #line 1 "bright.asm" ; Sets bright flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -756,7 +757,7 @@ BRIGHT_TMP: ld hl, ATTR_T jr __SET_BRIGHT ENDP -#line 13 "print.asm" +#line 14 "print.asm" #line 1 "over.asm" ; Sets OVER flag in P_FLAG permanently ; Parameter: OVER flag in bit 0 of A register @@ -822,7 +823,7 @@ OVER_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 14 "print.asm" +#line 15 "print.asm" #line 1 "inverse.asm" ; Sets INVERSE flag in P_FLAG permanently ; Parameter: INVERSE flag in bit 0 of A register @@ -848,7 +849,7 @@ INVERSE_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 15 "print.asm" +#line 16 "print.asm" #line 1 "bold.asm" ; Sets BOLD flag in P_FLAG permanently ; Parameter: BOLD flag in bit 0 of A register @@ -874,7 +875,7 @@ BOLD_TMP: ld (hl), a ret ENDP -#line 16 "print.asm" +#line 17 "print.asm" #line 1 "italic.asm" ; Sets ITALIC flag in P_FLAG permanently ; Parameter: ITALIC flag in bit 0 of A register @@ -902,7 +903,7 @@ ITALIC_TMP: ld (hl), a ret ENDP -#line 17 "print.asm" +#line 18 "print.asm" #line 1 "attr.asm" ; Attribute routines ; vim:ts=4:et:sw: @@ -960,7 +961,7 @@ SET_PIXEL_ADDR_ATTR: ld de, (SCREEN_ADDR) add hl, de ;; Final screen addr jp __SET_ATTR2 -#line 19 "print.asm" +#line 20 "print.asm" ; Putting a comment starting with @INIT
; will make the compiler to add a CALL to
; It is useful for initialization routines. @@ -1000,14 +1001,14 @@ __SCROLL: ; Scroll? ld hl, __TVFLAGS res 1, (hl) ret -#line 75 "/zxbasic/library-asm/print.asm" +#line 76 "/zxbasic/library-asm/print.asm" __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later call __SCROLL -#line 86 "/zxbasic/library-asm/print.asm" +#line 87 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1102,7 +1103,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence exx __PRINT_0Dh: ; Called WHEN printing CHR$(13) call __SCROLL -#line 209 "/zxbasic/library-asm/print.asm" +#line 210 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN __PRINT_EOL1: ; Another entry called from PRINT when next line required ld e, 0 @@ -1116,6 +1117,7 @@ __PRINT_AT1_END: ld hl, __TVFLAGS set 1, (hl) ld a, d +#line 230 "/zxbasic/library-asm/print.asm" __PRINT_EOL_END: ld d, a __PRINT_AT2_END: @@ -1328,6 +1330,7 @@ PRINT_AT: ; Changes cursor to ROW, COL ret nc ; Return if out of screen ld hl, __TVFLAGS res 1, (hl) +#line 482 "/zxbasic/library-asm/print.asm" jp __SAVE_S_POSN LOCAL __PRINT_COM LOCAL __BOLD @@ -1373,7 +1376,8 @@ __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_AT ; 22 AT DW __PRINT_TAB ; 23 TAB ENDP -#line 4 "load.asm" +#line 6 "load.asm" +#line 7 "/zxbasic/library-asm/load.asm" LOAD_CODE: ; This function will implement the LOAD CODE Routine ; Parameters in the stack are HL => String with LOAD name @@ -1392,11 +1396,13 @@ LOAD_CODE: LOCAL LD_CH_PR LOCAL LOAD_END LOCAL VR_CONTROL, VR_CONT_1, VR_CONT_2 + LOCAL MEM0 + MEM0 EQU 5C92h ; Temporary memory buffer HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage ; Must skip first 8 bytes used by ; PRINT routine TMP_HEADER EQU HEAD1 + 17 ; Temporary HEADER2 pointer storage -#line 34 "/zxbasic/library-asm/load.asm" +#line 39 "/zxbasic/library-asm/load.asm" TMP_FLAG EQU 23655 ; Uses BREG as a Temporary FLAG pop hl ; Return address pop af ; A = 1 => LOAD; A = 0 => VERIFY @@ -1481,6 +1487,7 @@ LD_TYPE: jr nc, LD_LOOK_H ; back to LD-LOOK-H with 4 and over. ; else A indicates type 0-3. call PRINT_TAPE_MESSAGES; Print tape msg +#line 145 "/zxbasic/library-asm/load.asm" ld hl, HEAD1 + 1 ; point HL to 1st descriptor. ld de, (TMP_HEADER) ; point DE to 2nd descriptor. ld b, 10 ; the count will be ten characters for the @@ -1507,12 +1514,14 @@ LD_NAME: ;; LD-CH-PR LD_CH_PR: call __PRINTCHAR ; PRINT-A prints character +#line 181 "/zxbasic/library-asm/load.asm" djnz LD_NAME ; loop back to LD-NAME for ten characters. bit 7, c ; test if all matched jr nz, LD_LOOK_H ; back to LD-LOOK-H if not ; else print a terminal carriage return. ld a, 0Dh ; prepare carriage return. call __PRINTCHAR ; PRINT-A outputs it. +#line 192 "/zxbasic/library-asm/load.asm" ld a, (HEAD1) cp 03 ; Only "bytes:" header is used un ZX BASIC jr nz, LD_LOOK_H @@ -1529,7 +1538,7 @@ VR_CONTROL: jr z, VR_CONT_1 ; forward to VR-CONT-1 if length unspecified ; e.g. LOAD "x" CODE sbc hl, de - jr nz, LOAD_ERROR ; Lenghts don't match + jr nz, LOAD_ERROR ; Lengths don't match VR_CONT_1: ld hl, HEAD1 + 13 ; fetch start of old data (orig. header) ld a, (hl) @@ -1577,7 +1586,7 @@ LD_BYTES_RET: LD_BYTES_NOINTER: ex af, af' ret -#line 262 "/zxbasic/library-asm/load.asm" +#line 274 "/zxbasic/library-asm/load.asm" ENDP PRINT_TAPE_MESSAGES: PROC @@ -1616,6 +1625,7 @@ PRINT_TAPE_MSG: pop bc ret ENDP +#line 328 "/zxbasic/library-asm/load.asm" #line 35 "load02.bas" #line 1 "loadstr.asm" ; Loads a string (ptr) from HL diff --git a/tests/functional/load03.asm b/tests/functional/load03.asm index 88cae6ec9..e0f12bf99 100644 --- a/tests/functional/load03.asm +++ b/tests/functional/load03.asm @@ -500,6 +500,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ENDP #line 3 "load.asm" #line 1 "print.asm" +; vim:ts=4:sw=4:et: ; vim:ts=4:sw=4:et: ; PRINT command routine ; Does not print attribute. Use PRINT_STR or PRINT_NUM for that @@ -527,7 +528,7 @@ __SAVE_S_POSN: ; Saves ROW, COL from DE into S_POSN mem var. POSX EQU S_POSN ; Current POS X POSY EQU S_POSN + 1 ; Current POS Y ENDP -#line 6 "print.asm" +#line 7 "print.asm" #line 1 "cls.asm" ; JUMPS directly to spectrum CLS ; This routine does not clear lower screen @@ -564,7 +565,7 @@ __CLS_SCR: SCREEN_ADDR EQU (__CLS_SCR + 1) ; Address used by print and other screen routines ; to get the start of the screen ENDP -#line 7 "print.asm" +#line 8 "print.asm" #line 1 "in_screen.asm" __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -587,7 +588,7 @@ __OUT_OF_SCREEN_ERR: ld a, ERROR_OutOfScreen jp __STOP ; Saves error code and exits ENDP -#line 8 "print.asm" +#line 9 "print.asm" #line 1 "table_jump.asm" JUMP_HL_PLUS_2A: ; Does JP (HL + A*2) Modifies DE. Modifies A add a, a @@ -602,7 +603,7 @@ JUMP_HL_PLUS_DE: ; Does JP (HL + DE) ex de, hl CALL_HL: jp (hl) -#line 9 "print.asm" +#line 10 "print.asm" #line 1 "ink.asm" ; Sets ink color in ATTR_P permanently ; Parameter: Paper color in A register @@ -647,7 +648,7 @@ INK_TMP: ld de, ATTR_T jp __SET_INK ENDP -#line 10 "print.asm" +#line 11 "print.asm" #line 1 "paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register @@ -685,7 +686,7 @@ PAPER_TMP: ld de, ATTR_T jp __SET_PAPER ENDP -#line 11 "print.asm" +#line 12 "print.asm" #line 1 "flash.asm" ; Sets flash flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -720,7 +721,7 @@ FLASH_TMP: ld hl, ATTR_T jr __SET_FLASH ENDP -#line 12 "print.asm" +#line 13 "print.asm" #line 1 "bright.asm" ; Sets bright flag in ATTR_P permanently ; Parameter: Paper color in A register @@ -755,7 +756,7 @@ BRIGHT_TMP: ld hl, ATTR_T jr __SET_BRIGHT ENDP -#line 13 "print.asm" +#line 14 "print.asm" #line 1 "over.asm" ; Sets OVER flag in P_FLAG permanently ; Parameter: OVER flag in bit 0 of A register @@ -821,7 +822,7 @@ OVER_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 14 "print.asm" +#line 15 "print.asm" #line 1 "inverse.asm" ; Sets INVERSE flag in P_FLAG permanently ; Parameter: INVERSE flag in bit 0 of A register @@ -847,7 +848,7 @@ INVERSE_TMP: ld (hl), a jp __SET_ATTR_MODE ENDP -#line 15 "print.asm" +#line 16 "print.asm" #line 1 "bold.asm" ; Sets BOLD flag in P_FLAG permanently ; Parameter: BOLD flag in bit 0 of A register @@ -873,7 +874,7 @@ BOLD_TMP: ld (hl), a ret ENDP -#line 16 "print.asm" +#line 17 "print.asm" #line 1 "italic.asm" ; Sets ITALIC flag in P_FLAG permanently ; Parameter: ITALIC flag in bit 0 of A register @@ -901,7 +902,7 @@ ITALIC_TMP: ld (hl), a ret ENDP -#line 17 "print.asm" +#line 18 "print.asm" #line 1 "attr.asm" ; Attribute routines ; vim:ts=4:et:sw: @@ -959,7 +960,7 @@ SET_PIXEL_ADDR_ATTR: ld de, (SCREEN_ADDR) add hl, de ;; Final screen addr jp __SET_ATTR2 -#line 19 "print.asm" +#line 20 "print.asm" ; Putting a comment starting with @INIT
; will make the compiler to add a CALL to
; It is useful for initialization routines. @@ -999,14 +1000,14 @@ __SCROLL: ; Scroll? ld hl, __TVFLAGS res 1, (hl) ret -#line 75 "/zxbasic/library-asm/print.asm" +#line 76 "/zxbasic/library-asm/print.asm" __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later call __SCROLL -#line 86 "/zxbasic/library-asm/print.asm" +#line 87 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1101,7 +1102,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence exx __PRINT_0Dh: ; Called WHEN printing CHR$(13) call __SCROLL -#line 209 "/zxbasic/library-asm/print.asm" +#line 210 "/zxbasic/library-asm/print.asm" call __LOAD_S_POSN __PRINT_EOL1: ; Another entry called from PRINT when next line required ld e, 0 @@ -1115,6 +1116,7 @@ __PRINT_AT1_END: ld hl, __TVFLAGS set 1, (hl) ld a, d +#line 230 "/zxbasic/library-asm/print.asm" __PRINT_EOL_END: ld d, a __PRINT_AT2_END: @@ -1327,6 +1329,7 @@ PRINT_AT: ; Changes cursor to ROW, COL ret nc ; Return if out of screen ld hl, __TVFLAGS res 1, (hl) +#line 482 "/zxbasic/library-asm/print.asm" jp __SAVE_S_POSN LOCAL __PRINT_COM LOCAL __BOLD @@ -1372,7 +1375,8 @@ __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_AT ; 22 AT DW __PRINT_TAB ; 23 TAB ENDP -#line 4 "load.asm" +#line 6 "load.asm" +#line 7 "/zxbasic/library-asm/load.asm" LOAD_CODE: ; This function will implement the LOAD CODE Routine ; Parameters in the stack are HL => String with LOAD name @@ -1391,11 +1395,13 @@ LOAD_CODE: LOCAL LD_CH_PR LOCAL LOAD_END LOCAL VR_CONTROL, VR_CONT_1, VR_CONT_2 + LOCAL MEM0 + MEM0 EQU 5C92h ; Temporary memory buffer HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage ; Must skip first 8 bytes used by ; PRINT routine TMP_HEADER EQU HEAD1 + 17 ; Temporary HEADER2 pointer storage -#line 34 "/zxbasic/library-asm/load.asm" +#line 39 "/zxbasic/library-asm/load.asm" TMP_FLAG EQU 23655 ; Uses BREG as a Temporary FLAG pop hl ; Return address pop af ; A = 1 => LOAD; A = 0 => VERIFY @@ -1480,6 +1486,7 @@ LD_TYPE: jr nc, LD_LOOK_H ; back to LD-LOOK-H with 4 and over. ; else A indicates type 0-3. call PRINT_TAPE_MESSAGES; Print tape msg +#line 145 "/zxbasic/library-asm/load.asm" ld hl, HEAD1 + 1 ; point HL to 1st descriptor. ld de, (TMP_HEADER) ; point DE to 2nd descriptor. ld b, 10 ; the count will be ten characters for the @@ -1506,12 +1513,14 @@ LD_NAME: ;; LD-CH-PR LD_CH_PR: call __PRINTCHAR ; PRINT-A prints character +#line 181 "/zxbasic/library-asm/load.asm" djnz LD_NAME ; loop back to LD-NAME for ten characters. bit 7, c ; test if all matched jr nz, LD_LOOK_H ; back to LD-LOOK-H if not ; else print a terminal carriage return. ld a, 0Dh ; prepare carriage return. call __PRINTCHAR ; PRINT-A outputs it. +#line 192 "/zxbasic/library-asm/load.asm" ld a, (HEAD1) cp 03 ; Only "bytes:" header is used un ZX BASIC jr nz, LD_LOOK_H @@ -1528,7 +1537,7 @@ VR_CONTROL: jr z, VR_CONT_1 ; forward to VR-CONT-1 if length unspecified ; e.g. LOAD "x" CODE sbc hl, de - jr nz, LOAD_ERROR ; Lenghts don't match + jr nz, LOAD_ERROR ; Lengths don't match VR_CONT_1: ld hl, HEAD1 + 13 ; fetch start of old data (orig. header) ld a, (hl) @@ -1576,7 +1585,7 @@ LD_BYTES_RET: LD_BYTES_NOINTER: ex af, af' ret -#line 262 "/zxbasic/library-asm/load.asm" +#line 274 "/zxbasic/library-asm/load.asm" ENDP PRINT_TAPE_MESSAGES: PROC @@ -1615,6 +1624,7 @@ PRINT_TAPE_MSG: pop bc ret ENDP +#line 328 "/zxbasic/library-asm/load.asm" #line 34 "load03.bas" #line 1 "loadstr.asm" ; Loads a string (ptr) from HL