develooper Front page | perl.perl6.internals | Postings from October 2001

Simple sub support's now in!

Thread Next
Dan Sugalski
October 12, 2001 13:00
Simple sub support's now in!
Message ID:
Okay, I finished the support for the generic stack. We can now:

   *) save and restore registers (using the save and restore opcodes)

   *) return from subs using the address on the top of the stack (using
      the ret opcode)

   *) Branch to a label using the bsr opcode, and remember where we were
      for later returning

At the moment we've only got relative sub calls using the bsr (well, bsr_i 
and bsr_ic opcodes, but close enough...) opcode. jsr will come as soon as 
we can reasonably get absolute addresses. Soon, I think.


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                      teddy bears get drunk

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About