Skip to content

Commit 2a3d259

Browse files
committed
Added some helper macros
1 parent 0dcad0e commit 2a3d259

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

lib/128spec.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,3 +1201,5 @@ end_filename:
12011201
.byte 0
12021202
}
12031203
}
1204+
1205+
#import "helper.asm"

lib/helper.asm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.importonce
2+
3+
.macro SetValue8Bit(variable, value) {
4+
lda #value
5+
sta variable
6+
}
7+
.macro SetValue16Bit(variable, value) {
8+
lda #<value
9+
sta variable
10+
lda #>value
11+
sta variable + 1
12+
}

0 commit comments

Comments
 (0)