Re: Executing a ZAP Instruction

2022-02-11 Thread Pieter Wiid
Actually, if the target field is always 16 bytes, you can do ZAP_IT ZAP PWORK16(16),0(0,r1) That eliminates the need for the first LHI -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Dave Clark Sent: Saturday, 12 February 2022

Re: Executing a ZAP Instruction

2022-02-11 Thread Robin Vowels
From: "Dave Clark" Sent: Saturday, February 12, 2022 9:44 AM "IBM Mainframe Assembler List" wrote on 02/11/2022 05:27:48 PM: Thanks, we'll see how this works. ;-) ZAP_IT ZAP PWORK16(0),0(0,R1) (SEE EXECUTE INSTRUCTION BELOW) ...snip... LHI R2,15*16

Re: Executing a ZAP Instruction

2022-02-11 Thread Robin Vowels
- Original Message - From: "Charles Mills" Sent: Saturday, February 12, 2022 9:27 AM EX is independent of the format of the target instruction. You can EX anything (except EX). It just plugs that second byte of the target instruction. You can EX an LR and vary which registers get

Re: Executing a ZAP Instruction

2022-02-11 Thread Robin Vowels
- Original Message - From: "Dave Clark" To: Sent: Saturday, February 12, 2022 9:03 AM How do (can?) you EXecute a ZAP instruction? I have a packed number in plain character format that can vary in length from 1 to 16 bytes. I need to move that into a 16-byte formal packed

Re: Rules for Zoned Overpunch

2022-02-11 Thread Robin Vowels
- Original Message - From: "Dave Clark" To: Sent: Saturday, February 12, 2022 5:00 AM Subject: Rules for Zoned Overpunch I know that x'F1' and x'C1' are positive and that x'D1' is negative. But what if I find x'A1', x'B1', or x'E1' for overpunch values? What is the shortest

Re: Rules for Zoned Overpunch

2022-02-11 Thread Gary Weinhold
For the decimal point, one normally just has different edit patterns for each different number of positions to the right of the decimal point.  And usually the edit pattern will set the significance indicator to the left of the decimal point so the decimal portion is zero-filled. On 2022-02-11

Re: Executing a ZAP Instruction

2022-02-11 Thread Kerry Liles
I presume you are pointing out that ZAP does NOT actually PACK anything that it is given*... of course one can EX the UNPK instruction. *duh I say, but some might be surprised I suppose. On Fri, 11 Feb 2022 at 18:00, Tom Marchant < 00a69b48f3bb-dmarc-requ...@listserv.uga.edu> wrote: > On

Re: Executing a ZAP Instruction

2022-02-11 Thread Ngan, Robert (DXC Luxoft)
Before the advent of the COMPARE AND TRAP type instructions, we all use to use EX Rnn,* to force a S0C3 abend for "this should never happen" conditions. But with baseless code, if you change EX Rnn,* to EXRL Rnn,* then you may not get your expected S0C3 when Rnn is a register other than zero.

Re: Executing a ZAP Instruction

2022-02-11 Thread Charles Mills
Meaning what? You can't EX a PACK instruction? Are you absolutely certain of that? I think you can EX anything except an EX/EXR. Charles -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Tom Marchant Sent: Friday, February 11,

Re: Executing a ZAP Instruction

2022-02-11 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/11/2022 06:13:52 PM: > As others have mentioned, you can roll both the L1 and L2 into the reg > you are using to OR into the ZAP instruction. > > But, remember, this is an OR, not a store. If one of your lengths is a > constant, while the other is a

Re: Executing a ZAP Instruction

2022-02-11 Thread Tony Thigpen
As others have mentioned, you can roll both the L1 and L2 into the reg you are using to OR into the ZAP instruction. But, remember, this is an OR, not a store. If one of your lengths is a constant, while the other is a variable, then you only need to fill one of the lengths into the reg.

Re: Executing a ZAP Instruction

2022-02-11 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/11/2022 06:00:02 PM: > Yes, you can EXecute a ZAP instruction. But, you can't use it to PACK Why not? ZAP and PACK are the exact same format instructions (SS-b). Sincerely, Dave Clark -- int.ext: 91078 direct: (937) 531-6378 home: (937)

