@@ -111,7 +111,7 @@ __END_PROGRAM:
111111 ret
112112__CALL_BACK__:
113113 DEFW 0
114- #line 1 "array.asm"
114+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ array.asm"
115115; vim: ts=4:et:sw=4:
116116 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
117117 ; (a.k.a. Boriel)
@@ -127,7 +127,7 @@ __CALL_BACK__:
127127 ; O = [a0 + b0 * (a1 + b1 * (a2 + ... bN-2(aN-1)))]
128128; What I will do here is to calculate the following sequence:
129129 ; ((aN-1 * bN-2) + aN-2) * bN-3 + ...
130- #line 1 "mul16.asm"
130+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ mul16.asm"
131131__MUL16: ; Mutiplies HL with the last value stored into de stack
132132 ; Works for both signed and unsigned
133133 PROC
@@ -151,8 +151,8 @@ __MUL16NOADD:
151151 djnz __MUL16LOOP
152152 ret ; Result in hl (16 lower bits)
153153 ENDP
154- #line 20 "array.asm"
155- #line 24 "/zxbasic/arch/zx48k/library-asm/array.asm"
154+ #line 20 "/zxbasic/src/arch/zx48k/library-asm/ array.asm"
155+ #line 24 "/zxbasic/src/ arch/zx48k/library-asm/array.asm"
156156__ARRAY_PTR: ;; computes an array offset from a pointer
157157 ld c , (hl)
158158 inc hl
@@ -181,9 +181,9 @@ __ARRAY:
181181 exx
182182 ld hl , 0 ; HL = Offset "accumulator"
183183LOOP :
184- #line 62 "/zxbasic/arch/zx48k/library-asm/array.asm"
184+ #line 62 "/zxbasic/src/ arch/zx48k/library-asm/array.asm"
185185 pop bc ; Get next index (Ai) from the stack
186- #line 72 "/zxbasic/arch/zx48k/library-asm/array.asm"
186+ #line 72 "/zxbasic/src/ arch/zx48k/library-asm/array.asm"
187187 add hl , bc ; Adds current index
188188 exx ; Checks if B'C' = 0
189189 ld a , b ; Which means we must exit (last element is not multiplied by anything)
@@ -202,15 +202,15 @@ LOOP:
202202ARRAY_END:
203203 ld a , (hl)
204204 exx
205- #line 101 "/zxbasic/arch/zx48k/library-asm/array.asm"
205+ #line 101 "/zxbasic/src/ arch/zx48k/library-asm/array.asm"
206206 LOCAL ARRAY_SIZE_LOOP
207207 ex de , hl
208208 ld hl , 0
209209 ld b , a
210210ARRAY_SIZE_LOOP:
211211 add hl , de
212212 djnz ARRAY_SIZE_LOOP
213- #line 111 "/zxbasic/arch/zx48k/library-asm/array.asm"
213+ #line 111 "/zxbasic/src/ arch/zx48k/library-asm/array.asm"
214214 ex de , hl
215215 ld hl , (TMP_ARR_PTR)
216216 ld a , (hl)
@@ -240,12 +240,12 @@ TMP_ARR_PTR:
240240 DW 0 ; temporary storage for pointer to tables
241241 ENDP
242242#line 52 "astore16.bas"
243- #line 1 "print.asm"
243+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
244244; vim:ts=4:sw=4:et:
245245; vim:ts=4:sw=4:et:
246246 ; PRINT command routine
247247 ; Does not print attribute. Use PRINT_STR or PRINT_NUM for that
248- #line 1 "sposn.asm"
248+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ sposn.asm"
249249 ; Printing positioning library.
250250 PROC
251251 LOCAL ECHO_E
@@ -269,8 +269,8 @@ __SAVE_S_POSN: ; Saves ROW, COL from DE into S_POSN mem var.
269269 POSX EQU S_POSN ; Current POS X
270270 POSY EQU S_POSN + 1 ; Current POS Y
271271 ENDP
272- #line 7 "print.asm"
273- #line 1 "cls.asm"
272+ #line 7 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
273+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ cls.asm"
274274 ; JUMPS directly to spectrum CLS
275275 ; This routine does not clear lower screen
276276 ;CLS EQU 0DAFh
@@ -306,9 +306,9 @@ __CLS_SCR:
306306 SCREEN_ADDR EQU (__CLS_SCR + 1 ) ; Address used by print and other screen routines
307307 ; to get the start of the screen
308308 ENDP
309- #line 8 "print.asm"
310- #line 1 "in_screen.asm"
311- #line 1 "error.asm"
309+ #line 8 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
310+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ in_screen.asm"
311+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ error.asm"
312312 ; Simple error control routines
313313; vim:ts=4:et:
314314 ERR_NR EQU 23610 ; Error code system variable
@@ -340,7 +340,7 @@ __ERROR_CODE:
340340__STOP:
341341 ld (ERR_NR) , a
342342 ret
343- #line 3 "in_screen.asm"
343+ #line 3 "/zxbasic/src/arch/zx48k/library-asm/ in_screen.asm"
344344__IN_SCREEN:
345345 ; Returns NO carry if current coords (D, E)
346346 ; are OUT of the screen limits (MAXX, MAXY)
@@ -362,8 +362,8 @@ __OUT_OF_SCREEN_ERR:
362362 ld a , ERROR_OutOfScreen
363363 jp __STOP ; Saves error code and exits
364364 ENDP
365- #line 9 "print.asm"
366- #line 1 "table_jump.asm"
365+ #line 9 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
366+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ table_jump.asm"
367367JUMP_HL_PLUS_2A: ; Does JP (HL + A*2) Modifies DE. Modifies A
368368 add a , a
369369JUMP_HL_PLUS_A: ; Does JP (HL + A) Modifies DE
@@ -377,11 +377,11 @@ JUMP_HL_PLUS_DE: ; Does JP (HL + DE)
377377 ex de , hl
378378CALL_HL:
379379 jp (hl)
380- #line 10 "print.asm"
381- #line 1 "ink.asm"
380+ #line 10 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
381+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ ink.asm"
382382 ; Sets ink color in ATTR_P permanently
383383; Parameter: Paper color in A register
384- #line 1 "const.asm"
384+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ const.asm"
385385 ; Global constants
386386 P_FLAG EQU 23697
387387 FLAGS2 EQU 23681
@@ -390,7 +390,7 @@ CALL_HL:
390390 CHARS EQU 23606 ; Pointer to ROM/RAM Charset
391391 UDG EQU 23675 ; Pointer to UDG Charset
392392 MEM0 EQU 5C92h ; Temporary memory buffer used by ROM chars
393- #line 5 "ink.asm"
393+ #line 5 "/zxbasic/src/arch/zx48k/library-asm/ ink.asm"
394394INK:
395395 PROC
396396 LOCAL __SET_INK
@@ -422,8 +422,8 @@ INK_TMP:
422422 ld de , ATTR_T
423423 jp __SET_INK
424424 ENDP
425- #line 11 "print.asm"
426- #line 1 "paper.asm"
425+ #line 11 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
426+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ paper.asm"
427427 ; Sets paper color in ATTR_P permanently
428428; Parameter: Paper color in A register
429429PAPER:
@@ -460,8 +460,8 @@ PAPER_TMP:
460460 ld de , ATTR_T
461461 jp __SET_PAPER
462462 ENDP
463- #line 12 "print.asm"
464- #line 1 "flash.asm"
463+ #line 12 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
464+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ flash.asm"
465465 ; Sets flash flag in ATTR_P permanently
466466; Parameter: Paper color in A register
467467FLASH:
@@ -495,8 +495,8 @@ FLASH_TMP:
495495 ld hl , ATTR_T
496496 jr __SET_FLASH
497497 ENDP
498- #line 13 "print.asm"
499- #line 1 "bright.asm"
498+ #line 13 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
499+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ bright.asm"
500500 ; Sets bright flag in ATTR_P permanently
501501; Parameter: Paper color in A register
502502BRIGHT:
@@ -530,12 +530,12 @@ BRIGHT_TMP:
530530 ld hl , ATTR_T
531531 jr __SET_BRIGHT
532532 ENDP
533- #line 14 "print.asm"
534- #line 1 "over.asm"
533+ #line 14 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
534+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ over.asm"
535535 ; Sets OVER flag in P_FLAG permanently
536536; Parameter: OVER flag in bit 0 of A register
537- #line 1 "copy_attr.asm"
538- #line 4 "/zxbasic/arch/zx48k/library-asm/copy_attr.asm"
537+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ copy_attr.asm"
538+ #line 4 "/zxbasic/src/ arch/zx48k/library-asm/copy_attr.asm"
539539COPY_ATTR:
540540 ; Just copies current permanent attribs to temporal attribs
541541 ; and sets print mode
@@ -575,7 +575,7 @@ TABLE:
575575 xor (hl) ; OVER 1 MODE
576576 and (hl) ; OVER 2 MODE
577577 or (hl) ; OVER 3 MODE
578- #line 65 "/zxbasic/arch/zx48k/library-asm/copy_attr.asm"
578+ #line 65 "/zxbasic/src/ arch/zx48k/library-asm/copy_attr.asm"
579579__REFRESH_TMP:
580580 ld a , (hl)
581581 and 10101010b
@@ -585,7 +585,7 @@ __REFRESH_TMP:
585585 ld (hl) , a
586586 ret
587587 ENDP
588- #line 4 "over.asm"
588+ #line 4 "/zxbasic/src/arch/zx48k/library-asm/ over.asm"
589589OVER:
590590 PROC
591591 ld c , a ; saves it for later
@@ -619,8 +619,8 @@ OVER_TMP:
619619 ld (hl) , a
620620 jp __SET_ATTR_MODE
621621 ENDP
622- #line 15 "print.asm"
623- #line 1 "inverse.asm"
622+ #line 15 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
623+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ inverse.asm"
624624 ; Sets INVERSE flag in P_FLAG permanently
625625; Parameter: INVERSE flag in bit 0 of A register
626626INVERSE:
@@ -645,8 +645,8 @@ INVERSE_TMP:
645645 ld (hl) , a
646646 jp __SET_ATTR_MODE
647647 ENDP
648- #line 16 "print.asm"
649- #line 1 "bold.asm"
648+ #line 16 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
649+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ bold.asm"
650650 ; Sets BOLD flag in P_FLAG permanently
651651; Parameter: BOLD flag in bit 0 of A register
652652BOLD:
@@ -671,8 +671,8 @@ BOLD_TMP:
671671 ld (hl) , a
672672 ret
673673 ENDP
674- #line 17 "print.asm"
675- #line 1 "italic.asm"
674+ #line 17 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
675+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ italic.asm"
676676 ; Sets ITALIC flag in P_FLAG permanently
677677; Parameter: ITALIC flag in bit 0 of A register
678678ITALIC:
@@ -699,8 +699,8 @@ ITALIC_TMP:
699699 ld (hl) , a
700700 ret
701701 ENDP
702- #line 18 "print.asm"
703- #line 1 "attr.asm"
702+ #line 18 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
703+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ attr.asm"
704704 ; Attribute routines
705705; vim:ts=4:et:sw:
706706__ATTR_ADDR:
@@ -757,7 +757,7 @@ SET_PIXEL_ADDR_ATTR:
757757 ld de , (SCREEN_ADDR)
758758 add hl , de ;; Final screen addr
759759 jp __SET_ATTR2
760- #line 20 "print.asm"
760+ #line 20 "/zxbasic/src/arch/zx48k/library-asm/ print.asm"
761761 ; Putting a comment starting with @INIT <address>
762762 ; will make the compiler to add a CALL to <address>
763763 ; It is useful for initialization routines.
@@ -797,14 +797,14 @@ __SCROLL: ; Scroll?
797797 ld hl , __TVFLAGS
798798 res 1 , (hl)
799799 ret
800- #line 76 "/zxbasic/arch/zx48k/library-asm/print.asm"
800+ #line 76 "/zxbasic/src/ arch/zx48k/library-asm/print.asm"
801801__PRINT_START:
802802 cp ' '
803803 jp c , __PRINT_SPECIAL ; Characters below ' ' are special ones
804804 exx ; Switch to alternative registers
805805 ex af , af' ; Saves a value (char to print) for later
806806 call __SCROLL
807- #line 87 "/zxbasic/arch/zx48k/library-asm/print.asm"
807+ #line 87 "/zxbasic/src/ arch/zx48k/library-asm/print.asm"
808808 call __LOAD_S_POSN
809809 ; At this point we have the new coord
810810 ld hl , (SCREEN_ADDR)
@@ -899,7 +899,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence
899899 exx
900900__PRINT_0Dh: ; Called WHEN printing CHR$(13)
901901 call __SCROLL
902- #line 210 "/zxbasic/arch/zx48k/library-asm/print.asm"
902+ #line 210 "/zxbasic/src/ arch/zx48k/library-asm/print.asm"
903903 call __LOAD_S_POSN
904904__PRINT_EOL1: ; Another entry called from PRINT when next line required
905905 ld e , 0
@@ -908,12 +908,12 @@ __PRINT_EOL2:
908908 inc a
909909__PRINT_AT1_END:
910910 ld hl , (MAXY)
911- cp l
911+ cp h
912912 jr c , __PRINT_EOL_END ; Carry if (MAXY) < d
913913 ld hl , __TVFLAGS
914914 set 1 , (hl)
915- ld a , d
916- #line 230 "/zxbasic/arch/zx48k/library-asm/print.asm"
915+ dec a
916+ #line 230 "/zxbasic/src/ arch/zx48k/library-asm/print.asm"
917917__PRINT_EOL_END:
918918 ld d , a
919919__PRINT_AT2_END:
@@ -953,7 +953,7 @@ __PRINT_TAB2:
953953__PRINT_NOP:
954954__PRINT_RESTART:
955955 ld hl , __PRINT_START
956- jp __PRINT_SET_STATE
956+ jr __PRINT_SET_STATE
957957__PRINT_ AT :
958958 ld hl , __PRINT_AT1
959959__PRINT_SET_STATE:
@@ -965,15 +965,15 @@ __PRINT_AT1: ; Jumps here if waiting for 1st parameter
965965 ld hl , __PRINT_AT2
966966 ld (PRINT_JUMP_STATE) , hl ; Saves next entry call
967967 call __LOAD_S_POSN
968- jp __PRINT_AT1_END
968+ jr __PRINT_AT1_END
969969__PRINT_AT2:
970970 exx
971971 ld hl , __PRINT_START
972972 ld (PRINT_JUMP_STATE) , hl ; Saves next entry call
973973 call __LOAD_S_POSN
974974 ld e , a
975975 ld hl , (MAXX)
976- cp (hl)
976+ cp l
977977 jr c , __PRINT_AT2_END
978978 jr __PRINT_EOL1
979979__PRINT_DEL:
@@ -1126,7 +1126,7 @@ PRINT_AT: ; Changes cursor to ROW, COL
11261126 ret nc ; Return if out of screen
11271127 ld hl , __TVFLAGS
11281128 res 1 , (hl)
1129- #line 482 "/zxbasic/arch/zx48k/library-asm/print.asm"
1129+ #line 482 "/zxbasic/src/ arch/zx48k/library-asm/print.asm"
11301130 jp __SAVE_S_POSN
11311131 LOCAL __PRINT_COM
11321132 LOCAL __BOLD
@@ -1173,9 +1173,9 @@ __PRINT_TABLE: ; Jump table for 0 .. 22 codes
11731173 DW __PRINT_TAB ; 23 TAB
11741174 ENDP
11751175#line 53 "astore16.bas"
1176- #line 1 "printu16.asm"
1177- #line 1 "printi16.asm"
1178- #line 1 "printnum.asm"
1176+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ printu16.asm"
1177+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ printi16.asm"
1178+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ printnum.asm"
11791179__PRINTU_START:
11801180 PROC
11811181 LOCAL __PRINTU_CONT
@@ -1196,11 +1196,11 @@ __PRINT_MINUS: ; PRINT the MINUS (-) sign. CALLER mus preserve registers
11961196 ld a , '-'
11971197 jp __PRINT_DIGIT
11981198 __PRINT_DIGIT EQU __PRINTCHAR ; PRINTS the char in A register, and puts its attrs
1199- #line 2 "printi16.asm"
1200- #line 1 "div16.asm"
1199+ #line 2 "/zxbasic/src/arch/zx48k/library-asm/ printi16.asm"
1200+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ div16.asm"
12011201 ; 16 bit division and modulo functions
12021202 ; for both signed and unsigned values
1203- #line 1 "neg16.asm"
1203+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ neg16.asm"
12041204 ; Negates HL value (16 bit)
12051205__ABS16:
12061206 bit 7 , h
@@ -1214,7 +1214,7 @@ __NEGHL:
12141214 ld h , a
12151215 inc hl
12161216 ret
1217- #line 5 "div16.asm"
1217+ #line 5 "/zxbasic/src/arch/zx48k/library-asm/ div16.asm"
12181218__DIVU16: ; 16 bit unsigned division
12191219 ; HL = Dividend, Stack Top = Divisor
12201220 ; -- OBSOLETE ; Now uses FASTCALL convention
@@ -1285,7 +1285,7 @@ __MODI16: ; 16 bit modulus
12851285 ex de , hl ; hl = reminder (modulus)
12861286 ; de = quotient
12871287 ret
1288- #line 3 "printi16.asm"
1288+ #line 3 "/zxbasic/src/arch/zx48k/library-asm/ printi16.asm"
12891289__PRINTI16: ; Prints a 16bits signed in HL
12901290 ; Converts 16 to 32 bits
12911291 PROC
@@ -1311,6 +1311,6 @@ __PRINTU_LOOP:
13111311 inc b
13121312 jp __PRINTU_LOOP ; Uses JP in loops
13131313 ENDP
1314- #line 2 "printu16.asm"
1314+ #line 2 "/zxbasic/src/arch/zx48k/library-asm/ printu16.asm"
13151315#line 54 "astore16.bas"
13161316 END
0 commit comments