Re: Extended Mnemonics After Unsigned Arithmetic
> I think a SHARE requirement would be a useful start to discussing > additional extended mnemonics. I'd follow that up with a HLASM RFE > request. I must admit to being somewhat bewildered as to what prompted Ed to initiate this discussion at all. As John E intimated, I reckon this cat has well and truly scarpered. _everybody_ will have different (lack of) standards for this ... Shane ...
How to print a floating point number
I'm just starting to learn assembler, so I started with 'Hello World' and also printing the sum of 2 numbers. Snippet of the code is below and it works fine: OPEN (SYSPRINT,(OUTPUT)) Write output here L 3,NUM1 Load first number in R3 L 4,NUM2 Load 2nd number in R4 AR4,3 Add contents of R4 and R3 and store * in R4 PUT SYSPRINT,MSG01Write Hello World to SYSPRINT * *Output the value in RESULT * MVC MSG01,=C'Result=' CVD R4,CONV1 UNPK MSG01B,CONV1+4(4) OIMSG01B+6,X'F0' PUT SYSPRINT,MSG01 CLOSE (SYSPRINT)Close SYSPRINT NUM1 DCF'9' Hardcoded first number NUM2 DCF'4' Hardcoded second number SYSPRINT DCB DDNAME=SYSPRINT,+ MACRF=(PM), + DSORG=PS,RECFM=F,LRECL=80 * *Output line: Fields add to 80 * DC - Character field * DS - Numeric field * * MSG01DCCL11'Hello World' Store string here MSG01B DSCL7 numeric field MSG01B2 DCC' ' MSG01C DCCL62' 'padding END NEWTON3 End of program But the printing part doesn't work if NUM1 & NUM2 have decimal points (e.g. 4.3 & 6.1). If I use ADBR to add the 2 numbers and store as BFP and try to print that, I get garbage. Can someone show what has to change in the code for this to work? Thanks. L 3,NUM1 Load first number in R3 L 4,NUM2 Load 2nd number in R4 ADBR4,3 Add contents of R4 and R3 and store * in R4
Automatic reply: ASSEMBLER-LIST Digest - 14 Mar 2013 to 15 Mar 2013 (#2013-39)
I am currently out of the office. I will be returning Monday March 25th. For immediate assistance contact: Dennis Munemura at his email address dennis.munem...@ca.com.
Re: Extended Mnemonics After Unsigned Arithmetic
On 3/15/2013 4:39 PM, robin wrote: (It's the reason that 32K is a limit in so many places in z/OS e.g., block sizes, number of ASIDs, etc.) No it's not. It's the result of using the halfword instructions such as LH, AH, SH, etc which automatically sign-extend to 32 bits. (Incidentally, the high-order 16 bits can easily be set to zero.) LOL! You say "No" and then make my point. LH, AH, SH, etc. work only with _signed_ integers. It's not that anyone thought there might one day be a need for negative DASD block sizes. It was simply too inconvenient to deal with unsigned halfwords without an instruction set designed to manipulate them. If the developers back then had logical halfword instructions as we do today, that pad with zeros instead of extending the sign bit, then the limits for 16-bit fields would have been typically 64K instead of 32K. -- Edward E Jaffe Phoenix Software International, Inc 831 Parkview Drive North El Segundo, CA 90245 http://www.phoenixsoftware.com/
Extended Mnemonics After Unsigned Arithmetic
Ed, I think a SHARE requirement would be a useful start to discussing additional extended mnemonics. I'd follow that up with a HLASM RFE request. How do we start the SHARE requirement ? and would you expect to discuss this at Boston or before ? Sharuff Sharuff Morsa HLASM IBM Hursley Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU