

Github GitHub - blogmywiki/6502: place to keep my 6502 breadboard computer assem...
source link: https://github.com/blogmywiki/6502
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A place to keep my 6502 breadboard computer assembler programs
Based on the work of Ben Eater https://eater.net/6502
Assembly language .s files are assembled using vasm in 6502 'oldstyle' mode, eg
./vasm6502_oldstyle -Fbin -dotdir monitor2.s
Flashed to EEPROM using minipro:
minipro -p AT28C256 -w a.out
hello world
Prints text to LCD display using RAM for stack pointer and VIA to interface with LCD
Prints some different text with a button connected to VIA CA1 pin
monitor1
Really dreadful code, first steps towards a monitor program. Shows contents of ROM on LCD display: address, hex contents, ASCII representation. Press button on CA1 to advance. Only steps through 256 bytes. Byte to ASCII hex code needs putting in a subroutine. Weird sh&t going on with the X register - had to paste display code in before infinite loop otherwise x was not reset to 0, why this makes any difference beats me. The ASCII offset for converting hex numbers A-F is mad - should be #41 not #30. Why? WHY DOES #41 WORK? IT MAKES NO SENSE.
monitor2
Slightly less dreadful. Folds hex>ascii conversion into subroutines. .out file is raw binary for flashing to EEPROM.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK