mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-12 05:31:04 +00:00
b43fd07688
My original goal was to add a sign-extended decimal format, but that turned out to be awkward. It works for data items and instructions with immediate operands (e.g. "LDA #-1"), but is either wrong or useless for address operands, since most assemblers treat integers as 32-bit values. (LDA -1 is not LDA $FFFF, it's LDA $FFFFFFFF, which is not useful unless your asm is doing an implicit mod.) There's also a bit of variability in how assemblers treat negative values, so I'm shelving the idea for now. I'm keeping the updated tests, which are now split into 6502 / 65816 parts. Also, updated the formatter to output all decimal values as unsigned. Most assemblers were fine with negative values, but 64tass .dword insists on positive. Rather than make the opcode conditional on the value's range, we now just always output unsigned decimal, which all current assemblers accept.
30 lines
659 B
ArmAsm
30 lines
659 B
ArmAsm
;Project file was edited to force ASCII formatting for some operands.
|
|
!cpu 65816
|
|
* = $1000
|
|
!as
|
|
!rs
|
|
clc
|
|
xce
|
|
rep #$30
|
|
!al
|
|
!rl
|
|
lda #$1234
|
|
lda #4660
|
|
lda #4660
|
|
lda #%0001001000110100
|
|
lda #$fffe
|
|
lda #65534
|
|
lda #65534
|
|
lda #%1111111111111110
|
|
lda+3 $fffefd
|
|
lda+3 16776957
|
|
lda+3 16776957
|
|
lda+3 %111111111111111011111101
|
|
lda #'h'
|
|
lda #'H' | $80
|
|
lda #$6868
|
|
lda+3 'h'
|
|
lda+3 'H' | $80
|
|
rts
|
|
|