home *** CD-ROM | disk | FTP | other *** search
/ Amiga Computing 57 / ac057a.adf / Demos / pcwall.bas < prev    next >
BASIC Source File  |  1988-12-19  |  1KB  |  102 lines

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