[A83] Re: Do I get this?
[Prev][Next][Index][Thread]
[A83] Re: Do I get this?
Well, to continue about the calls/pops/pushes:
Would this program work correctly?
pop hl
push hl
bcall(_disphl) ;shows the decimal representation of the
ret-address.
ret
>Ehm, yes, but you'll mess up your stack too, because you didn't remove
>the original ret address from it.
>
>Routine should be:
>
>routine:
> pop hl
> ld hl,xxxx
> push hl
> ret
>
>--(Peter-Martijn)
>
>
>> Out of the awnsers to my last question, I understand that when I do this:
>>
>>
>> call routine
>> .......................
>>
>> routine:
>> ld hl,xxxx
>> push hl
>> ret
>>
>>
>> My program will get messed up and return to xxxx, instead of to the
dotted
>> line.
>> Am I correct?
>>
>>
>
>
>
Follow-Ups: