gto.s 460 B

1234567891011121314151617
  1. .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
  2. .define .gto
  3. ! $Id$
  4. .extern .strlb
  5. ! Nonlocal goto.
  6. ! On the stack is a pointer to a block containing :
  7. ! 1. the new local base (ptr+8)
  8. ! 2. the new stack pointer (ptr+4)
  9. ! 3. the new program counter (ptr)
  10. .gto:
  11. movl (sp)+,r2
  12. movl 4(r2),sp ! Store new stack pointer
  13. pushl (r2) ! Push target address
  14. pushl 8(r2) ! Push new local base
  15. jsb .strlb ! Store in fp, compute ap
  16. rsb