|
From: <Gene_Gaunt/ReviewWorks@reviewworks.com> > Now this is getting interesting. > > DCL DD A(8) AUTO CHAR(4) INIT((8) X"FFFFFFFF"); > AND(S) A(1), H"1"; > AND(S) A(2), H"12"; > AND(S) A(3), H"123"; > AND(S) A(4), H"1234"; > AND(S) A(5), H"12345"; > AND(S) A(6), H"123456"; > AND(S) A(7), H"1234567"; > AND(S) A(8), H"12345678"; > BRK "LOOK"; > PEND; > > STRDBG > ADDBKP LOOK PGMVAR(A) OUTFMT(*HEX) > > 1: 01000000 > 2: 12000000 > 3: 23000000 > 4: 34000000 > 5: 00012345 > 6: 00123456 > 7: 01234567 > 8: 12345678 If you replace AND(S) with CPYBLA, you get 1 01FFFFFF 2 12FFFFFF 3 23FFFFFF 4 34FFFFFF 5 00012345 6 00123456 7 01234567 8 12345678 This clearly shows that *both* AND and CPYBLA suffer the same problem (that only the low-order byte is used for H literals 4 hex-digits or shorter). Thus that the problem is with the H literal rather than with the instructions. Note, also the (correct) difference between CPYBLA A(6), H'123456' = 00123456 and CPYBLA A(6), X'123456' = 123456FF So, don't just blindly replace H with X. +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.