esop

Essential Stack-Operated Phone (concept)
git clone git://git.luxferre.top/esop.git
Log | Files | Refs | README | LICENSE

commit c5a76c5a9a0b9bff5fd81e5378fde1f09e3e8f28
parent bfbe94d018d294d33c1a6a6ba2039d42e609d58b
Author: Luxferre <lux@ferre>
Date:   Sat, 30 Jul 2022 20:47:17 +0300

draw-str working

Diffstat:
Mtal-lib/esop-lib-subs.tal | 16++++++++++++----
Mtal-lib/font.tal | 9+++------
2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/tal-lib/esop-lib-subs.tal b/tal-lib/esop-lib-subs.tal @@ -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 ) diff --git a/tal-lib/font.tal b/tal-lib/font.tal @@ -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 )