Prev: A155 Up: Map Next: A16D
A164: Divide Word By Four
Divides HL by four. Nothing in the game calls or jumps here and no table holds its address, so it looks like leftover code (compare CalculateBitAddress just above, which divides a bit index by eight).
Input
HL Word to divide
Output
HL The word divided by four
DivideWordByFour A164 SRL H Divide HL by four, dropping the remainder.
A166 RR L
A168 SRL H
A16A RR L
A16C RET Return.
Prev: A155 Up: Map Next: A16D