Prev: 39581 Up: Map Next: 39597
39589: 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 39589 LD A,E Fetch the low byte of the address.
39590 SUB B Subtract the width.
39591 LD E,A Keep the new low byte in E.
39592 LD A,D Fetch the high byte of the address.
39593 SBC A,0 Subtract the carry.
39595 LD D,A Keep the new high byte in D.
39596 RET Return.
Prev: 39581 Up: Map Next: 39597