Re: A83: calls


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

Re: A83: calls




Correct.  He doesn't have enough rets in there, but otherwise it would be
fine.  This for example will work fine:

  call label1
  ...
label1:
  call label2
  ret
label2:
  call label3
  ret
label3:
  ret

you can, however, put a jump in there if you so please, but remeber you're
still gonna need the rets in there.  So this will also work:

  call label1
label1:
  cp  5
  jp   nc,label2
  ...
  ret
label2:
 ...
 ret

-Dan
-----Original Message-----
From: Jkhum98@aol.com <Jkhum98@aol.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Friday, September 25, 1998 11:24 PM
Subject: Re: A83: calls


>
>
>Don't you just have to do the appropriate number of "ret"s in the many
threads
>of your calls...? Well, I can tell you that this Example would not work as
it
>is. Just put a "ret" after every call you make, but if you put one after
"call
>second_label" that should be the end of the program and return to the OS. I
>think its possible in this manner, but now I have a question coming off
this.
>You could not do a Jump in there anywhere? You would have to return from
your
>call first to do this correctly, right...?
> --Jason K.
>>
>>Is it legal to make a call within a call? For example:
>>
>>
>>first_label:
>>     call second_label
>>
>>second_label:
>>     call third label
>>
>>third_label:
>>     ret
>>
>>From: Chris
>>mecad@scv.net
>>