Article View: comp.os.os2.programmer.misc
Article #1BCD arithmetic algorithms needed
From: bretz
Date: Sat, 09 Dec 1995 20:14
Date: Sat, 09 Dec 1995 20:14
23 lines
1109 bytes
1109 bytes
Hello, I am planing to implement a c++ class for bcd arithmetic and for accurate representation of monetary and the like. Currently I have an idea for adding packed or unpacked bcds by adding each digit and saving the decimal carry. I plan to use the Intel 80x86 bcd instructions (AAD, AAM, AAS, AAD, DAA and DAS) to implement the arithmetic. but I have no good idea for subtracting, multiplying and deviding packed or unpacked bcds. Can somebody help??? Thank you Thomas _____________________________________________________________________ bretz@ibm.net Thomas Bretz-Rieck Hamburg, Germany _____________________________________________________________________
Technical Details
Message-ID:
<4acqng$3nfa@news-s01.ny.us.ibm.net>Path:
arc1-ca.pugleaf.net!news-m01.ny.us.ibm.net!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news-m01.ny.us.ibm.net!usenet From: bretz@ibm.net Newsgroups: comp.os.os2.programmer.misc,comp.programming,comp.lang.c++,comp.lang.asm.x86,comp.lang.c,comp.sources.wanted Subject: BCD arithmetic algorithms needed Date: 9 Dec 1995 20:14:40 GMT Message-ID: <4acqng$3nfa@news-s01.ny.us.ibm.net> Reply-To: bretz@ibm.net NNTP-Posting-Host: slip139-92-41-71.emea.ibm.net X-Newsreader: IBM NewsReader/2 v1.2