5 ms·
Some interesting bits from the BASIC code (as seen 14:36 into the video): - POKE 53272,23 forces character set 2 (big/small letters). I knew it could be done b
by nathell 6y ago
Some interesting bits from the BASIC code (as seen 14:36 into the video):
- POKE 53272,23 forces character set 2 (big/small letters). I knew it could be done by a PRINT CHR$(142), but this is new to me. In general, it seems that the address 53272 can also be used to supply a custom charset: https://www.c64-wiki.com/wiki/53272 https://www.c64-wiki.com/wiki/53272
- C64 BASIC seems to be doing lazy tokenizing. Observe how line 1 ends with :END:TCB1984 – there is no TCB statement in BASIC, but it is never executed since it comes after the END statement.
I got rid of my C64 26 years ago when I was 10 or so, but I still can recite a rough memory map and a few KERNAL addresses. For the kid that I was back then, C64 was truly a magic device.
- classichasclass 6y agoCHR$(14), actually. 53272 is one of the VIC-II's pointer registers; it's also used to set the location of the hi-res screen in the 16K bank the video chip is looking at. To make this work in the lowest 16K, the VIC-II is made to see an image of the character ROM in the middle of memory ($1000), which is where both the upper case graphics set (POKE with 21) and upper lower case set (23) originate from.
- pjettter 6y agoWasn't POKE 686,0 something?
- nathell 6y agoDon’t know about 686, but 646 controlled the text color. POKE 646,0 would change it to black.
- pjettter 6y agoYes, 646 it was. Now I won't forget again!
- LambdaComplex 6y agoPoke646 was the name of a mod for the original Half-Life...I'm getting the feeling that isn't a coincidence Ninja edit: Yep, confirmed http://www.poke646.com/index.php/3-faq http://www.poke646.com/index.php/3-faq
- deleted 6y ago[deleted]
- reaperducer 6y agoPutting 0 into 686 wouldn't to anything, unless you had a program running in the background there, like a DOS wedge. 679 through 767 was empty at startup.
- justinlloyd 6y agoMany BASICs of the time did lazy tokenizing. You would bury code to be executed later, or binary data for graphics or assembly language after certain tokens, numbers or the closing quote of a string. BBC BASIC would tokenize on ENTER, ATOM BASIC didn't tokenize, but like a good text adventure game, you could write P. instead of PRINT, and P. in RAM was only two bytes compared to PRINT which was five bytes.
- mixmastamyk 6y agoVIC-20 with cassette-drive was my intro. I played the tapes on my stereo once, sounded like a modem: Kkkkkkkk.... ;-)
- andi999 6y agoI still find having a basic in like 9 kilobyte and the bios (kernal) in 7 kilobyte close to magic. Thats with average of 2,5 bytes per command like 6510 lines of assembly code, I wouldnt be able to write the datasette reader in it, or even the parser for basic, or the floating point number functions.(well any of it probably, but all of it?)