??? 09/20/07 19:22 Read: times |
#144839 - A very simple example would be helpful Responding to: ???'s previous message |
Richard said:
Producing an actual working example would require more effort than I'm willing to put into this discussison. After all, taking ASCII characters in a video terminal environment as an example, it would require construction of the 256-byte table, each word of which would then have to contain an address specific to the character used as the offset, namely [A], into it. I don't believe I have the old 6502 code I used back in the '80's any longer, though that would probably work. Using that example would, however, require detailed explanation of what each non-displayed character meant and how it was processed.
Consider, though, that each table entry corresponding to a displayable character would point to a single routine, the result of which would be to write [A] to the display memory, which would then be transferred, in hardware, through a character generator, to the pixel-wise display logic. Characters that required other specific action, e.g, control-S or control-Q, would require their own unique processing code. Further, the table would probably be pretty large, as there were, in my 6502 terminal case, IIRC, several layers of the dispatch table, as various processing contexts demanded. The input, after all, came from a keyboard encoder. Hi Richard, I'm sorry--I must not have been clear about my request for an example. I didn't mean at all that you should come up with anything anywhere near as big or complex or detailed as you are describing here. Far from it. All we need in order to clear up the confusing and incorrect aspects of your earlier post would be a simple, contrived example that 1) demonstrates the correct use of the jump instruction and 2) shows what actually goes in the table. Something with three or four entries in the table would be fine, as would do-nothing handlers for each event. I can't imagine it running beyond 30 lines of code, or taking nearly as much time to produce as you must have already spent in composing the somewhat lengthy post quoted above. -- Russ |