Re: Executing a ZAP Instruction

2022-02-11 Thread Tom Marchant
On Fri, 11 Feb 2022 17:03:09 -0500, Dave Clark wrote: > Does that mean ZAP can't be EXecuted? Yes, you can EXecute a ZAP instruction. But, you can't use it to PACK -- Tom Marchant

Re: Executing a ZAP Instruction

2022-02-11 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/11/2022 05:27:48 PM: > ZAP has L1/L2 so you want to load your EX register with (L1 * 16) + L2 > (where L1 and L2 are base 0, and a shift might be a better choice than an > actual multiply). Thanks, we'll see how this works. ;-) ZAP_IT

Re: Executing a ZAP Instruction

2022-02-11 Thread Charles Mills
EX is independent of the format of the target instruction. You can EX anything (except EX). It just plugs that second byte of the target instruction. You can EX an LR and vary which registers get copied. ZAP has L1/L2 so you want to load your EX register with (L1 * 16) + L2 (where L1 and L2 are

Re: Rules for Zoned Overpunch

2022-02-11 Thread Charles Mills
I am talking off the top of my head here. I have not used PACK and friends in years. Yes, there are length limitations. Pack is limited to 16 bytes and EDIT to 256 bytes of output. I am not familiar with PKA. CVB is not real relevant. Forget I said that. Well, it would help answer your sign

Executing a ZAP Instruction

2022-02-11 Thread Dave Clark
How do (can?) you EXecute a ZAP instruction? I have a packed number in plain character format that can vary in length from 1 to 16 bytes. I need to move that into a 16-byte formal packed work field in order to make the variable-length character data into recognizable packed-decimal

Re: Branch-and-Link nomenclature question

2022-02-11 Thread Bob Raicer
The notion of whether some of these linkage instructions could be thought of as "save" and "then branch" is interesting and hasn't changed since the introduction of the S/360. The fundamental concept is that as a part of normal instruction sequencing, the addressing information found in the PSW

Re: Rules for Zoned Overpunch

2022-02-11 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/11/2022 02:24:38 PM: > Doesn't PACK + CVB + EDMK pretty much just do this for you? Well, in the first place I am allowing the incoming zoned-decimal field to be up to 31 bytes. PACK won't handle that -- although that is not insurmountable

Re: Rules for Zoned Overpunch

2022-02-11 Thread Charles Mills
Doesn't PACK + CVB + EDMK pretty much just do this for you? Charles -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Dave Clark Sent: Friday, February 11, 2022 11:16 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Rules for

Re: Rules for Zoned Overpunch

2022-02-11 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/11/2022 01:40:42 PM: > What do you want to do if it is /not/ FACEBD? I'm asking this question because I have to turn an ostensibly zoned-decimal field with an internal right sign (an "overpunch") into a string of digits with an external left

Re: Rules for Zoned Overpunch

2022-02-11 Thread Schmitt, Michael
What do you want to do if it is /not/ FACEBD? Also, while the machine instructions consider F to be positive, IBM COBOL since VS COBOL II really wants 3 signs: F, C, D, where F is UNSIGNED. So it does make a difference when a packed or zoned field is being returned from an assembler program;

Re: Rules for Zoned Overpunch

2022-02-11 Thread Paul Gilmartin
On Feb 11, 2022, at 11:00:58, Dave Clark wrote: > >I know that x'F1' and x'C1' are positive and that x'D1' is > negative. But what if I find x'A1', x'B1', or x'E1' for overpunch values? > What is the shortest way (in terms of assembler instructions) to validate > these into just two

Re: Hexadecimal display using vector instructions

2022-02-11 Thread Steve Smith
I finally got a chance to walk thru these with XDC. Brilliant work! I guess I'm going to have to find some time to learn how to do some vectoring myself. These routines are a big help. Thank-you! sas On Tue, Feb 1, 2022 at 6:10 PM Ngan, Robert (DXC Luxoft) < robert.n...@dxc.com> wrote: > I