Mail Archives: djgpp/1997/09/23/23:26:11
At 01:51 9/22/1997 +0200, Alan Poppleton wrote:
>Hello everyone,
>
>Is it possible to use the 64 bit long longs in assembler? If so could
>you please write some example code demostrating how registers could be
>used to make 64-bit ints?
Yes of course. It's just a 64-bit value. In keeping with the big-endian
architecture of the 80x86 family the low half is stored first. I'm not sure
what you mean by "using registers to make 64-bit ints", but here's a wild guess:
(assuming n is declared long long in C)
movl n,%eax
movl n+4,%edx
# Now edx:eax contains the number n.
# Do stuff with n here
# Put it back
movl %eax,n
movl %edx,n+4
Nate Eldredge
eldredge AT ap DOT net
- Raw text -