december_adventure_2023

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

commit fdccdc30680f4c5b51590c255ff6edcc14c31767
parent b9c48c8f247d1b27ff46d5f91a0758e362987d08
Author: Eamon Caddigan <eamon.caddigan@gmail.com>
Date:   Tue,  5 Dec 2023 18:49:23 -0800

Printing characters to the screen

I'm not sure if this is a great implementation, but it's done!

Diffstat:
Mhello.tal | 33+++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/hello.tal b/hello.tal @@ -9,11 +9,36 @@ |0000 -|0100 - LIT 68 LIT 18 DEO 0000 0000 0000 0000 +|0100 + #0a6f .System/r DEO2 + #05cf .System/g DEO2 + #0caf .System/b DEO2 -( padding for dexe ) - 0000 00 + #0008 .Screen/x DEO2 + #0008 .Screen/y DEO2 + + ;message ;draw-string JSR2 + +BRK + +@message + "Hello 20 "world! 00 + +@draw-character ( char -- ) + #20 SUB #00 SWP #30 SFT2 + ;font ADD2 .Screen/addr DEO2 + #43 .Screen/sprite DEO +JMP2r + +@draw-string ( text* -- ) + LDAk #00 EQU ,&done JCN + #01 .Screen/auto DEO + &while + LDAk ;draw-character JSR2 + INC2 LDAk ,&while JCN + &done + POP2 +JMP2r @font 0000 0000 0000 0000