Re: QPROCT and QPRODT

Gene_Gaunt-GDFlLPZ4eRKEK/[email protected] Fri, 5 Mar 2010 09:30:18 -0500
Newsgroups gmane.comp.lang.as400.mi
Message-ID <OF57B8EAEF.496AF80E-ON852576DD.004B08B2-852576DD.004FAD96@reviewworks.com>
> I'm in the process of writing a routine to parse the
> instruction stream component of an OPM program and
> return the IRP. I'm hoping to use the information
> within QPROCT and QPRODT to help my routine anticipate
> the number of operands, operand types etc. for a given
> op code. I've been able to determine the easy parts
> (e.g. op code, op name, number of parameters) from a
> part of the QPROCT space, but am at a loss as to what
> an op code's associated entry in the QPRODT index is
> telling me.
>
> Can anyone throw some light on any of the information
> contained in these two objects?
>
> Many thanks.


Here is how to read those QPRODT index entries into your MI disassembler
project.  Break each 94-byte index entry into two 2-byte chunks and fifteen
6-byte chunks, and PRINT them in this order:

00  01
02  03
04  05  06  07  08  09
0A  0B  0C  0D  0E  0F
10  11  12  13  14  15
16  17  18  19  1A  1B
1C  1D  1E  1F  20  21
22  23  24  25  26  27
28  29  2A  2B  2C  2D
2E  2F  30  31  32  33
34  35  36  37  38  39
3A  3B  3C  3D  3E  3F
40  41  42  43  44  45
46  47  48  49  4A  4B
4C  4D  4E  4F  50  51
52  53  54  55  56  57
58  59  5A  5B  5C  5D

Study the PRINT-OUT this way, you'll have an Aha! moment and will see the
choice pool of operand types and lengths.

_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.