Product specifications

LD A,E ;Check to see that sprite o
CP 192 ;is actually on screen
JR NZ,IMPAC0 ;and if condition true goto
LD A,D ;IMPAC0
CP 0 ;else return to calling
RET Z ;routine with variable
;TRUFAL = false
;
IMPAC0: CALL VDINPT ;Move read from VRAM pointer
CALL VDINPT ;onto next sprite
LD B,31 ;Set loop counter = 31
;
IMPAC1: PUSH BC ;Save loop counter
CALL VDINPT ;Read sprite Y coord from
;VRAM sprite attribute table
LD A,C ;and test to see whether the
CP 208 ;routine has detected a user
;defined end of sprite
;attribute table marker
JR NZ,IMPAC2 ;If condition is false then
;goto IMPAC2
POP BC ;else retrieve old loop
;counter value and goto
JP IMPAC4 ;IMPAC4 to exit routine
;
IMPAC2: LD L,A ;Read sprite X/Y coords from
CALL VDINPT ;VRAM sprite attribute table
LD H,C ;into HL register pair
;Register H = X coord
;Register L = Y coord
CALL COMTSB ;Call impact detection test
;routine
LD A,(TRUFAL) ;and if the variable TRUFAL
CP 0 ;equals 0 on exit then sprite
JP NZ, IMPAC3 ;impact has not occurred
;therefore continue testing
;routine and move onto next
;sprite else goto IMPAC3
; and set up table IMPSPR
CALL VDINPT ;Move read from VRAM pointer
CALL VDINPT ;onto next sprite
POP BC ;Retrieve old loop counter
;value and decrement it
DJNZ IMPAC1 ;If loop counter < > 0 then
JP IMPAC4 ;goto IMPAC1 and repeat
;routine else goto IMPAC4
;and exit routine
;
IMPAC3: POP BC ;Retrieve old loop counter
;value
LD IX,IMPSPR ;Set index register pointer
;to point to start of table IMPSPR
LD (IX+3),H :Byte 4 of table IMPSPR