Hacking Microsoft BASIC
🕑 Added 2024-09-30 21:08:46 +0000 UTCNew video! In this one, I modify the Microsoft BASIC code that's running on the 6502 computer to add some new instructions. Specifically, I add instructions for printing to and manipulating the LCD screen that's already part of the computer.
As always, thanks for your support and let me know if anything is unclear or if there are any other issues you see before I release this publicly.
Thanks again!
-Ben
Comments
George M1GEO
Yes! SPI load & save, followed by interfacing to the world's worst video card!
Remco van Zuijlen
Ofcourse, now the breadboard computer works with WozMon and MsBasic and lcd write commands are implemented, what else can be still be done? If I may suggest implementing a SPI interface connecting to a SD-card? And after that ofcourse adding a LOAD and SAVE command to Basic.
George Harris
So, do you want to build a bootstrap to directly get into basic (without the parameters) and then have a CALL command that dumps out to WozMon?
Ben Eater
My hope was definitely to get BASIC running on it from the beginning, but I didn't exactly have the entire path mapped out of how to get there. That was a very distant goal at the time. The plan at the beginning was really just that I wanted to cover a few things like the LCD or keyboard that weren't practical on the SAP 8-bit CPU. I figured the 6502 would be a better platform for those videos.
Jack McKinney
@Tim Tom - I have not yet watched this episode, but I was just thinking about this same thing. I can imagine Ben thinking several months ago, "Gee, I'd love to kill a Wompus. But, an emulator is just wrong, and I don't want to fix old faulty hardware. So, what could I do. Hmmm...."
Tim Tom
It’s amazing looking from this episode back to where it all started. I’ve always been curious how much of it was planned/mapped out when it started. Did you know you’d eventually be running wozmon/basic on the thing when you were building a clock from 555 timers?
Timo Haanpää
Using character codes to clear the screen and move the cursor would also be an interesting experiment.
Ben Eater
Yep, Mikol's example shows how easy it is!
Alistair Campbell
Thanks, Ben. This is a fantastic episode :)
Mikol Ryon
Unless I missing something (ver possible) this works for me: in lcd.s: LCDCLEAR: lda #%00000001 ; clear display jsr lcd_instruction rts and in token.s: .ifdef EATER keyword_rts "LCDCMD", LCDCMD keyword_rts "LCDPRINT", LCDPRINT keyword_rts "LCDCLEAR", LCDCLEAR .endif Seems to working well.
George M1GEO
This is awesome, Ben! One of my favourite videos of yours!
ProgrammerDor
Nice! I love how easy it is to add commands. I would have loved to be able to do this when I learned Assembly way back in collage (early 90s). For the next video and because clearing the screen is such a common thing to do, maybe also add an LCDCLS command.
Mikol Ryon
Woohoo!!!! This is what I've been waiting for! A thousand thanks.