line output in progress

This commit is contained in:
Luxferre
2022-07-29 19:18:15 +03:00
parent ac5b54bd79
commit 544bc355a5
2 changed files with 41 additions and 3 deletions
+6
View File
@@ -56,3 +56,9 @@
( decrement )
%DEC { #01 SUB }
( get the bit of a specific number )
( val bitnum -- bit )
%GETBIT { SFT #01 AND }
( val* bitnum -- bit )
%GETBIT2 { SFT2 #0001 AND2 NIP }
+35 -3
View File
@@ -1,7 +1,5 @@
~esop-lib.tal
( subtract #20 from the ASCII code and you get the offset from the nanofont label )
%CHAR-TO-NF { #20 SUB ;nanofont ADD }
|0100
;on-frame SETSCRVEC
@@ -9,7 +7,8 @@
BRK
@on-frame
PXLk
#0f ROT ROT DBGSHORT ;line4 JSR2
DBGSHORT ( must be #10 12 )
;&adv KP-A JMPKEY
;&back KP-B JMPKEY
BRK
@@ -22,6 +21,39 @@ BRK
DEC
BRK
( sprite and text drawing routines )
( subtract #20 from the ASCII code and you get the offset from the nanofont label )
%CHAR-TO-NF { #20 SUB ;nanofont ADD }
( 4x1 scanline output from the nibble )
( nibble x y -- )
@line4
ROT #04 ( x y nibble counter --)
&lp
DEC ( first effective counter value is 3 )
DUP2 ( x y nibble counter nibble counter -- )
GETBIT ( x y nibble counter bit -- )
,&dpxl JCN
,&skip JMP
&dpxl ( x y nibble counter -- )
SWP2 PXLk SWP2
&skip ( x y nibble counter -- )
SWP2 SWP ( nibble counter y x -- )
INC ( increment x coord )
SWP SWP2 ( x y nibble counter -- )
DUP ,&lp JCN
JMP2r
( 4x4 sprite output from the memory )
( addr* x y -- )
@sprite4
( get sprite contents )
SWP2 LDA2 ( x y sprval* -- )
JMP2r
@putc
JMP2r