swissChili | a4f49b5 | 2020-08-16 17:35:37 -0700 | [diff] [blame] | 1 | ;;; This file is meant to test the parsing capabilities of the assembler. |
| 2 | ;;; It should contain every address mode to its parsing, as well as a |
| 3 | ;;; range of instructions to test. |
| 4 | |
| 5 | ;;; When the assembler supports macros, those will be tested here as well. |
| 6 | |
swissChili | 97b5d8b | 2020-08-15 20:00:54 -0700 | [diff] [blame] | 7 | start: |
| 8 | lda #$32 ; Store $32 in a |
| 9 | tax ; Transfer a to x |
| 10 | stx $200 ; Store x at $200 |
| 11 | jmp ($FFAA) ; Jump to the address at $FFAA |
swissChili | a4f49b5 | 2020-08-16 17:35:37 -0700 | [diff] [blame] | 12 | second_label: |
| 13 | lda $30, X |
| 14 | inc |
| 15 | adc #$3 |
| 16 | bne start |
| 17 | jsr another_subroutine |
| 18 | tax |
swissChili | 7acb4ce | 2020-08-16 20:16:10 -0700 | [diff] [blame] | 19 | brk |
swissChili | a4f49b5 | 2020-08-16 17:35:37 -0700 | [diff] [blame] | 20 | |
| 21 | another_subroutine: |
swissChili | 7acb4ce | 2020-08-16 20:16:10 -0700 | [diff] [blame] | 22 | rts |