× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




On 06/03/2010, at 6:10 AM, Richard Thomas wrote:

I can't thank you enough for your help. I'll let you know how I get along.

Perhaps this will help:

QPROCT Space: x'19DA'

Header section: 0 to x'465'. Consists of 2-byte values.

The number of non-x'ffff' entries in the header equals the number of x'ffff' entries in the body therefore the number of non-x'ffff' entries in the header plus the number of non-x'ffff' entries in the body equals the total number of MI instructions in the table. I note that some non-x'ffff' values are different between releases prior to 540 and 540 onwards. I do not yet know what these values mean nor why they are different.

Body section:
CHAR(8) op-code name
CHAR(2) op-code number
CHAR(3) flags
CHAR(1) optional instruction forms
CHAR(2) possibly resulting condition information
BIN(2) required parameters
CHAR(2) unknown but related to header information. Non-x'ffff' values appear to be an increasing sequence. Each x'ffff' value has a corresponding non-x'ffff' entry in the header but I haven't determined the relationship yet.

Byte 1 of the flags field appears to be:
Bits 0-3: Reserved
Bit 4: Only branch or indicator forms
Bit 5: Branch or Indicator form
Bit 6: Round form
Bit 7: Short form

Bytes 2 and 3 of the flags field are unknown. My guess is they specify resulting conditions but there is as yet no obvious pattern and I don't know why bytes 2 and 3 are the same values for every instruction (e.g. x'04D2D2', x'049292', x'0C5050') except for SIGEXCP (x'045000')

Unblocked MI instructions occupy the first 230 entries. Blocked instructions follow. On 540 and above blocked instructions have been removed (table ends at entry 230) and any corresponding header slots are set to x'ffff'.


QPRODT Index: x'0ECB'
BIN(2) op-code number: This is the index key.
BIN(2) required parameters
CHAR(6) DIM(15) Parameter detail

Information in the parameter detail array is varying length. That is a given parameter may use any number of entries. Parameter groups are separated by a x'000000000000' entry. Each array entry is a set of bits with the following meanings:

Byte 1
Bit 0 = Variable
Bit 1 = Pointer
Bit 2 = Branch Point
Bit 3 = Internal Entry Point
Bit 4 = Instruction Definition List
Bit 5 = Operand List
Bit 6 = Exception Description
Bit 7 = Constant
Byte 2
Bit 0 = Null operand
Bit 1 = Unsigned immediate value
Bit 2 = Signed immediate value
Bit 3 = Array
Bit 4 = Scalar
Bit 6 = Binary
Bit 7 = Floating-point
Byte 3
Bit 0 = Packed Decimal
Bit 1 = Zoned Decimal
Bit 2 = Character
Bit 3 = Other numeric?
Bit 4 = Reserved?
Bit 5 = Numeric
Bit 7 = Machine space pointer
Byte 4
Bit 0 = Signed
Bit 1 = Unsigned
Bits 2-7 = Reserved

Bytes 5 & 6 (2-byte signed binary)
Length: Positive 1,2,4,8 for some binary and character types
Negative (possibly two's complement) for specific-length character scalar values

There's something niggling at the back of my head about negative lengths but I can't resolve it and can't find any documentation to remind me or answer the itch.

Byte 3, bit 3 is a different form of numeric from byte 3, bit 5. Not sure of the actual difference but it's only used on CVTEFN, DIVREM, and REM.

So there you have it for whatever it's worth. Corrections and additions gratefully received.

Here are some examples:

Show Operation Code Table
System: GRYPHON
Object . . . . . . : QPROCT Object type . . . . : *PROCT
Library . . . . : QSYS Internal type . . . : 19DA

Type options, press Enter.
5=Display operand information

-Instruction-- Optional
Opt Seq Name Code Flags Forms Conditions Parms Unknown B
_ 41 CPYBTL 101C 000000 4 FFFF N
_ 42 CPYECLAP 1053 000000 3 FFFF N
_ 43 CPYHEXNN 1092 000000 2 FFFF N
_ 44 CPYHEXNZ 1096 000000 2 FFFF N
_ 45 CPYHEXZN 109A 000000 2 FFFF N
_ 46 CPYHEXZZ 109E 000000 2 FFFF N
_ 47 CPYNV 1042 06D2D2 B|I,R 2 FFFF N
_ 48 DIV 104F 07D2D2 B|I,S,R 3 0026 N
_ 49 DIVREM 1074 07D2D2 B|I,S,R 4 FFFF N
_ 50 ECSCAN 10D4 049292 B|I 4 FFFF N
More ...
F3=Exit F5=Refresh F12=Cancel F13=Repeat
F16=Sort by Sequence F17=Sort by Name F18=Sort by Code F19=Sort by Flags




Show Operand Description Table Entry

Op-Code . . . . . . . : CPYBTA Copy Bits Arithmetic
Hex . . . . . . . . . : 102C Required parameters . . . . : 4

Operand 1 . . : 800804000000 NUMERIC VARIABLE SCALAR
800820000000 CHARACTER VARIABLE SCALAR
400000000000 POINTER
Operand 2 . . : 800804000000 NUMERIC VARIABLE SCALAR
800820000000 CHARACTER VARIABLE SCALAR
010004000000 CONSTANT NUMERIC
010020000000 CONSTANT CHARACTER
400000000000 POINTER
Operand 3 . . : 004000000000 UNSIGNED IMMEDIATE
002000000000 SIGNED IMMEDIATE
Operand 4 . . : 004000000000 UNSIGNED IMMEDIATE
002000000000 SIGNED IMMEDIATE



Press Enter to continue.

F3=Exit F12=Cancel


Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.