7. Assume two streams of bytes, N bytes separated
(NL 4095) and a 256 byte table.
Translate and Test Table
o 2 3 4 5 6 7 8 910 11 12 13 14 15
In stream 1 locate the first nonzero bit of each byte.On finding the first nonzero bit in stream 1, set the
corresponding bit position in stream 2 to zero.Con tinue this process to the end of the stream. A 256-
byte translate-and-test table is constructed in storage
such that:
Byte from00000000 Byte from lxxxxxxx
Byte from 01xxxxxx
Byte from001xxxxx Byte from 0001xxxx Byte from 00001xxx Byte from 000001xx Byte from 0000001x Byte from 00000001 fetches
fetches
fetches
fetches
fetches
fetches
fetches
fetches
fetches00000000 from the table. (OJO) 01111111 from the table. (127 10 ) 10111111 from the table. (19110) 11011111 from the table. (22310) 11101111 from the table. (23910)
11110111 from the table.(24710) 11111011 from the table. (25110)
11111101 from the table. (25310)
11111110 from the table.(254 10 ) o
16
32
48
6480 96
112
128
144160 176
192208 224 240 o 254 253
239 239 239
223 223 223
223 223 223
191 191 191
191 191 191
191 191 191
191 191 191
127 127 127
127 127 127
127 127 127
127 127 127
127 127 127
127 127 127
127 127 127
127 127 127.. _.- 253 251 2 51 251 251 247
239 2392 39239239 239
223 2232 23223223 223
-- 223 2232 23223223 223
191 191 1 91 191 191 191-- 191 191 1 91 191 191 191 I- 191 191 1 91 191 191 191 191 191 1 91 191 191 191 1----- 127 1271 27 127 127 127
127 1271 27 127 127 127
127 1271 27127127 127I--- 127 1271 27127127 127
127 1271 27 127 127 127
127 1271 27 127 127 127
127 1271 27 127 127 127-- 127 1271 27 127 127 127 --r-- 247 247 247 247 247 247 247 --- - ."- ---- 239 239 239 239 239 239 239
----- --- 223 223 223 223 223 223 223 • ----- I--- --(---- 223 223 223 223 223 223 223
191 191 191 191 191 191 1911---- f------- - -- --- f.--- 1-- 191 191 191 191 191 191 191 -- 1---- f.---- -- 191 191 191 191 191 191 191
------ -- I-- 1---- 1--- -- 191 191 191 191 191 191 191 f.-- f--- -" -- 127 127 127 127 127 127 127 -- ---- --- I---- I-- --- - -
127 127 127 127 127 127 127--1------ --- -- f---- 1--- --- 127 127 127 127 127 127 127 1----- 1---- 1---- ---
127 127 127 127 127 127 127
- ---I---- --- 1----- 1-- - t--
127 127 127 127 127 127 127-- I-- 1----1--- ---
127 127 127 127 127 127 127--- [----J- - - 127 127 127 127 127 127 127
--- -- --- - ----- -- --- t- 127 127 127 127 127 127 127 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
All Decimal Numbers Represent an 8-Bit Binary Value
IBM
IBMSYBtem/360 Aesumbler Coding Form PROGRAM TEST AND Cf/AN(j£ BIT STREAMS PUNCHiNG iNSTRUCTiONS PAGE OF I I ti t-FF --- .- GRAPHiC CARD ELECTRO NUMBER PROGRAMMER I DATE PUNCH T T STATEMENT Identification- Name Operation Operand Comments Sequence _+-"',18 _T_-.--T
2
=,5,--,-,--r-r=3.:;-0 --.--,,-,=35.-,-,-,-,4.:;-0 -c::-r-.-T----r=45'-r---,--.-- , __ 50 ___ _ _ ,Q.Q _ _ _ _ f-----l-'-7",3 -,--,,---,--_,-_, -i?O I?- T:_ 0 J'l Ii "t'19 , f- P Ii M 0 R L G I II POI W T i _ _ 1-1 B A L R I " , 0 _ I-- I-- __ I- 0 A P.c-: R E (j I S I- - I U S_ I II Cj *, / oS" D €f J II E 13 A S £ R. E <i 1 S- I B _ START START l'<iM DC F' 249' S;L8EAM I L ENg Ttf q 0 IV. S Iv C f=- -A ( S T R A M - I )_ 1 __ C 0 (II TAN TAD D R __ B L £1 1-__ 1_ D C X L 2 oS" 6 • - - - foO - - - • __ _ T RAN S ATE T A 'B L £. .§. T R. £ A;M i- _ D S· - 7 SO CST REA M- S TO 1( A q £. ARE A I - -- -- I .s: LA 7) -I-lc--}---I--l,L""-\ -'_ L I AR i&-0t-t---! LR I __ •. S(R EX BC
EXR f---f-I---+-Ih-I L 1- TRANSII-- AND r TR T
NI+1- +--t-- -- -1--- I -:- ----f---I--- - -1-- i- O,COi-1STI ( 1 C Q IV. 2 0) I t/,O t/,I j- 'I, TR.,4 N i 8 ,ouT Z)AND o , I I--- OU T LOOP -1-- I(,I),TABL£ SOO(I),O f-- f- -- - LGTH TO RO I-- S T M S TAR TAD D R - ITO -i-- E 1'112+- 0 F S T R £ A M -/ TOR 0 ENDI-0F STREAM -/IITO R'I LiN i H 0 F S T R
£ AMTO, R'II £ X E C (j T E T R TIN S T/ / I /
£NiD ..• 0 F 5 T R
£ A MBRA N C H . . £ X £ C (j T E A["lv I' I EN',Z)r-_.--.OF. STREAM. -I VS IT£_·.sT OuT LAST STREAM ITEM CONTiNUE I • rEiT HT STRW Z POSlf
ON I i- i I-- -1-- -- +- j- R I f f- ... 1- - - f-I---j- ._- f- -t--
POS -- I- .. Appendix A 131
(N
Translate and Test Table
o 2 3 4 5 6 7 8 9
In stream 1 locate the first nonzero bit of each byte.
corresponding bit position in stream 2 to zero.
byte translate-and-test table is constructed in storage
such that:
Byte from
Byte from 01xxxxxx
Byte from
fetches
fetches
fetches
fetches
fetches
fetches
fetches
fetches
11110111 from the table.
11111101 from the table. (25310)
11111110 from the table.
16
32
48
64
112
128
144
192
239 239 239
223 223 223
223 223 223
191 191 191
191 191 191
191 191 191
191 191 191
127 127 127
127 127 127
127 127 127
127 127 127
127 127 127
127 127 127
127 127 127
127 127 127
239 2392 39239239 239
223 2232 23223223 223
-
191 191 1 91 191 191 191
127 1271 27 127 127 127
127 1271 27127127 127
127 1271 27 127 127 127
127 1271 27 127 127 127
127 1271 27 127 127 127
---
191 191 191 191 191 191 191
---
127 127 127 127 127 127 127
127 127 127 127 127 127 127
- ---
127 127 127 127 127 127 127
127 127 127 127 127 127 127
--
All Decimal Numbers Represent an 8-Bit Binary Value
IBM
IBM
2
=,5,--,-,--r-r=3.:;-0
EX
NI
£ AM
£
£ A M
ON
P