EasyManuals Logo

Siemens CPU 948 User Manual

Siemens CPU 948
548 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #386 background imageLoading...
Page #386 background image
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

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens CPU 948 and is the answer not in the manual?

Siemens CPU 948 Specifications

General IconGeneral
BrandSiemens
ModelCPU 948
CategoryController
LanguageEnglish

Related product manuals