Basic programming guide – Remote Processing BASIC for the CX-10 Modbus User Manual

Page 22

Advertising
background image

BASIC PROGRAMMING GUIDE

2-13

DBY

Syntax:

A=DBY(expr)
DBY(expr)=variable
Where: expr = 0 to 255

variable = 0 to 255

Function:

Read/write internal data memory.

Mode:

Command, run

Use:

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

DESCRIPTION

The DBY instruction retrieves or assigns a value to the 8052 internal data memory. 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.

BASIC-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

CBY, XBY

ERROR

BAD ARGUMENT Invalid expr value, such as DBY(256) or attempt to assign an invalid value to a

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

EXAMPLE

100

DBY(1EH) = 234

110

PRINT DBY(1EH)

>run

234

Advertising