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

Simple sub support's now in!

Thread Next
From:
Dan Sugalski
Date:
October 12, 2001 13:00
Subject:
Simple sub support's now in!
Message ID:
5.1.0.14.2.20011012155740.02229888@pop.sidhe.org
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.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About