mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-27 15:50:56 +00:00
2313 lines
69 KiB
NASM
2313 lines
69 KiB
NASM
// SNES 65816 CPU Test STR (Store Memory) demo by krom (Peter Lemon):
|
|
arch snes.cpu
|
|
output "CPUSTR.sfc", create
|
|
|
|
macro seek(variable offset) {
|
|
origin ((offset & $7F0000) >> 1) | (offset & $7FFF)
|
|
base offset
|
|
}
|
|
|
|
macro PrintText(SRC, DEST, SIZE) { // Print Text Characters To VRAM
|
|
stz.w REG_VMAIN // Set Increment VRAM Address After Accessing Lo Byte ($2115: Video Port Control)
|
|
ldx.w #{DEST} >> 1 // Set VRAM Destination
|
|
stx.w REG_VMADDL // $2116: VRAM
|
|
|
|
ldx.w #0 // X = 0 Number Of Text Characters To Print
|
|
{#}LoopText:
|
|
lda.w {SRC},x // A = Text Data
|
|
sta.w REG_VMDATAL // Store Text To VRAM Lo Byte
|
|
inx // X++
|
|
cpx.w #{SIZE}
|
|
bne {#}LoopText // IF (X != 0) Loop Text Characters
|
|
}
|
|
|
|
macro PrintValue(SRC, DEST, SIZE) { // Print HEX Characters To VRAM
|
|
stz.w REG_VMAIN // Set Increment VRAM Address After Accessing Lo Byte ($2115: Video Port Control)
|
|
ldx.w #{DEST} >> 1 // Set VRAM Destination
|
|
stx.w REG_VMADDL // $2116: VRAM Address
|
|
|
|
lda.b #$24 // A = "$"
|
|
sta.w REG_VMDATAL // Store Text To VRAM Lo Byte
|
|
|
|
ldx.w #{SIZE} // X = Number Of Hex Characters To Print
|
|
|
|
{#}LoopHEX:
|
|
dex // X--
|
|
ldy.w #0002 // Y = 2 (Char Count)
|
|
|
|
lda.w {SRC},x // A = Result Data
|
|
lsr // A >>= 4
|
|
lsr
|
|
lsr
|
|
lsr // A = Result Hi Nibble
|
|
|
|
{#}LoopChar:
|
|
cmp.b #10 // Compare Hi Nibble To 9
|
|
clc // Clear Carry Flag
|
|
bpl {#}HexLetter
|
|
adc.b #$30 // Add Hi Nibble To ASCII Numbers
|
|
sta.w REG_VMDATAL // Store Text To VRAM Lo Byte
|
|
bra {#}HexEnd
|
|
{#}HexLetter:
|
|
adc.b #$37 // Add Hi Nibble To ASCII Letters
|
|
sta.w REG_VMDATAL // Store Text To VRAM Lo Byte
|
|
{#}HexEnd:
|
|
|
|
lda.w {SRC},x // A = Result Data
|
|
and.b #$F // A = Result Lo Nibble
|
|
dey // Y--
|
|
bne {#}LoopChar // IF (Char Count != 0) Loop Char
|
|
|
|
cpx.w #0 // Compare X To 0
|
|
bne {#}LoopHEX // IF (X != 0) Loop Hex Characters
|
|
}
|
|
|
|
macro PrintPSR(SRC, DEST) { // Print Processor Status Flags To VRAM
|
|
stz.w REG_VMAIN // Set Increment VRAM Address After Accessing Lo Byte ($2115: Video Port Control)
|
|
ldx.w #{DEST} >> 1 // Set VRAM Destination
|
|
stx.w REG_VMADDL // $2116: VRAM Address
|
|
|
|
lda.b #%10000000 // A = Negative Flag Bit
|
|
jsr {#}PSRFlagTest // Test PSR Flag Data
|
|
|
|
lda.b #%01000000 // A = Overflow Flag Bit
|
|
jsr {#}PSRFlagTest // Test PSR Flag Data
|
|
|
|
lda.b #%00000010 // A = Zero Flag Bit
|
|
jsr {#}PSRFlagTest // Test PSR Flag Data
|
|
|
|
lda.b #%00000001 // A = Carry Flag Bit
|
|
jsr {#}PSRFlagTest // Test PSR Flag Data
|
|
|
|
bra {#}PSREnd
|
|
|
|
{#}PSRFlagTest:
|
|
bit.b {SRC} // Test Processor Status Flag Data Bit
|
|
bne {#}PSRFlagSet
|
|
lda.b #$30 // A = "0"
|
|
sta.w REG_VMDATAL // Store Text To VRAM Lo Byte
|
|
rts // Return From Subroutine
|
|
{#}PSRFlagSet:
|
|
lda.b #$31 // A = "1"
|
|
sta.w REG_VMDATAL // Store Text To VRAM Lo Byte
|
|
rts // Return From Subroutine
|
|
|
|
{#}PSREnd:
|
|
}
|
|
|
|
seek($8000); fill $8000 // Fill Upto $7FFF (Bank 0) With Zero Bytes
|
|
include "LIB/SNES.INC" // Include SNES Definitions
|
|
include "LIB/SNES_HEADER.ASM" // Include Header & Vector Table
|
|
include "LIB/SNES_GFX.INC" // Include Graphics Macros
|
|
|
|
// Variable Data
|
|
seek(WRAM) // 8Kb WRAM Mirror ($0000..$1FFF)
|
|
ResultData:
|
|
dw 0 // Result Data Word
|
|
PSRFlagData:
|
|
db 0 // Processor Status Register Flag Data Byte
|
|
IndirectData:
|
|
dl 0 // Indirect Data Long
|
|
|
|
seek($8000); Start:
|
|
SNES_INIT(SLOWROM) // Run SNES Initialisation Routine
|
|
|
|
LoadPAL(BGPAL, $00, 4, 0) // Load BG Palette Data
|
|
LoadLOVRAM(BGCHR, $0000, $3F8, 0) // Load 1BPP Tiles To VRAM Lo Bytes (Converts To 2BPP Tiles)
|
|
ClearVRAM(BGCLEAR, $F800, $400, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
// Setup Video
|
|
lda.b #%00001000 // DCBAPMMM: M = Mode, P = Priority, ABCD = BG1,2,3,4 Tile Size
|
|
sta.w REG_BGMODE // $2105: BG Mode 0, Priority 1, BG1 8x8 Tiles
|
|
|
|
// Setup BG1 256 Color Background
|
|
lda.b #%11111100 // AAAAAASS: S = BG Map Size, A = BG Map Address
|
|
sta.w REG_BG1SC // $2108: BG1 32x32, BG1 Map Address = $3F (VRAM Address / $400)
|
|
lda.b #%00000000 // BBBBAAAA: A = BG1 Tile Address, B = BG2 Tile Address
|
|
sta.w REG_BG12NBA // $210B: BG1 Tile Address = $0 (VRAM Address / $1000)
|
|
|
|
lda.b #%00000001 // Enable BG1
|
|
sta.w REG_TM // $212C: BG1 To Main Screen Designation
|
|
|
|
stz.w REG_BG1HOFS // Store Zero To BG1 Horizontal Scroll Pos Low Byte
|
|
stz.w REG_BG1HOFS // Store Zero To BG1 Horizontal Scroll Pos High Byte
|
|
stz.w REG_BG1VOFS // Store Zero To BG1 Vertical Scroll Pos Low Byte
|
|
stz.w REG_BG1VOFS // Store Zero To BG1 Vertical Pos High Byte
|
|
|
|
lda.b #$F // Turn On Screen, Maximum Brightness
|
|
sta.w REG_INIDISP // $2100: Screen Display
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Title Text
|
|
PrintText(Title, $F882, 28) // Load Text To VRAM Lo Bytes
|
|
|
|
// Print Page Break Text
|
|
PrintText(PageBreak, $F8C2, 30) // Load Text To VRAM Lo Bytes
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STAAddr, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
// Print Key Text
|
|
PrintText(Key, $F982, 30) // Load Text To VRAM Lo Bytes
|
|
|
|
// Print Page Break Text
|
|
PrintText(PageBreak, $F9C2, 30) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
rep #$80 // Reset Negative Flag
|
|
sta.w ResultData // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass1
|
|
Fail1:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail1
|
|
Pass1:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail1
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
rep #$80 // Reset Negative Flag
|
|
sta.w ResultData // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass2
|
|
Fail2:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail2
|
|
Pass2:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail2
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STALong, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
rep #$80 // Reset Negative Flag
|
|
sta.l ResultData // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass3
|
|
Fail3:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail3
|
|
Pass3:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail3
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
rep #$80 // Reset Negative Flag
|
|
sta.l ResultData // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass4
|
|
Fail4:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail4
|
|
Pass4:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail4
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STADP, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
rep #$80 // Reset Negative Flag
|
|
sta.b ResultData // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass5
|
|
Fail5:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail5
|
|
Pass5:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail5
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
rep #$80 // Reset Negative Flag
|
|
sta.b ResultData // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass6
|
|
Fail6:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail6
|
|
Pass6:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail6
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STADPIndirect, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
rep #$02 // Reset Zero Flag
|
|
stx.b IndirectData // Store Indirect Data
|
|
sta (IndirectData) // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass7
|
|
Fail7:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail7
|
|
Pass7:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail7
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
rep #$02 // Reset Zero Flag
|
|
stx.b IndirectData // Store Indirect Data
|
|
sta (IndirectData) // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass8
|
|
Fail8:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail8
|
|
Pass8:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail8
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STADPIndirectLong, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
rep #$02 // Reset Zero Flag
|
|
stx.b IndirectData // Store Indirect Data
|
|
sta [IndirectData] // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass9
|
|
Fail9:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail9
|
|
Pass9:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail9
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
rep #$02 // Reset Zero Flag
|
|
stx.b IndirectData // Store Indirect Data
|
|
sta [IndirectData] // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass10
|
|
Fail10:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail10
|
|
Pass10:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail10
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STAAddrX, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta.w ResultData,x // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass11
|
|
Fail11:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail11
|
|
Pass11:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail11
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta.w ResultData,x // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass12
|
|
Fail12:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail12
|
|
Pass12:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail12
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STALongX, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta.l ResultData,x // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass13
|
|
Fail13:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail13
|
|
Pass13:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail13
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta.l ResultData,x // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass14
|
|
Fail14:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail14
|
|
Pass14:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail14
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STAAddrY, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta ResultData,y // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass15
|
|
Fail15:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail15
|
|
Pass15:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail15
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta ResultData,y // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass16
|
|
Fail16:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail16
|
|
Pass16:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail16
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STADPX, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta.b ResultData,x // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass17
|
|
Fail17:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail17
|
|
Pass17:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail17
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta.b ResultData,x // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass18
|
|
Fail18:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail18
|
|
Pass18:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail18
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STADPIndirectX, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
stx.b IndirectData // Store Indirect Data
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta (IndirectData,x) // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass19
|
|
Fail19:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail19
|
|
Pass19:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail19
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
stx.b IndirectData // Store Indirect Data
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta (IndirectData,x) // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass20
|
|
Fail20:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail20
|
|
Pass20:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail20
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STADPIndirectY, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
stx.b IndirectData // Store Indirect Data
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta (IndirectData),y // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass21
|
|
Fail21:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail21
|
|
Pass21:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail21
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
stx.b IndirectData // Store Indirect Data
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta (IndirectData),y // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass22
|
|
Fail22:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail22
|
|
Pass22:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail22
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STADPIndirectLongY, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
stx.b IndirectData // Store Indirect Data
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta [IndirectData],y // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass23
|
|
Fail23:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail23
|
|
Pass23:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail23
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #ResultData // X = Absolute Data Address Word
|
|
stx.b IndirectData // Store Indirect Data
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta [IndirectData],y // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass24
|
|
Fail24:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail24
|
|
Pass24:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail24
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STASRS, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
pha // Push A To Stack
|
|
lda.b #$FF // A = $FF
|
|
sta $01,s // Store A
|
|
pla // Pull A From Stack
|
|
rep #$80 // Reset Negative Flag
|
|
sta.b ResultData // Store Result To Memory
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass25
|
|
Fail25:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail25
|
|
Pass25:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail25
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
pha // Push A To Stack
|
|
lda.w #$FFFF // A = $FFFF
|
|
sta $01,s // Store A
|
|
pla // Pull A From Stack
|
|
rep #$80 // Reset Negative Flag
|
|
sta.b ResultData // Store Result To Memory
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass26
|
|
Fail26:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail26
|
|
Pass26:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail26
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STASRSY, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
lda.b #$FF // A = $FF
|
|
ldx.w #ResultData // X = Absolute Data Indirect Address
|
|
phx // Push X To Stack
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta ($01,s),y // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckA
|
|
beq Pass27
|
|
Fail27:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail27
|
|
Pass27:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckA
|
|
bne Fail27
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
lda.w #$FFFF // A = $FFFF
|
|
ldx.w #ResultData // X = Absolute Data Indirect Address
|
|
phx // Push X To Stack
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sta ($01,s),y // Store A
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckB
|
|
beq Pass28
|
|
Fail28:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail28
|
|
Pass28:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckB
|
|
bne Fail28
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STXAddr, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$10 // Set 8-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
ldx.b #$FF // X = $FF
|
|
rep #$80 // Reset Negative Flag
|
|
stx.w ResultData // Store X
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
rep #$10 // Set 16-Bit X/Y
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckC
|
|
beq Pass29
|
|
Fail29:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail29
|
|
Pass29:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckC
|
|
bne Fail29
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$10 // Set 16-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
ldx.w #$FFFF // X = $FFFF
|
|
rep #$80 // Reset Negative Flag
|
|
stx.w ResultData // Store X
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckD
|
|
beq Pass30
|
|
Fail30:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail30
|
|
Pass30:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckD
|
|
bne Fail30
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STXDP, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$10 // Set 8-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
ldx.b #$FF // X = $FF
|
|
rep #$80 // Reset Negative Flag
|
|
stx.b ResultData // Store X
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
rep #$10 // Set 16-Bit X/Y
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckC
|
|
beq Pass31
|
|
Fail31:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail31
|
|
Pass31:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckC
|
|
bne Fail31
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$10 // Set 16-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
ldx.w #$FFFF // X = $FFFF
|
|
rep #$80 // Reset Negative Flag
|
|
stx.b ResultData // Store X
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckD
|
|
beq Pass32
|
|
Fail32:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail32
|
|
Pass32:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckD
|
|
bne Fail32
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STXDPY, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$10 // Set 8-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
ldx.b #$FF // X = $FF
|
|
ldy.b #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
stx ResultData,y // Store X
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
rep #$10 // Set 16-Bit X/Y
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckC
|
|
beq Pass33
|
|
Fail33:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail33
|
|
Pass33:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckC
|
|
bne Fail33
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$10 // Set 16-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
ldx.w #$FFFF // X = $FFFF
|
|
ldy.w #0 // Y = 0
|
|
rep #$02 // Reset Zero Flag
|
|
stx ResultData,y // Store X
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckD
|
|
beq Pass34
|
|
Fail34:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail34
|
|
Pass34:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckD
|
|
bne Fail34
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STYAddr, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$10 // Set 8-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
ldy.b #$FF // Y = $FF
|
|
rep #$80 // Reset Negative Flag
|
|
sty.w ResultData // Store Y
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
rep #$10 // Set 16-Bit X/Y
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckC
|
|
beq Pass35
|
|
Fail35:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail35
|
|
Pass35:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckC
|
|
bne Fail35
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$10 // Set 16-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
ldy.w #$FFFF // Y = $FFFF
|
|
rep #$80 // Reset Negative Flag
|
|
sty.w ResultData // Store Y
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckD
|
|
beq Pass36
|
|
Fail36:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail36
|
|
Pass36:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckD
|
|
bne Fail36
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STYDP, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$10 // Set 8-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
ldy.b #$FF // Y = $FF
|
|
rep #$80 // Reset Negative Flag
|
|
sty.b ResultData // Store Y
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
rep #$10 // Set 16-Bit X/Y
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckC
|
|
beq Pass37
|
|
Fail37:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail37
|
|
Pass37:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckC
|
|
bne Fail37
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$10 // Set 16-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
ldy.w #$FFFF // Y = $FFFF
|
|
rep #$80 // Reset Negative Flag
|
|
sty.b ResultData // Store Y
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckD
|
|
beq Pass38
|
|
Fail38:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail38
|
|
Pass38:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckD
|
|
bne Fail38
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STYDPX, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$10 // Set 8-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
ldy.b #$FF // Y = $FF
|
|
ldx.b #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sty ResultData,x // Store Y
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
rep #$10 // Set 16-Bit X/Y
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckC
|
|
beq Pass39
|
|
Fail39:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail39
|
|
Pass39:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckC
|
|
bne Fail39
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$10 // Set 16-Bit X/Y
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
ldy.w #$FFFF // Y = $FFFF
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
sty ResultData,x // Store Y
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckD
|
|
beq Pass40
|
|
Fail40:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail40
|
|
Pass40:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckD
|
|
bne Fail40
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STZAddr, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$02 // Reset Zero Flag
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
stz.w ResultData // Store Zero
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckE
|
|
beq Pass41
|
|
Fail41:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail41
|
|
Pass41:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckE
|
|
bne Fail41
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$02 // Reset Zero Flag
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
stz.w ResultData // Store Zero
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckF
|
|
beq Pass42
|
|
Fail42:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail42
|
|
Pass42:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckF
|
|
bne Fail42
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STZDP, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$02 // Reset Zero Flag
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
stz.b ResultData // Store Zero
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckE
|
|
beq Pass43
|
|
Fail43:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail43
|
|
Pass43:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckE
|
|
bne Fail43
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$02 // Reset Zero Flag
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
stz.b ResultData // Store Zero
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckF
|
|
beq Pass44
|
|
Fail44:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail44
|
|
Pass44:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckF
|
|
bne Fail44
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STZAddrX, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
stz.w ResultData,x // Store Zero
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckE
|
|
beq Pass45
|
|
Fail45:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail45
|
|
Pass45:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckE
|
|
bne Fail45
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
stz.w ResultData,x // Store Zero
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckF
|
|
beq Pass46
|
|
Fail46:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail46
|
|
Pass46:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckF
|
|
bne Fail46
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
WaitNMI() // Wait For VSync
|
|
|
|
ClearVRAM(BGCLEAR, $FA00, $40, 0) // Clear VRAM Map To Fixed Tile Word
|
|
|
|
WaitNMI() // Wait For VSync
|
|
|
|
// Print Syntax/Opcode Text
|
|
PrintText(STZDPX, $F902, 26) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary8Bit, $FA02, 5) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
clv // Clear Overflow Flag
|
|
|
|
// Run Test
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
stz.b ResultData,x // Store Zero
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA12, 1) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA24) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
lda.b ResultData // A = Result Data
|
|
cmp.w STRResultCheckE
|
|
beq Pass47
|
|
Fail47:
|
|
PrintText(Fail, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail47
|
|
Pass47:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckE
|
|
bne Fail47
|
|
PrintText(Pass, $FA32, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
// Print Modes Text
|
|
PrintText(Binary16Bit, $FA42, 6) // Load Text To VRAM Lo Bytes
|
|
|
|
// Setup Flags
|
|
rep #$08 // Reset Decimal Flag
|
|
rep #$20 // Set 16-Bit Accumulator
|
|
clc // Clear Carry Flag
|
|
|
|
// Run Test
|
|
ldx.w #0 // X = 0
|
|
rep #$02 // Reset Zero Flag
|
|
stz.b ResultData,x // Store Zero
|
|
|
|
// Store Processor Status Flag Data
|
|
php // Push Processor Status Register To Stack
|
|
sep #$20 // Set 8-Bit Accumulator
|
|
pla // Pull Accumulator Register From Stack
|
|
sta.b PSRFlagData // Store Processor Status Flag Data To Memory
|
|
|
|
// Print Result & Processor Status Flag Data
|
|
PrintValue(ResultData, $FA52, 2) // Print Result Data
|
|
PrintPSR(PSRFlagData, $FA64) // Print Processor Status Flag Data
|
|
|
|
// Check Result & Processor Status Flag Data
|
|
ldx.b ResultData // X = Result Data
|
|
cpx.w STRResultCheckF
|
|
beq Pass48
|
|
Fail48:
|
|
PrintText(Fail, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
bra Fail48
|
|
Pass48:
|
|
lda.b PSRFlagData // A = Processor Status Flag Data
|
|
cmp.w PSRResultCheckF
|
|
bne Fail48
|
|
PrintText(Pass, $FA72, 4) // Load Text To VRAM Lo Bytes
|
|
|
|
Loop:
|
|
jmp Loop
|
|
|
|
Title:
|
|
db "CPU Test STR (Store Memory):"
|
|
|
|
PageBreak:
|
|
db "------------------------------"
|
|
|
|
Key:
|
|
db "Modes | Result | NVZC | Test |"
|
|
Binary8Bit:
|
|
db "BIN,8"
|
|
Binary16Bit:
|
|
db "BIN,16"
|
|
Fail:
|
|
db "FAIL"
|
|
Pass:
|
|
db "PASS"
|
|
|
|
STAAddr:
|
|
db "STA addr (Opcode: $8D)"
|
|
STALong:
|
|
db "STA long (Opcode: $8F)"
|
|
STADP:
|
|
db "STA dp (Opcode: $85)"
|
|
STADPIndirect:
|
|
db "STA (dp) (Opcode: $92)"
|
|
STADPIndirectLong:
|
|
db "STA [dp] (Opcode: $87)"
|
|
STAAddrX:
|
|
db "STA addr,X (Opcode: $9D)"
|
|
STALongX:
|
|
db "STA long,X (Opcode: $9F)"
|
|
STAAddrY:
|
|
db "STA addr,Y (Opcode: $99)"
|
|
STADPX:
|
|
db "STA dp,X (Opcode: $95)"
|
|
STADPIndirectX:
|
|
db "STA (dp,X) (Opcode: $81)"
|
|
STADPIndirectY:
|
|
db "STA (dp),Y (Opcode: $91)"
|
|
STADPIndirectLongY:
|
|
db "STA [dp],Y (Opcode: $97)"
|
|
STASRS:
|
|
db "STA sr,S (Opcode: $83)"
|
|
STASRSY:
|
|
db "STA (sr,S),Y (Opcode: $93)"
|
|
STXAddr:
|
|
db "STX addr (Opcode: $8E)"
|
|
STXDP:
|
|
db "STX dp (Opcode: $86)"
|
|
STXDPY:
|
|
db "STX dp,Y (Opcode: $96)"
|
|
STYAddr:
|
|
db "STY addr (Opcode: $8C)"
|
|
STYDP:
|
|
db "STY dp (Opcode: $84)"
|
|
STYDPX:
|
|
db "STY dp,X (Opcode: $94)"
|
|
STZAddr:
|
|
db "STZ addr (Opcode: $9C)"
|
|
STZDP:
|
|
db "STZ dp (Opcode: $64)"
|
|
STZAddrX:
|
|
db "STZ addr,X (Opcode: $9E)"
|
|
STZDPX:
|
|
db "STZ dp,X (Opcode: $74)"
|
|
|
|
STRResultCheckA:
|
|
db $FF
|
|
PSRResultCheckA:
|
|
db $24
|
|
|
|
STRResultCheckB:
|
|
dw $FFFF
|
|
PSRResultCheckB:
|
|
db $04
|
|
|
|
STRResultCheckC:
|
|
db $FF
|
|
PSRResultCheckC:
|
|
db $34
|
|
|
|
STRResultCheckD:
|
|
dw $FFFF
|
|
PSRResultCheckD:
|
|
db $24
|
|
|
|
STRResultCheckE:
|
|
db $00
|
|
PSRResultCheckE:
|
|
db $24
|
|
|
|
STRResultCheckF:
|
|
dw $0000
|
|
PSRResultCheckF:
|
|
db $04
|
|
|
|
BGCHR:
|
|
include "Font8x8.asm" // Include BG 1BPP 8x8 Tile Font Character Data (1016 Bytes)
|
|
BGPAL:
|
|
dw $7800, $7FFF // Blue / White Palette (4 Bytes)
|
|
BGCLEAR:
|
|
dw $0020 // BG Clear Character Space " " Fixed Word |