eris2206

Documentation: http://frombelow.net/projects/eris2206/
Clone: git clone https://git.frombelow.net/eris2206.git
Log | Files | Refs | Submodules | README | LICENSE

rom_opcode_test_0.asm (856B)


      1     // Test all opcodes
      2     .set_address $80
      3     // LDA, STA & NOP
      4     // Result should be $FF in $00..$03
      5     LDA #$FF
      6     STA $00
      7     LDA #$00
      8     LDA $00
      9     STA $01
     10     LDA #$01
     11     NOP
     12     STA $7F
     13     NOP
     14     LDA ($7F)
     15     NOP
     16     STA $02
     17     NOP
     18     LDA #$03
     19     STA $7F
     20     NOP
     21     LDA #$FF
     22     NOP
     23     STA ($7F)
     24     // STA
     25     LDA #$FF
     26     // ADD
     27     // Result should be $FF in $04..$06
     28     LDA #$FE
     29     ADD #$01
     30     STA $04
     31     LDA #$01
     32     STA $7F
     33     LDA #$FE
     34     ADD $7F
     35     STA $05
     36     LDA #$02
     37     STA $7E
     38     LDA #$7E
     39     STA $7F
     40     LDA #$FD
     41     ADD ($7F)
     42     STA $06
     43     // Test rest of ALU
     44     // Result should be $FF in $07..$0A
     45     LDA #$04
     46     SUB #$05
     47     STA $07
     48     LDA #$FF
     49     AND #$0F
     50     ADD #$F0
     51     STA $08
     52     LDA #$0F
     53     ORA #$F0
     54     STA $09
     55     LDA #$05
     56     XOR #$0F
     57     SUB #$0B
     58     STA $0A
     59 end:
     60     LDA $0B
     61     JMP :end