(also see message from 5-10-98 by me/Astro : Interpolating in ASM)
Thanks,
Astro.
Try this:
Function Interpolate(StartTime, EndTime, CurTime, StartValue, EndValue:
Word): Word; Assembler;
Asm
MOV AX,EndValue
SUB AX,StartValue
MOV BX,CurTime
SUB BX,StartTime
MUL BX
MOV BX,EndTime
SUB BX,StartTime
DIV BX
ADD AX,StartValue
End;
After I tested this I noticed that in your previous post you used longint
for the times. Well this should give you some help anyway. Let me know if
you need to use longints and I'll work on it.
Bean, th...@igateway.com