TAR1 #BUFFER_AR1 // Trasnsfer address register 1 to BUFFER_AR1.
OPN "T" // Open DB60.
L DBLG // Load length of shared DB60 (bytes).
L 18 // Number of bytes for each data in DB60.
/I
T #NUMBER_OF_DATA_IN_DB // Number of data into the shared DB60.
L P#DBX 0.0 // Load pointer to first byte in DB60.
L 2 // 2 (bytes).
SLD 3 // Shift Left 3 positions (Dobleword).
+D // Pointer to third byte in DB60.
LAR1 // Load Address Register 1 from Accumulator 1.
L #NUMBER_OF_DATA_IN_DB
NEXT: T #LOOP_COUNTER // Transfer low word from ACU
1toLOOP_COUNTER.
L D [AR1,P#8.0] // Load into ACU 1 the
double Word whose memory
L D [AR1,P#4.0] // location is calculated (AR1 + 8.0).
-R
T #SUBTRACT_LSV_FROM_HSV // HSV - LSV.
L W [AR1,P#0.0] // Load Field input (INTEGER).
ITD // INTEGER TO DOUBLE INTEGER.
DTR // DOUBLE INTEGER TO REAL.
L 2.764800e+004 // Load module nominal range (0 - 27648).
/R // Slope.
L #SUBTRACT_LSV_FROM_HSV
*R
L D [AR1,P#4.0] // Low Scaling Value (LSV).
+R
T D [AR1,P#12.0] // Transfer to Scaling Value (SV).
L P#18.0 // Number of bytes for each data in DB60.
+AR1 // Add Accumulator 1 to Address Register 1.
L #LOOP_COUNTER
LOOP NEXT // Decrement LOOP_COUNTER and go to NEXT if <>0.
LAR1 #BUFFER_AR1 // Restore Initial Address Register.