esop

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

commit 544bc355a5e82356f67ab06c8ed154910ae4efbe
parent ac5b54bd79dcecd3d5369486d99b0a61aea5c456
Author: Luxferre <3335173-suborg@users.noreply.gitlab.com>
Date:   Fri, 29 Jul 2022 19:18:15 +0300

line output in progress

Diffstat:
Mtal-lib/esop-lib.tal | 6++++++
Mtal-lib/font.tal | 38+++++++++++++++++++++++++++++++++++---
2 files changed, 41 insertions(+), 3 deletions(-)

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