Prev: E9DB Up: Map Next: EA05
E9F8: Split a byte in two parts
Used by the routines at E544 and EEF1.
Input
A The byte to convert
B On return, holds the lowest 4 bits
C On return, holds the highest 4 bits
E9F8 LD C,A Copy A to C as a temporary copy.
E9F9 AND $07 Put the bottom 3 bits of A in B. Note : This should be AND 0F otherwise bit 3 is lost!
E9FB LD B,A
E9FC LD A,C Take the top 4 bytes to convert.
E9FD AND $F0
E9FF RRCA Shift these down to bits 0 - 3 and put it in C.
EA00 RRCA
EA01 RRCA
EA02 RRCA
EA03 LD C,A
EA04 RET Return.
Prev: E9DB Up: Map Next: EA05