beautypg.com

Rpbasic-52 programming guide, Ui0 ui1 – Remote Processing BASIC 52 User Manual

Page 134

background image

RPBASIC-52 PROGRAMMING GUIDE

2-115

UI0
UI1

Syntax:

U In
Where: n = 0 or 1, is the serial port number

Function:

Directs serial input to COM 0 or COM 1 when using GE T and INPU T statements.

Mode:

Comm and, run

Use:

UI1

Cards:

All

D E S C R IP T I ON

U I 0 an d U I1 c a n b e p la c e d a n y w he r e i n a p r og r am , a ll o w in g R P B A SI C - 52 t o a c c ep t in p u t f r om e i th e r C O M 0
or COM1.

The original BASIC-52 required an assembly language routine to use another serial port. RPBASIC-52 has
done this already.

RELATED

G E T , U O 0, U O 1 , I N P U T

EXAMPLE

The fo llowin g exam ple prin ts out an d inpu ts data from C OM 1.

100 UI 1
110 UO 1
120 INPUT "Enter name:",$(0)
130 UO 0
140 UI 0