mirror of
https://github.com/fadden/6502bench.git
synced 2026-04-20 04:16:47 +00:00
Add signed-decimal operand formatting
This allows signed decimal operands to be formatted as such, e.g. "LDA #$FE" becomes "LDA #-2". This can be applied to immediate operands and to numeric data pseudo-ops. Not all assemblers support this in all situations. The asm generators will output unsigned decimal operands if so. The 20020- and 20022-operand-formats tests have been updated.
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
lda #$fe
|
||||
lda #$ff
|
||||
|
||||
jmp end
|
||||
jmp next1
|
||||
|
||||
; Continuing with ASCII
|
||||
:ascii
|
||||
@@ -96,4 +96,34 @@
|
||||
dfb $fd
|
||||
dfb ","
|
||||
|
||||
end rts
|
||||
; Signed-decimal tests. All operands should be formatted as signed. This
|
||||
; will require hand-editing or tweaking the operand editor.
|
||||
next1 nop
|
||||
lda #$00 ;these should format as signed
|
||||
lda #$01
|
||||
lda #$7f
|
||||
lda #$80
|
||||
lda #$ff
|
||||
|
||||
lda $01 ;these should appear unsigned
|
||||
lda $fe
|
||||
lda: $0001
|
||||
lda $fffe
|
||||
jmp :skipdat1
|
||||
|
||||
dfb $00 ;all of these should appear signed
|
||||
dfb $01
|
||||
dfb $7f
|
||||
dfb $80
|
||||
dfb $ff
|
||||
dw $0001
|
||||
dw $fffe
|
||||
dw $0200 ;big-endian
|
||||
dw $fdff ;big-endian
|
||||
adr $010203
|
||||
adr $fffefd
|
||||
adrl $01020304
|
||||
adrl $fffefdfc
|
||||
:skipdat1
|
||||
|
||||
rts
|
||||
|
||||
@@ -37,4 +37,14 @@
|
||||
ldal $000068 ;'h'
|
||||
ldal $0000c8 ;"h"
|
||||
|
||||
; Signed-decimal tests.
|
||||
nop
|
||||
lda #$0000
|
||||
lda #$0001
|
||||
lda #$7fff
|
||||
lda #$8000
|
||||
lda #$ffff
|
||||
|
||||
ldal $fffefd
|
||||
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user