mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-03 05:49:48 +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)
352 lines
8.0 KiB
ArmAsm
352 lines
8.0 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
|
|
hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b
|
|
dfb $1c
|
|
dfb $1d
|
|
dfb $1e
|
|
dfb $1f
|
|
hex 202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
|
|
dfb $40
|
|
hex 4142434445464748494a4b4c4d4e4f505152535455565758595a
|
|
dfb $5b
|
|
dfb $5c
|
|
dfb $5d
|
|
dfb $5e
|
|
dfb $5f
|
|
dfb $60
|
|
dfb $61
|
|
dfb $62
|
|
dfb $63
|
|
dfb $64
|
|
dfb $65
|
|
dfb $66
|
|
dfb $67
|
|
dfb $68
|
|
dfb $69
|
|
dfb $6a
|
|
dfb $6b
|
|
dfb $6c
|
|
dfb $6d
|
|
dfb $6e
|
|
dfb $6f
|
|
dfb $70
|
|
dfb $71
|
|
dfb $72
|
|
dfb $73
|
|
dfb $74
|
|
dfb $75
|
|
dfb $76
|
|
dfb $77
|
|
dfb $78
|
|
dfb $79
|
|
dfb $7a
|
|
dfb $7b
|
|
dfb $7c
|
|
dfb $7d
|
|
dfb $7e
|
|
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
|
|
d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
|
dfb $fe
|
|
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
|
|
|