About time!
Jun. 10th, 2008 10:18 pmI 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
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
no subject
Date: 2008-06-11 03:35 pm (UTC)Yes, but you must be savoring the feeling of mastery
over the obdurate machine. ^.~
Assembly is hard shit, though its the sort of thing
you can dream in if you try to hard at it.
Good job.
no subject
Date: 2008-06-11 03:44 pm (UTC)I also want to port a client for the Model 100's external disk drive over to the NEC Starlet (a CP/M laptop.) That's a lot smaller piece of code, but may well be the more difficult task.
no subject
Date: 2008-06-11 04:45 pm (UTC)just the right FF to get that one instruction
going to the Accumulator.
Now...well now I don't want to dig in the
machines guts anymore. I just want it to
work, I want the software to hold my hand
and do things for me so I can get on with the
goddamn IDEA.
So I'm learning Python.
^.~
no subject
Date: 2008-06-11 05:41 pm (UTC)no subject
Date: 2008-06-11 06:23 pm (UTC)"I love high level languages"
C'mon, don't be the contrary sort, just
acknowledge you like it when you type
something and it works.
^.~
no subject
Date: 2008-06-11 06:24 pm (UTC)It doesn't work, it...
*facepaws and lets your sheep loose
in your house*
no subject
Date: 2008-06-11 06:37 pm (UTC)I do like high level languages, but selectively. I'm fond of perl and REXX. I've written thousands of lines of Pascal, including some that were published for actual pay. In spite of a negative first impression of php, I've come around to finding it fairly useful. I won't count FORTRAN here because compared to those others, it's nearly assembly language itself.
no subject
Date: 2008-06-12 08:07 pm (UTC)road with no gaurdrails.
There are other ways to do it, there are
Pascal varients, even BASIC variants that
let you block things out just so.
Thats why I like Python so much, the only
delimiters are white spaces, no searching
for that missing close bracket or other
stupidity. Python isn't a high level language
mind you, its a VERY high level language. But
it does amazing stuff. EVE Online is written
in that, if you want sheer graphics power.
And its amazingly logical. I mean, c'mon,
dear god, you WANT logical, you DREAM logical,
you want something that WORKS.
And Python does. If success is the best
revenge, Python is preening.
no subject
Date: 2008-06-12 11:56 pm (UTC)no subject
Date: 2008-06-13 01:50 am (UTC)@.@
no subject
Date: 2008-06-12 08:03 pm (UTC)to sit and make zeros work just so and in the end I got a few bits
of work out of massive amounts of brain power. New tools is what I
craved.
So now I have them.
http://www.python.org/
no subject
Date: 2008-06-12 11:55 pm (UTC)no subject
Date: 2008-06-13 01:49 am (UTC)traumatic Report Generator Disorder!
@.@
no subject
Date: 2008-06-13 01:59 am (UTC)no subject
Date: 2008-06-15 04:22 pm (UTC)I think you deserve some time with one too...
thats why I'm getting you on my guest pass
to;
http://www.youtube.com/watch?v=egeNrthYW20
Its just your speed!
^_^
no subject
Date: 2008-06-15 04:48 pm (UTC)no subject
Date: 2008-06-14 08:08 am (UTC)no subject
Date: 2008-06-14 11:15 am (UTC)no subject
Date: 2008-06-14 12:18 pm (UTC)You're doing it for fun!!
no subject
Date: 2008-06-14 01:30 pm (UTC)