In trying to understand the PLO (put low bit in D) and the GLO (get low bit from D) commands, I’m going to write a program that cycles through R1-RF and increments the registers one at a time. This program is pretty darned boring unless you have the memory contents in full view on the emulator. Let’s get started:
0000 90 GLO Set D to zero
0001 A1 PLO Set R1 to zero
0002 11 INC Increment R1 (This is the start of where we loop it)
0003 91 GLO Set D to value of R1
0004 A2 PLO Set R2 to value of D
0005 92 GLO Set D to value of R2
0006 A3 PLO Set R3 to value of D
0007 93 GLO Set D to value of R3
…… and so on and so on until …….
0020 30 BR Unconditional branch to the next byte
0021 02 Start the program again from 0002
I would suggest running this program in step mode. This program was designed to HAMMER DOWN the function of these two commands for me. It’s very illustrative of what these commands do if not a bit repetitive.
I’m starting to wonder how I can write a byte to a specific location in memory now. Specifically right after a 64 OUT 4 command. It would be nice to get some of the output devices involved in the fun here. I have some ideas of how it might work but I’m sweating with anticipation.
Another AHA moment! The BR 30 (Branch Unconditionally) command is simply changing the value of whatever register that P is pointing at. The value of P can be changed by the Dr SEP (Set P) command. It’s starting to all make a bit more sense. (Pun intended)
If you like the content on this site, please support it by using this link to order from Amazon. You know you were going to go there and buy stuff anyhow so why not help me pay the hosting bill.