Add test assembler code to match Go and Node.js code

This commit is contained in:
Terence Boldt 2020-12-04 21:28:33 -05:00
parent 3c08efa01c
commit 7acbbc1d26
2 changed files with 14 additions and 0 deletions

3
Firmware/assemble_test.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
ca65 test.asm
ld65 test.o -o test.bin -t none

11
Firmware/test.asm Normal file
View File

@ -0,0 +1,11 @@
ldx #$50 ;slot 5 for this test
start: lda #$80 ;set read flag low (ready to read)
sta $c08d,x ;bit 1 low for writing values
waitwl: lda $c08e,x ;bit 0 low for reading values
bmi waitwl ;wait for write flag low
jsr $fde3 ;print nibble of data
lda #$c0 ;set read flag high (done reading)
sta $c08d,x
waitwh: lda $c08e,x
bpl waitwh ;wait for write flag high
bmi start ;go around againg for next nibble