Skip to content

Unbalanced stack push/pop when processing chained input events #10

@matseh

Description

@matseh
InputHandler ; A0-InputEvent, A1-Data Area
	MOVEM.L	D1/A0-A3,-(SP)
	TST.B	StopInputFlag
	BEQ.B	inphend
	SUB.L	A2,A2
	MOVE.L	A0,A1
	MOVE.B	4(A1),D0	; ie_Class
	CMP.B	#1,D0		; RAWKEY
	BEQ.B	InpRawkey
	CMP.B	#2,D0		; RAWMOUSE
	BEQ.W	xInpRawMouse
	MOVE.L	A1,A2
InpNext	MOVE.L	(A1),A1
	MOVE.L	A1,D0
	BNE.B	InputHandler  <---- This ends up pushing registers to stack again for every input event in the chain.
inphend	MOVE.L	A0,D0
	MOVEM.L	(SP)+,D1/A0-A3
	RTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions