Updated test programs.

Test programs now work correctly with the latest CPU core changes.
This commit is contained in:
Anachronaut
2024-11-20 13:59:40 -05:00
committed by GitHub
parent e763a3e4de
commit 5e854ee7f9
4 changed files with 25 additions and 27 deletions
+12 -8
View File
@@ -1,21 +1,25 @@
; A test for the new math subroutines.
#Include ../Libraries/print.asm
#Include ../Libraries/math.asm
#Include ../Libraries/int8.asm
#Include ../Libraries/int16.asm
#Program
start:
SETD SomeInt16Operands
CALL int16sub
BRC end
CALL int16div
LDA
CALL printByteHex
INCD
LDA
CALL printByteHex
CALL blankSpace
INCD
LDA
CALL printByteHex
INCD
LDA
CALL printByteHex
INIA 0x3A
OUTA 0x00
BRI start
end:
CALL lineFeed
HALT
@@ -23,5 +27,5 @@
#Data
SomeInt16Operands:
0xFF 0xFF
0x00 0x01
0x01 0xF4
0x00 0x0A
+6 -8
View File
@@ -5,15 +5,13 @@
printByteDecimalTest:
INIB 0xFF ; Load 255 into B.
printDecimalTestloop:
SUB
CCF ; Clear the Carry Flag.
CALL printByteDecimal ; Print the value.
INCA ; Increment it.
PSHA
INIA 0x00
; Print A and a blank space.
CALL printByteDecimal
CALL blankSpace
POPA
BRQ printDecimalTestend ; If Q is zero, we're done.
INCA ; Increment A.
DECB ; Decrement B.
; If B underflows, we're done.
BRC printDecimalTestend
BRI printDecimalTestloop ; Branch back to the start of the loop.
printDecimalTestend:
CALL lineFeed
+1 -1
View File
@@ -8,7 +8,7 @@ printDigitTest:
SUB
CCF
BRQ printDigitTestend
CALL lineFeed
CALL blankSpace
BRI printDigitTestLoop
printDigitTestend:
CALL lineFeed
+5 -9
View File
@@ -2,18 +2,14 @@
#Program
printByteHexTest:
RSTA
INIB 0xFF
CALL printByteHex
printHexTestLoop:
PSHA
INIA 0x00
CALL blankSpace
POPA
INCA
SUB
CCF
CALL printByteHex
BRQ printHexTestend
CALL blankSpace
INCA
DECB
BRC printHexTestend
BRI printHexTestLoop
printHexTestend:
CALL lineFeed