1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-06 00:28:58 +00:00

Operand for ".enc" should be in double quotes

The 64tass assembler was generating a warning.
This commit is contained in:
Andy McFadden 2020-07-02 08:14:42 -07:00
parent fdd2bcf847
commit 7d1d7f9c56
15 changed files with 148 additions and 147 deletions

View File

@ -280,12 +280,12 @@ namespace SourceGen.AsmGen {
CheckAsciiFormats(out bool hasAscii, out bool hasHighAscii);
if (hasHighAscii) {
OutputLine(string.Empty, ".enc", HIGH_ASCII_ENC_NAME, string.Empty);
OutputLine(string.Empty, ".enc", '"' + HIGH_ASCII_ENC_NAME + '"', string.Empty);
OutputLine(string.Empty, ".cdef", "$20,$7e,$a0", string.Empty);
mCurrentEncoding = CharEncoding.Encoding.HighAscii;
}
if (hasAscii) {
OutputLine(string.Empty, ".enc", ASCII_ENC_NAME, string.Empty);
OutputLine(string.Empty, ".enc", '"' + ASCII_ENC_NAME + '"', string.Empty);
OutputLine(string.Empty, ".cdef", "$20,$7e,$20", string.Empty);
mCurrentEncoding = CharEncoding.Encoding.Ascii;
}
@ -372,7 +372,7 @@ namespace SourceGen.AsmGen {
if (newEnc != mCurrentEncoding) {
switch (newEnc) {
case CharEncoding.Encoding.Ascii:
OutputLine(string.Empty, ".enc", ASCII_ENC_NAME, string.Empty);
OutputLine(string.Empty, ".enc", '"' + ASCII_ENC_NAME + '"', string.Empty);
break;
case CharEncoding.Encoding.HighAscii:
// If this is a numeric operand (not string), and we're currently in
@ -382,14 +382,15 @@ namespace SourceGen.AsmGen {
if (mCurrentEncoding == CharEncoding.Encoding.Ascii && !dfd.IsString) {
newEnc = mCurrentEncoding;
} else {
OutputLine(string.Empty, ".enc", HIGH_ASCII_ENC_NAME, string.Empty);
OutputLine(string.Empty, ".enc", '"' + HIGH_ASCII_ENC_NAME + '"',
string.Empty);
}
break;
case CharEncoding.Encoding.C64Petscii:
OutputLine(string.Empty, ".enc", "none", string.Empty);
OutputLine(string.Empty, ".enc", "\"none\"", string.Empty);
break;
case CharEncoding.Encoding.C64ScreenCode:
OutputLine(string.Empty, ".enc", "screen", string.Empty);
OutputLine(string.Empty, ".enc", "\"screen\"", string.Empty);
break;
default:
Debug.Assert(false);

View File

@ -1,5 +1,5 @@
.cpu "65816"
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $1000
.as

View File

@ -1,7 +1,7 @@
;Project file was edited to get all big-endian data types, and to have an
;incorrect .junk alignment directive.
.cpu "6502"
.enc sg_hiascii
.enc "sg_hiascii"
.cdef $20,$7e,$a0
* = $1000
bit L1448

View File

@ -1,24 +1,24 @@
;Project file was edited to get zero-length strings and reverse DCI.
.cpu "6502"
.enc sg_hiascii
.enc "sg_hiascii"
.cdef $20,$7e,$a0
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $1000
rts
.text "low ASCII str"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.text "high ASCII str"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text "'low'quoted",$22,"''text"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.text $a2,"high",$a2,"quoted'",$a2,$a2,"text"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text "01234567890123456789012345678901234567890123456789012345678901"
.text "234567890123456789"
.byte $80
@ -50,19 +50,19 @@
.text "0123456789012345678901234567890123456789012345678901678901",$22
.text $22,$22
.byte $81
.enc sg_hiascii
.enc "sg_hiascii"
.text "**************************************************************"
.byte $80
.text "**************************************************************"
.text "**********************************"
.byte $81
.enc sg_ascii
.enc "sg_ascii"
.text "ver IICSA wol"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.text "ver IICSA hgih"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text ".eeht rof sllot ti ;sllot lleb eht mohw rof wonk ot dnes reven"
.text " erofereht dna ,dniknam ni devlovni ma I esuaceb ,em sehsinimi"
.text "d htaed snam ynA .erew nwo eniht fo ro sdneirf yht fo ronam a"
@ -75,16 +75,16 @@
.byte $80
.null "low ASCII strz"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.null "high ASCII strz"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.null "'low'quoted",$22,"''text"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.null $a2,"high",$a2,"quoted'",$a2,$a2,"text"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text "012345678901234567890123456789012345678901234567890123456789''"
.text "'",$00
.byte $80
@ -95,16 +95,16 @@
.byte $80
.ptext "low ASCII str1"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.ptext "high ASCII str1"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.ptext "'low'quoted",$22,"''text"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.ptext $a2,"high",$a2,"quoted'",$a2,$a2,"text"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text $3f,"0123456789012345678901234567890123456789012345678901234567"
.text "89'''"
.byte $80
@ -115,16 +115,16 @@
.byte $80
.text $0e,$00,"low ASCII str2"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.text $0f,$00,"high ASCII str2"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text $12,$00,"'low'quoted",$22,"''text"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.text $13,$00,$a2,"high",$a2,"quoted'",$a2,$a2,"text"
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text $3f,$00,"012345678901234567890123456789012345678901234567890123"
.text "456789'''"
.byte $80
@ -141,17 +141,17 @@
.byte $81
.shift "low ASCII dci"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.byte $e8,$e9,$e7,$e8,$a0,$c1,$d3,$c3,$c9,$c9,$a0,$e4,$e3,$69
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.shift "'low'quoted",$22,"''text"
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
.byte $a2,$e8,$e9,$e7,$e8,$a2,$f1,$f5,$ef,$f4,$e5,$e4,$a7,$a2,$a2,$f4
.byte $e5,$f8,$74
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text "012345678901234567890123456789012345678901234567890123456789''"
.text $a7
.byte $80

View File

@ -1,8 +1,8 @@
;Project file was edited to force ASCII formatting for some operands.
.cpu "6502"
.enc sg_hiascii
.enc "sg_hiascii"
.cdef $20,$7e,$a0
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $1000
lda $01

View File

@ -1,8 +1,8 @@
;Project file was edited to force ASCII formatting for some operands.
.cpu "65816"
.enc sg_hiascii
.enc "sg_hiascii"
.cdef $20,$7e,$a0
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $1000
.as

View File

@ -1,7 +1,7 @@
;Project was edited to add a label in the middle of a dense hex region, and add
;a duplicate label.
.cpu "6502"
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
BMI1 = $30 ;opcode mnemonic
zip = $cd

View File

@ -1,7 +1,7 @@
;Project was edited to add a label in the middle of a dense hex region, and add
;a duplicate label.
.cpu "65816"
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
BMI1 = $30 ;opcode mnemonic
zip = $cd

View File

@ -1,5 +1,5 @@
.cpu "65816"
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $1000
.as

View File

@ -1,8 +1,8 @@
;Project edited to mark some non-ASCII operands as ASCII.
.cpu "65816"
.enc sg_hiascii
.enc "sg_hiascii"
.cdef $20,$7e,$a0
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $1000
.as
@ -12,88 +12,88 @@
sep #$30
lda #'A'
lda #'A' | $80
.enc none
.enc "none"
lda #'A'
.enc screen
.enc "screen"
lda #'A'
.enc sg_ascii
.enc "sg_ascii"
ldx #'a'
ldx #'a' | $80
.enc none
.enc "none"
ldx #'a'
.enc screen
.enc "screen"
ldx #'a'
.enc sg_ascii
.enc "sg_ascii"
lda #$7f
lda #$7f
.enc none
.enc "none"
lda #$7f
.enc screen
.enc "screen"
lda #$7f
.enc sg_ascii
.enc "sg_ascii"
lda #$0d
rep #$30
.al
.xl
lda #'B'
lda #'B' | $80
.enc none
.enc "none"
lda #'B'
.enc screen
.enc "screen"
lda #'B'
sep #$30
.as
.xs
rts
.enc sg_ascii
.enc "sg_ascii"
.byte 'C'
.byte 'C' | $80
.enc none
.enc "none"
.byte 'C'
.enc screen
.enc "screen"
.byte 'C'
.enc sg_ascii
.enc "sg_ascii"
.word 'd'
.word 'd' | $80
.enc none
.enc "none"
.word 'd'
.enc screen
.enc "screen"
.word 'd'
.byte $00,$45
.byte $00,$c5
.byte $00,$c5
.byte $00,$45
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text "low ASCII str"
.enc sg_hiascii
.enc "sg_hiascii"
.text "high ASCII str"
.byte $80
.enc none
.enc "none"
.text "PETSCII str"
.byte $80
.enc screen
.enc "screen"
.text "Screen Code str"
.byte $82
.enc sg_ascii
.enc "sg_ascii"
.text $07,"Low ASCII CRLF",$0d,$0a
.byte $82
.enc sg_hiascii
.enc "sg_hiascii"
.text $87,"High ASCII CRLF",$8d,$8a
.byte $82
.enc none
.enc "none"
.text $93,"PETSCII with ",$96,"control",$05," codes",$0d
.byte $83
.enc sg_ascii
.enc "sg_ascii"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.enc sg_hiascii
.enc "sg_hiascii"
.text " !",$a2,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.enc none
.enc "none"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $5c
@ -102,10 +102,10 @@
.byte $5f
.byte $60
.text "abcdefghijklmnopqrstuvwxyz"
.enc sg_ascii
.enc "sg_ascii"
.text "{|}~"
.byte $83
.enc screen
.enc "screen"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $1c
@ -114,10 +114,10 @@
.byte $1f
.byte $40
.text "abcdefghijklmnopqrstuvwxyz"
.enc sg_ascii
.enc "sg_ascii"
.text "{|}~"
.byte $84
.enc none
.enc "none"
.text "IICSTEP esrever"
.byte $84
.null "null term PETSCII"
@ -131,7 +131,7 @@
.byte $84
.shift "pet dci"
.byte $84
.enc screen
.enc "screen"
.text "edoC neercS esrever"
.byte $84
.ptext "Screen Code with length"
@ -174,7 +174,7 @@
.byte $1d
.byte $1e
.byte $1f
.enc sg_ascii
.enc "sg_ascii"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $7f

View File

@ -1,8 +1,8 @@
;Project edited to mark some non-ASCII operands as ASCII.
.cpu "65816"
.enc sg_hiascii
.enc "sg_hiascii"
.cdef $20,$7e,$a0
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $1000
.as
@ -12,88 +12,88 @@
sep #$30
lda #'A'
lda #'A' | $80
.enc none
.enc "none"
lda #'A'
.enc screen
.enc "screen"
lda #'A'
.enc sg_ascii
.enc "sg_ascii"
ldx #'a'
ldx #'a' | $80
.enc none
.enc "none"
ldx #'a'
.enc screen
.enc "screen"
ldx #'a'
.enc sg_ascii
.enc "sg_ascii"
lda #$7f
lda #$7f
.enc none
.enc "none"
lda #$7f
.enc screen
.enc "screen"
lda #$7f
.enc sg_ascii
.enc "sg_ascii"
lda #$0d
rep #$30
.al
.xl
lda #'B'
lda #'B' | $80
.enc none
.enc "none"
lda #'B'
.enc screen
.enc "screen"
lda #'B'
sep #$30
.as
.xs
rts
.enc sg_ascii
.enc "sg_ascii"
.byte 'C'
.byte 'C' | $80
.enc none
.enc "none"
.byte 'C'
.enc screen
.enc "screen"
.byte 'C'
.enc sg_ascii
.enc "sg_ascii"
.word 'd'
.word 'd' | $80
.enc none
.enc "none"
.word 'd'
.enc screen
.enc "screen"
.word 'd'
.byte $00,$45
.byte $00,$c5
.byte $00,$c5
.byte $00,$45
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text "low ASCII str"
.enc sg_hiascii
.enc "sg_hiascii"
.text "high ASCII str"
.byte $80
.enc none
.enc "none"
.text "PETSCII str"
.byte $80
.enc screen
.enc "screen"
.text "Screen Code str"
.byte $82
.enc sg_ascii
.enc "sg_ascii"
.text $07,"Low ASCII CRLF",$0d,$0a
.byte $82
.enc sg_hiascii
.enc "sg_hiascii"
.text $87,"High ASCII CRLF",$8d,$8a
.byte $82
.enc none
.enc "none"
.text $93,"PETSCII with ",$96,"control",$05," codes",$0d
.byte $83
.enc sg_ascii
.enc "sg_ascii"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.enc sg_hiascii
.enc "sg_hiascii"
.text " !",$a2,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.enc none
.enc "none"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $5c
@ -107,7 +107,7 @@
.byte $7d
.byte $7e
.byte $83
.enc screen
.enc "screen"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $1c
@ -121,7 +121,7 @@
.byte $7d
.byte $7e
.byte $84
.enc none
.enc "none"
.text "IICSTEP esrever"
.byte $84
.null "null term PETSCII"
@ -135,7 +135,7 @@
.byte $84
.shift "pet dci"
.byte $84
.enc screen
.enc "screen"
.text "edoC neercS esrever"
.byte $84
.ptext "Screen Code with length"
@ -176,7 +176,7 @@
.byte $1b
.byte $1c
.byte $1d
.enc none
.enc "none"
.text $1e,$1f," !",$22,"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmno"
.text "pqrstuvwxyz["
.byte $5c

View File

@ -1,8 +1,8 @@
;Project edited to mark some non-ASCII operands as ASCII.
.cpu "65816"
.enc sg_hiascii
.enc "sg_hiascii"
.cdef $20,$7e,$a0
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $1000
.as
@ -12,88 +12,88 @@
sep #$30
lda #'A'
lda #'A' | $80
.enc none
.enc "none"
lda #'A'
.enc screen
.enc "screen"
lda #'A'
.enc sg_ascii
.enc "sg_ascii"
ldx #'a'
ldx #'a' | $80
.enc none
.enc "none"
ldx #'a'
.enc screen
.enc "screen"
ldx #'a'
.enc sg_ascii
.enc "sg_ascii"
lda #$7f
lda #$7f
.enc none
.enc "none"
lda #$7f
.enc screen
.enc "screen"
lda #$7f
.enc sg_ascii
.enc "sg_ascii"
lda #$0d
rep #$30
.al
.xl
lda #'B'
lda #'B' | $80
.enc none
.enc "none"
lda #'B'
.enc screen
.enc "screen"
lda #'B'
sep #$30
.as
.xs
rts
.enc sg_ascii
.enc "sg_ascii"
.byte 'C'
.byte 'C' | $80
.enc none
.enc "none"
.byte 'C'
.enc screen
.enc "screen"
.byte 'C'
.enc sg_ascii
.enc "sg_ascii"
.word 'd'
.word 'd' | $80
.enc none
.enc "none"
.word 'd'
.enc screen
.enc "screen"
.word 'd'
.byte $00,$45
.byte $00,$c5
.byte $00,$c5
.byte $00,$45
.byte $80
.enc sg_ascii
.enc "sg_ascii"
.text "low ASCII str"
.enc sg_hiascii
.enc "sg_hiascii"
.text "high ASCII str"
.byte $80
.enc none
.enc "none"
.text "PETSCII str"
.byte $80
.enc screen
.enc "screen"
.text "Screen Code str"
.byte $82
.enc sg_ascii
.enc "sg_ascii"
.text $07,"Low ASCII CRLF",$0d,$0a
.byte $82
.enc sg_hiascii
.enc "sg_hiascii"
.text $87,"High ASCII CRLF",$8d,$8a
.byte $82
.enc none
.enc "none"
.text $93,"PETSCII with ",$96,"control",$05," codes",$0d
.byte $83
.enc sg_ascii
.enc "sg_ascii"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.enc sg_hiascii
.enc "sg_hiascii"
.text " !",$a2,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
.byte $83
.enc none
.enc "none"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $5c
@ -107,7 +107,7 @@
.byte $7d
.byte $7e
.byte $83
.enc screen
.enc "screen"
.text " !",$22,"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"
.text "XYZ["
.byte $1c
@ -121,7 +121,7 @@
.byte $7d
.byte $7e
.byte $84
.enc none
.enc "none"
.text "IICSTEP esrever"
.byte $84
.null "null term PETSCII"
@ -135,7 +135,7 @@
.byte $84
.shift "pet dci"
.byte $84
.enc screen
.enc "screen"
.text "edoC neercS esrever"
.byte $84
.ptext "Screen Code with length"

View File

@ -1,6 +1,6 @@
;Edited to have duplicate labels (PROJ_ZERO, DPCODE).
.cpu "65816"
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
CONST_ZERO = $f0 ;project const

View File

@ -1,7 +1,7 @@
.cpu "65816"
.enc sg_hiascii
.enc "sg_hiascii"
.cdef $20,$7e,$a0
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
PrintInlineL1String = $011000
PrintInlineL2String = $012000
@ -66,7 +66,7 @@ data01 .word 4386
.byte $80
data02 .word _data03
.byte $80
.enc sg_hiascii
.enc "sg_hiascii"
_data03 .text "AllEight"
NoCont pla ;split across address change
@ -106,7 +106,7 @@ L1800 jsr PrintInlineNullString
.byte $01
.here
.logical $1840
.enc sg_ascii
.enc "sg_ascii"
.text "string"
.byte $00
.byte $60

View File

@ -1,5 +1,5 @@
.cpu "6502"
.enc sg_ascii
.enc "sg_ascii"
.cdef $20,$7e,$20
* = $2000
jmp L2100