Jun. 10th, 2008

altivo: (rocking horse)
I first started really working with computers in 1980, as a mainframe programmer using IBM 370 assembly language. In 1981 I acquired a Z80-based microcomputer and learned Z80 assembly language. Since then I've worked in, and learned to various degrees of fluency, at least a dozen computer languages but I still return naturally to assembly language.

When you want to do something on a really tiny machine, like the TRS-80 Model 100 or something similar, where the memory is only 64K or less, assembly (or machine language as some call it) is definitely the way to go.

The problem with the Model 100 is not that you can't code that way for it, but that the ins and outs of doing so were kept very quiet by Radio Shack, probably on the theory that most users wouldn't care to get involved at that level and would just be intimidated. Getting information on coding for an 8085 CPU is not difficult. The instruction set and principles are all over the web and covered by tons of old CP/M documentation. However, figuring out how to work your code into a machine that was designed to run only BASIC at the user level is not so simple.

I started out to write a "Hello World!" program just to work out the kinks. It took three days to get it working, not because my code was wrong but because my understanding of the memory model and how to appropriate some space was unclear. I had to gather bits of information from half a dozen documents and books before I finally got it to run. The final program consists of 23 bytes of code plus 13 bytes to hold the actual text to be displayed (null-terminated.) I feel silly that it took so long, but now I understand better what's involved in reserving memory on a machine that has no disk drives and stores its files in RAM right along with the executable code. Everything is volatile unless you take the proper steps to protect the RAM you need. ;p

November 2024

S M T W T F S
     12
345678 9
10111213141516
17181920212223
24252627282930

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 16th, 2026 01:59 am
Powered by Dreamwidth Studios