mains unchanged, and the instruction actually exe-
uted by EXECUTE is Op Code B, 0, B. D. I MvclIT 112 1151 100 100 to provide a move with a length of 112 bytes and thus
move 113 bytes.
Assembly Language Examples
These programming examples use the System/360 as­
sembly-language format and mnemonics. In general,
the operands are shown symbolically with indexing or
length specification following the symbol and enclosed
in parentheses. Lengths are given as the total number
of bytes in the field. This differs from the machine
definition regarding lengths which states that the
length is the number of bytes to be added to the field
address to obtain the address of the last byte of the
field. Thus the machine length is one less than the
assembly-language length. The assembly language
automatically subtracts one from the length specified
when the instruction is assembled.
Examples
l. Decimal right shift -even number of places.
Assume symbolic location "Source" is: Source: 12 34 56 78 9S and we wish to drop two places. MOVE NUMERICS (MVN) can be used to accomplish this Source MVN Source + 3 (1), Source + 4 12 34 56 7S 9S a length of 4 instead of 5 in operations using sym­
bohc locatIOn Source, the result is accomplished.
2. Decimal right shift -odd number of places. Source: 12 34 56 78 9S Assume we wish to drop three places.
The move with offset (MVO) instmction is used. Source MVO Source (5), Source (3) 00 01 23 45 6S 3. Decimal left shift -even number of places.
Assume tbe following at symbolic location "ZERO." Zero: 00 00 Source: 12 34 56 78 9S A left shift of four places can be performed as follows: Source MVC Source + 5 (2), Zero 12 34 56 78 9S 00 00 MVN Source + 6 (1), Source + 4 12 34 56 78 9S 00 OS NI Source + 4,240 12 3456 78 90 00 OS . Note the number 24010 in the AND IMMEDIATE instmction pro­
VIdes a mask of 11110000 which is to be used to make the old
sign positions zero.
128
4. Decimal left shift -odd number of places. Zero: 00 00 Source: 12 34 56 78 9S Assume the shift to be three places. Source MVC Souree + 5 (2), Zero MVN Source + 6 (1), Source + 4
NI Souree + 4, 240 MVO Source (6), Source (5)
12 34 56 78 9S 00 00 12 34 56 78 9S 00 OS 12 34 56 78 90 00 OS 01 23 45 67 89 00 OS 5. A master inventory file is to be updated by issue
and receipt transactions. There may be multiple trans­
actions pertaining to a master record. Both inactive
and updated master records are to be rewritten. The
following calculations are performed to update the
master:
Receipts
l. Receipt quantity X unit cost == receipt cost
2. Receipt cost + total cost == new total cost
3. Receipt quantity + quantity on hand new
quantity
4. New total cost --;- new quantity == new average
unit cost
Issues
l. Quantity on hand -issue quantity == new quantity
(if quantity on hand is less than issue quantity, go
to an exception routine) .
2. Issue quantity X average unit cost == issue cost
3. Total cost -issue cost == new total cost
4. If new quantity is not greater than the reorder level,
go to an exception routine. > Record Description NI aster Record:
Item #: 6 alphameric characters
Description: 20 alphabetic characters
Quantity: 7 digits plus sign
Total cost: 11 digits plus sign (2 decimal places)
Average unit cost: 7 digits plus sign (3 decimal places)
Reorder level: 5 digits plus sign
Transaction Record:
Type code: 1 digit plus sign
(plus 1 == receipt)
( plus 2 == issue)
Item #: 6 alphameric characters
Quantity: 5 digits plus sign
Receipt unit cost: 6 digits plus sign (2 decimal places)
IB14 IBM System/3S0 ABBembler CDding PDrm PROGRAM MASTER INVENTOR'!' FILE MAINTENANCE PUNCHING INSTRUCTIONS PAGE I OF :3 I-------------+-G-RAPH-'C -'-1 -'-1 --.-1-+----··--­ CARD ELECTRO NUMBER Nome Operation
1 10 12 16 STA R T X. f.-- BA LR I USI NG f-- -f.- Ml4-S fC- --L
8 C I OS I os )7- ·t ]05 I TO TC I DS 1- IAVG .. 0 5 BJl &12 OS I t X I 05 - TV PE I eQU 1-· M -
-- - Yc- ., uc DS IPI? 00 1 DS OI V I OS IDli VA 05 IFIT VE Oc 18 Operand 25 /5,1 0 *) I 5 15
J START
CL6 c. i.. -20 - PJ.4 .. -
PL6
- Pi..4 PL3 c X. CL6 Ii 3 !Pili PJ.7
PL7 I'Ll P \ 5 I -- ..
.. _ ..
... T I .. - S1A RT I GE E. T X I GET A 5 i X c--t--I-- CO MP .-"t- - +--+-- -I-' I r -"t --L_ I T -I--- Be
Be.
PUT G£"T I TE M; 6,EQUAL. 2."HIGH xci: PiT JoIN 30 PROGRAM MASTE.R INVENTORY FILE. MAINTE.NANCE. I DATE
STATEMENT
35 40 -I -1- 1·- - I 1--1- Identificatlon- Comments 'If f60 I .. N TV c- T'O TAL cos l7 I I AVERAGE COST I I 173 Sequence i--- ,.
R S 0 Rip E R
LEveL I I + - TRANSAC-TlrON wOfqK TYPE COOS ITEM Nu1M.8ER I .. 1- f.- 1+- - - QU ANITI TY II II. UNIT COS7 f- - -1-1-- PRO 0 U C 7 WOR J< ARE AI I DIVISION .. I WORK I 1+ "- 0 'tJ S r A IV.. T tJ s c 0 HAL IF IA 0 JUS T
GET FIRST M.ASTER I I GeT I C He C I( FOR ACT 11 vITI y I .
r 0 EX c'IE P Tit A NI5 .1 L Iv. R 1 T E MAS 7 c R
(laC 5) I READ (laCS) I _. I 1-1--+--+--1-++--+ PUNCHING INSTRUCTIONS PAGE 2... OF .3 GRAPHIC ,8Q i-· 1- t-- I I I CARD ELECTRO NUMBER Nome Operation Operand 10 12 16 18 25 30 '---i-t--t---f--+=:B_+C I 5 COM P A L -: I eLI.... T y E .J. ... C Z I 8 C. 8 ISS U E- -f- - c-:- eLI TV P E ) )( ... C 1 I _I-- _I _ t 8 C 8 ) 1? E eEl P T _ t _ 1!i:1i; K £: j:J T I 01111 ISSUE I SP MQTY-!.TQTY f l' ROD , A V G I-+----l---If--+--I---I---+-++ + M P J'- ROD ) T <n:. Y I AP PROD FI VE -- 9 D t'R q D C ) SP TOTC,PROO+I(6) I--+--+-+-+---i rep ..... T Y , R Q R. 0 I--I--f.- __ . 1 8 c 1.3 I E X <: E P r.r ION I IJC R'€+C Ii ZAP PROD I U C. /tiP PROD)TQTY 1--+--+-+-+---+ +1- APT 0 T C. ) PRODoj- I ( 6 ) 1--1-- _ A P ", Q TV) T Q T Y I--+--+-+---+---+--+-' _+- --+---I_-_I_--+"Z p I V J TOT C MVN DIVA)OlV+6 - + "t _ /-_1·.. 1 I 1--+--+-+-+---+-, I MVe> DI V(S)l.D I Y N I D I \I A, I!) OP Dlvced"MQTY AVG)DIV _L_l_ . PROGRAM MASTER INVE.NTORY FILE MAINTf.NANCE. STATEMENT
35 40 45
Comments 50 55 1 t T1--I
42
- _. 71 co,., PAR e T Y pelT 0 III I TO ISS U ElF T Y P E IE Qlu A L 5 2 COM PAR E Tly peT 0 II I TO R
e eel P T 1FT" P E IE QUA L I Toe XC E P T 0 N e R ROIR Ie A R 0 COMPUTE NeW QUANTII Tlv ••. G: w.b ... K 1 IQ TV COM P V Tel 6 9 U! e 0 &IT I HALf ADJUST I RE6U. L.T N61w COST CHECK oelR POl Nl TO 1: R
R 0 R 1 1= N of. H
1 GIH Fl e T II R N ToG E Tlx. I I A V & T 01'" 0 R KARlE A.I I I co,..,? U T Ii -RG c. e 1 pIT SiT N
E Iw TOT ALe 0 5 T, I I colMPUTE NEW QTY II I COST TO ISH1 fT DI V A ReA LIEF!T ONE. 1-' PLACE II I C 011>1 PUT E. HE. W A vie RAIG el Cos T
ADJUST MASTER I I PUNCHING INSTRUCTIONS Identification- r1"l1" II I I
I
I I I I I I I 1 PAGE 3 OF ,3 ± I + :.'- "''''0 '""'" 1- __________ --r.-- ___ ---,--.- ____________________ ___________________________________ .. ___ " Name Identlfication­ Sequence Appendix A 129
Previous Page Next Page