ld (_penRow),b ;load row
ld (_penCol),c ;load col
ret
If you look at
ti86asm.inc, you can see
that _penCol and _penRow are sequential in the TI86's
memory. That means that we can just load bc as
a 16 bit register into the first coordinate and bc
will overlap into the next coordinate.
More striking than the above design flaw is the fact that
these Opcodes don't even
exist! Data has to travel through the accumulator before going
to memory, not b or c .
|
ld (_penCol),bc ;load c into col and
; b into row
| |