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 SWP #04 ADD SWP
JMP2r JMP2r
@draw-str ( s* -> ) @draw-str ( x y s* -- x y )
&loop LDAk #00 EQU ,&eof JCN ( did we reach \0 ? ) &loop
LDAk ;putc JSR2 INC2 ,&loop JMP ( no so emit a char and repeat ) LDAk ( x y s* c -- )
&eof POP2 JMP2r ( yes so return ) #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 ) ( nanofont glyphs for ESOP, courtesy of Michaelangel007 )
+3 -6
View File
@@ -6,11 +6,8 @@
BRK BRK
@on-frame @on-frame
LIT 'K ;putc JSR2 ;moveme ;draw-str JSR2
LIT 'O ;putc JSR2 NIP #10 SWP
LIT 'o ;putc JSR2
LIT 'L ;putc JSR2
SWP #10 SUB SWP
;&adv KP-A JMPKEY ;&adv KP-A JMPKEY
;&back KP-B JMPKEY ;&back KP-B JMPKEY
BRK BRK
@@ -23,7 +20,7 @@ BRK
INC INC
BRK BRK
@moveme "MOVE 20 "ME! 00
( include ESOP stdlib routines ) ( include ESOP stdlib routines )