Hacker News new | past | comments | ask | show | jobs | submit login

No, and sadly I've lost the code I wrote, I don't know what happened to it.

Anyhow, programming an 8 bit 6800 for an embedded controller means keeping track of 6 or more things going on at the same time, while modern software focuses on one thing at a time and isolating it from everything else.

Those things include the contents of each register, the stack level, the size of the code, interrupts going off, polling that has to be done, counting cycles, etc. Organizing code into functions is a luxury not usually affordable.

It sounds tedious, but it was fun. I attached my own hard disk drive to my LSI-11, meaning I had to build an interface board and write a device driver. To figure out how to write the device driver, I dumped the floppy driver code. It was a marvel of tight engineering. The bootstrap loader was executing code only an instruction or two behind it getting loaded. I was just in awe.




If you think about it, it's pretty crazy. Register allocation using graph colouring is an NP-complete problem. Writing assembler by hand, one is doing this constantly in one's head, and often with better results than a compiler would do.


Here's a piece of assembler I wrote for the LSI-11:

https://github.com/DigitalMars/Empire-for-PDP-11/blob/master...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: