draw-str working

This commit is contained in:
Luxferre
2022-07-30 20:47:17 +03:00
parent bfbe94d018
commit c5a76c5a9a
2 changed files with 15 additions and 10 deletions
+12 -4
View File
@@ -64,10 +64,18 @@
SWP #04 ADD SWP
JMP2r
@draw-str ( s* -> )
&loop LDAk #00 EQU ,&eof JCN ( did we reach \0 ? )
LDAk ;putc JSR2 INC2 ,&loop JMP ( no so emit a char and repeat )
&eof POP2 JMP2r ( yes so return )
@draw-str ( x y s* -- x y )
&loop
LDAk ( x y s* c -- )
#00 EQU ,&eof JCN ( eof on #00 )
( x y s* -- )
LDAk ( x y s* c -- )
ROT ROT ( x y c s* -- )
STH2 ( x y c -- )
;putc JSR2 ( x y -- )
STH2r ( x y s* )
INC2 ,&loop JMP
&eof POP2 JMP2r
( nanofont glyphs for ESOP, courtesy of Michaelangel007 )
+3 -6
View File
@@ -6,11 +6,8 @@
BRK
@on-frame
LIT 'K ;putc JSR2
LIT 'O ;putc JSR2
LIT 'o ;putc JSR2
LIT 'L ;putc JSR2
SWP #10 SUB SWP
;moveme ;draw-str JSR2
NIP #10 SWP
;&adv KP-A JMPKEY
;&back KP-B JMPKEY
BRK
@@ -23,7 +20,7 @@ BRK
INC
BRK
@moveme "MOVE 20 "ME! 00
( include ESOP stdlib routines )