Hi! So I'm in the midst of building a rack-mounted modular 8085 computer.
While I've done some assembly programming for the Z80, and a bit x86, there's still some things that aren't clear.
I want to make a small monitor program, like the turnkey altair 8800 had:
-Communicates with a terminal (or teletype) via serial
-has a few commands, like: examine memory, change memory, jump to address.
that's it.
How would you attack this task? I'm pretty green at assembly, one of the reasons I'm doing this project, but something like (very pseudocode):
-initialize UART
-display prompt (send ">" to uart)
-loop until character received (check uart flag for that)
-test if received character is equal to one of the reseved characters for examine, jump)
-if examine call examine subroutine, if jump call jump routine
examine/edit routine:
- send "L?" to UART
- wait for ascii byte to be received (check uart flag for that)
- let that be low byte of address, saved to some location in RAM
- send "H?" to UART
- wait for ascii byte to be received (check uart flag for that)
- let that be high byte of address, saved to some location +1 in RAM
- send address HL, conv. to ascii to UART
- send data at address HL, converted to ascii to UART
- loop wait for UART input.
if "space", increment address HL and print again
- if a digit, save that, wait for the next, and change RAM in addr HL to new value
- if any other key, go back to prompt
Jump routine is easier: receive 2 bytes, jmp to address and run from there.
This is grossly simplified, from an .asm point of view, just thought i'd shorten it to reasonable chunks.
Here's my main issue: Almost exactly this was achieved on the Altair turnkey monitor, in 256 bytes.
I can't see how this is doable without a binary-> ascii lookup table routine.
that'd take up half the 256 bytes.
Has anyone ever written a 8 bit monitor, or something similar? Most (x86) assembler info is either very high-level, or very low-level.
Here's the turnkey-prom monitor documentation:
http://bitsavers.trailing-edge.com/pdf/mits/8800b_Turnkey_PROM_Monitor_Aug77.pdfThanks in advance!