On Tue, Feb 18, 2014 at 12:41 PM, John Gilmore <[email protected]> wrote:
> John [McKown]: > > The answer to the OP's question depends upon whether the length n > under discussion is a length in bytes, as it is and must be in XLn, or > a length in bits. > True. I assumed the length was in bits. I also assumed, due to the use of the word "stores" and "opened or closed". that the ITMAP was, in reality, being used as a bit string, with 8 bits in each byte, with each "bit" representing a "store". With '1'B meaning "store open" and '0'B meaning "store closed". I did not state, but also assumed that ITMLEN in fact contained the number of stores in total, and so was the number of bits used in the actual data item. I guess I should have explicitly stated this in my original message. > > If the former XL2 is sufficient for either +12500 or unsigned 12500. > If the latter a fullword will be required because 100000 is greater > than either 32767 or 65535. > > Since, however, the storage is being declared/allocated in bytes, it > seems clear to me that the length is/ought to be expressed in bytes > too. I do not see much rationale for your different view in this > particular context. > In my view, ITMAP most likely should have been defined as a BL1250 instead of a XL1250. But lengths in HLASM are always in bytes. The z can't allocate a single bit in the hardware as a independently addressable value. I haven't seen many programs which use the B (Binary). I do see a lot of A(), F'..', H'..',XL'..', and C'..' > > Note also that your expression for the capacity of a signed halfword > is slightly wrong. Because twos-complement representations are > used--Zero is its own twos complement--these limits are not > symmetrical. They are > > -2^15 <= H <= +2^15 - 1 > -32768 <= H <= +32767. > Did you ever have your fingers type the wrong word out of habit when you meant to write a similar word? That's what happened to me with the -32_767 instead of -32_768. Muscle memory got me. > > John Gilmore, Ashland, MA 01721 - USA > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- Wasn't there something about a PASCAL programmer knowing the value of everything and the Wirth of nothing? Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
