From 7acbbc1d26c6fe81ff472e5c852a86149b4aa8c8 Mon Sep 17 00:00:00 2001 From: Terence Boldt Date: Fri, 4 Dec 2020 21:28:33 -0500 Subject: [PATCH] Add test assembler code to match Go and Node.js code --- Firmware/assemble_test.sh | 3 +++ Firmware/test.asm | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100755 Firmware/assemble_test.sh create mode 100644 Firmware/test.asm diff --git a/Firmware/assemble_test.sh b/Firmware/assemble_test.sh new file mode 100755 index 0000000..8b1c025 --- /dev/null +++ b/Firmware/assemble_test.sh @@ -0,0 +1,3 @@ +#!/bin/sh +ca65 test.asm +ld65 test.o -o test.bin -t none diff --git a/Firmware/test.asm b/Firmware/test.asm new file mode 100644 index 0000000..f90a23e --- /dev/null +++ b/Firmware/test.asm @@ -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