Re: Friday puzzle: CNOP 1,2

2016-08-23 Thread Paul Gilmartin
On 2016-08-23, at 10:21, Ngan, Robert wrote: > Hmm, there's always something new to learn with the assembler. I've never > encountered the boundary and offset operands of ORG. That's useful to know > for future coding. > The only thing that ORG doesn't do vs. DC is emit the potential filler

Re: Friday puzzle: CNOP 1,2

2016-08-23 Thread Ngan, Robert
an issue we should be concerned about? -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Jonathan Scott Sent: Tuesday, August 23, 2016 05:36 To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Friday puzzle: CNOP 1,2 Ref: Your note

Re: Friday puzzle: CNOP 1,2

2016-08-23 Thread Lifshitz, Michael
Thanks Jonathan. Correct. The error of mine... -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Jonathan Scott Sent: Tuesday, August 23, 2016 1:36 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Friday puzzle: CNOP 1,2 Ref

Re: Friday puzzle: CNOP 1,2

2016-08-23 Thread Jonathan Scott
Ref: Your note of Tue, 23 Aug 2016 10:52:13 +0100 OK, I've spotted why I used the more complex format: ORG*+,, instead of ORG*-,, If you use the simpler form too close to the start of a section, so that the first operand goes negative, you get an error: ASMA038S

Re: Friday puzzle: CNOP 1,2

2016-08-23 Thread Jonathan Scott
Ref: Your note of Tue, 23 Aug 2016 09:43:14 + Michael Lifshitz wrote: > Jonathan, isn't it the same as > > ORG *-,, > > ? Yes, I'd have thought that your simpler form would have exactly the same effect as the form in my old ALIGN macro: ORG*+,, My macro appears to date

Re: Friday puzzle: CNOP 1,2

2016-08-23 Thread Lifshitz, Michael
Jonathan, isn't it the same as ORG *-,, ? -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Jonathan Scott Sent: Tuesday, August 23, 2016 12:25 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Friday puzzle: CNOP 1,2

Re: Friday puzzle: CNOP 1,2

2016-08-23 Thread Jonathan Scott
I have the following macro lying around which I presume I wrote to solve this problem. I leave whether it is correct or not as an exercise for the reader (as it appears I never used it). MACRO ALIGN , ORG *+,, DS0X MEND Jonathan Scott IBM Hursley, UK

Re: Friday puzzle: CNOP 1,2

2016-08-23 Thread John P. Hartmann
John, the point of this puzzle is how to avoid a wasted halfword; hence Friday. Though, equally one could argue that HLASM has a design bug here: 001 dc x'00' 00010001 0003 2 ORG *,2,1 Had it done things right,

Re: Friday puzzle: CNOP 1,2

2016-08-22 Thread John Dravnieks
ubject: Re: Friday puzzle: CNOP 1,2 Sent by:IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> Won't this possibly overlay the previous field if the ORG happens to land on a half-word boundary? Maybe a set of ORGs: ORG *+1 ORG *,2,-1 Tony Thigpen Jo

Re: Friday puzzle: CNOP 1,2

2016-08-22 Thread Tony Thigpen
take current position (*), align to 2 byte boundary (if required), and move back one byte Kind Regards John R Dravnieks From: "Ngan, Robert" <rn...@csc.com> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Date: 23/08/2016 03:03 Subject: Re: Friday puzzle: CNOP 1,2 Sen

Re: Friday puzzle: CNOP 1,2

2016-08-22 Thread John Dravnieks
ERV.UGA.EDU Date: 23/08/2016 03:03 Subject: Re: Friday puzzle: CNOP 1,2 Sent by:IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> I was trying to avoid generating an extra filler byte when one was not required. -Original Message- From: IBM Ma

Re: Friday puzzle: CNOP 1,2

2016-08-22 Thread Ngan, Robert
: Friday puzzle: CNOP 1,2 From: "Ngan, Robert" <rn...@csc.com> Sent: Saturday, August 20, 2016 4:47 AM I'm writing a macro to build length prefixed character strings. The length is one byte, and the actual string is referenced by LARL so it needs to be halfword aligned. So I c

Re: Friday puzzle: CNOP 1,2

2016-08-22 Thread Ngan, Robert
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Friday puzzle: CNOP 1,2 On 2016-08-19 16:01, Ngan, Robert wrote: > I wanted the length aligned on the odd byte, so the immediately following > (labeled) string was on a halfword boundary and could therefore be referenced > using a LARL. &g

Re: Friday puzzle: CNOP 1,2

2016-08-19 Thread Robin Vowels
From: "Ngan, Robert" Sent: Saturday, August 20, 2016 4:47 AM I'm writing a macro to build length prefixed character strings. The length is one byte, and the actual string is referenced by LARL so it needs to be halfword aligned. So I coded (what would be a CNOP 1,2 - if it

Re: Friday puzzle: CNOP 1,2

2016-08-19 Thread Paul Gilmartin
On 2016-08-19 16:01, Ngan, Robert wrote: > I wanted the length aligned on the odd byte, so the immediately following > (labeled) string was on a halfword boundary and could therefore be referenced > using a LARL. > How about: DSCAllow at least one byte DS0H

Re: Friday puzzle: CNOP 1,2

2016-08-19 Thread Ngan, Robert
[mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Tony Harminc Sent: Friday, August 19, 2016 15:31 To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Friday puzzle: CNOP 1,2 On 19 August 2016 at 14:47, Ngan, Robert <rn...@csc.com> wrote: > I'm writing a macro to build length prefixed characte

Re: Friday puzzle: CNOP 1,2

2016-08-19 Thread Tony Harminc
On 19 August 2016 at 14:47, Ngan, Robert wrote: > I'm writing a macro to build length prefixed character strings. The length is one byte, and the actual string is referenced by LARL so it needs to be halfword aligned. The string needs to be halfword aligned, or the length byte

Re: Friday puzzle: CNOP 1,2

2016-08-19 Thread Ed Jaffe
On 8/19/2016 11:47 AM, Ngan, Robert wrote: Yes, I could use LAY instead of LARL LAY requires base register coverage, so it's not really an acceptable substitute for LARL. , or I could use an aligned halfword length (which is what I've ended up doing for now). We pretty much always code

Friday puzzle: CNOP 1,2

2016-08-19 Thread Ngan, Robert
I'm writing a macro to build length prefixed character strings. The length is one byte, and the actual string is referenced by LARL so it needs to be halfword aligned. So I coded (what would be a CNOP 1,2 - if it was valid): DC(1-(*-)/2)X'00' Simulate a CNOP 1,2 However, this