Technical data
6.15 OB 180: Accessing Variable Data Blocks
DBA/DBL register
When a data block is opened with the operations C DB and CX DX,
the DBA register (data block start address) is loaded with the address
of data word DW 0, stored in DB 0.
Access to data blocks with operations such as L DR 60 or
DO DW 240 etc. are always relative to the data block start address.
In addition to the DBA register, the DBL register (data block length)
is always loaded when a data block is called. This register contains the
length (in words) of the opened DB or DX data block
without the
block header.
Note
A maximum of up to 4091 data words can be entered in the DBL
register.
STEP 5 access to data words is only possible up to a maximum
data word number of 255.
Applications of OB 180
Special function OB 180 allows you to access structured data in an
opened data block. You can do this by shifting the starting address of
the data block entered in the DBA register to the end of the data block
with the help of OB 180. Simultaneously to shifting the starting
address, OB 180 decrements the block length entered in the DBL
register accordingly. It is important that this is done so that the CPU
can monitor load and transfer operations in the case of later accesses
to the data block.
Example
The DBA register the address of the memory word
in which DW 0 to DB 17 is stored: DBA =
151BH
The number of data words is stored in the DBL
register: DBL = 8 (DW 0 to DW 7)
Since access to the data words by means of the
STEP 5 operations L DW, U D, DO DW etc. is
always relative to DBA, 3 is added to 151BH in
order to access, e.g. DW 3.
Data word DW 3 is stored under the address
151EH.
The DBL register is used to check whether a
transfer or load operation is pending. T DW 7
is permissible but T DW 8 or L DW 8 are not.
OB 180: Accessing Variable Data Blocks
CPU 928B Programming Guide
6 - 58 C79000-B8576-C898-01