The Apple 1 ROM is quite a tight piece of coding. Just 256 bytes which implements basic console IO, and memory editing in hex. And still two bytes left over. Legend is Woz wrote it directly in machine language. One version with lots of comments: https://github.com/jefftranter/6502/blob/master/asm/wozmon/w...
You can see a classic assembly language space optimizing trick at PRBYTE. It first prints the upper half of the byte in hex with call to the PRHEX procedure, then falls through to PRHEX again to print the second half.
Indeed, an assembler, and a computer to run it on, were luxuries in those days. I'll bet a lot of early code was hand assembled. It wasn't too hard on 8 bit machines. I coded on grid paper. In reality, all it took was a few dozen lines of code and I was simultaneously hooked on coding, and motivated to earn enough money to buy a computer of my own.
In addition to having access to computers, even just being able to get a copy of any software and do anything with it were a bit of a hurdle if you had started at the chip level.
Comments
The Apple 1 ROM is quite a tight piece of coding. Just 256 bytes which implements basic console IO, and memory editing in hex. And still two bytes left over. Legend is Woz wrote it directly in machine language. One version with lots of comments: https://github.com/jefftranter/6502/blob/master/asm/wozmon/w...
You can see a classic assembly language space optimizing trick at PRBYTE. It first prints the upper half of the byte in hex with call to the PRHEX procedure, then falls through to PRHEX again to print the second half.
Indeed, an assembler, and a computer to run it on, were luxuries in those days. I'll bet a lot of early code was hand assembled. It wasn't too hard on 8 bit machines. I coded on grid paper. In reality, all it took was a few dozen lines of code and I was simultaneously hooked on coding, and motivated to earn enough money to buy a computer of my own.
In addition to having access to computers, even just being able to get a copy of any software and do anything with it were a bit of a hurdle if you had started at the chip level.
My first programs were hand assembled. 6502 and 6809.
Turns out doing that and writing a basic line assembler and disassembler are a great way to get familiar with a CPU.