Strloop lda hello, x load each byte in turnĬmp #0 if we reached a null byte, break This is the assembly code without subtracting 0x40: *=$c000 I am running on the VICE 圆4 emulator on Mac OS X, and I'm assembling with an OS X port of 64tass. For example, to display the characters on screenīy directly POKEing the screen memory, one would POKE the decimal
The actual character generator ROM used a different set ofĪssignments. It turns 0x41 into an inverted spade sign (like on a deck of cards) and everything above it seems to be border characters and weird symbols.Īfter looking around for a while I found this quote on the wikipedia page for PETSCII which seemed to state the problem I'm trying to solve, but I'm not sure how to fix it and can't find any information anywhere. I'm just not sure why the character generator is turning 0x01 into the character 'A' and not 0x41. I can fix this by subtracting 0x40 from my string, but then everything other than letters are incorrect, for example, spaces. I've found that this is because the upper case characters start at 0x01, not 0x41 as I thought from the PETSCII codes here. Unfortunately if I print a string, for example 'HELLO WORLD', it will come out in garbled characters. I have some 6502 code to print a string to the screen memory after clearing the screen.