Close

Bootloader

A project log for One-instruction TTL Computer

A breadboard-able computer which uses only a single instruction - MOVE

justin-davisJustin Davis 05/23/2017 at 15:580 Comments

I think before I get into writing other software, I should focus on a bootloader. I don't like to keep synthesizing my VHDL every time I want to change my program. I need to poke the RAM and execute the program, so I have to give it a memory location and a byte. And it would be VERY useful to have a readback function, but I could do this afterward. So I put together a list of things my bootloader needs to do:

  1. Echo characters back to uart (DONE!)
  2. Keep track of string entered
  3. Process backspace key (subtract one from string pointer if not zero)
  4. Process enter key (don't store in string)
    1. Echo command on a new line (DONE!)
    2. Jump to string processing
  5. Split string into parts: 1st character is command (W - write, R - read, J - jump) (anything else jumps back to top)
  6. Skip anything not a hexnumber (so I can have whitespaces and extra stuff for readability)
  7. Next four hexnumbers are the memory address
  8. If a write, next two hexnumbers are data to write to the above address
  9. if a jump command, set PC to entered memory address (begin executing!)
  10. If a read, grab the memory contents and output them to the uart (converting to ASCII)

So I have my task list here. It should be easy to test as I go. And I can use everything I've written so far.

Discussions