Sample Code B

A very simple call and return test.

Check some very basic functions and work your way up. The first of these was by far the most useful to me when I was debugging my code.

1.

Since this function is so simple, you can start the stack wherever youw want, say SP=16. When the code is done, you should have 555 on the stack.

function Sys.init 0
  call fiver 0
  label DONE
  goto DONE
function fiver 0
  push constant 555
  return
Last modified February 20, 2025: Reorganize Ch 08 web, more tests cases. (e34f122)