lonestar

0x10c-inspired space game based on the DCPU-16
git clone git://squid-tech.com/lonestar.git
Log | Files | Refs | README

commit 40abba0dad85eb8ddb781231efa7994f6c2bacb8
parent 539f71c087bd6ca4c751c52eafd5488fab89a1df
Author: Josh Moore <jxm5210@rit.edu>
Date:   Wed, 20 Nov 2019 23:20:11 -0500

Add clearscreen to JSK

Diffstat:
Mbin/JSK.dasm | 18+++++++++++++++++-
Mbin/rom.bin | 0
2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/bin/JSK.dasm b/bin/JSK.dasm @@ -167,11 +167,27 @@ inc_cursor: JSR newline SET PC, POP - + +; Move the console cursor down a line, and to the first column newline: SET [CONSOLE_COL], 0 ADD [CONSOLE_ROW], 1 SET PC, POP + +; Clear all text/etc. from the screen. +clearscreen: + SET A, 0x8000 + clearscreen_loop: + IFG A, 0x8FA0 + SET PC, clearscreen_finish + SET [A], 0x0000 + ADD A, 1 + SET PC, clearscreen_loop + + clearscreen_finish: + SET [CONSOLE_COL], 0 + SET [CONSOLE_ROW], 0 + SET PC, POP diff --git a/bin/rom.bin b/bin/rom.bin Binary files differ.