Routines |
Prev: B14C | Up: Map | Next: B1D4 |
This multiplies A by 8, returning the result in BC.
Used by the routines at bounds_check, spawn_character, vischar_move_x, vischar_move_y and get_next_drawable_itemstruct.
|
||||||||||||
multiply_by_8 | B1C7 | LD B,$00 | Set B to zero | |||||||||
B1C9 | ADD A,A | Double the input argument | ||||||||||
B1CA | RL B | Merge the carry out from the doubling into B | ||||||||||
B1CC | ADD A,A | Double it again | ||||||||||
B1CD | RL B | |||||||||||
B1CF | ADD A,A | And double it again | ||||||||||
B1D0 | RL B | |||||||||||
B1D2 | LD C,A | Move low part of result into C | ||||||||||
B1D3 | RET | Return |
Prev: B14C | Up: Map | Next: B1D4 |