LoRom

org $9498AE      ;air fool x-ray of BTS $01
	DW $B400
	
org $94B400
	LDA $05D7    ;load value from $05D7 into A (unused in normal gameplay)
	CMP #$003C   ;compare value at $05D7 with the value 60
                 ;the value above determines after how many frames Samus will lose 1 HP. It's currently at 60 so Samus will lose 1 HP per second
	BEQ DAMAGE   ;if values are equal, branch to subroutine labelled 'DAMAGE'
	INC A        ;increase value in A by 1
	STA $05D7    ;store increased value from A to $05D7
	RTS
	
DAMAGE:
	STZ $05D7    ;store zero to $05D7 (resets counter)
	DEC $09C2    ;decrease Samus' health by 1
	RTS