Example 2 continued:
Flag assignment:
FW 10:
Bits 4 to 19 of the start address of the DB/DX (points to DW 0)
FW 12:
Length of the DB/DX (number of data words)
FD 14:
Address of the last data word in the DB/DX + 1 (physical address)
FB 6
SEGMENT 1
0000
Writing a DB with a constant
NAME :FILL DB
0005
:
! Required flags: FY 10 to FY 17 !
0006
:L
DH
000E EC00 Start addr. of the DB list
0009
:L
KF
+100
plus the DB number
000B
:+D
= Address list entry of DB 100
000C
:
(Bits 4 to 19)
000D
:LIR
1
Start addr. DB 100 to ACCU 1
000E
:T
FW 10
Buffer start addr.
000F
:L
KB 0
(Paragraph address)
0010
:!=F
If start addr. = 0, then
0011
:JC
=NIVO
DB does not exist
0012
:
0013
:L
FW 10
Start addr. of DB (1st DW)
0014
:SLD
4
Convert addr. to physical address
0015
:L
KB 1
Find out DB length via
0016
:-D
5th word in block header
0017
:LIR
1
Length including block header to ACCU 1
0018
:ADD
BN -5
Number of DWs = total length - 5 words (header)
0019
:
001A
:T
FW 12
Buffer length
001B
:
001C
:L
FW 12
Number of data words +
001D
:L
FW 10
start address (DW 0 converted to
001E
:SLD
4
physical address)
001F
:+D
produces
0020
:T
FD 14
address of the last DW + 1
0021
:
0022
:L
KH
A5A5
Constant, written to all data words
0024
:
0025
:L
FD 14
Address of the last DW + 1
0026
:ENT
Shift constant to ACCU-3-L
0027
:
(= register 10)
0028
:L
FW 10
Convert address of 1st data word (DW 0)
0029
:SLD
4
to physical address
002A
:
002B SCHL
:
Loop:
002C
:
ACCU 1: address of DW to be written to
002D
:
ACCU 2: address of last DW + 1
002E
:
ACCU 3: constant
002F
:TIR
10
Store the value of ACCU-3-L in the DW with
0030
:
the address in ACCU 1
0031
:
0032
:ADD
DH
0000 0001
Increment address by 1
0035
:
0036
:><D
Scan whether last DW reached
0037
:JC
=SCHL
(if not, return to the loop)
0038
:
0039 WEIT
:
Continue the program ...
003A
:
after all DWs have been written to ...
003B
:
003C
:BEU
003D
:
003E NIVO
:
If DB 100 does not exist
003F
:BE
Memory Access via Address in ACCU 1
CPU 948 Programming Guide
9 - 16
C79000-G8576-C848-04
Summary of Contents for CPU 948
Page 10: ...Contents CPU 948 Programming Guide 1 2 C79000 G8576 C848 04 ...
Page 32: ...Contents CPU 948 Programming Guide 2 2 C79000 G8576 C848 04 ...
Page 72: ...Data Blocks CPU 948 Programming Guide 2 42 C79000 G8576 C848 04 ...
Page 74: ...Contents CPU 948 Programming Guide 3 2 C79000 G8576 C848 04 ...
Page 154: ...Contents CPU 948 Programming Guide 4 2 C79000 G8576 C848 04 ...
Page 200: ...Contents CPU 948 Programming Guide 5 2 C79000 G8576 C848 04 ...
Page 308: ...Contents CPU 948 Programming Guide 7 2 C79000 G8576 C848 04 ...
Page 324: ...Examples of Parameter Assignment CPU 948 Programming Guide 7 18 C79000 G8576 C848 04 ...
Page 326: ...Contents CPU 948 Programming Guide 8 2 C79000 G8576 C848 04 ...
Page 370: ...Addressable System Data Area CPU 948 Programming Guide 8 46 C79000 G8576 C848 04 ...
Page 372: ...Contents CPU 948 Programming Guide 9 2 C79000 G8576 C848 04 ...
Page 486: ...Contents CPU 948 Programming Guide 11 2 C79000 G8576 C848 04 ...
Page 522: ...PG Functions via the S5 Bus CPU 948 Programming Guide 11 38 C79000 G8576 C848 04 ...
Page 524: ...Contents CPU 948 Programming Guide 12 2 C79000 G8576 C848 04 ...
Page 538: ...Contents CPU 948 Programming Guide 13 2 C79000 G8576 C848 04 ...
Page 546: ...List of Key Words CPU 948 Programming Guide Index 6 C79000 G8576 C848 04 ...