BTDT already. Try the attached Rexx (genoptbl.txt) (at least I hope it gets
attached -- I will paste it into a new reply if it doesn't make it to the list).
Peter
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Charles Mills
> Sent: Tuesday, March 06, 2012 10:04 AM
> To: [email protected]
> Subject: Re: Good source for relationship of opcodes, models, MACHINE()
> and ARCH()
>
> This was bugging me so I got a start on a document. I have a table now
> (with some question marks in it) that correlates Model numbers, the HLASM
> MACHINE() option, and the XL C/C++ ARCH() option, and also the Enterprise
> PL/I option ARCH() which (believe it or not!!!) is apparently exactly
> equivalent to that of C/C++.
>
> I had the bright idea that I could run assemblies with MACHINE(xxx,LIST)
> at the various levels and then use ISPF 3.12 to determine the differences
> as the level changed, but HLASM prints the opcode list in a three-column
> format, so nearly every line changes from one level to the next. I have
> not yet come up with an approach other than using some tool to make each
> list into a single column -- but that's more work than I wanted to take on
> this morning.
>
> Charles
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Charles Mills
> Sent: Monday, March 05, 2012 7:02 PM
> To: [email protected]
> Subject: Re: Good source for relationship of opcodes, models, MACHINE()
> and ARCH()
>
> Thanks. Good list. IBM Canada does some cool stuff.
>
> Sheesh! Add G-levels to MACHINE() and ARCH() levels.
>
> All the information is out there. I could do a document that answered
> these questions if I didn't already have a day job.
--
This message and any attachments are intended only for the use of the addressee
and may contain information that is privileged and confidential. If the reader
of the message is not the intended recipient or an authorized representative of
the intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail and delete the message and any
attachments from your system.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
/* REXX */
/* Procedure to read HLASM OPTABLE(type,LIST) output listing */
/* and generate a table of opcodes in a single column */
/* with opcodes also converted to decimal for sorting needs */
/* */
/* Input from SYSUT1 and output to SYSUT2 */
arg dbg .
if ((dbg = '') | (verify(dbg,'0123456789') > 0)) then dbg = 0
else dbg = dbg + 0
address TSO
select
when dbg = 1 then trace r
when dbg > 1 then trace i
otherwise trace o
end
/* Read in the entire OPTABLE listing */
'EXECIO * DISKR SYSUT1 (STEM LINE.'
if RC <> 0 then LINE.0 = 0
'EXECIO 0 DISKR SYSUT1 (FINIS'
if dbg > 0 then do
say 'GENOPTBL: LINE.0='LINE.0
end
intbl = 0
INST. = ''
INST.0 = 0
do lx = 2 to LINE.0
wd1 = word(LINE.lx, 1)
pfl = left(LINE.lx, 1)
if (intbl = 0) & (wd1 = '0Mnemonic') then do
intbl = 1
iterate lx
end
if (pfl = '1') & ,
(pos('Operation Code Table Contents', LINE.lx) = 0) then leave lx
if (intbl = 1) & (pfl = '1') then do
intbl = 0
iterate lx
end
if (intbl = 0) then iterate lx
if (pfl = '0') then LINE.lx = ' 'substr(LINE.lx, 2)
do lc = 2 to 122 by 40
icolm = substr(LINE.lx, lc, 40)
icw = words(icolm)
cw2 = word(icolm, 2)
if (icw = 0) | (cw2 = 'HLASM') then iterate lc
cw3 = word(icolm, 3)
op1d = right(x2d(left(cw3, 2)), 3, '0')
if length(cw3) = 4 then do
op2d1 = substr(cw3, 3, 1)
if op2d1 = '.' then op2d1 = ' '
else op2d1 = right(x2d(op2d1), 2, '0')
op2d2 = substr(cw3, 4, 1)
if op2d2 = '.' then op2d2 = ' '
else op2d2 = right(x2d(op2d2), 2, '0')
end
else do
op2d1 = ' '
op2d2 = ' '
end
icolm = substr(icolm, 1, 19) op1d op2d1 op2d2 substr(icolm, 20)
ix = INST.0 + 1
INST.ix = ' 'icolm
INST.0 = ix
end
end
/* Write the 1-column instruction lines to output */
'EXECIO' INST.0 'DISKW SYSUT2 (STEM INST.'
'EXECIO 0 DISKW SYSUT2 (FINIS'
exit
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN