1
0
mirror of https://github.com/fadden/6502bench.git synced 2026-04-20 19:16:34 +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:
Andy McFadden
2025-07-15 13:34:19 -07:00
parent 10e48f15e8
commit 4ea4204ab7
30 changed files with 710 additions and 115 deletions
Binary file not shown.
+327 -74
View File
@@ -1,8 +1,8 @@
### 6502bench SourceGen dis65 v1.0 ###
{
"_ContentVersion":3,
"FileDataLength":165,
"FileDataCrc32":-689690654,
"_ContentVersion":6,
"FileDataLength":216,
"FileDataCrc32":766666952,
"ProjectProps":{
"CpuName":"6502",
"IncludeUndocumentedInstr":false,
@@ -14,7 +14,9 @@
"DefaultTextScanMode":"LowHighAscii",
"MinCharsForString":4,
"SeekNearbyTargets":true,
"SmartPlpHandling":true},
"UseRelocData":false,
"SmartPlpHandling":true,
"SmartPlbHandling":true},
"PlatformSymbolFileIdentifiers":[],
"ExtensionScriptFileIdentifiers":[],
@@ -23,7 +25,12 @@
"AddressMap":[{
"Offset":0,
"Addr":4096}],
"Addr":4096,
"Length":-1024,
"PreLabel":"",
"DisallowInward":false,
"DisallowOutward":false,
"IsRelative":false}],
"TypeHints":[{
"Low":0,
"High":0,
@@ -37,6 +44,14 @@
"LongComments":{
"-2147483647":{
"Text":"Project file was edited to force ASCII formatting for some operands.",
"IsFancy":false,
"BoxMode":false,
"MaxWidth":80,
"BackgroundColor":0},
"164":{
"Text":"Signed-decimal tests. All of these must be formatted as signed decimal; this may require hand-editing or modifications to the instruction operand editor.",
"IsFancy":true,
"BoxMode":false,
"MaxWidth":80,
"BackgroundColor":0}},
@@ -64,319 +79,372 @@
"Length":2,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"12":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"15":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"17":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"20":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"22":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"25":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"27":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"30":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"32":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"35":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"37":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"43":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Hex",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"44":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Hex",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"46":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Hex",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"49":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Hex",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"53":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"54":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"56":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"59":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"63":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"64":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"66":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"69":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"73":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"74":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"76":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"79":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"83":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"84":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"86":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"89":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"93":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"95":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"97":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"100":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"102":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"104":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"106":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"108":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"110":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"112":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"114":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"116":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"118":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"120":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"122":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"124":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"129":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"131":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Hex",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"134":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Address",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"136":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Address",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"139":{
"Length":2,
"Format":"NumericBE",
"SubFormat":"Address",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"141":{
"Length":1,
@@ -384,7 +452,9 @@
"SubFormat":"Symbol",
"SymbolRef":{
"Label":"more_ascii",
"Part":"Low"}},
"Part":"Low"},
"Extra":null},
"142":{
"Length":1,
@@ -392,91 +462,268 @@
"SubFormat":"Symbol",
"SymbolRef":{
"Label":"more_ascii",
"Part":"High"}},
"Part":"High"},
"Extra":null},
"143":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"Address",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"145":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Address",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"148":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Address",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"152":{
"Length":2,
"Format":"NumericBE",
"SubFormat":"Address",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"154":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"155":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"156":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"157":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"158":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"159":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"160":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"161":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"162":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"163":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null}},
"SymbolRef":null,
"Extra":null},
"165":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"167":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"169":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"171":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"173":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"175":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"177":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"179":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"182":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"185":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"188":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"189":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"190":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"191":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"192":{
"Length":1,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"193":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"195":{
"Length":2,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"197":{
"Length":2,
"Format":"NumericBE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"199":{
"Length":2,
"Format":"NumericBE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"201":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"204":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"207":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"211":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null}},
"LvTables":{
},
@@ -484,4 +731,10 @@
"Visualizations":[],
"VisualizationAnimations":[],
"VisualizationSets":{
},
"RelocList":{
},
"DbrValues":{
}}
Binary file not shown.
@@ -1,8 +1,8 @@
### 6502bench SourceGen dis65 v1.0 ###
{
"_ContentVersion":3,
"FileDataLength":62,
"FileDataCrc32":946946401,
"_ContentVersion":6,
"FileDataLength":82,
"FileDataCrc32":1142036862,
"ProjectProps":{
"CpuName":"65816",
"IncludeUndocumentedInstr":false,
@@ -14,7 +14,9 @@
"DefaultTextScanMode":"LowHighAscii",
"MinCharsForString":4,
"SeekNearbyTargets":true,
"SmartPlpHandling":true},
"UseRelocData":false,
"SmartPlpHandling":true,
"SmartPlbHandling":true},
"PlatformSymbolFileIdentifiers":[],
"ExtensionScriptFileIdentifiers":[],
@@ -23,7 +25,12 @@
"AddressMap":[{
"Offset":0,
"Addr":4096}],
"Addr":4096,
"Length":-1024,
"PreLabel":"",
"DisallowInward":false,
"DisallowOutward":false,
"IsRelative":false}],
"TypeHints":[{
"Low":0,
"High":0,
@@ -37,6 +44,7 @@
"LongComments":{
"-2147483647":{
"Text":"Project file was edited to force ASCII formatting for some operands.",
"IsFancy":false,
"BoxMode":false,
"MaxWidth":80,
"BackgroundColor":0}},
@@ -52,85 +60,141 @@
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"10":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"13":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"19":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"22":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"25":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"32":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"36":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Decimal",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"40":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Binary",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"44":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"47":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"50":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"53":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"Ascii",
"SymbolRef":null},
"SymbolRef":null,
"Extra":null},
"57":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"HighAscii",
"SymbolRef":null}},
"SymbolRef":null,
"Extra":null},
"62":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"65":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"68":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"71":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"74":{
"Length":3,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null},
"77":{
"Length":4,
"Format":"NumericLE",
"SubFormat":"SignedDecimal",
"SymbolRef":null,
"Extra":null}},
"LvTables":{
},
@@ -138,4 +202,10 @@
"Visualizations":[],
"VisualizationAnimations":[],
"VisualizationSets":{
},
"RelocList":{
},
"DbrValues":{
}}
@@ -86,5 +86,33 @@ more_ascii .byte 'h'
.byte '}' | $80
.byte ',' | $80
L10A4 rts
;Signed-decimal tests. All of these must be formatted as signed decimal; this
;may require hand-editing or modifications to the instruction operand editor.
L10A4 nop
lda #0
lda #1
lda #127
lda #-128
lda #-1
lda 1
lda 254
lda @w1
lda 65534
jmp 4311
.byte 0
.byte 1
.byte 127
.byte 128
.byte 255
.word 1
.word 65534
.byte $00,$02
.byte $ff,$fd
.long 66051
.long 16776957
.dword 16909060
.dword 4294901244
rts
@@ -82,5 +82,33 @@ more_ascii !byte 'h'
!byte '}' | $80
!byte ',' | $80
L10A4 rts
;Signed-decimal tests. All of these must be formatted as signed decimal; this
;may require hand-editing or modifications to the instruction operand editor.
L10A4 nop
lda #0
lda #1
lda #127
lda #-128
lda #-1
lda 1
lda 254
lda+2 1
lda 65534
jmp 4311
!byte 0
!byte 1
!byte 127
!byte -128
!byte -1
!word 1
!word -2
!byte $00,$02
!byte $ff,$fd
!24 66051
!24 -259
!32 16909060
!32 -66052
rts
@@ -82,5 +82,33 @@ more_ascii: .byte 'h'
.byte '}' | $80
.byte ',' | $80
L10A4: rts
;Signed-decimal tests. All of these must be formatted as signed decimal; this
;may require hand-editing or modifications to the instruction operand editor.
L10A4: nop
lda #0
lda #1
lda #127
lda #128
lda #255
lda 1
lda 254
lda a:1
lda 65534
jmp 4311
.byte 0
.byte 1
.byte 127
.byte 128
.byte 255
.word 1
.word 65534
.dbyt 2
.dbyt 65533
.faraddr 66051
.faraddr 16776957
.dword 16909060
.dword 4294901244
rts
@@ -81,5 +81,33 @@ more_ascii dfb 'h'
dfb $fd
dfb ","
L10A4 rts
*Signed-decimal tests. All of these must be formatted as signed decimal; this
*may require hand-editing or modifications to the instruction operand editor.
L10A4 nop
lda #0
lda #1
lda #127
lda #-128
lda #-1
lda 1
lda 254
lda: 1
lda 65534
jmp 4311
dfb 0
dfb 1
dfb 127
dfb -128
dfb -1
dw 1
dw -2
ddb 2
ddb -3
adr 66051
adr -259
adrl 16909060
adrl -66052
rts
@@ -29,5 +29,12 @@
lda #$6868
lda @l'h'
lda @l'H' | $80
nop
lda #0
lda #1
lda #32767
lda #-32768
lda #-1
lda 16776957
rts
@@ -25,5 +25,12 @@
lda #$6868
lda+3 'h'
lda+3 'H' | $80
nop
lda #0
lda #1
lda #32767
lda #-32768
lda #-1
lda+3 16776957
rts
@@ -25,5 +25,12 @@
lda #$6868
lda f:'h'
lda f:'H' | $80
nop
lda #0
lda #1
lda #32767
lda #32768
lda #65535
lda 16776957
rts
@@ -21,5 +21,12 @@
lda #$6868
ldal 'h'
ldal "H"
nop
lda #0
lda #1
lda #32767
lda #-32768
lda #-1
ldal 16776957
rts
@@ -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