Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
nurpax committed Jan 31, 2021
1 parent 0120381 commit cd58755
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/cases/macro_regr1.expected.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
0801: A9 0D LDA #$0D
0803: 8D 20 D0 STA $D020
0806: A9 00 LDA #$00
0808: A2 10 LDX #$10
080A: 20 10 08 JSR $0810
080D: CA DEX
080E: 10 FA BPL $080A
0810: 60 RTS
23 changes: 23 additions & 0 deletions test/cases/macro_regr1.input.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

!let border_reg = $d020

!macro set_border(color) {
lda #color
sta border_reg
}

+set_border(13)

lda #0

ldx #16
set_foo:
jsr func
dex
bpl set_foo

!for i in range(5) {}

func: {
rts
}

0 comments on commit cd58755

Please sign in to comment.