Trevor Merritt e29ac45c84 scroll down works on CHIP-8 and High-Res modes
scroll left and right work in stdef and hidef
adds octo test roms
adds schip fonts to memory
2024-10-27 11:41:25 -04:00

35 lines
596 B
Plaintext

###########################################
#
# Next Test
#
# Demonstrates the use of the :next
# operative to refer to the second byte
# of an instruction. Mainly used for
# writing self-modifying code.
#
###########################################
: lt v0 := -1 i := vx save v0 ;
: rt v0 := 1 i := vx save v0 ;
: up v0 := -1 i := vy save v0 ;
: dn v0 := 1 i := vy save v0 ;
: main
va := 2
vb := 8
loop
clear
i := hex vc
sprite va vb 5
:next vx va += 1
:next vy vb += 1
if va == 0 then rt
if va == 59 then lt
if vb == 0 then dn
if vb == 26 then up
again