The format of LHH is LHH R1,D2(X2,B2). What you get is the halfword at address 2.
Mikael Nyström Core Ledger SEB Phone: +46 70 739 48 55 Switchboard: +46 771 62 10 00 Postal Address: A-B9, SE-106 40 Stockholm, Sweden Office Address: Stjarntorget 4 E-mail: mikael.nyst...@seb.se www.seb.se Please consider the environment before printing this e-mail CONFIDENTIALITY NOTICE This e-mail is confidential and may contain legally privileged information. If you have received it by mistake, please inform us by reply e-mail and then delete it (including any attachments) from your system; you should not copy it or in any other way disclose its content to anyone. E-mail is susceptible to data corruption, interception, unauthorised amendment, tampering and virus. We do not accept liability for any such actions or the consequences thereof. -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Peter Bishop Sent: den 5 juni 2019 06:30 To: IBM-MAIN@LISTSERV.UA.EDU Subject: LHH oddity This may be better posted elsewhere but I thought I'd start here. Here's the code running on a model 2828, hopefully it formats OK. This is just a very basic test and not intended for production, just to try and experiment with some new instructions. BASR 12,0 USING *,12 open (sysprint,OUTPUT) open the dump file snap dcb=sysprint,id=1, + PDATA=(REGS,PSW) lhi 7,256 llihf 8,256 sr 9,9 lhh 9,2 snap dcb=sysprint,id=2, + PDATA=(REGS,PSW) close sysprint BR 14 return drop 12 SYSPRINT dcb ddname=SYSPRINT, + dsorg=PS,recfm=VBA,macrf=(W),blksize=1632,lrecl=125 The question is: why does the LHH never get executed? I tried using MACHINE(ZS-6) but it still somehow goes from the SR straight to the SNAP. I was expecting an operation exception if the opcode was invalid, or an access exception if I didn't have addressability to the second operand. I even single-stepped with Xpediter, which stepped right past the LHH as if it wasn't there. The SNAPs before and after show registers 7 and 8 as expected, but not 9 which remains all zeroes. Obviously I've failed to understand something very basic. Here's the snap after the LHH 64-BIT GPR VALUES 0-3 00000000 00000048 00000000 80007044 00000000 00000040 00000000 009D3D6C 4-7 00000000 009D3D48 00000000 009F8588 00000000 009BCFC8 00000000 00000100 8-11 00000100 00000000 00000000 00000000 00000000 00000000 00000000 00000000 12-15 00000000 00007002 00000000 00006008 00000000 80FD76C0 00000000 00000000 Would love to know why the LHH isn't working as expected. My reading of POps leads me to think that R9 should be 00000002 00000000 but I must be reading it wrong. I was trying to find which document says which facilities are on which machine, but the POps wasn't really helpful: although it describes the facilities in detail it is not clear which models have which facility, in particular which have the "high-word facility" that provides LHH and its ilk. Thanks in advance for any insight you can offer. best regards, Peter ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN