Prev: 52820 Up: Map Next: 52937
52924: Reverse the order of the bits in A
For example, if A is 3 (00000011) at input, then at output, A will be 192 (11000000).
Used by the routine at 52635.
Input
A A bitmap
Output
A A vertically mirrored bitmap
52924 PUSH BC Store BC
52925 LD B,8 Load B with 8 (eight bits)
52927 LD C,0 Load C with zero
52929 RRA Shift bit right out of A and into carry flag
52930 RL C Shift bit left out of carry flag and into C
52932 DJNZ 52929 Loop back to 52929 for next bit
52934 LD A,C Load modified bitmap back into A
52935 POP BC Restore BC
52936 RET Return
Prev: 52820 Up: Map Next: 52937