It's a tricky one to look at as one big "thing", it might help to break it into layers. "Top down design" is something I learned in college, and I suppose would sort of apply here as well (although we never had to design a circuit to print "hello world" on a screen, that's taking a BTEC computing course a bit far).
You've got your high-level programming language that's doing all the "if this key is pressed, print this".
That's been compiled into low-level machine code (assembly language) which will have a small set of commands that deal with things in much smaller steps. In this case wait until a key's pressed, grab the key code, print it (if it's printable) and wait for the key to be let go of before repeating the process:-
Set data register 1 to address of start of display memory
Rdkeystatus: Read data from keyboard status port into data register 2
Compare data register 2 with xxx, where xxx has flags indicating key up, key down, etc. and jump to Rdkey if key down
jump to Rdkeystatus
rdkey: read data from keyboard data port into data register 2
jump to WaitForLetGo if data register 2 less than 32 (in other words an unprintable character)
copy data register 2 to address held in data register 1
increment data register 1
WaitForLetGo: Rdkeystatus: Read data from keyboard status port into data register 2
Compare data register 2 with xxx, where xxx has flags indicating key up, key down, etc. and jump to WaitForLetGo if key down
jump to Rdkeystatus
That's very simplistic and doesn't deal with what happens when you run out of screen, but hopefully you get the picture.
Now you get the nuts and bolts of these individual commands. If the processor receives an instruction code, depending on what the code is will depend on whether the processor needs to fetch the next one or two codes (containing the stuff it needs to work with, numbers to add for example) and what to do with it. That'll be microcode (Wikipedia has articles on it) that I know nothing about, that's what processor designers are for
The next layer down from microcode will be the logic gates themselves, and below that the transistors that make up those gates.
- What's New?
- Forum
- DF Facebook
- DF Twitter
- Upgrade To VIP
- Search
Social Networking Bookmarks