I've been attempting to write some simple test programs for my computer. It's kind of a different style of programming that takes some getting used to. Some things are surprisingly fast and easy and some things take a little longer. I have to write psuedocode first and then figure out how to translate to my machine code. For example, I thought one of the first programs could be a simple echo of characters from the UART back to the UART:
- ** echo characters to UART
- loop:
- wait for UART to be not busy
- move from UART data to ALU A
- move from ALU A to UART data
- jump to loop
This turns into:
- UARTWAIT:
- 00:move UART TX status -> pointer address reg
- 01:move TRASH -> pointer data reg
- ** 1 is busy which will jump back, 0 is ready which will fall through
- 02: move UARTDATA -> ALUA
- 03: move ALUA -> UARTDATA
- 04: move TRASH -> PC_LOW
I'm not sure if I can write and read UART data just yet, but I think I can. I could also replace TRASH with a memory address which holds the address of UARTWAIT.
Anyway, I was also thinking this could be made into a video game. It reminds me of the different programming style you need for TIS-100. I envision a person/robot you control by moving to different windows in a factory. Each window does a different function, and your job is to just move boxes from one to the next. Maybe it keeps track of your steps so you can replay later. Perhaps even be able to type the steps in if you prefer. All it would need is simple arrow keys and one button to pick-up/drop-off. Man, I wish I had more free time to work on projects like this.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
yeah, go for the game idea !
Are you sure? yes | no