Prev: 9A9D Up: Map Next: 9AAD
9AA5: Subtract Width From Address
Subtracts the width of a graphic from DE, to move back one row.
Input
B The width of the graphic
DE The address
Output
DE The address minus the width
SubtractWidthFromAddress 9AA5 LD A,E Fetch the low byte of the address.
9AA6 SUB B Subtract the width.
9AA7 LD E,A Keep the new low byte in E.
9AA8 LD A,D Fetch the high byte of the address.
9AA9 SBC A,$00 Subtract the carry.
9AAB LD D,A Keep the new high byte in D.
9AAC RET Return.
Prev: 9A9D Up: Map Next: 9AAD