When you return from call you always return at the adress you started from but sometimes this is inconvinient. In cases where there are calls inside calls and you want to return from there.
So for example.
call test
test:
ld a,(value)
dec a
ret z
now we return back from where we started if ret z would be jp z I would get myself in big trouble with stack overflows. There has to be another convinient way to escape a call.
So basicly I want to turn a call into a jump when some conditions are met within the call:
test:
ld a,(value)
dec a
special jump out of here z, adress
I find the problem difficult to explain so bear with the vagueness of the story please.
Login or register to post comments
