Home Page

BASIC Handbook

Basic2 Commands
Disk Drives
PEEK's and POKE's
RAM Memory Map
ROM Memory Map
Screen Display
ASCII and CHR$ Codes


Note: You will need to replace the '-' with the @ symbol.
This is to minimize spam.

My BASIC Quick Reference Guide

Abbreviation: U <SHIFT+S>

TYPE: Floating-Point Function
FORMAT: USR (<numeric>)

Action: The USR function jumps to a User callable machine language SubRoutine which has its starting address pointed to by the contents of memory locations 785-786. The starting address is established before calling the USR function by using POKE statements to set up locations 785-786. Unless POKE statements are used, locations 785-786 will give you an ?ILLEGAL QUANTITY error message.

The value of the <numeric> argument is stored in the floating-point accumulator starting at location 97, for access by the Assembler code, and the result of the USR function is the value which ends up there when the subroutine returns to BASIC.

EXAMPLES of USR Function:

10 B=T*SIN(Y)
20 C=USR(B/2)
30 D=USR(B/3)

Commodore Cheetah made by Allen Monks, started in the year 2000.