This commit is contained in:
2024-02-16 17:00:38 -05:00
parent 971f8a326c
commit 64a98f6add
4 changed files with 84 additions and 3 deletions

30
examples/clear_screen.asm Normal file
View File

@@ -0,0 +1,30 @@
.include _hwdefs.asm
.include _clrdefs.asm
;; Variables
.org SYSRAM
stack: byte[128]
;; Main
.org SYSROM
lds stack
jss cls
hlt
;; Clear the screen
FUNC cls:
ldp screen.char
ldc $00 ;; Blank
ldq screen.color
ldb CLR_BLACK ;; Black
.cls_loop: {
stc *p++
stb *q++
lda pl
cmp (lo(COLOR))
jnz .cls_loop
lda ph
cmp (hi(COLOR))
jnz }
rts