From: jasonp AT Glue DOT umd DOT edu (Jason Stratos Papadopoulos) Newsgroups: comp.os.msdos.djgpp Subject: need help with very simple inline assembly Date: 22 Jan 1997 16:58:16 GMT Organization: University of Maryland, College Park Lines: 24 Message-ID: <5c5gv8$i52@hecate.umd.edu> NNTP-Posting-Host: taylor.isr.umd.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hello. I've tried fiddling with the code on my own, and it doesn't seem to work. What I'd like to do is divide two integers to get their quotient, then use inline assembly to get the remainder at the same time and put it somewhere else. Unfortunately, I'm stymied. The code should look something like remainder=0; quotient = dividend/divisor; __asm__ __volatile__ ("movw %%ax, SOMETHING" : : :); ^^^^^^^^^ ^^^^^^^^^ the variable "remainder" | | | what goes here?---- Please help me fill in the blanks...this code is inside two nested loops and needs to be as fast as possible. Thanks in advance, jasonp PS: this is part of a program to calculate pi, and I'd be happy to post or mail a copy to anyone interested (it's rather fast already; this will make it blinding :)