A86: ret after call


[Prev][Next][Index][Thread]

A86: ret after call




How can I make the 'ret' command end the asm program if I jumped to it
from inside a call

ie:

call bob   < (HERE) --------------------------------------------\
								|
bob:								|
	ld a,6							|
	cp 6							|
	jp z,exit						|
	ret							|
								|
exit:								|
	ret	<-- this must END the program, not return to --/