mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-05 03:49:53 +00:00
284 lines
6.1 KiB
ArmAsm
284 lines
6.1 KiB
ArmAsm
; Copyright 2018 faddenSoft. All Rights Reserved.
|
|
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
|
;
|
|
; Assembler: Merlin 32
|
|
|
|
ORG $1000
|
|
|
|
JSR PostBRK
|
|
JSR PostH02
|
|
JSR PostH12
|
|
JSR PostH22
|
|
JSR PostH32
|
|
JSR PostRTI
|
|
JSR PostH42
|
|
JSR PostH52
|
|
JSR PostRTS
|
|
JSR PostH62
|
|
JSR PostJMPI
|
|
JSR PostH72
|
|
JSR PostH92
|
|
JSR PostHB2
|
|
JSR PostHD2
|
|
JSR PostHF2
|
|
NOP
|
|
NOP
|
|
NOP
|
|
BRK ZP ;$00
|
|
PostBRK ORA (ZP,X)
|
|
DFB $02
|
|
PostH02 DFB $03,ZP
|
|
DFB $04,ZP
|
|
ORA ZP
|
|
ASL ZP
|
|
DFB $07,ZP
|
|
PHP
|
|
ORA #ZP
|
|
ASL
|
|
DFB $0B,ZP
|
|
DFB $0C,#<ABS,#>ABS
|
|
ORA: ABS
|
|
ASL: ABS
|
|
DFB $0F,#<ABS,#>ABS
|
|
BPL PostBPL ;$10
|
|
PostBPL ORA (ZP),Y
|
|
DFB $12
|
|
PostH12 DFB $13,ZP
|
|
DFB $14,ZP
|
|
ORA ZP,X
|
|
ASL ZP,X
|
|
DFB $17,ZP
|
|
CLC
|
|
ORA: ABS,Y
|
|
DFB $1A
|
|
DFB $1B,#<ABS,#>ABS
|
|
DFB $1C,#<ABS,#>ABS
|
|
ORA: ABS,X
|
|
ASL: ABS,X
|
|
DFB $1F,#<ABS,#>ABS
|
|
JSR ABS ;$20
|
|
AND (ZP,X)
|
|
DFB $22
|
|
PostH22 DFB $23,ZP
|
|
BIT ZP
|
|
AND ZP
|
|
ROL ZP
|
|
DFB $27,ZP
|
|
PLP
|
|
AND #ZP
|
|
ROL
|
|
DFB $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