Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Register parameters

Code Block
titleRST 20H, DEFW $8209
IN:  BHL = pointer to null-terminated filename (B = 0, local)
	 CDE = pointer to null-terminated arguments string, optional (C = 0, local)
     A   = execution mode (A0=0: execute, A0=1:debug)

OUT: Fc = 0, successfulsuccess
	 Fc = 1, failure and A = error

Registers affected after return:
     AFBCDEHL depends on ELF execution
	 IXIY changed by the call

Notes

...

If the program has no need of arguments, simply let CDE point to a null-terminator (0).
Arguments in the argument string are space separated, this string is null terminated.
Arguments passing to ELF program is performed by this call. Arguments are pushed to the stack The call push the arguments from right to left according SDCC convention.

...