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: LAY (IBM Assembler – HLASM)Review an Instruction: LAY (IBM Assembler – HLASM)
I’ve updated the article about LAY to include how to decrement a register with LAY. If you haven’t seen this ...
How to Print a RegisterHow to Print a Register
A friend of mine, Melvyn Maltz, was amused by some code I wrote recently. The code simply printed out the ...
Debugging a S0C1: Dump readingDebugging a S0C1: Dump reading
Stumped by a S0C1? S0C4? S0C7? Master dump reading with this series of videos that cover dump reading basics. The ...

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