Contents / Reference section / BASIC keywords / Previous letter / Next letter / Index


U

UNTIL

Purpose

Part of the REPEAT...UNTIL construct. See the keyword REPEAT for more details

Example

450 UNTIL X<10

Description

A program object signifying the end of a REPEAT...UNTIL loop.

Syntax

UNTIL <testable condition>

Associated keywords

REPEAT

USR user

Purpose

The USR function provides the user with a means of calling sections of machine code program which are designed to return one value. When the machine code section is called the computer sets the processor's A,X and Y registers to the least significant bytes of A%, X% and Y%. The carry flag (C) is set to the least significant bit of C%. On return from the machine code section, an integer number is generated from the four registers P,Y,X,A (most significant byte to least significant byte).

Again it must be emphasised that USR returns a result whereas CALL does not. Therefore you must either assign the result to a variable

X=USR(&3000)

or print the result

PRINT USR(&3000)

Examples

1400 R=USR(&3000)

670 result=USR(plot5)

Description

A function allowing machine code to directly return a value for problems which do not require the flexibility of CALL.

Syntax

<num-var>=USR(<numeric>)

Associated keywords

CALL

Exit: BBC Microcomputer User Guide; Kasoft Typesetting; Archer


The BBC Microcomputer User Guide was written by John Coll and edited by David Allen for the British Broadcasting Corporation.

Optical character recognition and original formatting effort by Mark Usher.

HTML version maintained by: Kade "Archer" Hansson; e-mail: archer@dialix.com.au

Last updated: Monday 12th February 2001