Multiply Grande (MG) is the sister instruction of Multiply(M) and produces produces 128-bit products in an even/odd register pair. Ususally the result we are looking for is in the single, odd, grande (64-bits) register. That presents a problem: How do we convert a 64-bit product in a grande register to packed-decimal? It’s not obvious and requires a bit of mathematical know-how. This article shows you the assembler code that will do the conversion, and points to an explanation.
Review an Instruction: MG
Categories:
Related Posts
IBM Champion!IBM Champion!
I’m very happy to be named an IBM Champion for the third year. Thank you! ...
Review an Instruction: MS (IBM Assembler)Review an Instruction: MS (IBM Assembler)
Multiply Single (MS) provides another way to multiply binary integers using a single register. Read about it here. ...
Instructions of the Day: AP and SP – Add and Subtract Packed DecimalInstructions of the Day: AP and SP – Add and Subtract Packed Decimal
Start learning the basics of decimal arithmetic in assembler by tackling how to add and subtract in packed decimal. This video ...
