Re: Rules for Zoned Overpunch
On 2022-02-13 12:21, Seymour J Metz wrote: Why not CVB/LTR/BC? Nice suggestion, but it's a huge sledgehammer! Shmuel (Seymour J.) Metz From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Paul Gilmartin [0014e0e4a59b-dmarc-requ...@listserv.uga.edu] Sent: Friday, February 11, 2022 1:14 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Rules for Zoned Overpunch 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 classes -- positive and negative? How about CVB then CVD, then compare the result to the original? -- gil
Re: Rules for Zoned Overpunch
On 2/11/2022 10:00 AM, 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 classes -- positive and negative? Shortest? Who knows? | LLC Rx,LASTBYTE Get last byte | SRL Rx,4 Isolate sign.. | NILL Rx,X'0007' ..to last 3 bits | LA Rx,=C'?? - - '(Rx) Point to sign char | MVC SIGNCHAR,0(Rx) Set appropriate sign or '?' -- Phoenix Software International Edward E. Jaffe 831 Parkview Drive North El Segundo, CA 90245 https://www.phoenixsoftware.com/ This e-mail message, including any attachments, appended messages and the information contained therein, is for the sole use of the intended recipient(s). If you are not an intended recipient or have otherwise received this email message in error, any use, dissemination, distribution, review, storage or copying of this e-mail message and the information contained therein is strictly prohibited. If you are not an intended recipient, please contact the sender by reply e-mail and destroy all copies of this email message and do not otherwise utilize or retain this email message or any or all of the information contained therein. Although this email message and any attachments or appended messages are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the sender for any loss or damage arising in any way from its opening or use.
Re: Rules for Zoned Overpunch
You could use TRT to test the last byte, after some tedious coding of the table. N.B. I mean using the table codes to identify +/0/-/invalid; not just the 0/non-0 typical use. You could PACK the field, or just the last byte (which is just a nibble-swap), and CP to =P'0'. The cond. code tells you what you want to know. You could also use AP =P'0', which returns the same cond. code, but also normalizes the sign... but only in your test field, of course. Or, you could use IF TM,lastByte,B'',O It's + F (or not signed, if you like that interpretation) ELSEIF TM,lastByte,B'0001',O It's - B or D ELSE It's + A, C, or E ENDIF Note that this is a pure sign check, i.e. 0 is not special. The last is more instructions, but I'd guess that it would perform the best if that matters. sas On Fri, Feb 11, 2022 at 1:01 PM 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 classes -- positive and negative? > >
Re: Rules for Zoned Overpunch
On Feb 12, 2022, at 18:47:45, Seymour J Metz wrote: > > I read "validate these into just two classes" as validate that the zone - not > 0-9 and transform A-F appropriately into either C or D. > How about Compare Packed to a packed zero? But doesn't "just two classes" overlook a third class, that number which is neither positive nor negative? > > From: Paul Gilmartin [0014e0e4a59b-dmarc-requ...@listserv.uga.edu] > Sent: Saturday, February 12, 2022 8:40 PM > > On Feb 12, 2022, at 18:21:59, Seymour J Metz wrote: >> >> Why not CVB/LTR/BC? >> > It appears that the OP wants to "validate"; detect and > report the non-modal sign codes. > >> >> >> 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 classes -- positive and negative? -- gil
Re: Rules for Zoned Overpunch
I read "validate these into just two classes" as validate that the zone - not 0-9 and transform A-F appropriately into either C or D. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Paul Gilmartin [0014e0e4a59b-dmarc-requ...@listserv.uga.edu] Sent: Saturday, February 12, 2022 8:40 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Rules for Zoned Overpunch On Feb 12, 2022, at 18:21:59, Seymour J Metz wrote: > > Why not CVB/LTR/BC? > It appears that the OP wants to "validate"; detect and report the non-modal sign codes. If the original is zoned it might require: PACK; CVB; CVD; UNPK; CLC > > From: Paul Gilmartin > Sent: Friday, February 11, 2022 1:14 PM > > 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 classes -- positive and negative? >> > How about CVB then CVD, then compare the result to the original? -- gil
Re: Rules for Zoned Overpunch
On Feb 12, 2022, at 18:21:59, Seymour J Metz wrote: > > Why not CVB/LTR/BC? > It appears that the OP wants to "validate"; detect and report the non-modal sign codes. If the original is zoned it might require: PACK; CVB; CVD; UNPK; CLC > > From: Paul Gilmartin > Sent: Friday, February 11, 2022 1:14 PM > > 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 classes -- positive and negative? >> > How about CVB then CVD, then compare the result to the original? -- gil
Re: Rules for Zoned Overpunch
Why not CVB/LTR/BC? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Paul Gilmartin [0014e0e4a59b-dmarc-requ...@listserv.uga.edu] Sent: Friday, February 11, 2022 1:14 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Rules for Zoned Overpunch 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 classes -- positive and negative? > How about CVB then CVD, then compare the result to the original? -- gil
Re: Executing a ZAP Instruction
On Sat, 12 Feb 2022 at 05:02, Bernd Oppolzer wrote: [...] > The "skeleton instruction" for EX looks like this > > SKEL PACK TARGET(16),SOURCE(0) > > that is, it (internally) has length bytes 15 and zero (external L2 of zero > translates to zero, same as external L2 of one; but zero looks better, > showing that the real length will come from EX). You can also use the pattern *-*, which is of course zero, but has been used for decades as an eyecatcher showing that something will be plugged in here (whether by EXecute or some other means). SKEL PACK TARGET(16),SOURCE(*-*) Tony H.
Re: Executing a ZAP Instruction
Am 11.02.2022 um 23:03 schrieb 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 data. Sorry for jumping into this thread so late - if the source number is in char format and the target is packed, you should use PACK, not ZAP The "skeleton instruction" for EX looks like this SKEL PACK TARGET(16),SOURCE(0) that is, it (internally) has length bytes 15 and zero (external L2 of zero translates to zero, same as external L2 of one; but zero looks better, showing that the real length will come from EX). then you put the real length into a register, say R3, like this: LA R3,length BCTR R3,0 subtract 1 from R3 EX R3,SKEL EX combines the content of R3 with the second byte of the skeleton instruction using OR (it does not "replace" it, as you write below). HTH Kind regards Bernd The normal EXecute (ORs but effectively) replaces bits 8 to 15 of the target instruction with bits 56 to 63 of general register R1. But a ZAP instruction has an L1 field in bits 8 to 11 of the instruction and an L2 field in bits 12 to 15 of the instruction. Does that mean ZAP can't be EXecuted? Do I have to clear and align my variable-length character data in my 16-byte packed work field myself? Or is it feasible to manipulate the content of general register R1 so that bits 56 to 63 contain the correct L1 and L2 values? Sincerely, Dave Clark