If you are generating a binary result in a register and converting the result back to packed-decimal, you need to be keenly aware of the limitations of each of these data types. For large binary values, you will need some conversion techniques that aren’t found in Principles of Operation. This article discusses several approaches for converting double-precision binary back to packed-decimal.
Techniques for Converting From Binary to Packed-Decimal
Categories:
2 thoughts on “Techniques for Converting From Binary to Packed-Decimal”
Leave a ReplyCancel reply
Related Posts
Review an Instruction: AGFReview an Instruction: AGF
I’m creating new articles on my website in alphabetical order, and I’m on the A’s. There are numerous add instructions ...
z390 Support in VisibleZz390 Support in VisibleZ
I envisioned VisibleZ as a teaching tool for assembly language – I wanted to force students to deal with object ...
Review a Six-pack of Instructions! (IBM Assembler)Review a Six-pack of Instructions! (IBM Assembler)
You can quickly learn or review six IBM Assembler instructions with this article. Insert Immediate instructions allow you to modify ...

Hello David
I just have a minor comment on the last example where you store r4 and then load it into the upper half of R5 with a ICMH.
A while ago the hardware added ROTATE THEN INSERT SELECTED BITS HIGH which you might think what use is that? Well HLASM also added some useful extended mnemonics that use this opcode – in my version of the POP (SA22-7832-12) they are on page 7-372.
so you could code this LHLR R5,R4 to load the low half of R4 directly in to the high half of R5.
Kind regards
John
Nice! I’ll make the changes. Thanks for taking time to make a great suggestion. – David