home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / HISOFT.LZH / HISOFT_B.MSA / EXAMPLES / PCWALL.BAS < prev    next >
BASIC Source File  |  1987-11-06  |  1KB  |  100 lines

  1. rem $option n-o-a-
  2.  
  3. print "All the old PCW Benchmarks..."
  4.  
  5. dim times(8)    ' to hold the times
  6.  
  7.    t!=timer
  8.    FOR K=1 TO 10000
  9.    NEXT K
  10.    t=timer-t:times(1)=t
  11.  
  12.  
  13.    t!=timer
  14.    K=0
  15. z1:
  16.    K=K+1
  17.  IF K<10000 THEN GOTO z1
  18.   
  19.    t=timer-t:times(2)=t
  20.  
  21.  t!=timer
  22.    K=0
  23. z2:
  24.  K=K+1
  25.  A=(k/k)*k+K-K
  26.     IF K<10000 THEN GOTO z2
  27.    t=timer-t:times(3)=t
  28.  
  29.    t!=timer
  30.    K=0
  31. z3:
  32.  K=K+1
  33.  A=K/2*3+4-5
  34.     IF K<10000 THEN GOTO z3
  35.    t=timer-t:times(4)=t
  36.  
  37.    t!=timer
  38.    K=0
  39. z4:
  40.      K=K+1
  41.      A=K/2*3+4-5
  42.     GOSUB s4
  43.     IF K<10000 THEN GOTO z4
  44.     t=timer-t:times(5)=t
  45.     goto skip1
  46. s4:
  47.      RETURN
  48. skip1:
  49.  
  50.     t!=timer
  51.     K=0
  52.     DIM M(5)
  53. z5:
  54.     K=K+1
  55.     A=K/2*3+4-5
  56.     GOSUB s3
  57.     FOR L=1 TO 5
  58.     NEXT L
  59.      IF K<10000 THEN GOTO z5
  60.     t=timer-t:times(6)=t
  61.     goto  skip2
  62. s3:
  63.      RETURN
  64.  
  65. skip2:
  66.     t!=timer
  67.     K=0
  68.     DIM M1(5)
  69. z6:
  70.      K=K+1
  71.     A=K/2*3+4-5
  72.     GOSUB s6
  73.     FOR L=1 TO 5
  74.     M1(L)=A
  75.     NEXT L
  76.     IF K<10000 THEN GOTO z6
  77.     t=timer-t:times(7)=t
  78.     
  79. goto skip3
  80.  
  81. s6:
  82.  RETURN
  83.  
  84. skip3:
  85.     t!=timer
  86.     K=0
  87. z7:    K=K+1
  88.     A=K^2
  89.     B=LOG(K)
  90.     C=SIN(K)
  91.     IF K<10000 THEN GOTO z7
  92.    t=timer-t:times(8)=t
  93.  
  94. t=0
  95. for i%=1 to 8
  96. print "PCW";i%,times(i%)/10
  97. t=t+times(i%)
  98. next i%
  99. print "Average=";t/80
  100.