From 065ef57e5b636cd0a4dee9d46eaab415da9fd0e9 Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Sat, 28 Sep 2024 19:38:41 +0200 Subject: [PATCH 1/2] fix: initialize TV_FLAG correctly --- src/lib/arch/zx48k/runtime/print.asm | 3 ++- src/lib/arch/zx48k/runtime/sysvars.asm | 12 ++++++------ src/lib/arch/zxnext/runtime/print.asm | 3 ++- src/lib/arch/zxnext/runtime/sysvars.asm | 12 ++++++------ tests/functional/arch/zx48k/sna_00.sna | Bin 49179 -> 49179 bytes tests/functional/arch/zx48k/tap_00.tap | Bin 6039 -> 6041 bytes tests/functional/arch/zx48k/tzx_00.tzx | Bin 6061 -> 6063 bytes tests/functional/arch/zx48k/z80_00.z80 | Bin 2295 -> 2297 bytes 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/lib/arch/zx48k/runtime/print.asm b/src/lib/arch/zx48k/runtime/print.asm index 62f5446c0..c60ec5d47 100644 --- a/src/lib/arch/zx48k/runtime/print.asm +++ b/src/lib/arch/zx48k/runtime/print.asm @@ -32,7 +32,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN diff --git a/src/lib/arch/zx48k/runtime/sysvars.asm b/src/lib/arch/zx48k/runtime/sysvars.asm index 14bd87396..6ae0af969 100644 --- a/src/lib/arch/zx48k/runtime/sysvars.asm +++ b/src/lib/arch/zx48k/runtime/sysvars.asm @@ -10,18 +10,18 @@ SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS -CHARS EQU 23606 ; Pointer to ROM/RAM Charset -TVFLAGS EQU 23612 ; TV Flags -UDG EQU 23675 ; Pointer to UDG Charset +CHARS EQU 23606 ; Pointer to ROM/RAM Charset +TV_FLAG EQU 23612 ; Flags for controlling output to screen +UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates -FLAGS2 EQU 23681 ; +FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands -ATTR_T EQU 23695 ; temporary ATTRIBUTES -P_FLAG EQU 23697 ; +ATTR_T EQU 23695 ; temporary ATTRIBUTES +P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 diff --git a/src/lib/arch/zxnext/runtime/print.asm b/src/lib/arch/zxnext/runtime/print.asm index 62f5446c0..c60ec5d47 100644 --- a/src/lib/arch/zxnext/runtime/print.asm +++ b/src/lib/arch/zxnext/runtime/print.asm @@ -32,7 +32,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN diff --git a/src/lib/arch/zxnext/runtime/sysvars.asm b/src/lib/arch/zxnext/runtime/sysvars.asm index 14bd87396..55d552097 100644 --- a/src/lib/arch/zxnext/runtime/sysvars.asm +++ b/src/lib/arch/zxnext/runtime/sysvars.asm @@ -10,18 +10,18 @@ SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS -CHARS EQU 23606 ; Pointer to ROM/RAM Charset -TVFLAGS EQU 23612 ; TV Flags -UDG EQU 23675 ; Pointer to UDG Charset +CHARS EQU 23606 ; Pointer to ROM/RAM Charset +TV_FLAG EQU 23612 ; TV Flags +UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates -FLAGS2 EQU 23681 ; +FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands -ATTR_T EQU 23695 ; temporary ATTRIBUTES -P_FLAG EQU 23697 ; +ATTR_T EQU 23695 ; temporary ATTRIBUTES +P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 diff --git a/tests/functional/arch/zx48k/sna_00.sna b/tests/functional/arch/zx48k/sna_00.sna index a0e9ad3cd7e6fbdc233242a4edb5c20d81d2f7fd..abe1b18312cee0faa99d7e56e62149a5e1504c9a 100644 GIT binary patch delta 551 zcmYk0U1*YF6vs7VDN>Ae;gd!4@wG^8RzeaZ)`%czEkXR)#X~HjMOXF(gOsHgeM!0I z^PJa0h)DWCDzmkDQ*H82=9@f_#RBWfmZK0af(RD0dXrdjIRF3e91ed@Dxyh6G*7nn zs?+0Ly_pXEF%f@AWcj)zUp4;Gb4aZoraQbwMGtyiYvRm&m1Uh#f_IbhMH=@SjB&PP z+7;B=E|V@(yTi1})MlykrPVbaqElXj@P@s+-s}qzw6fXfBA0@jRaUF6@w2?&KT`$8 zhGv>{(Q7`kQ;PnOCJ1%`+R&|d>!WJDILD1* zrJx)H0BQbiWhL%-4`R+M1P{@$Pw>P5m3Wk*Y0Ln<7+-@_y~;I}OvP?&!8^`DQi_C>iiA8hdNiPw^gy5V1K zR5-XiYoP!fF2E?PDQOnQe?@ z%f2ludbT;gFj@8Z-sH$a#@(44mN9+dH#yRx9G)oI?fd%i`iLML7W|Fy#H)ER-`uNv zUlAL1`zhh%;0ZxEBb?^ns6OCY8)JfAGAC>2@+E0jtOpd%;U9+F_QrpGR7=lJ-Tw`1 CO#qbu delta 515 zcmbQ;z&yKwd4rAvo-7wC?pZnI=E<8+uO2-s zFzw*QhbI+vrb?(7O^Q)8nJOV;1*E~Y-+X%X>RE|t7Y_mzgie)UhKim9Iw9RoVv12` zjAF{HstOD9WgQ=BtZV$0d1lO@(DE}JT`>ghjC8nMIKUtzr@#xgU0aMS~PdV&6Rq-O29RXxd{v7IC-!Vnt=gEhU z^IxC+HtE7)v&p_w5l{xm&V}>YrtY75dTR63-l@~4E}Xi0>ei_qQ`M(x^~Nam$0#<& zoSivMaUzJ6w`zZGH^D6xT2_V6LSWc0Mkhd~3|9%?me z>b~#XC4oevh*1qIwwI8`b?9Y$;0lFn^f2s>V(h61B6M9PiUa5W`yUSc4=3fF_D-I2 z^oc@5h>RQ;8{a=0>xORVSP+gnJ0rh&dN!D8Z@sMGPsuFrOz|CWT)WR&93iD@iN#`g zij-z@A#KxavXTp_A)2uHcO{tfKFj)|1Ro=%J9Nn=b|u(`bR^i~xl0a8Z9URnso7=l zjhz)9rWU&>e_$(<^?@)!+v@{<5)1AV+-_@ay>#lrybh*}&ev(5-Dx>YN9^M1Fw-^N zST6E*rBJSDxCfBSmn7H^$kA)+R=#c&mwA^`E|?3$fSUeJHS>fk{fPPQ5j;xg?D9|? z&?1jg^d2)nbNneqIXnaCEiY2^0zU_o;a@0vf?orA%v}sU#P0wpyg^X{FMv7(`~*`2 zfIn{WMU&~Fj=@`T*7i%QtOaZQXL3pP(*XRhJthbL`4%Vuhubg#(~yRjkcTti2G0ZH zoFF(#_#?%9ui3kMqeQGW1)2q%Qmo^?ugo(=vZeF;xAl8{-jT`em$nGXb%?Is44VN8#lq5{AfOmxJ3_A*B&l=DF`Cwx*Jg(IOp>{eBpaIQ~s=f z;-ssKGbKz3a)4X;@mX8eR87SuQdMD)&-%n&=p#(o(;^&5)`*DmM90 z%;rs#-Mpid-_Bb-8f$K>vmp^#47aVB2(>jQ_H5{5Av?|xd4aY&x7t3ya<%WmTb&+q zy3Kp(fRj5mB&v$4EtZ)>ny=LrybF*gkRf;w5fwZ=zy) zHeDQPSNOP9t2fH7yEuna|d5lqzyr(oP#3`2+5B29^K- diff --git a/tests/functional/arch/zx48k/tzx_00.tzx b/tests/functional/arch/zx48k/tzx_00.tzx index b2136b66401975de7328ab7f2a917a579f963782..59123eba160aa53f71fcf58c10854785ea02bea6 100644 GIT binary patch delta 567 zcmYL_QD~A;6vs7bX%>ua&bzgm*UzGqG=yYWZ4kjISkj=@!(|ka(bHOc5ZYM!P%bGq zz4u&;XpF3g(UMiuhawtZGQZ?PR(r6XWGM^rErK4hzKtjjob&si^XG6lbFP$Y%5OYi z)&w=d!NyhHq1bSK(Bjz@W!9T4ikmRomJC%E=b%IneMwwcFb-OBya+KCvP}?X& zI(4M42fJG9Q~NgeiY_CL6Zr#mncDS5_?7SVzpc>|ChOV#Tqd+=pCEfJhMkrMTUpe% zmYiBK%8E*{yqpzHe6dhcuoIBY9VgfWsKcw)^=pdd?6PR*g+!KdpyF5O579;SMBW z4l-~I_JI8su}%^kBH}JrpRMLjZ-|&HI$whZC%9qUy~^w{lFFaly`kIX{>Bu|(?{v? z%B-(*KA>P~GFzNUu8b|@9F8M>cw11C2BlNgv4wXlJX1St_*~%CvSV1fbmpQYjYyZp acY4n3X^Ak&C|eVyE18_U#LELJkNg2_R|p;e delta 564 zcmYL_UuaTs6vs80XckDD^H&-3=QRqgSr)P^Hi%$Bn6X&(@FR-K=pkywki}R^4_a(B z@9&0-qC&9E~y&}zys9+Bi1;!Nt!s?LCdk zw27%1>uPU~Z&}{UyDV5F@*Lf2TVwhFzskLlH!3}7a~3WA z>(uihsj5`#^F?lDvz3~HHvw|{MS`~jas;)ybV{{eoacyDW;H`UAj99TqOCjKjU@k7 zf=|--HlZ&GsKnzGy~ZM-m;3=md3+ntGhU?V5uOAz#lKK=4^IP{;BE=s#LodS{+puf zxCrtA;60KY0$f?*BO23v?V-y_$@){NeLko1AL5)Gpdt7l4vo+L(?)m&Ww-)kkcJFA zgdFUJ4d59gt{Vi$3BSd(Piwg&7$^3IA#BuPVCE5jL-M3Zw%osQS+~#sRZ?_MCi5eW zsc^?kRKe74cXno&GMp=Uy?a76fW@Z Z^pri&mXrjG>`d1#6-siE)embN{sT`R1u6gl diff --git a/tests/functional/arch/zx48k/z80_00.z80 b/tests/functional/arch/zx48k/z80_00.z80 index a614187a476a3a006b930f73d4bb5d75a1599676..c1733384cb9a65c60afc61a8456bb1d6fae8b68d 100644 GIT binary patch delta 566 zcmYk2Ur5tY6vzF!wYEl(7Iiht-ThY7MoR__lTe7j5OgvseYivg89mvbhe3+Dhn$U? zZTFtLB9LelCDr=p_7c(fHQcXpp(Q^2>}l9WG4>XP53YVnRGh;(pYJ(`!{PjFSZ;W( zNm7C?O2@2cIsP0=il(?&|LS0UpVSiIWhoR2;V8*ZrvmD#SY@6HC;^%xqVq=C9|n{YL5kjC2I#GLKv4=$ z19~m86g|O@0L_Rm6y3)!0o@Z0hHm3GfVlWYQ3TI{;s?>i6d&OEH6GNN9$nXaHOw|G ztHq_^iue)xsCcOl{@G5QhyQ9bWI(_*n1VZyfTxg#9@q=co5VgvaFB?*Tz|G6TRVbe zTiM_<)!{g|jCsB?XOtxK$M@8C?)Q9SYTdJksj>2muk}Sh#dM3w=1y>RbT;R59qGl} z$7T7Xe4;Ws`(cTvtA{O%1zst+F3J~9otNdy@+I+|o-uhhhnZ|u?D682bWWM$r2(C3 SQR<1d_5bHcnxK8=$G-v1Z3a33 delta 553 zcmYL_Ur1AN6vw@8UbaS{1p2EM?zg)rwz6@HVG;@v7{O9TRu4a-NQxe!f59TObb)Mlb$qa8x@uszgYb0v}cl-KduHyqPVQDmvZ+$R{TW zJ^;wwWz~&ajB38j5i2cPh5f4D8a{7;MU4vKIaCLjfAcnR}x6n24sf_U!}93%V@vtDiG_O2Ld ztJ(U*1`NzOD%Vthf@F#VyBoXr$=_AI;q_E@v^L$>J{#3BZ52HoX{L|N7XpDJVZ41z zlFmpc&5`+!6_#5$>|FlD%xd78boJ~dNxC6j=RfG67}}z!l1uZXDmQZlEzhc_ES{Sc OCxt}NE-19$@!}73F92o$ From 41d1259bc0a4e8c2f086a1b7f76c48d6cec7942a Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Sat, 28 Sep 2024 19:45:56 +0200 Subject: [PATCH 2/2] tests: update test accordingly --- tests/functional/arch/zx48k/astore16.asm | 39 +++---- tests/functional/arch/zx48k/attr.asm | 46 ++++---- tests/functional/arch/zx48k/attr_in_subs.asm | 32 +++--- tests/functional/arch/zx48k/circle.asm | 70 ++++++------ tests/functional/arch/zx48k/code00.asm | 39 +++---- tests/functional/arch/zx48k/code01.asm | 39 +++---- tests/functional/arch/zx48k/code02.asm | 39 +++---- tests/functional/arch/zx48k/coercion3.asm | 20 ++-- tests/functional/arch/zx48k/const_str5.asm | 39 +++---- tests/functional/arch/zx48k/draw.asm | 74 ++++++------ tests/functional/arch/zx48k/draw3.asm | 90 +++++++-------- tests/functional/arch/zx48k/einarattr.asm | 39 +++---- tests/functional/arch/zx48k/einarshift.asm | 39 +++---- tests/functional/arch/zx48k/fact.asm | 39 +++---- tests/functional/arch/zx48k/for0.asm | 39 +++---- tests/functional/arch/zx48k/ifelse1.asm | 39 +++---- tests/functional/arch/zx48k/ifwhilex.asm | 39 +++---- tests/functional/arch/zx48k/inkey.asm | 39 +++---- tests/functional/arch/zx48k/inktemp.asm | 98 ++++++++-------- tests/functional/arch/zx48k/label_sent2.asm | 24 ++-- tests/functional/arch/zx48k/label_sent3.asm | 24 ++-- tests/functional/arch/zx48k/label_sent4.asm | 24 ++-- tests/functional/arch/zx48k/label_sent5.asm | 24 ++-- tests/functional/arch/zx48k/lcd3.asm | 39 +++---- tests/functional/arch/zx48k/lcd7.asm | 39 +++---- tests/functional/arch/zx48k/lcd8.asm | 39 +++---- tests/functional/arch/zx48k/lcd9.asm | 39 +++---- .../arch/zx48k/let_array_local_const0.asm | 39 +++---- tests/functional/arch/zx48k/load02.asm | 39 +++---- tests/functional/arch/zx48k/load03.asm | 39 +++---- tests/functional/arch/zx48k/loadstr.asm | 12 +- tests/functional/arch/zx48k/loadu16ii.asm | 39 +++---- tests/functional/arch/zx48k/ltee1.asm | 39 +++---- tests/functional/arch/zx48k/memcpytest.asm | 39 +++---- tests/functional/arch/zx48k/noheap.asm | 39 +++---- tests/functional/arch/zx48k/ongosub.asm | 39 +++---- tests/functional/arch/zx48k/ongoto.asm | 39 +++---- .../arch/zx48k/opt1_dim_arr_global.asm | 39 +++---- .../arch/zx48k/opt1_dim_arr_global2.asm | 39 +++---- .../arch/zx48k/opt1_dim_arr_global3.asm | 39 +++---- .../arch/zx48k/opt1_dim_arr_global4.asm | 39 +++---- .../arch/zx48k/opt1_dim_arr_local2.asm | 39 +++---- .../arch/zx48k/opt2_fastcall_func.asm | 39 +++---- .../functional/arch/zx48k/opt2_func_call.asm | 39 +++---- tests/functional/arch/zx48k/opt3_data2.asm | 39 +++---- tests/functional/arch/zx48k/opt3_einar.asm | 39 +++---- tests/functional/arch/zx48k/optconst.asm | 39 +++---- tests/functional/arch/zx48k/param0.asm | 39 +++---- tests/functional/arch/zx48k/param1.asm | 39 +++---- tests/functional/arch/zx48k/param2.asm | 39 +++---- tests/functional/arch/zx48k/parambyref1.asm | 39 +++---- tests/functional/arch/zx48k/plot.asm | 62 +++++----- tests/functional/arch/zx48k/print.asm | 39 +++---- tests/functional/arch/zx48k/print_arrstr.asm | 39 +++---- tests/functional/arch/zx48k/print_at.asm | 39 +++---- tests/functional/arch/zx48k/print_comma.asm | 39 +++---- tests/functional/arch/zx48k/print_eol.asm | 39 +++---- .../functional/arch/zx48k/print_eol_attr.asm | 39 +++---- tests/functional/arch/zx48k/print_f.asm | 39 +++---- tests/functional/arch/zx48k/print_f16.asm | 39 +++---- tests/functional/arch/zx48k/print_i16.asm | 39 +++---- tests/functional/arch/zx48k/print_i32.asm | 39 +++---- tests/functional/arch/zx48k/print_i8.asm | 39 +++---- tests/functional/arch/zx48k/print_tab.asm | 39 +++---- tests/functional/arch/zx48k/print_u16.asm | 39 +++---- tests/functional/arch/zx48k/print_u32.asm | 39 +++---- tests/functional/arch/zx48k/print_u8.asm | 39 +++---- tests/functional/arch/zx48k/read10.asm | 39 +++---- tests/functional/arch/zx48k/read12.asm | 39 +++---- tests/functional/arch/zx48k/read13.asm | 39 +++---- tests/functional/arch/zx48k/read5.asm | 39 +++---- tests/functional/arch/zx48k/read8.asm | 39 +++---- tests/functional/arch/zx48k/read9.asm | 39 +++---- tests/functional/arch/zx48k/readokdown.asm | 39 +++---- tests/functional/arch/zx48k/readokup.asm | 39 +++---- tests/functional/arch/zx48k/simple.asm | 39 +++---- tests/functional/arch/zx48k/sin1.asm | 39 +++---- tests/functional/arch/zx48k/slice2.asm | 60 +++++----- tests/functional/arch/zx48k/spfill.asm | 106 +++++++++--------- tests/functional/arch/zx48k/str0.asm | 39 +++---- tests/functional/arch/zx48k/str01.asm | 56 ++++----- tests/functional/arch/zx48k/str02.asm | 64 +++++------ tests/functional/arch/zx48k/strbase2.asm | 39 +++---- tests/functional/arch/zx48k/stringparam.asm | 39 +++---- tests/functional/arch/zx48k/strlocal0.asm | 39 +++---- tests/functional/arch/zx48k/strparam0.asm | 39 +++---- tests/functional/arch/zx48k/strparam1.asm | 12 +- tests/functional/arch/zx48k/strparam2.asm | 39 +++---- tests/functional/arch/zx48k/strparam3.asm | 39 +++---- tests/functional/arch/zx48k/subrec.asm | 39 +++---- tests/functional/arch/zx48k/usr0.asm | 39 +++---- tests/functional/arch/zx48k/warn_unreach0.asm | 20 ++-- 92 files changed, 1919 insertions(+), 1846 deletions(-) diff --git a/tests/functional/arch/zx48k/astore16.asm b/tests/functional/arch/zx48k/astore16.asm index 5a72415c7..6202c1467 100644 --- a/tests/functional/arch/zx48k/astore16.asm +++ b/tests/functional/arch/zx48k/astore16.asm @@ -261,18 +261,18 @@ TMP_ARR_PTR: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -729,7 +729,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -772,7 +773,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -808,10 +809,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -860,7 +861,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -977,14 +978,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1002,7 +1003,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1027,12 +1028,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1075,9 +1076,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/attr.asm b/tests/functional/arch/zx48k/attr.asm index 53dcb1ed1..886616c54 100644 --- a/tests/functional/arch/zx48k/attr.asm +++ b/tests/functional/arch/zx48k/attr.asm @@ -45,12 +45,12 @@ ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/bold.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/bold.asm" ; Sets BOLD flag in P_FLAG permanently ; Parameter: BOLD flag in bit 0 of A register -#line 1 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 4 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -59,24 +59,24 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 6 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 6 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" push namespace core COPY_ATTR: ; Just copies current permanent attribs into temporal attribs @@ -92,9 +92,9 @@ COPY_ATTR: ld hl, P_FLAG call __REFRESH_TMP __SET_ATTR_MODE: ; Another entry to set print modes. A contains (P_FLAG) -#line 65 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 65 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" ret -#line 67 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 67 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" __REFRESH_TMP: ld a, (hl) and 0b10101010 @@ -105,7 +105,7 @@ __REFRESH_TMP: ret ENDP pop namespace -#line 4 "/zxbasic/src/arch/zx48k/library-asm/bold.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/bold.asm" push namespace core BOLD: PROC @@ -130,8 +130,8 @@ BOLD_TMP: ret ENDP pop namespace -#line 27 "zx48k/attr.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/flash.asm" +#line 27 "arch/zx48k/attr.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/flash.asm" ; Sets flash flag in ATTR_P permanently ; Parameter: Paper color in A register push namespace core @@ -167,8 +167,8 @@ FLASH_TMP: jr __SET_FLASH ENDP pop namespace -#line 28 "zx48k/attr.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/ink.asm" +#line 28 "arch/zx48k/attr.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/ink.asm" ; Sets ink color in ATTR_P permanently ; Parameter: Paper color in A register push namespace core @@ -204,8 +204,8 @@ INK_TMP: jp __SET_INK ENDP pop namespace -#line 29 "zx48k/attr.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/over.asm" +#line 29 "arch/zx48k/attr.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/over.asm" ; Sets OVER flag in P_FLAG permanently ; Parameter: OVER flag in bit 0 of A register push namespace core @@ -243,8 +243,8 @@ OVER_TMP: jp __SET_ATTR_MODE ENDP pop namespace -#line 30 "zx48k/attr.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 30 "arch/zx48k/attr.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register push namespace core @@ -283,5 +283,5 @@ PAPER_TMP: jp __SET_PAPER ENDP pop namespace -#line 31 "zx48k/attr.bas" +#line 31 "arch/zx48k/attr.bas" END diff --git a/tests/functional/arch/zx48k/attr_in_subs.asm b/tests/functional/arch/zx48k/attr_in_subs.asm index 12b92a861..ea4ebbf5f 100644 --- a/tests/functional/arch/zx48k/attr_in_subs.asm +++ b/tests/functional/arch/zx48k/attr_in_subs.asm @@ -51,10 +51,10 @@ _screenAttributes2__leave: pop ix ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/bright.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/bright.asm" ; Sets bright flag in ATTR_P permanently ; Parameter: Paper color in A register -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -63,24 +63,24 @@ _screenAttributes2__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/bright.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/bright.asm" push namespace core BRIGHT: ld hl, ATTR_P @@ -114,8 +114,8 @@ BRIGHT_TMP: jr __SET_BRIGHT ENDP pop namespace -#line 33 "zx48k/attr_in_subs.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/cls.asm" +#line 33 "arch/zx48k/attr_in_subs.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/cls.asm" ;; Clears the user screen (24 rows) push namespace core CLS: @@ -145,8 +145,8 @@ CLS: ret ENDP pop namespace -#line 34 "zx48k/attr_in_subs.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/ink.asm" +#line 34 "arch/zx48k/attr_in_subs.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/ink.asm" ; Sets ink color in ATTR_P permanently ; Parameter: Paper color in A register push namespace core @@ -182,8 +182,8 @@ INK_TMP: jp __SET_INK ENDP pop namespace -#line 35 "zx48k/attr_in_subs.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 35 "arch/zx48k/attr_in_subs.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register push namespace core @@ -222,5 +222,5 @@ PAPER_TMP: jp __SET_PAPER ENDP pop namespace -#line 36 "zx48k/attr_in_subs.bas" +#line 36 "arch/zx48k/attr_in_subs.bas" END diff --git a/tests/functional/arch/zx48k/circle.asm b/tests/functional/arch/zx48k/circle.asm index bc174c562..1198ea6a7 100644 --- a/tests/functional/arch/zx48k/circle.asm +++ b/tests/functional/arch/zx48k/circle.asm @@ -104,10 +104,10 @@ _c: ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ; Bresenham's like circle algorithm ; best known as Middle Point Circle drawing algorithm -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -141,15 +141,15 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ; MIXED __FASTCAL__ / __CALLE__ PLOT Function ; Plots a point into the screen calling the ZX ROM PLOT routine ; Y in A (accumulator) ; X in top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -158,25 +158,25 @@ __STOP: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/attr.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/attr.asm" ; Attribute routines ; vim:ts=4:et:sw: push namespace core @@ -222,7 +222,7 @@ __SET_ATTR2: ; Sets attr from ATTR_T to (HL) which points to the scr address ret ENDP pop namespace -#line 3 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" +#line 3 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" ; Printing positioning library. push namespace core ; Loads into DE current ROW, COL print position from S_POSN mem var. @@ -264,7 +264,7 @@ __SET_SCR_PTR: ;; Fast ret ENDP pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" push namespace core __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -285,8 +285,8 @@ __OUT_OF_SCREEN_ERR: jp __STOP ; Saves error code and exits ENDP pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/set_pixel_addr_attr.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/set_pixel_addr_attr.asm" push namespace core ; Sets the attribute at a given screen pixel address in hl ; HL contains the address in RAM for a given pixel (not a coordinate) @@ -305,7 +305,7 @@ SET_PIXEL_ADDR_ATTR: add hl, de ;; Final screen addr jp __SET_ATTR2 pop namespace -#line 11 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 11 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" push namespace core PLOT: PROC @@ -320,8 +320,8 @@ PLOT: ex (sp), hl ; Callee ld b, a ld c, h -#line 37 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 43 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 37 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 43 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ld a, 191 cp b jr c, __PLOT_ERR ; jr is faster here (#1) @@ -362,7 +362,7 @@ __PLOT_ERR: COORDS EQU 5C7Dh ENDP pop namespace -#line 6 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 6 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ; Draws a circle at X, Y of radius R ; X, Y on the Stack, R in accumulator (Byte) push namespace core @@ -379,8 +379,8 @@ CIRCLE: ex (sp), hl ; __CALLEE__ convention ld e, h ; E = X ld h, a ; H = R -#line 33 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" -#line 39 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 33 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" +#line 39 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ld a, h add a, d sub 192 @@ -535,9 +535,9 @@ __CIRCLE_PLOT: ret ENDP pop namespace -#line 80 "zx48k/circle.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 4 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 80 "arch/zx48k/circle.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" push namespace core COPY_ATTR: ; Just copies current permanent attribs into temporal attribs @@ -553,9 +553,9 @@ COPY_ATTR: ld hl, P_FLAG call __REFRESH_TMP __SET_ATTR_MODE: ; Another entry to set print modes. A contains (P_FLAG) -#line 65 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 65 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" ret -#line 67 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 67 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" __REFRESH_TMP: ld a, (hl) and 0b10101010 @@ -566,9 +566,9 @@ __REFRESH_TMP: ret ENDP pop namespace -#line 81 "zx48k/circle.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/neg32.asm" +#line 81 "arch/zx48k/circle.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/neg32.asm" push namespace core __ABS32: bit 7, d @@ -593,7 +593,7 @@ __NEG32: ; Negates DEHL (Two's complement) inc de ret pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm" push namespace core __FTOU32REG: ; Converts a Float to (un)signed 32 bit integer (NOTE: It's ALWAYS 32 bit signed) ; Input FP number in A EDCB (A exponent, EDCB mantissa) @@ -665,5 +665,5 @@ __FTOU8: ; Converts float in C ED LH to Unsigned byte in A ld a, l ret pop namespace -#line 82 "zx48k/circle.bas" +#line 82 "arch/zx48k/circle.bas" END diff --git a/tests/functional/arch/zx48k/code00.asm b/tests/functional/arch/zx48k/code00.asm index bd2592976..7c837432c 100644 --- a/tests/functional/arch/zx48k/code00.asm +++ b/tests/functional/arch/zx48k/code00.asm @@ -335,18 +335,18 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -834,7 +834,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -877,7 +878,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -913,10 +914,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -965,7 +966,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1082,14 +1083,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1107,7 +1108,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1132,12 +1133,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1180,9 +1181,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/code01.asm b/tests/functional/arch/zx48k/code01.asm index b898cae57..3f4207e25 100644 --- a/tests/functional/arch/zx48k/code01.asm +++ b/tests/functional/arch/zx48k/code01.asm @@ -335,18 +335,18 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -834,7 +834,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -877,7 +878,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -913,10 +914,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -965,7 +966,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1082,14 +1083,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1107,7 +1108,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1132,12 +1133,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1180,9 +1181,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/code02.asm b/tests/functional/arch/zx48k/code02.asm index e0570ad78..f60704267 100644 --- a/tests/functional/arch/zx48k/code02.asm +++ b/tests/functional/arch/zx48k/code02.asm @@ -335,18 +335,18 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -834,7 +834,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -877,7 +878,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -913,10 +914,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -965,7 +966,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1082,14 +1083,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1107,7 +1108,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1132,12 +1133,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1180,9 +1181,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/coercion3.asm b/tests/functional/arch/zx48k/coercion3.asm index 5366b1ae6..32fd44b3b 100644 --- a/tests/functional/arch/zx48k/coercion3.asm +++ b/tests/functional/arch/zx48k/coercion3.asm @@ -47,10 +47,10 @@ _c: ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -59,24 +59,24 @@ _c: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" push namespace core PAPER: PROC @@ -113,5 +113,5 @@ PAPER_TMP: jp __SET_PAPER ENDP pop namespace -#line 27 "zx48k/coercion3.bas" +#line 27 "arch/zx48k/coercion3.bas" END diff --git a/tests/functional/arch/zx48k/const_str5.asm b/tests/functional/arch/zx48k/const_str5.asm index 5ef552267..eb847f202 100644 --- a/tests/functional/arch/zx48k/const_str5.asm +++ b/tests/functional/arch/zx48k/const_str5.asm @@ -74,18 +74,18 @@ _cs: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -542,7 +542,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -585,7 +586,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -621,10 +622,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -673,7 +674,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -790,14 +791,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -815,7 +816,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -840,12 +841,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -888,9 +889,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/draw.asm b/tests/functional/arch/zx48k/draw.asm index 9b95506c4..77e85d778 100644 --- a/tests/functional/arch/zx48k/draw.asm +++ b/tests/functional/arch/zx48k/draw.asm @@ -71,9 +71,9 @@ _b: ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 4 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -82,24 +82,24 @@ _b: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 6 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 6 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" push namespace core COPY_ATTR: ; Just copies current permanent attribs into temporal attribs @@ -115,9 +115,9 @@ COPY_ATTR: ld hl, P_FLAG call __REFRESH_TMP __SET_ATTR_MODE: ; Another entry to set print modes. A contains (P_FLAG) -#line 65 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 65 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" ret -#line 67 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 67 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" __REFRESH_TMP: ld a, (hl) and 0b10101010 @@ -128,14 +128,14 @@ __REFRESH_TMP: ret ENDP pop namespace -#line 49 "zx48k/draw.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" +#line 49 "arch/zx48k/draw.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" ; DRAW using bresenhams algorithm and screen positioning ; Copyleft (k) 2010 by J. Rodriguez (a.k.a. Boriel) http://www.boriel.com ; vim:ts=4:et:sw=4: ; Y parameter in A ; X parameter in high byte on top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -169,10 +169,10 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/attr.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/attr.asm" ; Attribute routines ; vim:ts=4:et:sw: push namespace core @@ -218,7 +218,7 @@ __SET_ATTR2: ; Sets attr from ATTR_T to (HL) which points to the scr address ret ENDP pop namespace -#line 3 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" +#line 3 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" ; Printing positioning library. push namespace core ; Loads into DE current ROW, COL print position from S_POSN mem var. @@ -260,7 +260,7 @@ __SET_SCR_PTR: ;; Fast ret ENDP pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" push namespace core __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -281,8 +281,8 @@ __OUT_OF_SCREEN_ERR: jp __STOP ; Saves error code and exits ENDP pop namespace -#line 10 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/set_pixel_addr_attr.asm" +#line 10 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/set_pixel_addr_attr.asm" push namespace core ; Sets the attribute at a given screen pixel address in hl ; HL contains the address in RAM for a given pixel (not a coordinate) @@ -301,8 +301,8 @@ SET_PIXEL_ADDR_ATTR: add hl, de ;; Final screen addr jp __SET_ATTR2 pop namespace -#line 13 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelDown.asm" +#line 13 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelDown.asm" ; ; PixelDown ; Alvin Albrecht 2002 @@ -352,8 +352,8 @@ leave: ret ENDP pop namespace -#line 15 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelUp.asm" +#line 15 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelUp.asm" ; ; PixelUp ; Alvin Albrecht 2002 @@ -399,8 +399,8 @@ leave: ret ENDP pop namespace -#line 16 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelLeft.asm" +#line 16 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelLeft.asm" ; ; PixelLeft ; Jose Rodriguez 2012 @@ -442,8 +442,8 @@ leave: ; Sets screen offset back again ret ENDP pop namespace -#line 17 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelRight.asm" +#line 17 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelRight.asm" ; ; PixelRight ; Jose Rodriguez 2012 @@ -485,7 +485,7 @@ leave: ; Sets screen offset back again ret ENDP pop namespace -#line 18 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" +#line 18 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" ;; DRAW PROCEDURE push namespace core PROC @@ -747,9 +747,9 @@ __FASTPLOTEND: ret ENDP pop namespace -#line 50 "zx48k/draw.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/neg32.asm" +#line 50 "arch/zx48k/draw.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/neg32.asm" push namespace core __ABS32: bit 7, d @@ -774,7 +774,7 @@ __NEG32: ; Negates DEHL (Two's complement) inc de ret pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm" push namespace core __FTOU32REG: ; Converts a Float to (un)signed 32 bit integer (NOTE: It's ALWAYS 32 bit signed) ; Input FP number in A EDCB (A exponent, EDCB mantissa) @@ -846,5 +846,5 @@ __FTOU8: ; Converts float in C ED LH to Unsigned byte in A ld a, l ret pop namespace -#line 51 "zx48k/draw.bas" +#line 51 "arch/zx48k/draw.bas" END diff --git a/tests/functional/arch/zx48k/draw3.asm b/tests/functional/arch/zx48k/draw3.asm index 828939c1e..61710b9da 100644 --- a/tests/functional/arch/zx48k/draw3.asm +++ b/tests/functional/arch/zx48k/draw3.asm @@ -104,9 +104,9 @@ _c: ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 4 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -115,24 +115,24 @@ _c: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 6 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 6 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" push namespace core COPY_ATTR: ; Just copies current permanent attribs into temporal attribs @@ -148,9 +148,9 @@ COPY_ATTR: ld hl, P_FLAG call __REFRESH_TMP __SET_ATTR_MODE: ; Another entry to set print modes. A contains (P_FLAG) -#line 65 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 65 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" ret -#line 67 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 67 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" __REFRESH_TMP: ld a, (hl) and 0b10101010 @@ -161,8 +161,8 @@ __REFRESH_TMP: ret ENDP pop namespace -#line 80 "zx48k/draw3.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/draw3.asm" +#line 80 "arch/zx48k/draw3.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/draw3.asm" ; ----------------------------------------------------------- ; vim: et:ts=4:sw=4:ruler: ; @@ -170,7 +170,7 @@ __REFRESH_TMP: ; DRAW x, y, r => r = Arc in radians ; r parameter in A ED BC register ; X, and Y parameter in high byte on top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -204,15 +204,15 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 11 "/zxbasic/src/arch/zx48k/library-asm/draw3.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 11 "/zxbasic/src/lib/arch/zx48k/runtime/draw3.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ; MIXED __FASTCAL__ / __CALLE__ PLOT Function ; Plots a point into the screen calling the ZX ROM PLOT routine ; Y in A (accumulator) ; X in top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/attr.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/attr.asm" ; Attribute routines ; vim:ts=4:et:sw: push namespace core @@ -258,7 +258,7 @@ __SET_ATTR2: ; Sets attr from ATTR_T to (HL) which points to the scr address ret ENDP pop namespace -#line 3 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" +#line 3 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" ; Printing positioning library. push namespace core ; Loads into DE current ROW, COL print position from S_POSN mem var. @@ -300,7 +300,7 @@ __SET_SCR_PTR: ;; Fast ret ENDP pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" push namespace core __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -321,8 +321,8 @@ __OUT_OF_SCREEN_ERR: jp __STOP ; Saves error code and exits ENDP pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/set_pixel_addr_attr.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/set_pixel_addr_attr.asm" push namespace core ; Sets the attribute at a given screen pixel address in hl ; HL contains the address in RAM for a given pixel (not a coordinate) @@ -341,7 +341,7 @@ SET_PIXEL_ADDR_ATTR: add hl, de ;; Final screen addr jp __SET_ATTR2 pop namespace -#line 11 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 11 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" push namespace core PLOT: PROC @@ -356,8 +356,8 @@ PLOT: ex (sp), hl ; Callee ld b, a ld c, h -#line 37 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 43 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 37 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 43 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ld a, 191 cp b jr c, __PLOT_ERR ; jr is faster here (#1) @@ -398,8 +398,8 @@ __PLOT_ERR: COORDS EQU 5C7Dh ENDP pop namespace -#line 12 "/zxbasic/src/arch/zx48k/library-asm/draw3.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/stackf.asm" +#line 12 "/zxbasic/src/lib/arch/zx48k/runtime/draw3.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/stackf.asm" ; ------------------------------------------------------------- ; Functions to manage FP-Stack of the ZX Spectrum ROM CALC ; ------------------------------------------------------------- @@ -438,14 +438,14 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK ld b, a jp __FPSTACK_PUSH pop namespace -#line 13 "/zxbasic/src/arch/zx48k/library-asm/draw3.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" +#line 13 "/zxbasic/src/lib/arch/zx48k/runtime/draw3.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" ; DRAW using bresenhams algorithm and screen positioning ; Copyleft (k) 2010 by J. Rodriguez (a.k.a. Boriel) http://www.boriel.com ; vim:ts=4:et:sw=4: ; Y parameter in A ; X parameter in high byte on top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelDown.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelDown.asm" ; ; PixelDown ; Alvin Albrecht 2002 @@ -495,8 +495,8 @@ leave: ret ENDP pop namespace -#line 15 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelUp.asm" +#line 15 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelUp.asm" ; ; PixelUp ; Alvin Albrecht 2002 @@ -542,8 +542,8 @@ leave: ret ENDP pop namespace -#line 16 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelLeft.asm" +#line 16 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelLeft.asm" ; ; PixelLeft ; Jose Rodriguez 2012 @@ -585,8 +585,8 @@ leave: ; Sets screen offset back again ret ENDP pop namespace -#line 17 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelRight.asm" +#line 17 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelRight.asm" ; ; PixelRight ; Jose Rodriguez 2012 @@ -628,7 +628,7 @@ leave: ; Sets screen offset back again ret ENDP pop namespace -#line 18 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" +#line 18 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" ;; DRAW PROCEDURE push namespace core PROC @@ -890,7 +890,7 @@ __FASTPLOTEND: ret ENDP pop namespace -#line 14 "/zxbasic/src/arch/zx48k/library-asm/draw3.asm" +#line 14 "/zxbasic/src/lib/arch/zx48k/runtime/draw3.asm" ; Ripped from the ZX Spectrum ROM push namespace core DRAW3: @@ -1277,9 +1277,9 @@ SUM_B: jp __DRAW ;;forward to LINE-DRAW (Fastcalled) ENDP pop namespace -#line 81 "zx48k/draw3.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/neg32.asm" +#line 81 "arch/zx48k/draw3.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/neg32.asm" push namespace core __ABS32: bit 7, d @@ -1304,7 +1304,7 @@ __NEG32: ; Negates DEHL (Two's complement) inc de ret pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm" push namespace core __FTOU32REG: ; Converts a Float to (un)signed 32 bit integer (NOTE: It's ALWAYS 32 bit signed) ; Input FP number in A EDCB (A exponent, EDCB mantissa) @@ -1376,5 +1376,5 @@ __FTOU8: ; Converts float in C ED LH to Unsigned byte in A ld a, l ret pop namespace -#line 82 "zx48k/draw3.bas" +#line 82 "arch/zx48k/draw3.bas" END diff --git a/tests/functional/arch/zx48k/einarattr.asm b/tests/functional/arch/zx48k/einarattr.asm index ada95571d..ad6e1f26f 100644 --- a/tests/functional/arch/zx48k/einarattr.asm +++ b/tests/functional/arch/zx48k/einarattr.asm @@ -83,18 +83,18 @@ _printA__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -551,7 +551,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -594,7 +595,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -630,10 +631,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -682,7 +683,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -799,14 +800,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -824,7 +825,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -849,12 +850,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -897,9 +898,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/einarshift.asm b/tests/functional/arch/zx48k/einarshift.asm index f1155e735..9a5a70900 100644 --- a/tests/functional/arch/zx48k/einarshift.asm +++ b/tests/functional/arch/zx48k/einarshift.asm @@ -70,18 +70,18 @@ _b: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -538,7 +538,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -581,7 +582,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -617,10 +618,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -669,7 +670,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -786,14 +787,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -811,7 +812,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -836,12 +837,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -884,9 +885,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/fact.asm b/tests/functional/arch/zx48k/fact.asm index d197dda48..eb7fbb93e 100644 --- a/tests/functional/arch/zx48k/fact.asm +++ b/tests/functional/arch/zx48k/fact.asm @@ -147,18 +147,18 @@ _fact__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -650,7 +650,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -693,7 +694,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -729,10 +730,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -781,7 +782,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -898,14 +899,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -923,7 +924,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -948,12 +949,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -996,9 +997,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/for0.asm b/tests/functional/arch/zx48k/for0.asm index d980f53d0..7d1b8c106 100644 --- a/tests/functional/arch/zx48k/for0.asm +++ b/tests/functional/arch/zx48k/for0.asm @@ -78,18 +78,18 @@ _x: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -581,7 +581,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -624,7 +625,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -660,10 +661,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -712,7 +713,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -829,14 +830,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -854,7 +855,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -879,12 +880,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -927,9 +928,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/ifelse1.asm b/tests/functional/arch/zx48k/ifelse1.asm index b49152c3f..de51a7349 100644 --- a/tests/functional/arch/zx48k/ifelse1.asm +++ b/tests/functional/arch/zx48k/ifelse1.asm @@ -83,18 +83,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -551,7 +551,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -594,7 +595,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -630,10 +631,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -682,7 +683,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -799,14 +800,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -824,7 +825,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -849,12 +850,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -897,9 +898,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/ifwhilex.asm b/tests/functional/arch/zx48k/ifwhilex.asm index 93618d695..4acb49438 100644 --- a/tests/functional/arch/zx48k/ifwhilex.asm +++ b/tests/functional/arch/zx48k/ifwhilex.asm @@ -73,18 +73,18 @@ _i: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -541,7 +541,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -584,7 +585,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -620,10 +621,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -672,7 +673,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -789,14 +790,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -814,7 +815,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -839,12 +840,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -887,9 +888,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/inkey.asm b/tests/functional/arch/zx48k/inkey.asm index 18b270cfb..140a46344 100644 --- a/tests/functional/arch/zx48k/inkey.asm +++ b/tests/functional/arch/zx48k/inkey.asm @@ -72,18 +72,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -540,7 +540,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -583,7 +584,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -619,10 +620,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -671,7 +672,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -788,14 +789,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -813,7 +814,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -838,12 +839,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -886,9 +887,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/inktemp.asm b/tests/functional/arch/zx48k/inktemp.asm index 81fc2e765..68ef1b4d3 100644 --- a/tests/functional/arch/zx48k/inktemp.asm +++ b/tests/functional/arch/zx48k/inktemp.asm @@ -60,10 +60,10 @@ ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ; Bresenham's like circle algorithm ; best known as Middle Point Circle drawing algorithm -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -97,15 +97,15 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ; MIXED __FASTCAL__ / __CALLE__ PLOT Function ; Plots a point into the screen calling the ZX ROM PLOT routine ; Y in A (accumulator) ; X in top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -114,25 +114,25 @@ __STOP: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/attr.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/attr.asm" ; Attribute routines ; vim:ts=4:et:sw: push namespace core @@ -178,7 +178,7 @@ __SET_ATTR2: ; Sets attr from ATTR_T to (HL) which points to the scr address ret ENDP pop namespace -#line 3 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" +#line 3 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" ; Printing positioning library. push namespace core ; Loads into DE current ROW, COL print position from S_POSN mem var. @@ -220,7 +220,7 @@ __SET_SCR_PTR: ;; Fast ret ENDP pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" push namespace core __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -241,8 +241,8 @@ __OUT_OF_SCREEN_ERR: jp __STOP ; Saves error code and exits ENDP pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/set_pixel_addr_attr.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/set_pixel_addr_attr.asm" push namespace core ; Sets the attribute at a given screen pixel address in hl ; HL contains the address in RAM for a given pixel (not a coordinate) @@ -261,7 +261,7 @@ SET_PIXEL_ADDR_ATTR: add hl, de ;; Final screen addr jp __SET_ATTR2 pop namespace -#line 11 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 11 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" push namespace core PLOT: PROC @@ -276,8 +276,8 @@ PLOT: ex (sp), hl ; Callee ld b, a ld c, h -#line 37 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 43 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 37 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 43 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ld a, 191 cp b jr c, __PLOT_ERR ; jr is faster here (#1) @@ -318,7 +318,7 @@ __PLOT_ERR: COORDS EQU 5C7Dh ENDP pop namespace -#line 6 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 6 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ; Draws a circle at X, Y of radius R ; X, Y on the Stack, R in accumulator (Byte) push namespace core @@ -335,8 +335,8 @@ CIRCLE: ex (sp), hl ; __CALLEE__ convention ld e, h ; E = X ld h, a ; H = R -#line 33 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" -#line 39 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 33 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" +#line 39 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ld a, h add a, d sub 192 @@ -491,9 +491,9 @@ __CIRCLE_PLOT: ret ENDP pop namespace -#line 42 "zx48k/inktemp.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 4 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 42 "arch/zx48k/inktemp.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" push namespace core COPY_ATTR: ; Just copies current permanent attribs into temporal attribs @@ -509,9 +509,9 @@ COPY_ATTR: ld hl, P_FLAG call __REFRESH_TMP __SET_ATTR_MODE: ; Another entry to set print modes. A contains (P_FLAG) -#line 65 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 65 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" ret -#line 67 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 67 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" __REFRESH_TMP: ld a, (hl) and 0b10101010 @@ -522,14 +522,14 @@ __REFRESH_TMP: ret ENDP pop namespace -#line 43 "zx48k/inktemp.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" +#line 43 "arch/zx48k/inktemp.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" ; DRAW using bresenhams algorithm and screen positioning ; Copyleft (k) 2010 by J. Rodriguez (a.k.a. Boriel) http://www.boriel.com ; vim:ts=4:et:sw=4: ; Y parameter in A ; X parameter in high byte on top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelDown.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelDown.asm" ; ; PixelDown ; Alvin Albrecht 2002 @@ -579,8 +579,8 @@ leave: ret ENDP pop namespace -#line 15 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelUp.asm" +#line 15 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelUp.asm" ; ; PixelUp ; Alvin Albrecht 2002 @@ -626,8 +626,8 @@ leave: ret ENDP pop namespace -#line 16 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelLeft.asm" +#line 16 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelLeft.asm" ; ; PixelLeft ; Jose Rodriguez 2012 @@ -669,8 +669,8 @@ leave: ; Sets screen offset back again ret ENDP pop namespace -#line 17 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelRight.asm" +#line 17 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelRight.asm" ; ; PixelRight ; Jose Rodriguez 2012 @@ -712,7 +712,7 @@ leave: ; Sets screen offset back again ret ENDP pop namespace -#line 18 "/zxbasic/src/arch/zx48k/library-asm/draw.asm" +#line 18 "/zxbasic/src/lib/arch/zx48k/runtime/draw.asm" ;; DRAW PROCEDURE push namespace core PROC @@ -974,8 +974,8 @@ __FASTPLOTEND: ret ENDP pop namespace -#line 44 "zx48k/inktemp.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/flash.asm" +#line 44 "arch/zx48k/inktemp.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/flash.asm" ; Sets flash flag in ATTR_P permanently ; Parameter: Paper color in A register push namespace core @@ -1011,8 +1011,8 @@ FLASH_TMP: jr __SET_FLASH ENDP pop namespace -#line 45 "zx48k/inktemp.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/ink.asm" +#line 45 "arch/zx48k/inktemp.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/ink.asm" ; Sets ink color in ATTR_P permanently ; Parameter: Paper color in A register push namespace core @@ -1048,8 +1048,8 @@ INK_TMP: jp __SET_INK ENDP pop namespace -#line 46 "zx48k/inktemp.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/over.asm" +#line 46 "arch/zx48k/inktemp.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/over.asm" ; Sets OVER flag in P_FLAG permanently ; Parameter: OVER flag in bit 0 of A register push namespace core @@ -1087,8 +1087,8 @@ OVER_TMP: jp __SET_ATTR_MODE ENDP pop namespace -#line 47 "zx48k/inktemp.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 47 "arch/zx48k/inktemp.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register push namespace core @@ -1127,5 +1127,5 @@ PAPER_TMP: jp __SET_PAPER ENDP pop namespace -#line 48 "zx48k/inktemp.bas" +#line 48 "arch/zx48k/inktemp.bas" END diff --git a/tests/functional/arch/zx48k/label_sent2.asm b/tests/functional/arch/zx48k/label_sent2.asm index e8545b0c4..9b002d826 100644 --- a/tests/functional/arch/zx48k/label_sent2.asm +++ b/tests/functional/arch/zx48k/label_sent2.asm @@ -41,18 +41,18 @@ ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/border.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/border.asm" ; __FASTCALL__ Routine to change de border ; Parameter (color) specified in A register push namespace core BORDER EQU 229Bh pop namespace ; Nothing to do! (Directly from the ZX Spectrum ROM) -#line 23 "zx48k/label_sent2.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 23 "arch/zx48k/label_sent2.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -61,24 +61,24 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" push namespace core PAPER: PROC @@ -115,5 +115,5 @@ PAPER_TMP: jp __SET_PAPER ENDP pop namespace -#line 24 "zx48k/label_sent2.bas" +#line 24 "arch/zx48k/label_sent2.bas" END diff --git a/tests/functional/arch/zx48k/label_sent3.asm b/tests/functional/arch/zx48k/label_sent3.asm index 8e578f24e..4a5607523 100644 --- a/tests/functional/arch/zx48k/label_sent3.asm +++ b/tests/functional/arch/zx48k/label_sent3.asm @@ -41,18 +41,18 @@ ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/border.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/border.asm" ; __FASTCALL__ Routine to change de border ; Parameter (color) specified in A register push namespace core BORDER EQU 229Bh pop namespace ; Nothing to do! (Directly from the ZX Spectrum ROM) -#line 23 "zx48k/label_sent3.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 23 "arch/zx48k/label_sent3.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -61,24 +61,24 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" push namespace core PAPER: PROC @@ -115,5 +115,5 @@ PAPER_TMP: jp __SET_PAPER ENDP pop namespace -#line 24 "zx48k/label_sent3.bas" +#line 24 "arch/zx48k/label_sent3.bas" END diff --git a/tests/functional/arch/zx48k/label_sent4.asm b/tests/functional/arch/zx48k/label_sent4.asm index 744feb4fa..280069958 100644 --- a/tests/functional/arch/zx48k/label_sent4.asm +++ b/tests/functional/arch/zx48k/label_sent4.asm @@ -41,18 +41,18 @@ ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/border.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/border.asm" ; __FASTCALL__ Routine to change de border ; Parameter (color) specified in A register push namespace core BORDER EQU 229Bh pop namespace ; Nothing to do! (Directly from the ZX Spectrum ROM) -#line 23 "zx48k/label_sent4.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 23 "arch/zx48k/label_sent4.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -61,24 +61,24 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" push namespace core PAPER: PROC @@ -115,5 +115,5 @@ PAPER_TMP: jp __SET_PAPER ENDP pop namespace -#line 24 "zx48k/label_sent4.bas" +#line 24 "arch/zx48k/label_sent4.bas" END diff --git a/tests/functional/arch/zx48k/label_sent5.asm b/tests/functional/arch/zx48k/label_sent5.asm index 4b9f54d0d..279951cd1 100644 --- a/tests/functional/arch/zx48k/label_sent5.asm +++ b/tests/functional/arch/zx48k/label_sent5.asm @@ -41,18 +41,18 @@ ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/border.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/border.asm" ; __FASTCALL__ Routine to change de border ; Parameter (color) specified in A register push namespace core BORDER EQU 229Bh pop namespace ; Nothing to do! (Directly from the ZX Spectrum ROM) -#line 23 "zx48k/label_sent5.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 23 "arch/zx48k/label_sent5.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" ; Sets paper color in ATTR_P permanently ; Parameter: Paper color in A register -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -61,24 +61,24 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/paper.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/paper.asm" push namespace core PAPER: PROC @@ -115,5 +115,5 @@ PAPER_TMP: jp __SET_PAPER ENDP pop namespace -#line 24 "zx48k/label_sent5.bas" +#line 24 "arch/zx48k/label_sent5.bas" END diff --git a/tests/functional/arch/zx48k/lcd3.asm b/tests/functional/arch/zx48k/lcd3.asm index f57c1dc8d..09d979a87 100644 --- a/tests/functional/arch/zx48k/lcd3.asm +++ b/tests/functional/arch/zx48k/lcd3.asm @@ -241,18 +241,18 @@ __ADDF: ; Addition SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -709,7 +709,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -752,7 +753,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -788,10 +789,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -840,7 +841,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -957,14 +958,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -982,7 +983,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1007,12 +1008,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1055,9 +1056,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/lcd7.asm b/tests/functional/arch/zx48k/lcd7.asm index 0a38458bc..271c352b8 100644 --- a/tests/functional/arch/zx48k/lcd7.asm +++ b/tests/functional/arch/zx48k/lcd7.asm @@ -111,18 +111,18 @@ _Frame__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -579,7 +579,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -622,7 +623,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -658,10 +659,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -710,7 +711,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -827,14 +828,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -852,7 +853,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -877,12 +878,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -925,9 +926,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/lcd8.asm b/tests/functional/arch/zx48k/lcd8.asm index fbb7cc8ac..701d56919 100644 --- a/tests/functional/arch/zx48k/lcd8.asm +++ b/tests/functional/arch/zx48k/lcd8.asm @@ -113,18 +113,18 @@ _Frame__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -581,7 +581,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -624,7 +625,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -660,10 +661,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -712,7 +713,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -829,14 +830,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -854,7 +855,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -879,12 +880,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -927,9 +928,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/lcd9.asm b/tests/functional/arch/zx48k/lcd9.asm index c58707220..38c1d4e05 100644 --- a/tests/functional/arch/zx48k/lcd9.asm +++ b/tests/functional/arch/zx48k/lcd9.asm @@ -103,18 +103,18 @@ _Frame__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -571,7 +571,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -614,7 +615,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -650,10 +651,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -702,7 +703,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -819,14 +820,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -844,7 +845,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -869,12 +870,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -917,9 +918,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/let_array_local_const0.asm b/tests/functional/arch/zx48k/let_array_local_const0.asm index 3378acf56..ff43b8c0b 100644 --- a/tests/functional/arch/zx48k/let_array_local_const0.asm +++ b/tests/functional/arch/zx48k/let_array_local_const0.asm @@ -696,18 +696,18 @@ __ALLOC_INITIALIZED_LOCAL_ARRAY: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -1129,7 +1129,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -1172,7 +1173,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -1208,10 +1209,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -1260,7 +1261,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1377,14 +1378,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1402,7 +1403,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1427,12 +1428,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1475,9 +1476,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/load02.asm b/tests/functional/arch/zx48k/load02.asm index b3b6252d7..318738df6 100644 --- a/tests/functional/arch/zx48k/load02.asm +++ b/tests/functional/arch/zx48k/load02.asm @@ -342,18 +342,18 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -841,7 +841,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -884,7 +885,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -920,10 +921,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -972,7 +973,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1089,14 +1090,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1114,7 +1115,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1139,12 +1140,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1187,9 +1188,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/load03.asm b/tests/functional/arch/zx48k/load03.asm index 85fd7aac6..8fcf7112c 100644 --- a/tests/functional/arch/zx48k/load03.asm +++ b/tests/functional/arch/zx48k/load03.asm @@ -339,18 +339,18 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -838,7 +838,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -881,7 +882,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -917,10 +918,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -969,7 +970,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1086,14 +1087,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1111,7 +1112,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1136,12 +1137,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1184,9 +1185,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/loadstr.asm b/tests/functional/arch/zx48k/loadstr.asm index cd112c631..b7975ed40 100644 --- a/tests/functional/arch/zx48k/loadstr.asm +++ b/tests/functional/arch/zx48k/loadstr.asm @@ -855,18 +855,18 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows diff --git a/tests/functional/arch/zx48k/loadu16ii.asm b/tests/functional/arch/zx48k/loadu16ii.asm index f71ee3927..d2285eca9 100644 --- a/tests/functional/arch/zx48k/loadu16ii.asm +++ b/tests/functional/arch/zx48k/loadu16ii.asm @@ -78,18 +78,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -546,7 +546,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -589,7 +590,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -625,10 +626,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -677,7 +678,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -794,14 +795,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -819,7 +820,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -844,12 +845,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -892,9 +893,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/ltee1.asm b/tests/functional/arch/zx48k/ltee1.asm index 18b53f983..709f65df6 100644 --- a/tests/functional/arch/zx48k/ltee1.asm +++ b/tests/functional/arch/zx48k/ltee1.asm @@ -128,18 +128,18 @@ _addWibble__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -596,7 +596,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -639,7 +640,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -675,10 +676,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -727,7 +728,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -844,14 +845,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -869,7 +870,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -894,12 +895,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -942,9 +943,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/memcpytest.asm b/tests/functional/arch/zx48k/memcpytest.asm index c61fa2d42..3166a61c1 100644 --- a/tests/functional/arch/zx48k/memcpytest.asm +++ b/tests/functional/arch/zx48k/memcpytest.asm @@ -146,18 +146,18 @@ _MemSet__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -649,7 +649,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -692,7 +693,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -728,10 +729,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -780,7 +781,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -897,14 +898,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -922,7 +923,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -947,12 +948,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -995,9 +996,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/noheap.asm b/tests/functional/arch/zx48k/noheap.asm index 2dc0da92f..3b0fad6b6 100644 --- a/tests/functional/arch/zx48k/noheap.asm +++ b/tests/functional/arch/zx48k/noheap.asm @@ -55,18 +55,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -523,7 +523,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -566,7 +567,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -602,10 +603,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -654,7 +655,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -771,14 +772,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -796,7 +797,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -821,12 +822,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -869,9 +870,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/ongosub.asm b/tests/functional/arch/zx48k/ongosub.asm index c18978b98..5834449a7 100644 --- a/tests/functional/arch/zx48k/ongosub.asm +++ b/tests/functional/arch/zx48k/ongosub.asm @@ -131,18 +131,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -599,7 +599,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -642,7 +643,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -678,10 +679,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -730,7 +731,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -847,14 +848,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -872,7 +873,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -897,12 +898,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -945,9 +946,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/ongoto.asm b/tests/functional/arch/zx48k/ongoto.asm index ae0521b32..906662e28 100644 --- a/tests/functional/arch/zx48k/ongoto.asm +++ b/tests/functional/arch/zx48k/ongoto.asm @@ -108,18 +108,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -576,7 +576,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -619,7 +620,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -655,10 +656,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -707,7 +708,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -824,14 +825,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -849,7 +850,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -874,12 +875,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -922,9 +923,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt1_dim_arr_global.asm b/tests/functional/arch/zx48k/opt1_dim_arr_global.asm index 12f939825..8b153f102 100644 --- a/tests/functional/arch/zx48k/opt1_dim_arr_global.asm +++ b/tests/functional/arch/zx48k/opt1_dim_arr_global.asm @@ -210,18 +210,18 @@ TMP_ARR_PTR: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -678,7 +678,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -721,7 +722,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -757,10 +758,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -809,7 +810,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -926,14 +927,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -951,7 +952,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -976,12 +977,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1024,9 +1025,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt1_dim_arr_global2.asm b/tests/functional/arch/zx48k/opt1_dim_arr_global2.asm index b6f764236..76227284a 100644 --- a/tests/functional/arch/zx48k/opt1_dim_arr_global2.asm +++ b/tests/functional/arch/zx48k/opt1_dim_arr_global2.asm @@ -69,18 +69,18 @@ _a.__DATA__: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -537,7 +537,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -580,7 +581,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -616,10 +617,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -668,7 +669,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -785,14 +786,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -810,7 +811,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -835,12 +836,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -883,9 +884,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt1_dim_arr_global3.asm b/tests/functional/arch/zx48k/opt1_dim_arr_global3.asm index 617141054..4c16a2b45 100644 --- a/tests/functional/arch/zx48k/opt1_dim_arr_global3.asm +++ b/tests/functional/arch/zx48k/opt1_dim_arr_global3.asm @@ -71,18 +71,18 @@ _a.__DATA__: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -539,7 +539,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -582,7 +583,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -618,10 +619,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -670,7 +671,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -787,14 +788,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -812,7 +813,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -837,12 +838,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -885,9 +886,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt1_dim_arr_global4.asm b/tests/functional/arch/zx48k/opt1_dim_arr_global4.asm index 53fdc1242..8feca87fe 100644 --- a/tests/functional/arch/zx48k/opt1_dim_arr_global4.asm +++ b/tests/functional/arch/zx48k/opt1_dim_arr_global4.asm @@ -214,18 +214,18 @@ TMP_ARR_PTR: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -682,7 +682,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -725,7 +726,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -761,10 +762,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -813,7 +814,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -930,14 +931,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -955,7 +956,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -980,12 +981,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1028,9 +1029,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt1_dim_arr_local2.asm b/tests/functional/arch/zx48k/opt1_dim_arr_local2.asm index 70a3c406b..159ee2efb 100644 --- a/tests/functional/arch/zx48k/opt1_dim_arr_local2.asm +++ b/tests/functional/arch/zx48k/opt1_dim_arr_local2.asm @@ -503,18 +503,18 @@ __ALLOC_INITIALIZED_LOCAL_ARRAY: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -936,7 +936,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -979,7 +980,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -1015,10 +1016,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -1067,7 +1068,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1184,14 +1185,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1209,7 +1210,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1234,12 +1235,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1282,9 +1283,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt2_fastcall_func.asm b/tests/functional/arch/zx48k/opt2_fastcall_func.asm index 31d1566ea..fc2887e30 100644 --- a/tests/functional/arch/zx48k/opt2_fastcall_func.asm +++ b/tests/functional/arch/zx48k/opt2_fastcall_func.asm @@ -99,18 +99,18 @@ _c2__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -567,7 +567,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -610,7 +611,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -646,10 +647,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -698,7 +699,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -815,14 +816,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -840,7 +841,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -865,12 +866,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -913,9 +914,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt2_func_call.asm b/tests/functional/arch/zx48k/opt2_func_call.asm index 1039caa47..6d359152c 100644 --- a/tests/functional/arch/zx48k/opt2_func_call.asm +++ b/tests/functional/arch/zx48k/opt2_func_call.asm @@ -77,18 +77,18 @@ _c1__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -545,7 +545,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -588,7 +589,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -624,10 +625,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -676,7 +677,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -793,14 +794,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -818,7 +819,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -843,12 +844,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -891,9 +892,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt3_data2.asm b/tests/functional/arch/zx48k/opt3_data2.asm index a7b82c2e2..5e2fa3371 100644 --- a/tests/functional/arch/zx48k/opt3_data2.asm +++ b/tests/functional/arch/zx48k/opt3_data2.asm @@ -289,18 +289,18 @@ TMP_ARR_PTR: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -757,7 +757,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -800,7 +801,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -836,10 +837,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -888,7 +889,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1005,14 +1006,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1030,7 +1031,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1055,12 +1056,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1103,9 +1104,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/opt3_einar.asm b/tests/functional/arch/zx48k/opt3_einar.asm index 3201b0c9f..2d04a02cf 100644 --- a/tests/functional/arch/zx48k/opt3_einar.asm +++ b/tests/functional/arch/zx48k/opt3_einar.asm @@ -92,18 +92,18 @@ _x2__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -560,7 +560,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -603,7 +604,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -639,10 +640,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -691,7 +692,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -808,14 +809,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -833,7 +834,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -858,12 +859,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -906,9 +907,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/optconst.asm b/tests/functional/arch/zx48k/optconst.asm index 1e9f9630f..1a72540b1 100644 --- a/tests/functional/arch/zx48k/optconst.asm +++ b/tests/functional/arch/zx48k/optconst.asm @@ -82,18 +82,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -550,7 +550,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -593,7 +594,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -629,10 +630,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -681,7 +682,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -798,14 +799,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -823,7 +824,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -848,12 +849,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -896,9 +897,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/param0.asm b/tests/functional/arch/zx48k/param0.asm index d1823b708..58a688cee 100644 --- a/tests/functional/arch/zx48k/param0.asm +++ b/tests/functional/arch/zx48k/param0.asm @@ -95,18 +95,18 @@ _test__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -563,7 +563,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -606,7 +607,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -642,10 +643,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -694,7 +695,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -811,14 +812,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -836,7 +837,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -861,12 +862,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -909,9 +910,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/param1.asm b/tests/functional/arch/zx48k/param1.asm index 5773e2093..b662a9323 100644 --- a/tests/functional/arch/zx48k/param1.asm +++ b/tests/functional/arch/zx48k/param1.asm @@ -89,18 +89,18 @@ _test__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -557,7 +557,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -600,7 +601,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -636,10 +637,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -688,7 +689,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -805,14 +806,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -830,7 +831,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -855,12 +856,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -903,9 +904,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/param2.asm b/tests/functional/arch/zx48k/param2.asm index fa3191d8d..4191bdec4 100644 --- a/tests/functional/arch/zx48k/param2.asm +++ b/tests/functional/arch/zx48k/param2.asm @@ -95,18 +95,18 @@ _test__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -563,7 +563,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -606,7 +607,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -642,10 +643,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -694,7 +695,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -811,14 +812,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -836,7 +837,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -861,12 +862,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -909,9 +910,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/parambyref1.asm b/tests/functional/arch/zx48k/parambyref1.asm index 7dd24b594..bdb467a2e 100644 --- a/tests/functional/arch/zx48k/parambyref1.asm +++ b/tests/functional/arch/zx48k/parambyref1.asm @@ -93,18 +93,18 @@ _test__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -561,7 +561,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -604,7 +605,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -640,10 +641,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -692,7 +693,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -809,14 +810,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -834,7 +835,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -859,12 +860,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -907,9 +908,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/plot.asm b/tests/functional/arch/zx48k/plot.asm index 9f105ed12..8fbde2ac3 100644 --- a/tests/functional/arch/zx48k/plot.asm +++ b/tests/functional/arch/zx48k/plot.asm @@ -75,9 +75,9 @@ _b: ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 4 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -86,24 +86,24 @@ _b: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 6 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 6 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" push namespace core COPY_ATTR: ; Just copies current permanent attribs into temporal attribs @@ -119,9 +119,9 @@ COPY_ATTR: ld hl, P_FLAG call __REFRESH_TMP __SET_ATTR_MODE: ; Another entry to set print modes. A contains (P_FLAG) -#line 65 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 65 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" ret -#line 67 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 67 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" __REFRESH_TMP: ld a, (hl) and 0b10101010 @@ -132,9 +132,9 @@ __REFRESH_TMP: ret ENDP pop namespace -#line 53 "zx48k/plot.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/neg32.asm" +#line 53 "arch/zx48k/plot.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/neg32.asm" push namespace core __ABS32: bit 7, d @@ -159,7 +159,7 @@ __NEG32: ; Negates DEHL (Two's complement) inc de ret pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/ftou32reg.asm" push namespace core __FTOU32REG: ; Converts a Float to (un)signed 32 bit integer (NOTE: It's ALWAYS 32 bit signed) ; Input FP number in A EDCB (A exponent, EDCB mantissa) @@ -231,13 +231,13 @@ __FTOU8: ; Converts float in C ED LH to Unsigned byte in A ld a, l ret pop namespace -#line 54 "zx48k/plot.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 54 "arch/zx48k/plot.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ; MIXED __FASTCAL__ / __CALLE__ PLOT Function ; Plots a point into the screen calling the ZX ROM PLOT routine ; Y in A (accumulator) ; X in top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -271,10 +271,10 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 8 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/attr.asm" +#line 8 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/attr.asm" ; Attribute routines ; vim:ts=4:et:sw: push namespace core @@ -320,7 +320,7 @@ __SET_ATTR2: ; Sets attr from ATTR_T to (HL) which points to the scr address ret ENDP pop namespace -#line 3 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" +#line 3 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" ; Printing positioning library. push namespace core ; Loads into DE current ROW, COL print position from S_POSN mem var. @@ -362,7 +362,7 @@ __SET_SCR_PTR: ;; Fast ret ENDP pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" push namespace core __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -383,8 +383,8 @@ __OUT_OF_SCREEN_ERR: jp __STOP ; Saves error code and exits ENDP pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/set_pixel_addr_attr.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/set_pixel_addr_attr.asm" push namespace core ; Sets the attribute at a given screen pixel address in hl ; HL contains the address in RAM for a given pixel (not a coordinate) @@ -403,7 +403,7 @@ SET_PIXEL_ADDR_ATTR: add hl, de ;; Final screen addr jp __SET_ATTR2 pop namespace -#line 11 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 11 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" push namespace core PLOT: PROC @@ -418,8 +418,8 @@ PLOT: ex (sp), hl ; Callee ld b, a ld c, h -#line 37 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 43 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 37 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 43 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ld a, 191 cp b jr c, __PLOT_ERR ; jr is faster here (#1) @@ -460,5 +460,5 @@ __PLOT_ERR: COORDS EQU 5C7Dh ENDP pop namespace -#line 55 "zx48k/plot.bas" +#line 55 "arch/zx48k/plot.bas" END diff --git a/tests/functional/arch/zx48k/print.asm b/tests/functional/arch/zx48k/print.asm index bf1fa780a..1df5e4e0c 100644 --- a/tests/functional/arch/zx48k/print.asm +++ b/tests/functional/arch/zx48k/print.asm @@ -100,18 +100,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -568,7 +568,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -611,7 +612,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -647,10 +648,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -699,7 +700,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -816,14 +817,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -841,7 +842,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -866,12 +867,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -914,9 +915,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_arrstr.asm b/tests/functional/arch/zx48k/print_arrstr.asm index b714939ca..ddda44e4e 100644 --- a/tests/functional/arch/zx48k/print_arrstr.asm +++ b/tests/functional/arch/zx48k/print_arrstr.asm @@ -108,18 +108,18 @@ _a.__DATA__: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -576,7 +576,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -619,7 +620,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -655,10 +656,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -707,7 +708,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -824,14 +825,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -849,7 +850,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -874,12 +875,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -922,9 +923,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_at.asm b/tests/functional/arch/zx48k/print_at.asm index 3c19766ba..87a68ddb1 100644 --- a/tests/functional/arch/zx48k/print_at.asm +++ b/tests/functional/arch/zx48k/print_at.asm @@ -67,18 +67,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -535,7 +535,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -578,7 +579,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -614,10 +615,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -666,7 +667,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -783,14 +784,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -808,7 +809,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -833,12 +834,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -881,9 +882,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_comma.asm b/tests/functional/arch/zx48k/print_comma.asm index aeac9ca3b..a38163dcb 100644 --- a/tests/functional/arch/zx48k/print_comma.asm +++ b/tests/functional/arch/zx48k/print_comma.asm @@ -58,18 +58,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -526,7 +526,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -569,7 +570,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -605,10 +606,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -657,7 +658,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -774,14 +775,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -799,7 +800,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -824,12 +825,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -872,9 +873,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_eol.asm b/tests/functional/arch/zx48k/print_eol.asm index ff98f614f..6985db95a 100644 --- a/tests/functional/arch/zx48k/print_eol.asm +++ b/tests/functional/arch/zx48k/print_eol.asm @@ -53,18 +53,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -521,7 +521,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -564,7 +565,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -600,10 +601,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -652,7 +653,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -769,14 +770,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -794,7 +795,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -819,12 +820,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -867,9 +868,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_eol_attr.asm b/tests/functional/arch/zx48k/print_eol_attr.asm index 34c353a79..3b742afdf 100644 --- a/tests/functional/arch/zx48k/print_eol_attr.asm +++ b/tests/functional/arch/zx48k/print_eol_attr.asm @@ -63,18 +63,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -531,7 +531,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -574,7 +575,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -610,10 +611,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -662,7 +663,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -779,14 +780,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -804,7 +805,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -829,12 +830,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -877,9 +878,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_f.asm b/tests/functional/arch/zx48k/print_f.asm index c4dcfc655..f8a43d849 100644 --- a/tests/functional/arch/zx48k/print_f.asm +++ b/tests/functional/arch/zx48k/print_f.asm @@ -63,18 +63,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -531,7 +531,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -574,7 +575,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -610,10 +611,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -662,7 +663,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -779,14 +780,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -804,7 +805,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -829,12 +830,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -877,9 +878,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_f16.asm b/tests/functional/arch/zx48k/print_f16.asm index 06e770b1f..e67cf7d27 100644 --- a/tests/functional/arch/zx48k/print_f16.asm +++ b/tests/functional/arch/zx48k/print_f16.asm @@ -57,18 +57,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -525,7 +525,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -568,7 +569,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -604,10 +605,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -656,7 +657,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -773,14 +774,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -798,7 +799,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -823,12 +824,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -871,9 +872,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_i16.asm b/tests/functional/arch/zx48k/print_i16.asm index 92ebae436..12a2b8a62 100644 --- a/tests/functional/arch/zx48k/print_i16.asm +++ b/tests/functional/arch/zx48k/print_i16.asm @@ -56,18 +56,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -524,7 +524,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -567,7 +568,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -603,10 +604,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -655,7 +656,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -772,14 +773,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -797,7 +798,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -822,12 +823,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -870,9 +871,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_i32.asm b/tests/functional/arch/zx48k/print_i32.asm index d8a7f9c92..60633bf14 100644 --- a/tests/functional/arch/zx48k/print_i32.asm +++ b/tests/functional/arch/zx48k/print_i32.asm @@ -57,18 +57,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -525,7 +525,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -568,7 +569,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -604,10 +605,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -656,7 +657,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -773,14 +774,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -798,7 +799,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -823,12 +824,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -871,9 +872,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_i8.asm b/tests/functional/arch/zx48k/print_i8.asm index e97a348ab..481206642 100644 --- a/tests/functional/arch/zx48k/print_i8.asm +++ b/tests/functional/arch/zx48k/print_i8.asm @@ -56,18 +56,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -524,7 +524,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -567,7 +568,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -603,10 +604,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -655,7 +656,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -772,14 +773,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -797,7 +798,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -822,12 +823,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -870,9 +871,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_tab.asm b/tests/functional/arch/zx48k/print_tab.asm index 06d376cd8..8ada6b285 100644 --- a/tests/functional/arch/zx48k/print_tab.asm +++ b/tests/functional/arch/zx48k/print_tab.asm @@ -54,18 +54,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -522,7 +522,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -565,7 +566,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -601,10 +602,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -653,7 +654,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -770,14 +771,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -795,7 +796,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -820,12 +821,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -868,9 +869,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_u16.asm b/tests/functional/arch/zx48k/print_u16.asm index 0e7fdf13c..20c919fa2 100644 --- a/tests/functional/arch/zx48k/print_u16.asm +++ b/tests/functional/arch/zx48k/print_u16.asm @@ -56,18 +56,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -524,7 +524,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -567,7 +568,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -603,10 +604,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -655,7 +656,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -772,14 +773,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -797,7 +798,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -822,12 +823,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -870,9 +871,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_u32.asm b/tests/functional/arch/zx48k/print_u32.asm index 273d6f099..21fd745af 100644 --- a/tests/functional/arch/zx48k/print_u32.asm +++ b/tests/functional/arch/zx48k/print_u32.asm @@ -57,18 +57,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -525,7 +525,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -568,7 +569,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -604,10 +605,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -656,7 +657,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -773,14 +774,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -798,7 +799,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -823,12 +824,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -871,9 +872,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/print_u8.asm b/tests/functional/arch/zx48k/print_u8.asm index 49614b7da..24eec3c58 100644 --- a/tests/functional/arch/zx48k/print_u8.asm +++ b/tests/functional/arch/zx48k/print_u8.asm @@ -56,18 +56,18 @@ _a: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -524,7 +524,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -567,7 +568,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -603,10 +604,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -655,7 +656,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -772,14 +773,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -797,7 +798,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -822,12 +823,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -870,9 +871,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/read10.asm b/tests/functional/arch/zx48k/read10.asm index e2419b837..6653493e0 100644 --- a/tests/functional/arch/zx48k/read10.asm +++ b/tests/functional/arch/zx48k/read10.asm @@ -161,18 +161,18 @@ __DATA__END: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -629,7 +629,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -672,7 +673,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -708,10 +709,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -760,7 +761,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -877,14 +878,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -902,7 +903,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -927,12 +928,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -975,9 +976,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/read12.asm b/tests/functional/arch/zx48k/read12.asm index 858b51b0e..1940b79c2 100644 --- a/tests/functional/arch/zx48k/read12.asm +++ b/tests/functional/arch/zx48k/read12.asm @@ -96,18 +96,18 @@ __DATA__END: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -564,7 +564,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -607,7 +608,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -643,10 +644,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -695,7 +696,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -812,14 +813,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -837,7 +838,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -862,12 +863,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -910,9 +911,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/read13.asm b/tests/functional/arch/zx48k/read13.asm index db270245f..06ffbe861 100644 --- a/tests/functional/arch/zx48k/read13.asm +++ b/tests/functional/arch/zx48k/read13.asm @@ -314,18 +314,18 @@ TMP_ARR_PTR: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -782,7 +782,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -825,7 +826,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -861,10 +862,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -913,7 +914,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1030,14 +1031,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1055,7 +1056,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1080,12 +1081,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1128,9 +1129,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/read5.asm b/tests/functional/arch/zx48k/read5.asm index b2138fec4..57c61d198 100644 --- a/tests/functional/arch/zx48k/read5.asm +++ b/tests/functional/arch/zx48k/read5.asm @@ -161,18 +161,18 @@ __DATA__END: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -629,7 +629,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -672,7 +673,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -708,10 +709,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -760,7 +761,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -877,14 +878,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -902,7 +903,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -927,12 +928,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -975,9 +976,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/read8.asm b/tests/functional/arch/zx48k/read8.asm index ff833d8b6..e51ec2be0 100644 --- a/tests/functional/arch/zx48k/read8.asm +++ b/tests/functional/arch/zx48k/read8.asm @@ -176,18 +176,18 @@ __DATA__END: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -644,7 +644,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -687,7 +688,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -723,10 +724,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -775,7 +776,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -892,14 +893,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -917,7 +918,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -942,12 +943,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -990,9 +991,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/read9.asm b/tests/functional/arch/zx48k/read9.asm index b9bd80055..ab13f8938 100644 --- a/tests/functional/arch/zx48k/read9.asm +++ b/tests/functional/arch/zx48k/read9.asm @@ -324,18 +324,18 @@ TMP_ARR_PTR: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -792,7 +792,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -835,7 +836,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -871,10 +872,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -923,7 +924,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -1040,14 +1041,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -1065,7 +1066,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -1090,12 +1091,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1138,9 +1139,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/readokdown.asm b/tests/functional/arch/zx48k/readokdown.asm index 478c4ac9f..bb26b2cba 100644 --- a/tests/functional/arch/zx48k/readokdown.asm +++ b/tests/functional/arch/zx48k/readokdown.asm @@ -159,18 +159,18 @@ __DATA__END: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -627,7 +627,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -670,7 +671,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -706,10 +707,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -758,7 +759,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -875,14 +876,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -900,7 +901,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -925,12 +926,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -973,9 +974,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/readokup.asm b/tests/functional/arch/zx48k/readokup.asm index 8fe65ea43..5a4fe876f 100644 --- a/tests/functional/arch/zx48k/readokup.asm +++ b/tests/functional/arch/zx48k/readokup.asm @@ -158,18 +158,18 @@ __DATA__END: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -626,7 +626,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -669,7 +670,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -705,10 +706,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -757,7 +758,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -874,14 +875,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -899,7 +900,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -924,12 +925,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -972,9 +973,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/simple.asm b/tests/functional/arch/zx48k/simple.asm index 5422c9ffd..013cd0763 100644 --- a/tests/functional/arch/zx48k/simple.asm +++ b/tests/functional/arch/zx48k/simple.asm @@ -74,18 +74,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -542,7 +542,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -585,7 +586,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -621,10 +622,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -673,7 +674,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -790,14 +791,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -815,7 +816,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -840,12 +841,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -888,9 +889,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/sin1.asm b/tests/functional/arch/zx48k/sin1.asm index 3f9181f02..b4b286e30 100644 --- a/tests/functional/arch/zx48k/sin1.asm +++ b/tests/functional/arch/zx48k/sin1.asm @@ -62,18 +62,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -530,7 +530,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -573,7 +574,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -609,10 +610,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -661,7 +662,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -778,14 +779,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -803,7 +804,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -828,12 +829,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -876,9 +877,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/slice2.asm b/tests/functional/arch/zx48k/slice2.asm index 7ec544afe..b335c11f7 100644 --- a/tests/functional/arch/zx48k/slice2.asm +++ b/tests/functional/arch/zx48k/slice2.asm @@ -129,9 +129,9 @@ _doubleSizePrint__leave: DEFB 6Ch DEFB 64h ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/cls.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/cls.asm" ;; Clears the user screen (24 rows) -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -140,24 +140,24 @@ _doubleSizePrint__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 4 "/zxbasic/src/arch/zx48k/library-asm/cls.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/cls.asm" push namespace core CLS: PROC @@ -186,8 +186,8 @@ CLS: ret ENDP pop namespace -#line 106 "zx48k/slice2.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 106 "arch/zx48k/slice2.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -221,8 +221,8 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 107 "zx48k/slice2.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm" +#line 107 "arch/zx48k/slice2.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -282,7 +282,7 @@ __STOP: ; HL = BLOCK Start & DE = Length. ; An init directive is useful for initialization routines. ; They will be added automatically if needed. -#line 1 "/zxbasic/src/arch/zx48k/library-asm/heapinit.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/heapinit.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -389,7 +389,7 @@ __MEM_INIT2: ret ENDP pop namespace -#line 69 "/zxbasic/src/arch/zx48k/library-asm/free.asm" +#line 69 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm" ; --------------------------------------------------------------------- ; MEM_FREE ; Frees a block of memory @@ -488,9 +488,9 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ret ENDP pop namespace -#line 108 "zx48k/slice2.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/loadstr.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 108 "arch/zx48k/slice2.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/loadstr.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -580,9 +580,9 @@ __MEM_START: __MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE ld a, h ; HL = NULL (No memory available?) or l -#line 113 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 113 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ret z ; NULL -#line 115 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 115 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ; HL = Pointer to Free block ld e, (hl) inc hl @@ -647,7 +647,7 @@ __MEM_SUBTRACT: ret ENDP pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/loadstr.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/loadstr.asm" ; Loads a string (ptr) from HL ; and duplicates it on dynamic memory again ; Finally, it returns result pointer in HL @@ -684,15 +684,15 @@ __LOADSTR: ; __FASTCALL__ entry pop hl ; Recovers destiny in hl as result ret pop namespace -#line 109 "zx48k/slice2.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/pstorestr2.asm" +#line 109 "arch/zx48k/slice2.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/pstorestr2.asm" ; vim:ts=4:et:sw=4 ; ; Stores an string (pointer to the HEAP by DE) into the address pointed ; by (IX + BC). No new copy of the string is created into the HEAP, since ; it's supposed it's already created (temporary string) ; -#line 1 "/zxbasic/src/arch/zx48k/library-asm/storestr2.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/storestr2.asm" ; Similar to __STORE_STR, but this one is called when ; the value of B$ if already duplicated onto the stack. ; So we needn't call STRASSING to create a duplication @@ -725,7 +725,7 @@ __STORE_STR2: dec hl ; HL points to mem address variable. This might be useful in the future. ret pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/pstorestr2.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/pstorestr2.asm" push namespace core __PSTORE_STR2: push ix @@ -733,8 +733,8 @@ __PSTORE_STR2: add hl, bc jp __STORE_STR2 pop namespace -#line 110 "zx48k/slice2.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/strlen.asm" +#line 110 "arch/zx48k/slice2.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/strlen.asm" ; Returns len if a string ; If a string is NULL, its len is also 0 ; Result returned in HL @@ -749,8 +749,8 @@ __STRLEN: ; Direct FASTCALL entry ld l, a ret pop namespace -#line 111 "zx48k/slice2.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/strslice.asm" +#line 111 "arch/zx48k/slice2.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/strslice.asm" ; String slicing library ; HL = Str pointer ; DE = String start @@ -835,5 +835,5 @@ __FREE_ON_EXIT: ret ENDP pop namespace -#line 112 "zx48k/slice2.bas" +#line 112 "arch/zx48k/slice2.bas" END diff --git a/tests/functional/arch/zx48k/spfill.asm b/tests/functional/arch/zx48k/spfill.asm index c1a2797e5..c5ea8c1e4 100644 --- a/tests/functional/arch/zx48k/spfill.asm +++ b/tests/functional/arch/zx48k/spfill.asm @@ -62,7 +62,7 @@ ei ret _SPFill: -#line 11 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" +#line 11 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" push namespace core PROC LOCAL SPPFill @@ -385,14 +385,14 @@ SPPFill_end: LD IX,(SPPFill_IXBuffer) ENDP pop namespace -#line 541 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" +#line 541 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" _SPFill__leave: ret .LABEL.__LABEL0: DEFW 0001h DEFB 61h ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/CharLeft.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/CharLeft.asm" ; ; CharLeft ; Alvin Albrecht 2002 @@ -442,8 +442,8 @@ SP.CharLeft: ; ccf ; ret ; ENDIF -#line 549 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/CharRight.asm" +#line 549 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/CharRight.asm" ; ; CharRight ; Alvin Albrecht 2002 @@ -488,8 +488,8 @@ SP.CharRight: ; ccf ; ret ; ENDIF -#line 550 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/GetScrnAddr.asm" +#line 550 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/GetScrnAddr.asm" ; ; GetScrnAddr ; Alvin Albrecht 2002 @@ -543,7 +543,7 @@ norotate: ret ENDP pop namespace -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -552,26 +552,26 @@ norotate: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 63 "/zxbasic/src/arch/zx48k/library-asm/SP/GetScrnAddr.asm" -#line 551 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelDown.asm" +#line 63 "/zxbasic/src/lib/arch/zx48k/runtime/SP/GetScrnAddr.asm" +#line 551 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelDown.asm" ; ; PixelDown ; Alvin Albrecht 2002 @@ -621,8 +621,8 @@ leave: ret ENDP pop namespace -#line 552 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/SP/PixelUp.asm" +#line 552 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/SP/PixelUp.asm" ; ; PixelUp ; Alvin Albrecht 2002 @@ -668,11 +668,11 @@ leave: ret ENDP pop namespace -#line 553 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ; Bresenham's like circle algorithm ; best known as Middle Point Circle drawing algorithm -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -706,15 +706,15 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 5 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 5 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ; MIXED __FASTCAL__ / __CALLE__ PLOT Function ; Plots a point into the screen calling the ZX ROM PLOT routine ; Y in A (accumulator) ; X in top of the stack -#line 1 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/attr.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/attr.asm" ; Attribute routines ; vim:ts=4:et:sw: push namespace core @@ -760,7 +760,7 @@ __SET_ATTR2: ; Sets attr from ATTR_T to (HL) which points to the scr address ret ENDP pop namespace -#line 3 "/zxbasic/src/arch/zx48k/library-asm/sposn.asm" +#line 3 "/zxbasic/src/lib/arch/zx48k/runtime/sposn.asm" ; Printing positioning library. push namespace core ; Loads into DE current ROW, COL print position from S_POSN mem var. @@ -802,7 +802,7 @@ __SET_SCR_PTR: ;; Fast ret ENDP pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/in_screen.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/in_screen.asm" push namespace core __IN_SCREEN: ; Returns NO carry if current coords (D, E) @@ -823,8 +823,8 @@ __OUT_OF_SCREEN_ERR: jp __STOP ; Saves error code and exits ENDP pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/set_pixel_addr_attr.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/set_pixel_addr_attr.asm" push namespace core ; Sets the attribute at a given screen pixel address in hl ; HL contains the address in RAM for a given pixel (not a coordinate) @@ -843,7 +843,7 @@ SET_PIXEL_ADDR_ATTR: add hl, de ;; Final screen addr jp __SET_ATTR2 pop namespace -#line 11 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 11 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" push namespace core PLOT: PROC @@ -858,8 +858,8 @@ PLOT: ex (sp), hl ; Callee ld b, a ld c, h -#line 37 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" -#line 43 "/zxbasic/src/arch/zx48k/library-asm/plot.asm" +#line 37 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" +#line 43 "/zxbasic/src/lib/arch/zx48k/runtime/plot.asm" ld a, 191 cp b jr c, __PLOT_ERR ; jr is faster here (#1) @@ -900,7 +900,7 @@ __PLOT_ERR: COORDS EQU 5C7Dh ENDP pop namespace -#line 6 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 6 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ; Draws a circle at X, Y of radius R ; X, Y on the Stack, R in accumulator (Byte) push namespace core @@ -917,8 +917,8 @@ CIRCLE: ex (sp), hl ; __CALLEE__ convention ld e, h ; E = X ld h, a ; H = R -#line 33 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" -#line 39 "/zxbasic/src/arch/zx48k/library-asm/circle.asm" +#line 33 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" +#line 39 "/zxbasic/src/lib/arch/zx48k/runtime/circle.asm" ld a, h add a, d sub 192 @@ -1073,8 +1073,8 @@ __CIRCLE_PLOT: ret ENDP pop namespace -#line 554 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/cls.asm" +#line 554 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/cls.asm" ;; Clears the user screen (24 rows) push namespace core CLS: @@ -1104,9 +1104,9 @@ CLS: ret ENDP pop namespace -#line 555 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" -#line 4 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 555 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" push namespace core COPY_ATTR: ; Just copies current permanent attribs into temporal attribs @@ -1122,9 +1122,9 @@ COPY_ATTR: ld hl, P_FLAG call __REFRESH_TMP __SET_ATTR_MODE: ; Another entry to set print modes. A contains (P_FLAG) -#line 65 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 65 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" ret -#line 67 "/zxbasic/src/arch/zx48k/library-asm/copy_attr.asm" +#line 67 "/zxbasic/src/lib/arch/zx48k/runtime/copy_attr.asm" __REFRESH_TMP: ld a, (hl) and 0b10101010 @@ -1135,8 +1135,8 @@ __REFRESH_TMP: ret ENDP pop namespace -#line 556 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/pause.asm" +#line 556 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/pause.asm" ; The PAUSE statement (Calling the ROM) push namespace core __PAUSE: @@ -1144,14 +1144,14 @@ __PAUSE: ld c, l jp 1F3Dh ; PAUSE_1 pop namespace -#line 557 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/usr_str.asm" +#line 557 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/usr_str.asm" ; This function just returns the address of the UDG of the given str. ; If the str is EMPTY or not a letter, 0 is returned and ERR_NR set ; to "A: Invalid Argument" ; On entry HL points to the string ; and A register is non-zero if the string must be freed (TMP string) -#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -1211,7 +1211,7 @@ __PAUSE: ; HL = BLOCK Start & DE = Length. ; An init directive is useful for initialization routines. ; They will be added automatically if needed. -#line 1 "/zxbasic/src/arch/zx48k/library-asm/heapinit.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/heapinit.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -1318,7 +1318,7 @@ __MEM_INIT2: ret ENDP pop namespace -#line 69 "/zxbasic/src/arch/zx48k/library-asm/free.asm" +#line 69 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm" ; --------------------------------------------------------------------- ; MEM_FREE ; Frees a block of memory @@ -1417,7 +1417,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ret ENDP pop namespace -#line 11 "/zxbasic/src/arch/zx48k/library-asm/usr_str.asm" +#line 11 "/zxbasic/src/lib/arch/zx48k/runtime/usr_str.asm" push namespace core USR_STR: PROC @@ -1468,5 +1468,5 @@ USR_ERROR: ret ENDP pop namespace -#line 558 "/zxbasic/src/arch/zx48k/library/SP/Fill.bas" +#line 558 "/zxbasic/src/lib/arch/zx48k/stdlib/SP/Fill.bas" END diff --git a/tests/functional/arch/zx48k/str0.asm b/tests/functional/arch/zx48k/str0.asm index 2d823a52e..c01b083f9 100644 --- a/tests/functional/arch/zx48k/str0.asm +++ b/tests/functional/arch/zx48k/str0.asm @@ -100,18 +100,18 @@ _test__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -568,7 +568,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -611,7 +612,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -647,10 +648,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -699,7 +700,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -816,14 +817,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -841,7 +842,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -866,12 +867,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -914,9 +915,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/str01.asm b/tests/functional/arch/zx48k/str01.asm index 5b8e05410..323b07d42 100644 --- a/tests/functional/arch/zx48k/str01.asm +++ b/tests/functional/arch/zx48k/str01.asm @@ -51,14 +51,14 @@ _a: ei ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/storestr2.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/storestr2.asm" ; Similar to __STORE_STR, but this one is called when ; the value of B$ if already duplicated onto the stack. ; So we needn't call STRASSING to create a duplication ; HL = address of string memory variable ; DE = address of 2n string. It just copies DE into (HL) ; freeing (HL) previously. -#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -118,7 +118,7 @@ _a: ; HL = BLOCK Start & DE = Length. ; An init directive is useful for initialization routines. ; They will be added automatically if needed. -#line 1 "/zxbasic/src/arch/zx48k/library-asm/heapinit.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/heapinit.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -225,7 +225,7 @@ __MEM_INIT2: ret ENDP pop namespace -#line 69 "/zxbasic/src/arch/zx48k/library-asm/free.asm" +#line 69 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm" ; --------------------------------------------------------------------- ; MEM_FREE ; Frees a block of memory @@ -324,7 +324,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ret ENDP pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/storestr2.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/storestr2.asm" push namespace core __PISTORE_STR2: ; Indirect store temporary string at (IX + BC) push ix @@ -351,13 +351,13 @@ __STORE_STR2: dec hl ; HL points to mem address variable. This might be useful in the future. ret pop namespace -#line 24 "zx48k/str01.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/str.asm" +#line 24 "arch/zx48k/str01.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/str.asm" ; The STR$( ) BASIC function implementation ; Given a FP number in C ED LH ; Returns a pointer (in HL) to the memory heap ; containing the FP number string representation -#line 1 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -417,7 +417,7 @@ __STORE_STR2: ; HL = BLOCK Start & DE = Length. ; An init directive is useful for initialization routines. ; They will be added automatically if needed. -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -451,7 +451,7 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 69 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 69 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ; --------------------------------------------------------------------- ; MEM_ALLOC ; Allocates a block of memory in the heap. @@ -482,9 +482,9 @@ __MEM_START: __MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE ld a, h ; HL = NULL (No memory available?) or l -#line 113 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 113 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ret z ; NULL -#line 115 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 115 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ; HL = Pointer to Free block ld e, (hl) inc hl @@ -549,8 +549,8 @@ __MEM_SUBTRACT: ret ENDP pop namespace -#line 8 "/zxbasic/src/arch/zx48k/library-asm/str.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/stackf.asm" +#line 8 "/zxbasic/src/lib/arch/zx48k/runtime/str.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/stackf.asm" ; ------------------------------------------------------------- ; Functions to manage FP-Stack of the ZX Spectrum ROM CALC ; ------------------------------------------------------------- @@ -589,8 +589,8 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK ld b, a jp __FPSTACK_PUSH pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/str.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/str.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -599,24 +599,24 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 10 "/zxbasic/src/arch/zx48k/library-asm/str.asm" +#line 10 "/zxbasic/src/lib/arch/zx48k/runtime/str.asm" push namespace core __STR: __STR_FAST: @@ -668,9 +668,9 @@ __STR_END: STK_END EQU 5C65h ENDP pop namespace -#line 25 "zx48k/str01.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/u32tofreg.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/neg32.asm" +#line 25 "arch/zx48k/str01.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/u32tofreg.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/neg32.asm" push namespace core __ABS32: bit 7, d @@ -695,7 +695,7 @@ __NEG32: ; Negates DEHL (Two's complement) inc de ret pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/u32tofreg.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/u32tofreg.asm" push namespace core __I8TOFREG: ld l, a @@ -765,5 +765,5 @@ __U32TOFREG_END: ret ENDP pop namespace -#line 26 "zx48k/str01.bas" +#line 26 "arch/zx48k/str01.bas" END diff --git a/tests/functional/arch/zx48k/str02.asm b/tests/functional/arch/zx48k/str02.asm index 690bcd52c..bc7f24dde 100644 --- a/tests/functional/arch/zx48k/str02.asm +++ b/tests/functional/arch/zx48k/str02.asm @@ -67,7 +67,7 @@ _a: DEFB 6Fh DEFB 20h ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -127,7 +127,7 @@ _a: ; HL = BLOCK Start & DE = Length. ; An init directive is useful for initialization routines. ; They will be added automatically if needed. -#line 1 "/zxbasic/src/arch/zx48k/library-asm/heapinit.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/heapinit.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -234,7 +234,7 @@ __MEM_INIT2: ret ENDP pop namespace -#line 69 "/zxbasic/src/arch/zx48k/library-asm/free.asm" +#line 69 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm" ; --------------------------------------------------------------------- ; MEM_FREE ; Frees a block of memory @@ -333,8 +333,8 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed ret ENDP pop namespace -#line 39 "zx48k/str02.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/storestr2.asm" +#line 39 "arch/zx48k/str02.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/storestr2.asm" ; Similar to __STORE_STR, but this one is called when ; the value of B$ if already duplicated onto the stack. ; So we needn't call STRASSING to create a duplication @@ -367,13 +367,13 @@ __STORE_STR2: dec hl ; HL points to mem address variable. This might be useful in the future. ret pop namespace -#line 40 "zx48k/str02.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/str.asm" +#line 40 "arch/zx48k/str02.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/str.asm" ; The STR$( ) BASIC function implementation ; Given a FP number in C ED LH ; Returns a pointer (in HL) to the memory heap ; containing the FP number string representation -#line 1 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ; vim: ts=4:et:sw=4: ; Copyleft (K) by Jose M. Rodriguez de la Rosa ; (a.k.a. Boriel) @@ -433,7 +433,7 @@ __STORE_STR2: ; HL = BLOCK Start & DE = Length. ; An init directive is useful for initialization routines. ; They will be added automatically if needed. -#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm" ; Simple error control routines ; vim:ts=4:et: push namespace core @@ -467,7 +467,7 @@ __STOP: ld (ERR_NR), a ret pop namespace -#line 69 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 69 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ; --------------------------------------------------------------------- ; MEM_ALLOC ; Allocates a block of memory in the heap. @@ -498,9 +498,9 @@ __MEM_START: __MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE ld a, h ; HL = NULL (No memory available?) or l -#line 113 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 113 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ret z ; NULL -#line 115 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm" +#line 115 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm" ; HL = Pointer to Free block ld e, (hl) inc hl @@ -565,8 +565,8 @@ __MEM_SUBTRACT: ret ENDP pop namespace -#line 8 "/zxbasic/src/arch/zx48k/library-asm/str.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/stackf.asm" +#line 8 "/zxbasic/src/lib/arch/zx48k/runtime/str.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/stackf.asm" ; ------------------------------------------------------------- ; Functions to manage FP-Stack of the ZX Spectrum ROM CALC ; ------------------------------------------------------------- @@ -605,8 +605,8 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK ld b, a jp __FPSTACK_PUSH pop namespace -#line 9 "/zxbasic/src/arch/zx48k/library-asm/str.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 9 "/zxbasic/src/lib/arch/zx48k/runtime/str.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -615,24 +615,24 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 10 "/zxbasic/src/arch/zx48k/library-asm/str.asm" +#line 10 "/zxbasic/src/lib/arch/zx48k/runtime/str.asm" push namespace core __STR: __STR_FAST: @@ -684,9 +684,9 @@ __STR_END: STK_END EQU 5C65h ENDP pop namespace -#line 41 "zx48k/str02.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/strcat.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/strlen.asm" +#line 41 "arch/zx48k/str02.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/strcat.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/strlen.asm" ; Returns len if a string ; If a string is NULL, its len is also 0 ; Result returned in HL @@ -701,7 +701,7 @@ __STRLEN: ; Direct FASTCALL entry ld l, a ret pop namespace -#line 3 "/zxbasic/src/arch/zx48k/library-asm/strcat.asm" +#line 3 "/zxbasic/src/lib/arch/zx48k/runtime/strcat.asm" push namespace core __ADDSTR: ; Implements c$ = a$ + b$ ; hl = &a$, de = &b$ (pointers) @@ -797,9 +797,9 @@ __STRCATEND: ret ENDP pop namespace -#line 42 "zx48k/str02.bas" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/u32tofreg.asm" -#line 1 "/zxbasic/src/arch/zx48k/library-asm/neg32.asm" +#line 42 "arch/zx48k/str02.bas" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/u32tofreg.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/neg32.asm" push namespace core __ABS32: bit 7, d @@ -824,7 +824,7 @@ __NEG32: ; Negates DEHL (Two's complement) inc de ret pop namespace -#line 2 "/zxbasic/src/arch/zx48k/library-asm/u32tofreg.asm" +#line 2 "/zxbasic/src/lib/arch/zx48k/runtime/u32tofreg.asm" push namespace core __I8TOFREG: ld l, a @@ -894,5 +894,5 @@ __U32TOFREG_END: ret ENDP pop namespace -#line 43 "zx48k/str02.bas" +#line 43 "arch/zx48k/str02.bas" END diff --git a/tests/functional/arch/zx48k/strbase2.asm b/tests/functional/arch/zx48k/strbase2.asm index 3fc2cbb7b..235d395e7 100644 --- a/tests/functional/arch/zx48k/strbase2.asm +++ b/tests/functional/arch/zx48k/strbase2.asm @@ -103,18 +103,18 @@ _b: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -571,7 +571,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -614,7 +615,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -650,10 +651,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -702,7 +703,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -819,14 +820,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -844,7 +845,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -869,12 +870,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -917,9 +918,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/stringparam.asm b/tests/functional/arch/zx48k/stringparam.asm index 8afc209a8..8c172f8c1 100644 --- a/tests/functional/arch/zx48k/stringparam.asm +++ b/tests/functional/arch/zx48k/stringparam.asm @@ -92,18 +92,18 @@ _testStr__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -560,7 +560,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -603,7 +604,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -639,10 +640,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -691,7 +692,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -808,14 +809,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -833,7 +834,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -858,12 +859,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -906,9 +907,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/strlocal0.asm b/tests/functional/arch/zx48k/strlocal0.asm index 27b7bf8b1..2bb62052b 100644 --- a/tests/functional/arch/zx48k/strlocal0.asm +++ b/tests/functional/arch/zx48k/strlocal0.asm @@ -96,18 +96,18 @@ _test__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -564,7 +564,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -607,7 +608,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -643,10 +644,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -695,7 +696,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -812,14 +813,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -837,7 +838,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -862,12 +863,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -910,9 +911,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/strparam0.asm b/tests/functional/arch/zx48k/strparam0.asm index c56cfe2f0..594bc79b0 100644 --- a/tests/functional/arch/zx48k/strparam0.asm +++ b/tests/functional/arch/zx48k/strparam0.asm @@ -122,18 +122,18 @@ _test1__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -590,7 +590,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -633,7 +634,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -669,10 +670,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -721,7 +722,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -838,14 +839,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -863,7 +864,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -888,12 +889,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -936,9 +937,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/strparam1.asm b/tests/functional/arch/zx48k/strparam1.asm index 338a1f7f2..54fca5d35 100644 --- a/tests/functional/arch/zx48k/strparam1.asm +++ b/tests/functional/arch/zx48k/strparam1.asm @@ -869,18 +869,18 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows diff --git a/tests/functional/arch/zx48k/strparam2.asm b/tests/functional/arch/zx48k/strparam2.asm index 9170d7bd4..67db757a0 100644 --- a/tests/functional/arch/zx48k/strparam2.asm +++ b/tests/functional/arch/zx48k/strparam2.asm @@ -111,18 +111,18 @@ _test__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -579,7 +579,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -622,7 +623,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -658,10 +659,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -710,7 +711,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -827,14 +828,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -852,7 +853,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -877,12 +878,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -925,9 +926,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/strparam3.asm b/tests/functional/arch/zx48k/strparam3.asm index 025330a58..d300252ca 100644 --- a/tests/functional/arch/zx48k/strparam3.asm +++ b/tests/functional/arch/zx48k/strparam3.asm @@ -116,18 +116,18 @@ _test__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -584,7 +584,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -627,7 +628,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -663,10 +664,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -715,7 +716,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -832,14 +833,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -857,7 +858,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -882,12 +883,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -930,9 +931,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/subrec.asm b/tests/functional/arch/zx48k/subrec.asm index 0b0e677cc..3e042ff99 100644 --- a/tests/functional/arch/zx48k/subrec.asm +++ b/tests/functional/arch/zx48k/subrec.asm @@ -159,18 +159,18 @@ _fact__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -662,7 +662,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -705,7 +706,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -741,10 +742,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -793,7 +794,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -910,14 +911,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -935,7 +936,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -960,12 +961,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -1008,9 +1009,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/usr0.asm b/tests/functional/arch/zx48k/usr0.asm index 755aeb353..f0b79daeb 100644 --- a/tests/functional/arch/zx48k/usr0.asm +++ b/tests/functional/arch/zx48k/usr0.asm @@ -65,18 +65,18 @@ SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows @@ -533,7 +533,8 @@ __PRINT_INIT: ; To be called before program starts (initializes library) ;; Clears ATTR2 flags (OVER 2, etc) xor a ld (FLAGS2), a - ld (TVFLAGS), a + ld hl, TV_FLAG + res 0, (hl) LOCAL SET_SCR_ADDR call __LOAD_S_POSN jp __SET_SCR_PTR @@ -576,7 +577,7 @@ __PRINT_CHR: push hl call __SCROLL_SCR pop hl -#line 93 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 94 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 2: call SET_SCR_ADDR jr 4f @@ -612,10 +613,10 @@ __PRGRAPH: ex de, hl ; HL = Write Address, DE = CHARS address bit 2, (iy + $47) call nz, __BOLD -#line 140 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 141 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" bit 4, (iy + $47) call nz, __ITALIC -#line 145 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 146 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" ld hl, (DFCC) push hl ld b, 8 ; 8 bytes per char @@ -664,7 +665,7 @@ __PRINT_0Dh: ; Called WHEN printing CHR$(13) push hl call __SCROLL_SCR pop hl -#line 210 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 211 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" 1: ld l, 1 __PRINT_EOL_END: @@ -781,14 +782,14 @@ __PRINT_BOLD: __PRINT_BOLD2: call BOLD_TMP jp __PRINT_RESTART -#line 354 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 355 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_ITA: ld hl, __PRINT_ITA2 jp __PRINT_SET_STATE __PRINT_ITA2: call ITALIC_TMP jp __PRINT_RESTART -#line 364 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 365 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __BOLD __BOLD: push hl @@ -806,7 +807,7 @@ __BOLD: pop hl ld de, MEM0 ret -#line 385 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 386 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __ITALIC __ITALIC: push hl @@ -831,12 +832,12 @@ __ITALIC: pop hl ld de, MEM0 ret -#line 413 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 414 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __SCROLL_SCR -#line 487 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 488 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __SCROLL_SCR EQU 0DFEh ; Use ROM SCROLL -#line 489 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" #line 490 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 491 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" PRINT_COMMA: call __LOAD_S_POSN ld a, e @@ -879,9 +880,9 @@ PRINT_AT: ; Changes cursor to ROW, COL LOCAL __PRINT_TABLE LOCAL __PRINT_TAB, __PRINT_TAB1, __PRINT_TAB2 LOCAL __PRINT_ITA2 -#line 546 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 547 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" LOCAL __PRINT_BOLD2 -#line 552 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" +#line 553 "/zxbasic/src/lib/arch/zx48k/runtime/print.asm" __PRINT_TABLE: ; Jump table for 0 .. 22 codes DW __PRINT_NOP ; 0 DW __PRINT_NOP ; 1 diff --git a/tests/functional/arch/zx48k/warn_unreach0.asm b/tests/functional/arch/zx48k/warn_unreach0.asm index 62b21fff9..7f5729b4a 100644 --- a/tests/functional/arch/zx48k/warn_unreach0.asm +++ b/tests/functional/arch/zx48k/warn_unreach0.asm @@ -48,9 +48,9 @@ _mySub__leave: pop ix ret ;; --- end of user code --- -#line 1 "/zxbasic/src/arch/zx48k/library-asm/cls.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/cls.asm" ;; Clears the user screen (24 rows) -#line 1 "/zxbasic/src/arch/zx48k/library-asm/sysvars.asm" +#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/sysvars.asm" ;; ----------------------------------------------------------------------- ;; ZX Basic System Vars ;; Some of them will be mapped over Sinclair ROM ones for compatibility @@ -59,24 +59,24 @@ _mySub__leave: SCREEN_ADDR: DW 16384 ; Screen address (can be pointed to other place to use a screen buffer) SCREEN_ATTR_ADDR: DW 22528 ; Screen attribute address (ditto.) ; These are mapped onto ZX Spectrum ROM VARS - CHARS EQU 23606 ; Pointer to ROM/RAM Charset - TVFLAGS EQU 23612 ; TV Flags - UDG EQU 23675 ; Pointer to UDG Charset + CHARS EQU 23606 ; Pointer to ROM/RAM Charset + TV_FLAG EQU 23612 ; Flags for controlling output to screen + UDG EQU 23675 ; Pointer to UDG Charset COORDS EQU 23677 ; Last PLOT coordinates - FLAGS2 EQU 23681 ; + FLAGS2 EQU 23681 ; ECHO_E EQU 23682 ; DFCC EQU 23684 ; Next screen addr for PRINT DFCCL EQU 23686 ; Next screen attr for PRINT S_POSN EQU 23688 ATTR_P EQU 23693 ; Current Permanent ATTRS set with INK, PAPER, etc commands - ATTR_T EQU 23695 ; temporary ATTRIBUTES - P_FLAG EQU 23697 ; + ATTR_T EQU 23695 ; temporary ATTRIBUTES + P_FLAG EQU 23697 ; MEM0 EQU 23698 ; Temporary memory buffer used by ROM chars SCR_COLS EQU 33 ; Screen with in columns + 1 SCR_ROWS EQU 24 ; Screen height in rows SCR_SIZE EQU (SCR_ROWS << 8) + SCR_COLS pop namespace -#line 4 "/zxbasic/src/arch/zx48k/library-asm/cls.asm" +#line 4 "/zxbasic/src/lib/arch/zx48k/runtime/cls.asm" push namespace core CLS: PROC @@ -105,5 +105,5 @@ CLS: ret ENDP pop namespace -#line 28 "zx48k/warn_unreach0.bas" +#line 28 "arch/zx48k/warn_unreach0.bas" END