03-17-2011, 11:42 PM
Oh, just saw your reply to the speed trial:
fSin is in the library at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:FSin.bas">http://www.boriel.com/wiki/en/index.php ... C:FSin.bas</a><!-- m -->
Code I'm using:
For the three trials I comment /uncomment Bm7 and 8 start points and comment out the BM8 code if I'm doing BM7, and change the Sin into fSin if necessary and run. That's all I changed.
fSin is in the library at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:FSin.bas">http://www.boriel.com/wiki/en/index.php ... C:FSin.bas</a><!-- m -->
Code I'm using:
Code:
#include "fSin.bas"
FUNCTION t() as uLong
asm
DI
LD DE,(23674)
LD D,0
LD HL,(23672)
EI
end asm
end function
cls
DIM i as uInteger
DIM k,var,j as uByte
DIM time as uLong
LET k=5
LET i=2
let time =t()
goto start
subroutine:
return
'start:
label:
LET i=i+1
LET var=k/2*3+4-5
gosub subroutine
DIM M(5) as uInteger
FOR j=0 to 4
LET M(j)=i
NEXT j
IF i<1000 then GOTO label: END IF
REM BM8
start:
FOR i=1 to 100
result=i^2
result=ln(i)
result=fSin(i)
next i
REM print (CAST (FLOAT,t())-time)/50
print time, t()
print "Done!"
print result
print M(1),k,i,var, "\*"
For the three trials I comment /uncomment Bm7 and 8 start points and comment out the BM8 code if I'm doing BM7, and change the Sin into fSin if necessary and run. That's all I changed.