Correct useage of USR ?
Re: Correct useage of USR ?
Good to know, so.. the interpreter will switch to the next BASIC line, correct ?
Re: Correct useage of USR ?
Yes.
I often use such code:
PRINT USR xxx, <params>
IF PEEK <ERRNO> THEN GOTO ERRORHANDLER
where ERRNO is a byte in the system variable area, which is set by the USR routine to its return code: 0 for no error and > 0 to indicate an error (like in C
Siggi
I often use such code:
PRINT USR xxx, <params>
IF PEEK <ERRNO> THEN GOTO ERRORHANDLER
where ERRNO is a byte in the system variable area, which is set by the USR routine to its return code: 0 for no error and > 0 to indicate an error (like in C

Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
http://zx81.ddns.net/ZxTeaM