mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-11 13:50:13 +00:00
3368182e14
The DCI string format uses character values where the high bit of the last byte differs from the rest of the string. Usually all the high bits are clear except on the last byte, but SourceGen generally allows either polarity. This gets a little uncertain with single-character strings, because SourceGen can't auto-detect DCI very effectively. A series of bytes with the high bit set could be a single high-ASCII string or a series of single-byte DCI strings. The motivation for allowing them is C64 PETSCII. While ASCII allows "high ASCII" as an escape hatch, PETSCII doesn't have that option, so there's no way to mark the data as a character or a string. We still want to do a bit of screening, but if the user specifies a non-ASCII character set and the selected bytes have their high bits set, we want to just treat the whole set as 1-byte DCI. Some minor adjustments were needed for a couple of validity checks that expected longer strings. This adds some short DCI strings in different character sets to the char-encoding regression tests. (for issue #102)
249 lines
6.1 KiB
ArmAsm
249 lines
6.1 KiB
ArmAsm
;Projected edited to format non-char operands as chars.
|
|
org $1000
|
|
lda #'A'
|
|
lda #"A"
|
|
lda #$c1
|
|
lda #$41
|
|
ldx #'a'
|
|
ldx #"a"
|
|
ldx #$41
|
|
ldx #$01
|
|
lda #$7f ;inappropriate format should be ignored
|
|
lda #$7f
|
|
lda #$7f
|
|
lda #$7f
|
|
lda #$0d
|
|
jmp L144B
|
|
|
|
dfb 'C'
|
|
dfb "C"
|
|
dfb $c3
|
|
dfb $43
|
|
dw 'd'
|
|
dw "d"
|
|
dw $44
|
|
dw $04
|
|
ddb 'E'
|
|
ddb "E"
|
|
ddb $c5
|
|
ddb $45
|
|
dfb $80
|
|
asc 'low ASCII str'
|
|
asc "high ASCII str"
|
|
dfb $80
|
|
hex d0c5d4d3c3c9c920535452
|
|
dfb $80
|
|
hex 53031205050e20430f040520131412
|
|
dfb $82
|
|
asc 07,'Low ASCII CRLF',0d0a
|
|
dfb $82
|
|
asc 87,"High ASCII CRLF",8d8a
|
|
dfb $82
|
|
hex 93d0c5d4d3c3c9c920574954482096434f4e54524f4c0520434f4445530d
|
|
dfb $83
|
|
asc ' !"#$%&',27,'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX'
|
|
asc 'YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'
|
|
dfb $83
|
|
asc " !",a2,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX"
|
|
asc "YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
|
|
dfb $83
|
|
hex 202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
|
|
hex 40c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9da5b
|
|
dfb $5c
|
|
dfb $5d
|
|
dfb $5e
|
|
dfb $5f
|
|
dfb $60
|
|
hex 4142434445464748494a4b4c4d4e4f505152535455565758595a
|
|
dfb $7b
|
|
dfb $7c
|
|
dfb $7d
|
|
dfb $7e
|
|
dfb $83
|
|
hex 202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
|
|
hex 004142434445464748494a4b4c4d4e4f505152535455565758595a1b
|
|
dfb $1c
|
|
dfb $1d
|
|
dfb $1e
|
|
dfb $1f
|
|
dfb $40
|
|
hex 0102030405060708090a0b0c0d0e0f101112131415161718191a
|
|
dfb $7b
|
|
dfb $7c
|
|
dfb $7d
|
|
dfb $7e
|
|
dfb $84
|
|
hex c9c9c3d3d4c5d02045535245564552
|
|
dfb $84
|
|
hex 4e554c4c205445524d20d0c5d4d3c3c9c900
|
|
dfb $84
|
|
hex d4484953204e554c4c2d5445524d494e4154454420535452494e472049532054
|
|
hex 4f4f204c4f4e4720544f20464954204f4e20412053494e474c45204c494e452c
|
|
hex 20414e442057494c4c2042452053504c49542e00
|
|
dfb $84
|
|
hex 13d0c5d4d3c3c9c92057495448204c454e475448
|
|
dfb $84
|
|
hex 1400d0c5d4d3c3c9c92057495448204c454e47544832
|
|
dfb $84
|
|
hex 504554204443c9
|
|
dfb $84
|
|
hex 05040f43200e05051203532005131205160512
|
|
dfb $84
|
|
hex 0e150c0c2d1405120d2013031205050e20030f04053f00
|
|
dfb $84
|
|
hex 1753031205050e20430f04052017091408200c050e071408
|
|
dfb $84
|
|
hex 180053031205050e20430f04052017091408200c050e07140832
|
|
dfb $84
|
|
hex 53031205050e20430f0405204443c9
|
|
dfb $84
|
|
dfb $85
|
|
dfb $00
|
|
dfb $01
|
|
dfb $02
|
|
dfb $03
|
|
dfb $04
|
|
dfb $05
|
|
dfb $06
|
|
dfb $07
|
|
dfb $08
|
|
dfb $09
|
|
dfb $0a
|
|
dfb $0b
|
|
dfb $0c
|
|
dfb $0d
|
|
dfb $0e
|
|
dfb $0f
|
|
dfb $10
|
|
dfb $11
|
|
dfb $12
|
|
dfb $13
|
|
dfb $14
|
|
dfb $15
|
|
dfb $16
|
|
dfb $17
|
|
dfb $18
|
|
dfb $19
|
|
dfb $1a
|
|
dfb $1b
|
|
dfb $1c
|
|
dfb $1d
|
|
dfb $1e
|
|
dfb $1f
|
|
asc ' !"#$%&',27,'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX'
|
|
asc 'YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'
|
|
dfb $7f
|
|
dfb $80
|
|
dfb $81
|
|
dfb $82
|
|
dfb $83
|
|
dfb $84
|
|
dfb $85
|
|
dfb $86
|
|
dfb $87
|
|
dfb $88
|
|
dfb $89
|
|
dfb $8a
|
|
dfb $8b
|
|
dfb $8c
|
|
dfb $8d
|
|
dfb $8e
|
|
dfb $8f
|
|
dfb $90
|
|
dfb $91
|
|
dfb $92
|
|
dfb $93
|
|
dfb $94
|
|
dfb $95
|
|
dfb $96
|
|
dfb $97
|
|
dfb $98
|
|
dfb $99
|
|
dfb $9a
|
|
dfb $9b
|
|
dfb $9c
|
|
dfb $9d
|
|
dfb $9e
|
|
dfb $9f
|
|
asc " !",a2,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX"
|
|
asc "YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
|
|
dfb $ff
|
|
|
|
L144B nop
|
|
jmp :L14DA
|
|
|
|
asc 'ASCII escapes \: \\ \r \n \" \',27,' \t'
|
|
dfb $80
|
|
hex d0c5d4d3c3c9c9204553434150455320
|
|
dfb $5c
|
|
hex 3a20
|
|
dfb $5c
|
|
dfb $5c
|
|
dfb $20
|
|
dfb $5c
|
|
hex 5220
|
|
dfb $5c
|
|
hex 4e20
|
|
dfb $5c
|
|
hex 2220
|
|
dfb $5c
|
|
hex 2720
|
|
dfb $5c
|
|
dfb $54
|
|
dfb $80
|
|
hex 534352200513030110051320
|
|
dfb $1c
|
|
hex 3a20
|
|
dfb $1c
|
|
dfb $1c
|
|
dfb $20
|
|
dfb $1c
|
|
hex 1220
|
|
dfb $1c
|
|
hex 0e20
|
|
dfb $1c
|
|
dfb $22
|
|
dfb $20
|
|
dfb $1c
|
|
dfb $27
|
|
dfb $20
|
|
dfb $1c
|
|
dfb $14
|
|
dfb $80
|
|
asc "HIGH escapes \: \\ \r \n \0 \' \t"
|
|
dfb $80
|
|
|
|
:L14DA nop
|
|
jmp :L1511
|
|
|
|
dfb $86
|
|
dci 'Hello'
|
|
dci 'HI'
|
|
dci 'X'
|
|
dci '!'
|
|
dfb $86
|
|
dci "Hello"
|
|
dci "HI"
|
|
dfb 'X'
|
|
dfb '!'
|
|
dfb $86
|
|
hex 48454c4ccf
|
|
hex 48c9
|
|
hex d8
|
|
hex a1
|
|
dfb $86
|
|
hex c8c5cccc4f
|
|
hex c849
|
|
dfb $58
|
|
dfb $21
|
|
dfb $86
|
|
hex 48050c0c8f
|
|
hex 48c9
|
|
hex d8
|
|
hex a1
|
|
dfb $86
|
|
|
|
:L1511 nop
|
|
rts
|
|
|