Roger Browne wrote:

Wow, it really does work. Thanks! Although it misses the case where the
called sub has zero .params:

   .sub 'main' :main
      errorson 0x0C
      foo(5)
   .end
   .sub foo
      print "Not OK\n"
   .end

As said, get_params isn't emitted at all, if there are no params. A simple work-around could be:

  .macro .no_params  # maybe defined internally
    get_params '()'
  .endm
  ...

  .sub foo
     .no_params      # could of course just emit the get_params directly
     ...

With r11213 this throws an exception for the above sample code.

Should we just use this syntax?

leo

Reply via email to