by pcwalton · 2y ago · 0 comments
getShdwOfst:
xor bh,bh
mov bl,al
mov di,bx
shl di,1
shl di,1
shl d1,1
...
Why shift one bit at a time, like you would on a CPU like the 6502 with no multi-bit shift instructions? Was this hand-ported from some system without those?[1]: https://github.com/lanceewing/agi/blob/main/src/CMGRAPHX.ASM...
8086 shifts were 1 bit at a time (2 cycles for a register shift.) or using cl for the count (8 cycles + 4 cycles/bit for a register shift).
constant multi-bit shifts were added in the 80186.