Lost a day yesterday due to the move and date night with the Wife. I’m doin’ my best here…
So my understanding of how relative & indexed jumps work on the 8080 & Z80 was just flawed. There’s no variable indexing, like on the 6800 or 6502, which is a super bummer.
My original ideas was to have a register be the offset into a subroutine, so like you’d call the subroutine, and what was on the C register would end up selecting which part of the subroutine was run. I thought it was clever… I want to make a general purpose routine that can set or clear a specified bit in a control word.
Lets for get set vs clear for now, and focus on selecting the bit. The SET & RES commands seemed cool at first, but are actually kind of useless, since you can’t select the bit from a register. So what if we go back to using RLCA, and we use C as a counter, to determine the # of rotates we make? Oh right, we tried this two days ago, and couldn’t verify if it worked. LET. TRY. AGAIN ( I’m super hating all of this).
Lets test it on the LEDs on port0 instead of on the console – that should be more conclusive.
AND IT DOESN’T WORK. I HATE THIS . I’M DONE.