1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-30 01:50:10 +00:00
6502bench/SourceGen/SGTestData/Expected/2006-operand-formats_acme.S
Andy McFadden f33cd7d8a6 Replace character operand output method
The previous code output a character in single-quotes if it was
standard ASCII, double-quotes if high ASCII, or hex if it was neither
of those.  If a flag was set, high ASCII would also be output as
hex.

The new system takes the character value and an encoding identifier.
The identifier selects the character converter and delimiter
pattern, and puts the two together to generate the operand.

While doing this I realized that I could trivially support high
ASCII character arguments in all assemblers by setting the delimiter
pattern to "'#' | $80".

In FormatDescriptor, I had previously renamed the "Ascii" sub-type
"LowAscii" so it wouldn't be confused, but I dislike filling the
project file with "LowAscii" when "Ascii" is more accurate and less
confusing.  So I switched it back, and we now check the project
file version number when deciding what to do with an ASCII item.
The CharEncoding tests/converters were also renamed.

Moved the default delimiter patterns to the string table.

Widened the delimiter pattern input fields slightly.  Added a read-
only TextBox with assorted non-typewriter quotes and things so
people have something to copy text from.
2019-08-11 22:11:00 -07:00

66 lines
1.4 KiB
ArmAsm

;Project file was edited for some ASCII operands.
!cpu 65816
* = $1000
!as
!rs
clc
xce
sep #$30
lda $01
lda $0102
lda+3 $010203
lda 1
lda 258
lda+3 66051
lda %00000001
lda %0000000100000010
lda+3 %000000010000001000000011
bra skipdata
!byte $01
!word $0201
!24 $030201
!32 $04030201
!byte 1
!word 513
!24 197121
!32 67305985
!byte %00000001
!word %0000001000000001
!24 %000000110000001000000001
!32 %00000100000000110000001000000001
skipdata lda #'h'
lda 'h'
lda+2 'h'
lda+3 'h'
lda #$1f
lda #' '
lda #'~'
lda #$7f
lda #$80
lda #$9f
lda #' ' | $80
lda #'~' | $80
lda #$ff
rep #'0'
!al
!rl
lda #'h'
lda #'H' | $80
lda #$6868
rts
more_ascii !byte 'h'
!byte $80
!word $6868
!byte $80
!word skipdata
!24 skipdata
!byte $10,$3f
!byte <more_ascii
!byte >more_ascii
!word more_ascii
!24 more_ascii
!byte $10,$68