Due to the variable-sized register frames, the usage of bsr/ret has some more limitations: you can't bsr into a different .sub anymore.

TODO the PASM/PIR assembler should catch this abuse of bsr.

.sub main
   bsr foo
.end

.sub foo
  # a lot of registers used
  # bang
  ret
.end

bsr is only safe inside one .sub:

.sub main
   bsr foo
   ...
foo:
   ...
   ret
.end

leo

Reply via email to