Professional Documents
Culture Documents
1 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
General ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Revision Information .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Abstract ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Implementation ... ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. The Assembler Language . ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Machine Characteristics . .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Forlopp Support .. ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Instructions for Reading from Store .. ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RS, Read from Store . ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RSE, Read from Store Extended . ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RSI, Read from Store Indexed .. .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RSII, Read from Store Indexed Indirect .. ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RSS, Read Subvariable from Store . .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RDP, Read Dynamic Buffer Pointer . .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RDB, Read from Dynamic Buffer . ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RDBI, Read from Dynamic Buffer Indexed . .. ... ... .. ... .. ... ... .. ... .. ... ... .. RCB, Read from Communication Buffer . ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RCP, Read Communication Buffer Pointer . .. ... ... .. ... .. ... ... .. ... .. ... ... .. RFID, Read Forlopp Identity . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Instructions for writing in Store ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WS, Write in Store .. .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WSE, Write in Store Extended . .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WSI, Write in Store Indexed . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WSII, Write in Store Indexed Indirect . ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WSS, Write Subvariable in Store . ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WHC, Write Halfword Constant . .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WZ, Write Zeros .. ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WO, Write Ones .. ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. FIRSI, File Insert Register to Store Indexed . ... ... .. ... .. ... ... .. ... .. ... ... .. WDB, Write in Dynamic Buffer .. .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WDBI, Write in Dynamic Buffer Indexed . ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. WCB, Write in Communication Buffer . ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. CCBI, Copy Communication Buffer Indexed . ... ... .. ... .. ... ... .. ... .. ... ... .. WFID, Write Forlopp Identity . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Register Instructions ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. LCC, Load Character Constant . .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. LHC, Load Halfword Constant .. .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. LWCD, Load Word Constant Double .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. LHCE, Load Halfword Constant Extended . .. ... ... .. ... .. ... ... .. ... .. ... ... .. LAT, Load Absolute Time .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. MFR, Move from Register . ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... ..
A4 XSEIF R3
2 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
4.7 4.8 4.9 4.10 4.11 5 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 5.13 5.14 6 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 7 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 7.12 8 8.1
MFRE, Move from Register Extended ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. MTR, Move To Register . .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. TNB , Translate Number to Bit vector . ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. CFID, Clear Forlopp Identity . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. TFID, Test Forlopp Identity ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Arithmetic Instructions .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. AR, Add Register to Register ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ARD, Add Register to Register Double .. ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ACC, Add Character Constant To Register . .. ... ... .. ... .. ... ... .. ... .. ... ... .. AWC, Add Word Constant to register . ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. AWCD, Add Word Constant To Register Double ... .. ... .. ... ... .. ... .. ... ... .. AHCS, Add Halfword Constant To Store ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SR, Subtract Register from Register .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SRD, Subtract Register from Register Double .. ... .. ... .. ... ... .. ... .. ... ... .. SCC, Subtract Character Constant from Register . .. ... .. ... ... .. ... .. ... ... .. SWC, Subtract Word Constant from Register ... ... .. ... .. ... ... .. ... .. ... ... .. SWCD, Subtract Word Constant from Register Double .. ... ... .. ... .. ... ... .. SHCS, Subtract Halfword Constant from Store . ... .. ... .. ... ... .. ... .. ... ... .. MR, Multiply Register . ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. DR, Divide Register . .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Shift and Logical Instructions .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SHL, SHift Left ... ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SHLD, SHift Left Double . .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SHR, SHift Right . ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SHRD, SHift Right Double ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ROL, ROtate Left . ... .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ROLD, ROtate Left Double ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ROR, ROtate Right . .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RORD, ROtate Right Double . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ER, Exclusive or in Register . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. OR, Logical Or in Register ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. NR, Logical and in Register .. ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. NWC, Logical and with Word Constant .. ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. Local Jump Instructions ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JLN, Jump Local Normal .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JLL, Jump Local and Link . ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JOR, Jump on One in Result Indicator .. ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JZR, Jump on Zero in Result Indicator .. ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JEC, Jump on Equality with Character Constant .. .. ... .. ... ... .. ... .. ... ... .. JUC, Jump on Unequality with Character Constant . ... .. ... ... .. ... .. ... ... .. JER, Jump on Equality between Registers . .. ... ... .. ... .. ... ... .. ... .. ... ... .. JUR, Jump on Unequality between Registers .. ... .. ... .. ... ... .. ... .. ... ... .. JGT, Jump on Greater Than . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JLT, Jump on Less Than . .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JTR, Jump on Table Indexed by Register ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JTS, Jump on Table Indexed by Store ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... ..
29 29 30 30 31 31 31 32 32 33 33 33 34 35 35 36 36 37 37 38 38 38 39 39 40 40 41 41 42 42 43 44 44 45 45 46 46 46 47 47 47 48 48 49 49 50
Signal Transmission Instructions .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. 51 SSN, Send Signal Normal ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. 51
3 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10 8.11 8.12 8.13 8.14 8.15 8.16 8.17 8.18 8.19 8.20 8.21 8.22 8.23 9 9.1 9.2 10 10.1 10.2 10.3 10.4 10.5 11 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.10 11.11 11.12 11.13 11.14 11.15 11.16 11.17
SSIN, Send Signal Indirect Normal . .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSPD, Send Signal from Process Register Direct . .. ... .. ... ... .. ... .. ... ... .. SSL, Send Signal and Link .. ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSIL, Send Signal Indirect and Link .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSPL, Send Signal from Process register Linked . .. ... .. ... ... .. ... .. ... ... .. SSB, Send Signal via Job Buffer . ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSBD, Send Signal via Job Buffer Double . .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSIB, Send Signal Indirect via Job Buffer .. .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSIBD Send Signal Indirect via Job Buffer Double .. ... .. ... ... .. ... .. ... ... .. SCBS, Send Combined Backward Signal .. .. ... ... .. ... .. ... ... .. ... .. ... ... .. RCBS, Retrieve Combined Backward Signal ... ... .. ... .. ... ... .. ... .. ... ... .. SSPB, Send Signal from Process Register via Job Buffer . ... .. ... .. ... ... .. SSPBD Send Signal from Process Registers via Job Buffer Double ... ... .. XSTQ, Send Signal via Time Queue .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. XSTQD Send Signal via Time Queue Double .. ... .. ... .. ... ... .. ... .. ... ... .. SSRP, Send Signal to RP . ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSRPE Send Signal TO RP Extended .. ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSIP, Send Signal to IPNA ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSIPD, Send Signal to IPNA Double .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. XRST, Read from Signal Sending Table . ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. RBD, Receive Bulk Data .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSRPB, Send Bulk Signal to RP ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... ..
51 52 53 53 54 55 55 56 56 57 57 58 59 60 62 64 65 66 68 69 70 71
Miscellaneous Instructions ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. 73 EP, End of Program . .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. 73 SRT , Set Return Time .. .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. 74 Search Instructions . ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. BLO, Bit search for Leftmost One in Register ... ... .. ... .. ... ... .. ... .. ... ... .. BLOD, Bit search for Leftmost One in Register Double .. ... ... .. ... .. ... ... .. CS, Compare String .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. FESR, File search for Equality between Store and Register .. .. ... .. ... ... .. FCZS, File search for Change to Zero in Store . ... .. ... .. ... ... .. ... .. ... ... .. Macro Instructions .. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ADDR, Load Dened Address .. .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. BLNR, Load Block Reference Number .. ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. DUPL, Duplicate Instruction . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ERD, Exclusive or in Register ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JECD, Jump on Eq with Char Constant Double ... .. ... .. ... ... .. ... .. ... ... .. JERD, Jump on Equality between Register Double . ... .. ... ... .. ... .. ... ... .. JGETD Jump on Greater Than or Equal Double .. .. ... .. ... ... .. ... .. ... ... .. JGTD, Jump on Greater Than Double ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JLETD Jump on Less Than or Equal Double ... ... .. ... .. ... ... .. ... .. ... ... .. JLTD, Jump on Less Than Double .. .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. JUCD, Jump on Unequality with Char Const Double ... .. ... ... .. ... .. ... ... .. JURD, Jump on Unequality between Register Double . .. ... ... .. ... .. ... ... .. LBNBA Load Base Address Number . ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. LBNSL, Load Signal Location .. .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. LCCE, Load Character Constant Extended .. ... ... .. ... .. ... ... .. ... .. ... ... .. LWC, Load Word Constant ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. NHC, Logical aNd with Halfword Constant . .. ... ... .. ... .. ... ... .. ... .. ... ... .. 74 74 75 75 76 77 78 78 79 79 80 80 81 81 82 82 82 83 83 84 84 84 85 85
4 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
RECEIVE, Receive a Signal . ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SGLOC Signal Group Location . .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSLL, Send Signal Local and Link .. .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. SSLN, Send Signal Local Normal ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. TQINF Time Queue Information .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. TQINFI Time Queue Information Indirect ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. VAL , Load Dened Value . ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. XLLR, Load Location in Register . ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... ..
86 86 87 87 88 89 89 90
5 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
1
1.1
General
Revision Information
This Descripttion is based on 13/1551-ANZ 211 60 Rev B. Changes in this document are a Clarication that the registers r4 and r5 are only used and set by the PLEX compiler for the instructions RSII and WSII. When writing the instruction manually nothing should be dened for the registers r4 and r5, only the registers r1, r2 and r3 should be dened.
1.2
Abstract
This paper denes and describes assembler instructions in ASA210C. It is valid for APZ 212 20 and later APZs. The paper describes instructions which are of a general nature only. Instructions which are used by the operating system for special purposes are described in the document ASA210C, Operating System Assembler Instructions. Parameters in the instructions are dened in the document ASA210C, Assembler Instruction Parameters. Binary formats of the machine operations are described in the document Machine Operation Binary Formats.
1.3
Implementation
This document is valid for APZ 212 20 and later APZs. When nothing else is said in the sections implementation below it implies that the machine instruction is implemented for all APZ models.
1.4
6 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
A program label is dened by writing the name followed by a right-hand parenthesis before the keyword to which the reference is to be made in the assembler instruction. The assembler instructions may have parameters which are separated by following characters: a , A comma normally separates the parameters. b A dash between two parameters indicates that data is transferred between the parameters. The transfer is always done from the right-hand to the left-hand parameter. c / A slash separates variables and subvariables or a process register and part of that register.
1.5
Machine Characteristics
APZ 212 is a 32-bit machine. Assembler instructions which work differently on different register lengths have names which end on letter D. That is, the assembler instruction AR, Add Register, will inuence the 16 lower bits in a register whereas the assembler instruction ARD will affect all the 32 bits in a double word.
1.6
Forlopp Support
In order to support the forlopp concept, all buffered signal sending instructions described below also transfer the forlopp identity of the current forlopp as signal data. The current forlopp identity is cleared at the end of a job before a new signal is taken out from the signal buffer. Then, when a new signal is entered, the forlopp identity from that signal is loaded as current forlopp identity.
2
2.1
7 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Variable var is fetched from the store and stored right-justied in process register r. Variables larger than 32 bits and subvariables can not be read. c Example: RS WR1-CLINK; The contents of variable CLINK is transferred to register WR1. d Implementation: The assembler instruction RS generates one of the machine operations RSA, RSU or RSL.RSA will be generated if the base address of the variable is 1-63, RSU if it is 64-255 and RSL if it is 256-4095.
2.2
8 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
2.3
9 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
2.4
10 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
2.5
2.6
11 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
2.7
2.8
12 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Transport of data to consecutive process registers from a (sub)variable array in a dynamic buffer.If the subvariable and the register variable are less than 16 bit the data are stored packed according to vlm. r1 indicates register for the rst variable. vlm species the length and rst position for the register variable when stored in r1. vlb species subvariable within the variable. vl species the length of the variable. r2 species the number of variables that shall be transferred. If r2=0, the instruction does not execute any action. m species the maximum value for the contents of register r2. If the contents are greater than m+1, software error actions are taken. 0 <= m <= 63. Process register PR1 (bit 0-11) contains pointer to the buffer. Index register IR contains index to the rst buffer variable. If the origin (sub)variable is greater than the register variable the data will be truncated. If the origin (sub)variable is smaller than the register variable the register variable will be lled with zeros from most signicant bit. Parts of bits 0-15 of process registers which are not written with register variables remain unchanged. c d=Example: RDBI DR0/H0-H0, H, AR2, 25; (IR=0,AR2=10) From the buffer pointed to by PR1, with the length 8 bits, 10 variables are read to process registers, the rst variable will be stored in DR0/H0, the second variable in DR0/H1, the third in DR1/H0 an so forth. d Note: THIS INSTRUCTION MAY NOT BE USED IN ASA SECTORS IN PROGRAMS. e Note 1: APS checks that r1s address + m <= 63 to prevent wrap-around.
13 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
2.9
2.10
14 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Variable var shall have a length of 32 bits and may not be indexed. The variable may be allocated in a le (addressed by pointer). If the trace bit T for writing in a variable from the base address table is set it is saved in B23 in register r, and B30 in PR1 is set to one. c Note: THIS INSTRUCTION MAY NOT BE USED IN ASA SECTORS IN PROGRAMS.
2.11
3
3.1
15 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
WS CLINK-WR1; Process register WR1 is stored in variable CLINK. d Implementation: The assembler instruction WS generates one of the machine operations WSA, WSU or WSL. WSA will be generated if the base address of the variable is 1-63, WSU if it is 64-255 and WSL if it is 256-4095.
3.2
3.3
16 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
This instruction transfers the contents of consecutive process registers to variables in a variable array in the store. (The pointer has a xed value or does not occur, the index runs consecutively). The contents of the process registers are placed right-justied in the variables. If the variables are less than 32 bits, that part of the process registers which cannot be contained in the variables is truncated from the left. In the case of variables larger than 16/32 bits, bit 16/32 and upwards are not affected. Subvariables cannot be written. - IR species an index to the rst receiving variable. - r1 species the rst register which is to be transferred. - r2 species a register, which contains the number of registers to be transferred. If the contents of register r2=0 no transfer is carried out. The contents of r2 are always unaffected. - m species the maximum value for the contents of register r2. If the contents are greater than m+1, program error actions are taken. 0 <= m <= 63. c Example: WSI DUMPVAR - WR22, PR0, 7; (IR=2, PR0=5) Bits 0-7 of process registers WR22, WR23, WR24, WR25 and WR26 are entered in the ve variables with indexes 2, 3, 4, 5 and 6 in variable array DUMPVAR (the variables have a length of 8 bits). d Note 1: APS checks that r1s address + m <= 63 to prevent wrap-around. e Note 2: Parameter r1 must not be a temporary variable. f Note 3: APS does not accept variables larger than 32 bit g Implementation: The assembler instruction WSI generates one of the machine operations WSIU or WSIL. WSIU will be generated if the base address of var is 1-255, else WSIL will be generated.
3.4
17 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Function: This instruction transfers the contents of consecutive process registers to variables in a variable array in the store. Both the variable and the rst register where data is fetched from is addressed indirectly. The pointer has a xed value or is not used, the index runs consecutively from the given start value. Variables larger than 32 bits and subvariables can not be written. - Processor register r1 contains the base address number of the variable to be written. - r2 species the rst register that is to be transferred to the variable, see Note 2 below. - r3 is the number of indices to be transferred. If r3 = 0 then the entire variable will be written. - r4 is the rst used data register in register memory, RM, DR0 - DR23. - r5 is the last used data register in RM, DR0 - DR23 - IR contains the rst index of the variable to be written. - PR0 contains a valid pointer (if used). The parameters r4 and r5 are only used by the register allocation algorithms within APS. They do not affect the binary format of the instruction, and hence should not be dened when writng this instruction manually.
Example: WSII WR0-DR0, WR1; (WR1=5, IR=2, PR0=5) Five consecutive data registers, DR0-DR4 is transferred to ve variables with indexes 2, 3, 4, 5, 6 to a variable array in the store. The base address number of the variable array is taken from WR0. The rst data register to use at the transfer is taken from DR0.
Note 2:
18 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
The address of the register to be given in r2 is expressed as the normal register address dened in the document ASA201C, assembler instruction parameters. DR0 has the address 6, DR1 has the address 7 and so on. DR23 has the address 29.
3.5
3.6
19 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Implementation: The assembler instruction WHC generates one of the machine operations WHCU or WHCL. WHCU will be generated if the base address of var is 1-255, else WHCL will be generated.
3.7
3.8
20 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
The assembler instruction WO generates one of the machine operations WOU or WOL. WOU will be generated if the base address of var is 1-255, else WOL will be generated.
3.9
21 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
3.10
22 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
to the contents of process register r. The subvariable is then written back into the data store. V = 2log (variable length) Q = 2log (number of variables in array of variables)
3.11
23 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
To the buffer pointed to by PR1, with the length 8 bits, 10 variables are written from process registers. The rst variable is taken from DR0/H0, the second variable is taken from DR0/H1, the third from DR1/H0 an so forth. d Note 1: THIS INSTRUCTION MAY NOT BE USED IN ASA SECTORS IN PROGRAMS. e Note 2: Parameter r1 must not be a temporary variable. f Note 3: PR1 should be loaded with instruction RDP. g Note 4: APS checks that r1s address + m <= 63 to prevent wrap-around.
3.12
24 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
3.13
CR = Number of W16 to Copy / to Clear. If CR = 0, the instruction is terminated. r = a1 parameter & pointer to Copy to / to Clear r+1 = Index to Copy to / to Clear r+2 = a2 parameter & pointer to Copy from / not used r+3 = Index to Copy from / not used The instruction is interruptable. The data left to be copied is stored in rml[CR]. The other registers are left unchanged.
25 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
31
24 23 22 Pointer
d Note:
a-par
3.14
4
4.1
Register Instructions
LCC, Load Character Constant
a Format: LCC r-c; b Function: Program constant c is transferred to process register r. Constant c is placed right-justied in r. The rest of r is cleared to zero.
26 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
4.2
4.3
27 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Example: LWCD WR6/W0-1025; Numeric value 1025 is stored in process register WR6.
4.4
4.5
28 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
r1+2 month r1+3 day r1+4 hour r1+5 minute r1+6 second r1+7 decisecond r1+8 undened c Example: LAT WR10; The contents of process registers will be: WR10 = undened value WR11 = year WR12 = month WR13 = day WR14 = hour WR15 = minute WR16 = second WR17 = decisecond d Note: That process register WR10 will be undened.
4.6
29 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
MFR WR3-WR2; The contents of process register WR2 are transferred to process register WR3.
4.7
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 >
WR4
0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0
4.8
30 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
C3 WR1
C2
C1
C0
0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0
<
WR2
0 1 0 0 1 1 1 1 0 1 0 1 1 0 1 0
a Only the 4 least signicant bits in WR2 in the example will be transferred to process register WR1.
4.9
4.10
31 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
4.11
5
5.1
Arithmetic Instructions
AR, Add Register to Register
a Format: AR r1-r2; b Function: The contents of process register r2/W0 are added to the contents of process register r1/W0. If the result of the addition can be contained in r1/W0, result indicator RIR is set to zero. If the result requires a larger eld length, carry is obtained and RIR is then set to one. The result is stored right-justied in register r1/W0. If the result cannot be contained in the register it will be truncated from the left. c Example: AR AR0-AR1;
32 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
The contents of process register AR1/W0 are added to the contents of process register AR0/W0.
5.2
5.3
33 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
5.4
5.5
5.6
34 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Function: The program constant h is added to a variable var in the store. The instruction is carried out correctly for variables with a maximum eld length of 32 bits. If the variable should have a size exceeding 32 bits, only the 32 least signicant bits of the variable participate in the addition. If the result of the addition can be contained in the variable or in the 32 least signicant bits of the variable, result indicator RIR is cleared to zero. The result is stored right-justied in the variable. If, on the other hand, the result cannot be contained in the variable, carry will occur, in which case RIR is set to one. The result is truncated from the left with a number of bits which cannot be contained in the variable.
Example: AHCS COUNT-136; The number 136 is added to the variable COUNT.
Implementation: The assembler instruction AHCS generates one of the machine operations AHCSU or AHCSL. AHCSU will be generated if the base address of var is 1-255, else AHCSL will be generated.
5.7
35 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
5.8
5.9
36 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
5.10
5.11
37 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
The number 5 is subtracted from the contents of process register AR1. 32 bits are affected.
5.12
5.13
38 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
multiplied and the 32 least signicant bits of the result are stored in r1/W0 and r1+1/W0 with the least signicant bits in r1. r1/W1 and r1+1/W1 are cleared to zero. RIR is cleared to zero if the result can be contained in 32 bits, otherwise RIR is set to one. c Example: MR AR0-AR2; The contents of process registers AR0 and AR1 are multiplied by AR2 and AR3 and the result is stored in AR0 and AR1. Note, r1 and r2 may not be temporary variables.
5.14
6
6.1
39 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Function: A shift of B15-B0 in process register r to the left the number of steps specied by program constant z. Zeroes are entered from the right. B31-B16 do not participate in the operation and are set to zero before the result is stored in r. If z has the value zero, the number of shift steps will be fetched from index register IR, character 0. RIR is set to one if any of bits shifted out from B15 is one. Otherwise RIR is reset to zero.
Example: SHL AR0, 5; The contents of process register AR0 are shifted 5 steps to the left. If the contents were H1FFF before, they become HFFE0 afterwards and RIR=1.
6.2
6.3
40 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
SHR r, z; b Function: Shift B15-B0 in process register r to the right the number of steps specied by program constant z. Zeroes are entered from the left. B31-B16 do not participate in the operation and are set to zero before the result is stored in r. If z has the value zero, the number of shift steps will be fetched from index register IR, character 0. RIR is set to one if any of the bits shifted out from B0 is set to one. Otherwise RIR is reset to zero. c Example: SHR AR0, 3; The contents of process register AR0 are shifted 3 steps to the right. If the contents of AR0 were H1FFF before, they become H3FF afterwards and RIR=1.
6.4
6.5
41 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Function: Rotation of B15-B0 in process register r to the left the number of steps specied by program constant z. B31-B16 do not participate in the operation and are cleared before the result is stored in r. If z has the value zero, the number of shift steps shall be fetched from index register IR, character 0. RIR is set to one if any of the bits which have been shifted out are set to one. Otherwise RIR is reset to zero.
Example: ROL AR0, 4; If AR0 = H1234 before the execution of ROL, AR0 will contain H2341 after the execution of ROL. RIR is set to one.
6.6
6.7
42 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Rotation of B15-B0 in process register r to the right the number of steps specied by program constant z. B31-B16 do not participate in the operation and are cleared before the result is stored in r. If z has the value zero, the number of shift steps shall be fetched from index register IR, character 0. RIR is set to one if any of the bits shifted out is set to one. Otherwise RIR is reset to zero. c Example: ROR AR3, 4; If AR3 = HABCD before the execution of ROR, AR3 will contain HDABC after the execution. RIR is set to one.
6.8
6.9
43 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
r1 0 1 r2 0 1 0 1 1 0
Result indicator RIR is reset to zero if the result is zero and is set to one if the result is not zero. b Example: ER AR1-AR2; A logical exclusive OR is carried out between the contents of process registers AR1 and AR2. The result is stored in AR1.
6.10
The result indicator RIR is reset to zero if the result is zero and is set to one if the result is not zero. b Example: OR AR2-AR0;
44 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
A logical OR is carried out between the contents of process registers AR2 and AR0. The result is stored in AR2.
6.11
Result indicator RIR is reset to zero if the result is zero and is set to one if the result is not zero. b Example: NR AR1-AR3; A logical AND is carried out between the contents of process registers AR1 and AR3. The result is stored in AR1.
6.12
45 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
r 0 1 w 0 1 0 0 0 1
Result indicator RIR is cleared if the result is zero and is set to one if the result is not zero. b Example: NWC AR3-HD4; Logical AND is carried out between hexadecimal number 00D4 and the contents of process register AR3.
7.1
46 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
7.2
7.3
7.4
47 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
JZR in; A jump is done to program label in if RIR has the value zero.
7.5
7.6
7.7
48 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
If process registers r and CR contain equal values, a jump is done to a program label l within the same software unit. Otherwise the execution continues with the next instruction in sequence. c Example: JER WR4, EQ; A jump is done to program label EQ if the contents of process registers WR4 and CR are equal.
7.8
7.9
49 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
7.10
7.11
50 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
If WR6 contains the value 2, a jump takes place to program label WHEN_VAL_2. If WR6 contains a value greater than 2, a jump takes place to program label ERROR.
7.12
51 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
8
8.1
8.2
52 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Note: SSIN works the same way as SSN with the difference that the block number is calculated from the block reference stored in register r and that the local signal number (lsn) of the receiver is fetched from the global signal distribution table for multiple signals (GSDT-M). The register contents after SSIN are the same as after SSN.
8.3
A signal in accordance with WR7, WR8 and WR9 is sent to the block specied in WR7. The number of data items is in accordance with the format in WR8/C0. SSPD can be used to send a signals to active or passive blocks. The instruction executes the following: - SR0 and SR1 are loaded with information. - Program execution is started in the receiving block on address PSA+IA. PSA is fetched from the reference table of the receiving block and IA is
53 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
fetched from position LSN in the signal distribution table of the receiving block. b Note: Parameter r must not be a temporary variable.
8.4
8.5
54 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Signal sig is then sent to a block in its own processor, carrying a pointer and data. The signal sending pointer (ssp) and data format (f) are specied by sig while the block reference is specied in register r. Each transferred data is 32 bits. c Example: SSIL WR1, SEIZE; Signal SEIZE is sent to a block. Register WR1 species the block reference. A pointer and data accompany the signal in accordance with the format. d Note: No process registers (temporary variables) are saved. e Implementation: SSIL is implemented in the same way as SSL with the difference that the block number is calculated from the block reference in register r and that the local signal number (lsn) of the receiver is fetched from the global signal distribution table for multiple signals (GSDT-M).
8.6
55 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
No process registers (temporary variables) are saved. e Implementation: As for SSPD with the addition that the address to the next instruction in sequence is stored in the link register stack (block number and instruction address). Note that process registers (temporary variables) are not saved.
8.7
8.8
56 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
A signal message is entered in a job buffer. The signal message contains signal IDLE with a pointer and data in accordance with the format. The signal also contains the forlopp identity of the current forlopp.
8.9
8.10
57 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
SSIBD WR3, CLEAR; A signal message is entered in a job buffer. The signal message contains signal CLEAR with a pointer and data in accordance with the format. The forlopp identity is also sent in the signal. The block reference of the receiver to the signal is fetched from register WR3. d Implementation: SSIBD is implemented in the same way as SSBD but with the difference that the block number is calculated from the block reference in register r.
8.11
8.12
58 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
RCBS sig; b Function: This instruction has no operative function. It has been included to permit tracing on the reception of a combined backward signal. 32 bits are transferred for each data. c Example: RCBS RET1; The signal RET1 is received. d Note 1: A position in SDT must be occupied to be able to set the tracebit for this signal. e Note 2: RCBS is not generated by APS at present.
8.13
59 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
A signal in accordance with WR15, WR16 and WR17 is sent to a block (WR15). The job buffer is specied in WR13 and the number of data items in the signal is indicated by f in WR16/C0. b Note 1: Parameter r must not be a temporary variable. c Note 2: SSPB is the same assembler instruction as the older SIPBO.
8.14
SSPBD Send Signal from Process Registers via Job Buffer Double
a Format: SSPBD r; b Function: A signal message with pointer and data is inserted in the job buffer indicated in register r. The entire signal message is fetched from process registers; receiving block from register r+2, local signal number and data format from register r+3, transmitting processor and block from register r+4 and the pointer and data from the PR0 register and DR registers respectively. Register r+1 is not used. Each transferred data is 32 bits. The current forlopp identity stored in register EXECFID is also transferred in the signal. Input data to SSPBD:
60 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
A signal in accordance with WR15, WR16 and WR17 is sent to a block (WR15). The job buffer is specied in WR13 and the number of data items in the signal is indicated by f in WR16/C0. b Note: Parameter r must not be a temporary variable.
8.15
61 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
TQD 60 s long time intervals. Input data for the instruction is fetched from register r and subsequent registers. TQA 15
12 11
9 8 bn-r
hour
9 8 bn-r
When XRST is used in macro the following applies:bn-r is zero for unique signals.bn-r is not equal to zero for multiple signals. ssp is the position in the signal sending table in the block for the signal to be sent. b Example: TQINF WR0-RMWDEL, 2;LCC WR3-5;XSTQ WR0;
62 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Signal RMWDEL is sent via the time queue. The macro TQINF is used to load the register WR0 and onwards with required data. Signal RMWDEL is sent with a delay of 5 to 6 seconds. The data to send in the signal is taken from the of DR-registers previously loaded. c Note 1: Parameter r must not be a temporary variable. d Note 2: Registers r, r+1 and r+2 can be loaded with the aid of macros TQINF or TQINFI. e Note 3: The delay in the relative time queues will be at least the nominal time. The maximum delay is the nominal time plus the delay unit of the time queue. E.g. a nominal delay of 5 seconds in TQC will in reality be between 5 and 6 seconds. The maximum delay is 65534 time units. f Note 4: The signal from Time Queue will be executed with a SSPB or SSPBD in block JOB.
8.16
63 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
TQD 60 s long time intervals. Input data for the instruction is fetched from register r and subsequent registers. TQA 15
12 11
9 8 bn-r
hour
9 8 bn-r
4 3 1 2
0 r
f tq jb
When XRST is used in macro the following applies:bn-r is zero for unique signals.bn-r is not equal to zero for multiple signals. ssp is the position in the signal sending table in the block for the signal to be sent. b Note 1: Parameter r must not be a temporary variable. c Note 2:
64 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Registers r, r+1 and r+2 can be loaded with the aid of macros TQINF or TQINFI. d Note 3: The delay in the relative time queues will be at least the nominal time. The maximum delay is the nominal time plus the delay unit of the time queue. E.g. a nominal delay of 5 seconds in TQC will in reality be between 5 and 6 seconds.
8.17
65 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
a B indicates if the CM/RP is blocked. var is addressed with bit c-15of PR0 as a pointer. (c = parameter c). b Note 1: If the RP is blocked, the operating system will take over control. c Implementation: The assembler instruction SSRP generates one of the machine operations SSRPU or SSRPL. SSRPU will be generated if the base address of var is 1-255, else SSRPL will be generated.
8.18
66 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
15 cm-addr
11 10 B E
7 RP address CME
B indicates if the CM/RP is blocked. var is addressed with PR0/2exp(c) as a pointer. (c = parameter c). b Note 1: If the RP is blocked, the operating system will take over control. c Note 2: All RP:s can not handle long RP signals. d Implementation: The assembler instruction SSRPE generates one of the machine operations SSRPEU or SSRPEL. SSRPEU will be generated if the base address of var is 1-255, else SSRPEL will be generated.
8.19
67 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Data according to format f will be sent with the signal. If a CB/DB is included in the data, rst signal (including the buffer description in r+1-r+4) will be sent to IPNA, then the CB/DB will be sent with softDMA signals to IPNA. 16 bits of data is transferred from each DR register. Note: After a block has sent one signal with CB/DB to IPNA, the same block cannot send the next signal with CB/DB to IPNA on the same priority level until the rst one has been acknowledged. For signals without CB/DB there are no such restriction. Different CP blocks can simultaneously send signals with CB/DB to the same IPNA. Data Structure:
Logical IPNA address = Bit 0 Subaddress (A/B side) Bit 7-1 Logical IPNA number IPNASUP = IPNA Software Unit Pointer Logical IPNA number = (31 - Logical RPHB address) Registers r, r+1, ..., r+4: 15 14 r r+1 r+2 r+3 r+4 P 11 Type 8 7 Signal Number 0
Number of buffered data / Data Buffer pointer LSW / Data Buffer pointer MSW / Data
Type
= 0 1 P(Priority) = 0 1
68 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
8.20
69 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Logical IPNA address = Bit 0 Subaddress (A/B side) Bit 7-1 Logical IPNA number IPNASUP = IPNA Software Unit Pointer Logical IPNA number = (31 - Logical RPHB address) Registers r, r+1, ..., r+4: 15 14 r r+1 r+2 r+3 r+4 P 11 Type 8 7 Signal Number 0
Number of buffered data / Data Buffer pointer LSW / Data Buffer pointer MSW / Data
Type
= 0 1 P(Priority) = 0 1
8.21
70 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
XRST WRO-SEIZE,1; If signal SEIZE is a unique signal the BN-R for signal SEIZE is read from GSDT-U and stored in register WRO.
8.22
The parameter r species the register which contains the pointer to the Communication Buffer where the Bulk Data is stored. The instruction RBD must only be located at the signal entry of the RP-CP signal, directly after the RECEIVE signal, a PROGERROR will be issued if the instruction is found elsewhere. The SDT (Signal Distribution Table) is scanned for Bulk Data signals at Load-Time (Function Change, etc) for Bulk Data signals. The size information is collected and stored In the APZ System tables. The size information is later used at the reception of the Bulk Data signal to allocate a Communication Buffer with the appropriate size where the Bulk Data is copied to.
71 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Example: RECEIVE BULKSIG; RBD 5, WR9; The signal BULKSIG is received with ordinary signal data registers and bulk data. The pointer to the Communication Buffer where the bulk data is stored is found in the register WR9. The size of the Communication Buffer is 512 W16.
8.23
72 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
A PROGERROR occurs if the content of the index register IR added to the content of CR is greater than the physical size of the Communication Buffer specied by r+1. The E-bit in the distributed RP-table must always be 0 for bulk data signals; a PROGERROR will be issued otherwise. The number of devices per CM is specied by: 2exp(c), i.e. c shall have the value 2log(number of devices per CM). Data accompanies the signal according to format f. The data is fetched from the DR-registers and a maximum of 16 data words with a maximum of 16 bits each may be transmitted. Note: Temporary variable may not be specied instead of r. c Example: SSRPB RPTAB, 4, 2, 0, AR0; A signal with the number specied in AR0 is sent to a device program in RP. The internal address within the RP and the RP-number will be calculated from the contents of PR0 and the distributed RP-table RPTAB. Pointer and four 16-bit data will be sent. There are four devices on each CM. RPTAB 15 cm-addr 11 10 B E 9 8 7 RP address CME 0
B indicates if the CM/RP is blocked. var is addressed with bit c-15 of PR0 as a pointer. (c = parameter c). The Communication Buffer pointed out by AR1 is transferred to the RP starting at IR and CR number of W16 words. d e f Implementation: This instruction is only available on APZ 212 40 and later. Note1: If the RP is blocked, the operating system will take over control. Note2: The ownership of the Communication Buffer pointer is transferred to APZ at this instruction.
73 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
9
9.1
Miscellaneous Instructions
EP, End of Program
a Format: EP; b Function: The EP is used at the following events: - local linked return - combined backward signal - concluding of a job on TRL, THL1, THL2, THL3, BAL1 or BAL2 level. c Implementation: The function of the EP-instruction, is controlled by the contents of the top position of the link register stack (LR): - if BN of LR is equal to the block number of current block a local linked return is performed or a combined backward signal within the block is sent. The program execution will then continue in this block at address according to IA value from LR. - if BN of LR differs from the block number of current block and is not equal to zero, a combined backward signal is sent to this other block. This means that the program execution will continue at address according IA value from LR in the new block. - If BN of LR is equal to zero the current job will be concluded. The continued execution is then controlled in the following way: -- If the concluded job was a TRL-job, a return to the interrupted level with highest priority is executed -- If the concluded job was a job table job (THL1), the job table search will continue if the whole job table has not been searched. If the search is nished a job on THL2 or THL3 is started if there is any waiting, else a return to interrupted job on BAL is executed. -- If the concluded job was a THL2 or a THL3 job, a new THL job is started if there is any waiting, else a return to interrupted job on BAL is executed. -- was the concluded job a BAL1 or a BAL2 job, a new BAL job is started if there is any waiting. d Note:
74 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
When a return to interrupted job is to be performed but there is no interrupted job or when a BAL job is concluded without any new BAL job to start, then an idle-loop is entered.
9.2
10
10.1
Search Instructions
BLO, Bit search for Leftmost One in Register
a Format: BLO r, c, l; b Function: A search for a bit set to one from left to right in process register r. The search starts at the bit position specied by character constant c and continues with the next lower signicant bit position. The search is concluded when a bit set to one is encountered or when bit position 0 has been searched. If c = 0, index register IR character 0 indicates where the search is to begin. If a bit set to one is encountered, it is cleared to zero and a bit address is stored right-justied in index register IR. IR is cleared to zero before the storage operation is carried out. A jump is then done to program label l.
75 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
If no bit set to one is encountered, the execution continues with the next instruction in sequence. Index register IR is not affected. c Example: BLO WR2, 9, CONT; A bit set to one is sought from and including bit position 9 in process register WR2. If, for example, WR2 contains the number = H1050, an exit is done to program label CONT with value 6 in IR and H1010 in WR2.
10.2
10.3
76 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Example: CS STR1, WR9, STR2, WR10; The two string variables STR1 and STR2 will be compared. If the are stored in a RECORD then WR9 indicates the actual pointer value for STR1 and WR10 indicates the pointer value for STR2. The result of the comparison is found in the CR register.
Note: The comparison between var1 and var2 will be strictly numerical and the micro program will not perform any check whether the compared 8-bit numbers are valid ASCII characters.
10.4
77 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
The instruction cannot be used for variables larger than 32 bits or for subvariables or indexed variables. e Note 2: The instruction can be interrupted. This means that the instruction can be temporarily concluded if, for example, a maintenance interrupt signal arrives during the execution of the instruction. When the interrupt sequence has been concluded, the execution of the instruction continues. f Implementation: The assembler instruction FESR generates one of the machine operations FESRU or FESRL. FESRU will be generated if the base address of var is 1-255, else FESRL will be generated.
10.5
78 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Counters in variable block IDLE are run through and each counter is decremented by 1. If any counter is decremented to 0, a jump is done to program label FOUND. d Note 1: The instruction cannot be used for variables larger than 32 bits or subvariables. Unlike FESR, the instruction can be used for indexed variables. e Note 2: No tracing on variables can take place. f Note 3: The instruction can be interrupted. This means that the instruction can be temporarily concluded if, for example, a maintenance interrupt signal arrives during the execution of the instruction. When the interrupt sequence has been concluded, the execution of the instruction continues. g Implementation: The assembler instruction FCZS generates one of the machine operations FCZSU or FCZSL. FCZS will be generated if the base address of var is 1-255, else FCZSL will be generated.
11
Macro Instructions
A macro instruction is a statement which is available to the assembler programmer in source code and which generates assembler instructions.
11.1
79 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
The address to program label START will be included in the sequence of instructions when loading the program unit to the program store. d Code generation: 16-bit binary value
11.2
a Note:
APS does not use the blnm parameter. Own (current) block number is always used. b Example: BLNR WR2-RC; If own block number is H394 WR2 will contain the value H9403 when BLNR is executed, whether own block is RC or not. c Code generation: XRBN r;ROL r, 8;
11.3
80 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
The next instruction in sequence is repeated w times. c Note: If the instruction after DUPL is a macro instruction, only the last instruction in the macros code generation is repeated. d Example: DUPL 3;XSTP H10FF; The generated assembler instructions will be follows: XSTP H10FF; XSTP H10FF; XSTP H10FF;
11.4
11.5
81 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
JECD WR1, 6, TEST; A jump is done to program label TEST if process register WR1 contains the number 6. d Code generation: JEC r, c, l;
11.6
11.7
82 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
11.8
11.9
11.10
83 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
If the value of process register r is less than the value of process register CR, a jump is made to a program label l. c Example: JLTD WR9, ROUTINE; A jump is done to program label ROUTINE if the contents of process register WR9 are less than the contents of process register CR. d Code generation: JLT r, l;
11.11
11.12
84 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
A jump is done to program label UQ if the contents of process register WR0 and CR are unequal. d Code generation: JUR r, l;
11.13
11.14
11.15
85 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Function: Character constant c is transferred to a variable in process register r. The length and position of the variable within the register are specied by vlm.
11.16
11.17
86 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
a Result indicator RIR is cleared if the result is zero and is set to one if the result is not zero. b Example: NHC AR3-HD4; Logical AND is carried out between hexadecimal number 00D4 and the contents of process register AR3. c Code generation: NWC r-w;
11.18
11.19
87 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
Note: Early APS versions generated:LHC r/H0-signal group pos bit 0-7;LHC r/H1-signal group pos bit 8-11;
11.20
11.21
88 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
n species the instruction address to the program label to which the jump is to take place.
11.22
a Note 1:
The subsequent registers, register r+3 and, where applicable, register r+4 shall also be set before the instruction XSTQ can be executed. In the case of time queue TQA, the month and day are allocated in register r+3 in the left-hand and right-hand half-words respectively. The hour and minute are allocated in register r+4 in the left-hand and right-hand half-words respectively. In the case of time queues TQB, TQC and TQD, a delay is specied as a multiple of 100 ms, 1 second and 1 minute respectively in register r+3. b Note 2: Parameter r must not be a temporary variable.
89 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
11.23
a Note 1:
The subsequent registers, register r1+3 and, where applicable, register r1+4, shall also be set before the instruction XSTQ can be executed. In the case of time queue TQA, the month and day are allocated in register r1+3/H1 and r1+3/H0 respecitvely. The hour and minute are allocated in register r1+4/H1 and r1+4/H0 respectively. In the case of time queues TQB, TQC and TQD the delay is specied as a multiple of 100 ms, 1 second and 1 minute respectively in register r1+3. b Note 2: Temporary variable may not be specied instead of registers.
11.24
90 ( 90 )
/ EAB/UZ/DM SES
Approved Checked
2006-08-18
VAL w; b Function: Numeric value w will be generated in binary form and with a eld length of 16 bits. Instruction VAL is used for writing machine instructions in pure machine code and for organizing tables in the program store. c Example: VAL H384B; The hexadecimal value 384B will be included in the sequence of machine operations. d Code generation: 16-bit binary code
11.25