Originally posted by Level_7:
1) You wrote your OS *entirely* in assembly? I'm curious to know some characteristics of that OS, or was it just a monitor? Im sure you know how to describe an OS.
Well, it wasn't much of an OS.

We did have a monitor, but you could completely disconnect the breadboard from the monitor and it would still run. The "OS" handled basic comms with the various components, including a serial port, as well as handling interrupts etc. It wasn't like you could just turn it on and get a command prompt (unless the app you had loaded provided one). The memory footprint was small enough that in most cases the OS and the app were nearly indistinguishable (obviously there was no memory protection or anything, the "OS" was just a set of functions we used from project to project).
Basically, at the beginning of the semester we got a Motorola 68000, 4k of ROM (in ICs), 4k of RAM, a couple of other chips (er, notably a clock chip, there were several other "utility" chips as well), and some wires to connect them all. Everything plugged into the breadboard (the 68000 had a ZIF socket that plugged in). You were required to implement a memory translation hub (e.g. figure out that when the 68k requested memory address x, it was asking for something off the ROM, but when it asked for address y, it wanted the RAM, and address z was the serial port, etc) as part of the first lab. Essentially, build a computer from ICs and wires.
2) What do you mean by "wiring the thing up"?
See above -- plug everything into the breadboard and use standard wires to build the address bus, data bus, etc. The groups who had EEs had nice neat, well-planned boards. Our group (3 CECS majors) looked like we had dumped a bowl of spaghetti on the breadboard. But the software was fantastic.
3) You say you wrote the OS from scratch, right? How then did you debug the assembly, especially since 2) implies you did not have *any* firmware running, not even a monitor.
We had a monitor running for debug purposes, but the projects were disconnected from the monitors when you demonstrated the labs. For communications we had a serial connection to a Windows PC running Hyperterm.
Actually the monitors were used for debugging while developing -- once you went to demonstrate (since you couldn't demo with a monitor attached) you burned your code into the ROMs and plugged em in. The monitor simulated the ROM and RAM while it was plugged in, which was what allowed you to inspect memory, "pause" the execution of the processor (since it could arbitrarily delay the memory read for the next instruction), etc.
As an example of a project, the first lab was to implement a game (IIRC it was a variation on Connect Four). For extra credit you could provide the capability to play against the computer, with a programmed AI making the computer's moves. Do you have any idea how hard it is to write a game AI that fits, along with OS functions and the game code itself, in no more than 4k of ROM and uses no more than 4k of RAM?
Oh, I nearly forgot. We actually were
allowed to write in C, as apparently there was a newly acquired cross-compiler available, but nobody bothered to try it.
[This message was edited by technophile on February 27, 2002 at 18:33.]