What does this assembler code do?

Ralph P. Sobek ralph at laas.fr
Wed Dec 5 02:33:45 AEST 1990


The following embedded assembler code belongs to some C language code
for reading VAX VMS Backup tapes under Unix.  Maybe this would compile
under Ultrix.  If someone can translate this into straight C, I would
sure appreciate that, also.  Here's the function:
 
vdatetosec()
{
	asm("movl 4(ap),r0");
	asm("movl (r0)+,r2; movl (r0),r3; subl2 $2913970176,r2; sbwc $8164719,r3 ");
	asm("ediv $10000000,r2,r0,r1");
}

Neither SPARCs nor 680x0s like this code!

--
Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
ralph at laas.fr				   Addresses are ordered by importance.
ralph at laas.uucp, or ...!uunet!laas!ralph		
If all else fails, try:				      sobek at eclair.Berkeley.EDU
===============================================================================
Reliable software should kill people reliably! -Andy Mickel, Pascal News #13,78



More information about the Comp.unix.ultrix mailing list