View previous topic :: View next topic
|
Author |
Message |
Sahoo
New User
Joined: 08 Jun 2006 Posts: 53
|
|
|
|
What will the following OR Immediate instruction do?
OI WK4BTS+L'WK4BTS-1,X'F0' |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
It insures that the sign for the ZD field is a 'F' instead of the usual 'C'...... |
|
Back to top |
|
|
Sahoo
New User
Joined: 08 Jun 2006 Posts: 53
|
|
|
|
How is this L'WK4BTS-1 calculated |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Sahoo wrote: |
How is this L'WK4BTS-1 calculated |
That should read 'the length of WK4BTS minus one......
If WK4BTS was defined as a length of 9 characters at memory location 100, then
OI WK4BTS+L'WK4BTS-1,X'F0'
would translate as OI 100+9-1,X'F0'
111111111
000000000
012345678
000001234 the hex would be F0F0F0F0F0F0F1F2F3C4
Aand that C4 would be at memory location 100+9-1 or 108......and OI into a F4 so the display would be 000001234 rather than 00000123D....
Need more? |
|
Back to top |
|
|
manikawnth
New User
Joined: 07 Feb 2007 Posts: 61 Location: Mumbai
|
|
|
|
I think it is better to say like this:
The usual Zonal decimal format is converted to a character decimal,
as ZD cannot have a signed nibble 'F' |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
as ZD cannot have a signed nibble 'F' |
An "F" sign is treated as positive, just the same as a "C" sign. . . |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
From the PoOps
Chapter 8. Decimal Instructions
Decimal-Number Formats . . . . . . . . . . . 8-1
Zoned Format . . . . . . . . . . . . . . . . 8-1
.
.
.
Zoned Format
In the zoned format, the rightmost four bits of a byte are called the numeric bits (N) and normally consist of a code representing a decimal digit. The leftmost four bits of a byte are called the zone bits (Z), except for the rightmost byte of a decimal operand, where these bits may be treated either as a zone or as a sign (S).
Appendix A. Number Representation and Instruction-Use Examples
Decimal Integers . . . . . . . . . . . . . . . A-4
.
.
.
The following are some examples of decimal integers shown in hexadecimal notation:
Code: |
Decimal Value Packed Format Zoned Format
+123 12 3C F1 F2 C3
or or
12 3F F1 F2 F3 |
|
|
Back to top |
|
|
|