@@ -496,6 +496,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed
496496 ENDP
497497#line 3 "load.asm"
498498#line 1 "print.asm"
499+ ; vim:ts=4:sw=4:et:
499500; vim:ts=4:sw=4:et:
500501 ; PRINT command routine
501502 ; 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.
523524 POSX EQU S_POSN ; Current POS X
524525 POSY EQU S_POSN + 1 ; Current POS Y
525526 ENDP
526- #line 6 "print.asm"
527+ #line 7 "print.asm"
527528#line 1 "cls.asm"
528529 ; JUMPS directly to spectrum CLS
529530 ; This routine does not clear lower screen
@@ -560,7 +561,7 @@ __CLS_SCR:
560561 SCREEN_ADDR EQU (__CLS_SCR + 1 ) ; Address used by print and other screen routines
561562 ; to get the start of the screen
562563 ENDP
563- #line 7 "print.asm"
564+ #line 8 "print.asm"
564565#line 1 "in_screen.asm"
565566__IN_SCREEN:
566567 ; Returns NO carry if current coords (D, E)
@@ -583,7 +584,7 @@ __OUT_OF_SCREEN_ERR:
583584 ld a , ERROR_OutOfScreen
584585 jp __STOP ; Saves error code and exits
585586 ENDP
586- #line 8 "print.asm"
587+ #line 9 "print.asm"
587588#line 1 "table_jump.asm"
588589JUMP_HL_PLUS_2A: ; Does JP (HL + A*2) Modifies DE. Modifies A
589590 add a , a
@@ -598,7 +599,7 @@ JUMP_HL_PLUS_DE: ; Does JP (HL + DE)
598599 ex de , hl
599600CALL_HL:
600601 jp (hl)
601- #line 9 "print.asm"
602+ #line 10 "print.asm"
602603#line 1 "ink.asm"
603604 ; Sets ink color in ATTR_P permanently
604605; Parameter: Paper color in A register
@@ -643,7 +644,7 @@ INK_TMP:
643644 ld de , ATTR_T
644645 jp __SET_INK
645646 ENDP
646- #line 10 "print.asm"
647+ #line 11 "print.asm"
647648#line 1 "paper.asm"
648649 ; Sets paper color in ATTR_P permanently
649650; Parameter: Paper color in A register
@@ -681,7 +682,7 @@ PAPER_TMP:
681682 ld de , ATTR_T
682683 jp __SET_PAPER
683684 ENDP
684- #line 11 "print.asm"
685+ #line 12 "print.asm"
685686#line 1 "flash.asm"
686687 ; Sets flash flag in ATTR_P permanently
687688; Parameter: Paper color in A register
@@ -716,7 +717,7 @@ FLASH_TMP:
716717 ld hl , ATTR_T
717718 jr __SET_FLASH
718719 ENDP
719- #line 12 "print.asm"
720+ #line 13 "print.asm"
720721#line 1 "bright.asm"
721722 ; Sets bright flag in ATTR_P permanently
722723; Parameter: Paper color in A register
@@ -751,7 +752,7 @@ BRIGHT_TMP:
751752 ld hl , ATTR_T
752753 jr __SET_BRIGHT
753754 ENDP
754- #line 13 "print.asm"
755+ #line 14 "print.asm"
755756#line 1 "over.asm"
756757 ; Sets OVER flag in P_FLAG permanently
757758; Parameter: OVER flag in bit 0 of A register
@@ -817,7 +818,7 @@ OVER_TMP:
817818 ld (hl) , a
818819 jp __SET_ATTR_MODE
819820 ENDP
820- #line 14 "print.asm"
821+ #line 15 "print.asm"
821822#line 1 "inverse.asm"
822823 ; Sets INVERSE flag in P_FLAG permanently
823824; Parameter: INVERSE flag in bit 0 of A register
@@ -843,7 +844,7 @@ INVERSE_TMP:
843844 ld (hl) , a
844845 jp __SET_ATTR_MODE
845846 ENDP
846- #line 15 "print.asm"
847+ #line 16 "print.asm"
847848#line 1 "bold.asm"
848849 ; Sets BOLD flag in P_FLAG permanently
849850; Parameter: BOLD flag in bit 0 of A register
@@ -869,7 +870,7 @@ BOLD_TMP:
869870 ld (hl) , a
870871 ret
871872 ENDP
872- #line 16 "print.asm"
873+ #line 17 "print.asm"
873874#line 1 "italic.asm"
874875 ; Sets ITALIC flag in P_FLAG permanently
875876; Parameter: ITALIC flag in bit 0 of A register
@@ -897,7 +898,7 @@ ITALIC_TMP:
897898 ld (hl) , a
898899 ret
899900 ENDP
900- #line 17 "print.asm"
901+ #line 18 "print.asm"
901902#line 1 "attr.asm"
902903 ; Attribute routines
903904; vim:ts=4:et:sw:
@@ -955,7 +956,7 @@ SET_PIXEL_ADDR_ATTR:
955956 ld de , (SCREEN_ADDR)
956957 add hl , de ;; Final screen addr
957958 jp __SET_ATTR2
958- #line 19 "print.asm"
959+ #line 20 "print.asm"
959960 ; Putting a comment starting with @INIT <address>
960961 ; will make the compiler to add a CALL to <address>
961962 ; It is useful for initialization routines.
@@ -995,14 +996,14 @@ __SCROLL: ; Scroll?
995996 ld hl , __TVFLAGS
996997 res 1 , (hl)
997998 ret
998- #line 75 "/zxbasic/library-asm/print.asm"
999+ #line 76 "/zxbasic/library-asm/print.asm"
9991000__PRINT_START:
10001001 cp ' '
10011002 jp c , __PRINT_SPECIAL ; Characters below ' ' are special ones
10021003 exx ; Switch to alternative registers
10031004 ex af , af' ; Saves a value (char to print) for later
10041005 call __SCROLL
1005- #line 86 "/zxbasic/library-asm/print.asm"
1006+ #line 87 "/zxbasic/library-asm/print.asm"
10061007 call __LOAD_S_POSN
10071008 ; At this point we have the new coord
10081009 ld hl , (SCREEN_ADDR)
@@ -1097,7 +1098,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence
10971098 exx
10981099__PRINT_0Dh: ; Called WHEN printing CHR$(13)
10991100 call __SCROLL
1100- #line 209 "/zxbasic/library-asm/print.asm"
1101+ #line 210 "/zxbasic/library-asm/print.asm"
11011102 call __LOAD_S_POSN
11021103__PRINT_EOL1: ; Another entry called from PRINT when next line required
11031104 ld e , 0
@@ -1111,6 +1112,7 @@ __PRINT_AT1_END:
11111112 ld hl , __TVFLAGS
11121113 set 1 , (hl)
11131114 ld a , d
1115+ #line 230 "/zxbasic/library-asm/print.asm"
11141116__PRINT_EOL_END:
11151117 ld d , a
11161118__PRINT_AT2_END:
@@ -1323,6 +1325,7 @@ PRINT_AT: ; Changes cursor to ROW, COL
13231325 ret nc ; Return if out of screen
13241326 ld hl , __TVFLAGS
13251327 res 1 , (hl)
1328+ #line 482 "/zxbasic/library-asm/print.asm"
13261329 jp __SAVE_S_POSN
13271330 LOCAL __PRINT_COM
13281331 LOCAL __BOLD
@@ -1368,7 +1371,8 @@ __PRINT_TABLE: ; Jump table for 0 .. 22 codes
13681371 DW __PRINT_ AT ; 22 AT
13691372 DW __PRINT_TAB ; 23 TAB
13701373 ENDP
1371- #line 4 "load.asm"
1374+ #line 6 "load.asm"
1375+ #line 7 "/zxbasic/library-asm/load.asm"
13721376LOAD_CODE:
13731377 ; This function will implement the LOAD CODE Routine
13741378 ; Parameters in the stack are HL => String with LOAD name
@@ -1387,11 +1391,13 @@ LOAD_CODE:
13871391 LOCAL LD_CH_PR
13881392 LOCAL LOAD_END
13891393 LOCAL VR_CONTROL , VR_CONT_1 , VR_CONT_2
1394+ LOCAL MEM0
1395+ MEM0 EQU 5C92h ; Temporary memory buffer
13901396 HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage
13911397 ; Must skip first 8 bytes used by
13921398 ; PRINT routine
13931399 TMP_HEADER EQU HEAD1 + 17 ; Temporary HEADER2 pointer storage
1394- #line 34 "/zxbasic/library-asm/load.asm"
1400+ #line 39 "/zxbasic/library-asm/load.asm"
13951401 TMP_FLAG EQU 23655 ; Uses BREG as a Temporary FLAG
13961402 pop hl ; Return address
13971403 pop af ; A = 1 => LOAD; A = 0 => VERIFY
@@ -1476,6 +1482,7 @@ LD_TYPE:
14761482 jr nc , LD_LOOK_H ; back to LD-LOOK-H with 4 and over.
14771483 ; else A indicates type 0-3.
14781484 call PRINT_TAPE_MESSAGES ; Print tape msg
1485+ #line 145 "/zxbasic/library-asm/load.asm"
14791486 ld hl , HEAD1 + 1 ; point HL to 1st descriptor.
14801487 ld de , (TMP_HEADER) ; point DE to 2nd descriptor.
14811488 ld b , 10 ; the count will be ten characters for the
@@ -1502,12 +1509,14 @@ LD_NAME:
15021509 ;; LD-CH-PR
15031510LD_CH_PR:
15041511 call __PRINTCHAR ; PRINT-A prints character
1512+ #line 181 "/zxbasic/library-asm/load.asm"
15051513 djnz LD_NAME ; loop back to LD-NAME for ten characters.
15061514 bit 7 , c ; test if all matched
15071515 jr nz , LD_LOOK_H ; back to LD-LOOK-H if not
15081516 ; else print a terminal carriage return.
15091517 ld a , 0Dh ; prepare carriage return.
15101518 call __PRINTCHAR ; PRINT-A outputs it.
1519+ #line 192 "/zxbasic/library-asm/load.asm"
15111520 ld a , (HEAD1)
15121521 cp 03 ; Only "bytes:" header is used un ZX BASIC
15131522 jr nz , LD_LOOK_H
@@ -1524,7 +1533,7 @@ VR_CONTROL:
15241533 jr z , VR_CONT_1 ; forward to VR-CONT-1 if length unspecified
15251534 ; e.g. LOAD "x" CODE
15261535 sbc hl , de
1527- jr nz , LOAD_ERROR ; Lenghts don't match
1536+ jr nz , LOAD_ERROR ; Lengths don't match
15281537VR_CONT_1:
15291538 ld hl , HEAD1 + 13 ; fetch start of old data (orig. header)
15301539 ld a , (hl)
@@ -1572,7 +1581,7 @@ LD_BYTES_RET:
15721581LD_BYTES_NOINTER:
15731582 ex af , af'
15741583 ret
1575- #line 262 "/zxbasic/library-asm/load.asm"
1584+ #line 274 "/zxbasic/library-asm/load.asm"
15761585 ENDP
15771586PRINT_TAPE_MESSAGES:
15781587 PROC
@@ -1611,6 +1620,7 @@ PRINT_TAPE_MSG:
16111620 pop bc
16121621 ret
16131622 ENDP
1623+ #line 328 "/zxbasic/library-asm/load.asm"
16141624#line 30 "code00.bas"
16151625#line 1 "loadstr.asm"
16161626 ; Loads a string (ptr) from HL
0 commit comments