[Coco] USRx() and adding more parameters?

William Astle lost at l-w.ca
Tue Nov 4 23:52:11 EST 2025


On 2025-11-04 20:14, Allen Huffman via Coco wrote:
> The BASIC ROM has the USR function:
> 
> DEF USR0=&H3F00
> 
> A=USR0(42)
> 
> It accepts one parameter.
> 
> Since it jumps from BASIC into the USR assembly, couldn’t that code just parse a “,” and more numbers, allowing it to accept whatever needed to be passed in?
> 
> A=USR0(1,2,3,4)

Almost. It would have to look like:

A=USR0(1),2,3,4

The closing parenthesis is already validated by the time the USR handler 
starts.

-- 
William Astle


More information about the Coco mailing list