mirror of
https://github.com/uffejakobsen/acme.git
synced 2024-12-26 14:29:15 +00:00
721a2d7bbc
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@3 4df02467-bbd4-4a76-a152-e7ce94205b78
81 lines
1.0 KiB
Plaintext
81 lines
1.0 KiB
Plaintext
;ACME 0.07
|
|
|
|
!ifdef Lib_65816_std_a !eof
|
|
Lib_65816_std_a = 1
|
|
|
|
; Labels and macros for Western Digital's 65c816 processor
|
|
|
|
cpu_e_cop = $fff4
|
|
cpu_e_abort = $fff8
|
|
cpu_e_nmi = $fffa
|
|
cpu_e_reset = $fffc
|
|
cpu_e_irq = $fffe
|
|
|
|
cpu_n_cop = $fff4
|
|
cpu_n_brk = $fff6
|
|
cpu_n_abort = $fff8
|
|
cpu_n_nmi = $fffa
|
|
cpu_n_irq = $fffe
|
|
|
|
!macro cpu_emu {; switch to emulation mode
|
|
sec
|
|
xce
|
|
}
|
|
|
|
!macro cpu_native {; switch to native mode
|
|
clc
|
|
xce
|
|
}
|
|
|
|
!macro a8 {; switch A to 8 bit
|
|
sep #%..#.....
|
|
!as
|
|
}
|
|
|
|
!macro a16 {; switch A to 16 bit
|
|
rep #%..#.....
|
|
!al
|
|
}
|
|
|
|
!macro i8 {; switch X/Y to 8 bit
|
|
sep #%...#....
|
|
!rs
|
|
}
|
|
|
|
!macro i16 {; switch X/Y to 16 bit
|
|
rep #%...#....
|
|
!rl
|
|
}
|
|
|
|
!macro ai8 {; switch A/X/Y to 8 bit
|
|
sep #%..##....
|
|
!as
|
|
!rs
|
|
}
|
|
|
|
!macro ai16 {; switch A/X/Y to 16 bit
|
|
rep #%..##....
|
|
!al
|
|
!rl
|
|
}
|
|
|
|
!macro a8i16 {; switch A to 8, X/Y to 16 bit
|
|
+a8
|
|
+i16
|
|
}
|
|
|
|
!macro a16i8 {; switch A to 16, X/Y to 8 bit
|
|
+a16
|
|
+i8
|
|
}
|
|
|
|
!macro inc24 .t {; increase 24-bit counter
|
|
inc .t
|
|
bne .j; "*" syntax not used here because size of ".t" is unknown
|
|
inc .t + 1
|
|
bne .j
|
|
inc .t + 2
|
|
.j
|
|
}
|
|
|