rom_opcode_test_1.asm (778B)
1 // Test all opcodes 2 .set_address $80 3 // Accumulator manipulation 4 LDA #$FE 5 INC 6 STA $00 7 LDA #$00 8 DEC 9 STA $01 10 LDA #$FE 11 ROL 12 ORA #$02 13 STA $02 14 LDA #$FB 15 ROR 16 ORA #$02 17 STA $03 18 LDA #$00 19 INV 20 STA $04 21 // Jump commands 22 // Result should be $FF in $05..$07 23 // JMP 24 LDA #$FF 25 JMP :skip1 26 LDA #$01 27 skip1: 28 STA $05 29 // JNZ 30 JNZ :skip2 31 LDA #$01 32 skip2: 33 STA $06 34 // JZE 35 JZE :skip3 36 STA $07 37 JMP :skip4 38 skip3: 39 LDA #$01 40 STA $07 41 skip4: 42 // Program execution from RAM 43 // Result should be $FF in $08 44 LDA #$1D // JMP 45 STA $7E 46 LDA #:skip6 47 STA $7F 48 JMP $7E 49 skip5: 50 JMP :skip5 51 skip6: 52 LDA #$FF 53 STA $08 54 end: 55 LDA $09 56 JMP :end