beautypg.com

Rpbasic-52 programming guide – Remote Processing BASIC 52 User Manual

Page 47

background image

RPBASIC-52 PROGRAMMING GUIDE

2-28

DBY

Syntax:

A = D B Y (expr)

D B Y (expr)=variable
Where: expr = 0 to 255

variable = 0 to 255

Function:

Read/write internal data memory.

Mode:

Comm and, run

Use:

DBY(0F0H ) = 45H
A=DB Y(100)

Cards:

All

D E S C R IP T I ON

The D BY instruc tion ret rieves or assig ns a va lue to th e 8052 interna l data m emo ry. expr and variable must
both must be between 0 and 255 since there are only 256 internal memory locations and one byte can only be
between 0 and 255.

RPBAS IC-52 uses many internal memory locations for its own use. Change internal memory with caution or
Basic may malfunction. Locations 1BH through 21H may be used in any way you wish.

RELATED

C B Y , X B Y

E R R O R

B A D A R G U M E N T Invalid expr value, such as DBY(256) or attempt to assign an invalid value to a

D B Y (expr), such as DBY(18H)=1000.

EXAMPLE

100 DBY(1EH ) = 234
1 1 0 P R I N T D B Y (1 E H )

>run

234