| 1 |
;ACME 0.96.4 |
| 2 |
|
| 3 |
!ifdef lib_6502_std_a !eof |
| 4 |
lib_6502_std_a = 1 |
| 5 |
|
| 6 |
; labels and macros for plain 6502 processor |
| 7 |
|
| 8 |
!address { |
| 9 |
cpu_nmi = $fffa |
| 10 |
cpu_reset = $fffc |
| 11 |
cpu_irq = $fffe |
| 12 |
} |
| 13 |
|
| 14 |
; skip byte |
| 15 |
!macro bit8 { |
| 16 |
!byte $24 ; opcode of BIT $.. command |
| 17 |
} |
| 18 |
|
| 19 |
; skip word |
| 20 |
!macro bit16 { |
| 21 |
!byte $2c ; opcode of BIT $.... command |
| 22 |
} |
| 23 |
|
| 24 |
; increase 16-bit counter |
| 25 |
!macro inc16 @t { |
| 26 |
inc @t |
| 27 |
bne + |
| 28 |
inc @t + 1 |
| 29 |
+ |
| 30 |
} |
| 31 |
|
| 32 |
; far branches |
| 33 |
!macro bcc @t { |
| 34 |
bcs + |
| 35 |
jmp @t |
| 36 |
+ |
| 37 |
} |
| 38 |
!macro bcs @t { |
| 39 |
bcc + |
| 40 |
jmp @t |
| 41 |
+ |
| 42 |
} |
| 43 |
|
| 44 |
!macro beq @t { |
| 45 |
bne + |
| 46 |
jmp @t |
| 47 |
+ |
| 48 |
} |
| 49 |
|
| 50 |
!macro bne @t { |
| 51 |
beq + |
| 52 |
jmp @t |
| 53 |
+ |
| 54 |
} |
| 55 |
|
| 56 |
!macro bmi @t { |
| 57 |
bpl + |
| 58 |
jmp @t |
| 59 |
+ |
| 60 |
} |
| 61 |
|
| 62 |
!macro bpl @t { |
| 63 |
bmi + |
| 64 |
jmp @t |
| 65 |
+ |
| 66 |
} |
| 67 |
|
| 68 |
!macro bvc @t { |
| 69 |
bvs + |
| 70 |
jmp @t |
| 71 |
+ |
| 72 |
} |
| 73 |
|
| 74 |
!macro bvs @t { |
| 75 |
bvc + |
| 76 |
jmp @t |
| 77 |
+ |
| 78 |
} |