Prev: 54758 Up: Map Next: 54800
54778: Merge Gun Shot Onto Background
Used by the routines at Merge_Shot_Alias, Draw_GunShot_Mask and Draw_GunShot.
Merge_Shot 54778 PUSH BC Store BC and HL for later.
54779 PUSH HL
Merge_Shot_Loop 54780 LD A,(DE) Loads the contents of the source address held in DE.
54781 XOR (HL) Performs a bit-by-bit XOR comparison against the contents of the destination address held by HL.
A register bit Comparison bit A bit set to
0 0 0
0 1 1
1 0 1
1 1 0
54782 LD (HL),A Stores the result at the destination address.
54783 INC HL Increase the source and destination addresses by one, decrease the counter by one. Loop back to Merge_Shot_Loop until the C counter is zero.
54784 INC DE
54785 DEC C
54786 JR NZ,Merge_Shot_Loop
54788 POP HL Restore HL with the original destination address.
54789 INC H Increase the high-order byte of HL by one, if this is on a screen third boundary (@todo what's the term for this?) then call Calc_Attribute.
54790 LD A,H
54791 AND 7
54793 CALL Z,Calc_Attribute
54796 POP BC Decrease the B counter by one and loop back to Merge_Shot until it is zero.
54797 DJNZ Merge_Shot
54799 RET Return.
Prev: 54758 Up: Map Next: 54800