december_adventure_2023

December Adventure (2023)
git clone https://git.eamoncaddigan.net/december_adventure_2023.git
Log | Files | Refs | README

commit 0280c7430e35fe1f10cd5b30eeec3d0331ad3778
parent afa918ccdf29e74ffaa7b3354ab0027c56b4920e
Author: Eamon Caddigan <eamon.caddigan@gmail.com>
Date:   Fri,  8 Dec 2023 13:05:56 -0800

Drawing strings without the zero page

My flow control logic could still be tightened up _I'm sure_, but I can
now draw string on the screen, with newlines, without the zero page.

Diffstat:
Mhello.tal | 13+++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/hello.tal b/hello.tal @@ -8,7 +8,6 @@ |a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |0000 - @string &auto $1 &x $2 &y $2 |0100 #0a6f .System/r DEO2 @@ -36,9 +35,7 @@ BRK JMP2r @draw-string ( text* -- ) - .Screen/auto DEI .string/auto STZ - .Screen/x DEI2 .string/x STZ2 - .Screen/y DEI2 .string/y STZ2 + [ #00 .Screen/auto DEI ] .Screen/x DEI2 ROT2 #01 .Screen/auto DEO &while LDAk @@ -47,15 +44,15 @@ JMP2r &not-00 #0a NEQk NIP ,&not-0a JCN POP - .string/x LDZ2 .Screen/x DEO2 - .string/y LDZ2 #0008 ADD2 DUP2 .string/y STZ2 .Screen/y DEO2 + OVR2 .Screen/x DEO2 + .Screen/y DEI2 #0008 ADD2 .Screen/y DEO2 INC2 ,&while JMP &not-0a ;draw-character JSR2 INC2 ,&while JMP &done - POP2 - .string/auto LDZ .Screen/auto DEO + POP2 POP2 + .Screen/auto DEO POP JMP2r @font