Shop OBEX P1 Docs P2 Docs Learn Events
Using SETBRK instructions during debug ISR's — Parallax Forums

Using SETBRK instructions during debug ISR's

Hi P2heads,
I've discovered that a "spacer" instruction is needed after
a SETBRK instruction otherwise invalid values are returned in INA/INB.

For example
	setbrk	#%1000000	'ina/inb as pin status
	nop
	mov	porta,ina	'get pins

	setbrk	#1		'ina/inb as ISR data
	nop
	mov	next_pc,inb	'get CZ flags & PC
:)

Comments

Sign In or Register to comment.