1
0
mirror of https://github.com/fadden/6502bench.git synced 2026-04-20 19:16:34 +00:00

Tweak backslash escaping

The initial implementation was testing the byte value rather than
the converted value, so backslashes were getting through in high
ASCII strings.  PETSCII and C64 screen codes don't really have a
backslash so it's not really an issue there.

The new implementation handles high ASCII correctly.  The various
201n0-char-encoding-x regression tests have been updated to verify
this.
This commit is contained in:
Andy McFadden
2021-07-31 20:22:21 -07:00
parent 8fc38d5d90
commit 752fa06ef5
24 changed files with 1112 additions and 33 deletions
@@ -144,5 +144,20 @@ allbytes
!hex e0e1e2e3e4e5e6e7e8e9eaebecedeeef
!hex f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
end
end nop
jmp skip_bs
!text "ASCII escapes \: \\ \r \n \",$22," \",$27," \t"
!byte $80
!pet "PETSCII escapes \: \\ \r \n \",$22," \",$27," \t"
!byte $80
!scr "SCR escapes \: \\ \r \n \",$22," \",$27," \t"
!byte $80
!xor $80 {
; Can't include string delimiter due to code gen limitation. Do "\0" instead.
!text "HIGH escapes \: \\ \r \n \",$30," \",$27," \t"
}
!byte $80
skip_bs nop
rts