4 ms·
This brings back a lot of memories. I remember in high school printing out a sheet of Z80 opcodes (at size 6 font), writing a program on a sheet of paper, and
by Xcelerate 10y ago
This brings back a lot of memories. I remember in high school printing out a sheet of Z80 opcodes (at size 6 font), writing a program on a sheet of paper, and then manually compiling that program and typing in the hex codes (using the AsmPrgm instruction to prefix the program). It was great for boring classes as long as you sat far enough in the back. As a prank, we started grabbing people's calculators and turning off the LCD display using some sequence of assembly. Restarting the calculator wouldn't fix it, so you either had to memorize the button sequences to re-enable the display or remove the batteries and let it sit for a while.
- chairmanwow 10y agoHow on earth did you work out how to program assembly through button presses on a calculator? Sounds like a stunning prank though.
- Xcelerate 10y agoThe TI graphing calculators have a mode for writing your own programs. Typically this is done using TI-BASIC, but if you prefix the program with the AsmPrgm symbol, it will allow you to directly write Z80 opcodes as hex values. Combined with a TI-provided guide for making bcalls (calls into common routines that have already been written, like changing LCD settings or multiplying floats), it's not too difficult to write a short ASM program by hand.
- mikeknoop 10y agoFun times. I did the same hand compiling back in middle school on a couple long plane flights where I didn't have access to a full compiler. Shame this never shipped: http://www.detachedsolutions.com/main/oldnews.php?item=58 http://www.detachedsolutions.com/main/oldnews.php?item=58
- stevekemp 10y agoI did the same thing with my ZX Spectrum - writing programs in assembly language on paper, then manually looking up each opcode in the table at the back of the manual. After writing out all the opcodes I'd then have to work out the values to use for any relative jumps, once I knew how long each instruction had been. Finally the whole thing would be POKEd into memory, and tested. Writing code like that, without a compiler/assembler was simultaneously a lot of fun and utterly exhausting. I know I got into the habit of putting in random "nops" just in case I had to add new functionality in later revisions - that would allow some unconditional jumps to be patched into place to avoid having to change offsets, etc.