SDSP Benchmark


   ;
   ;---------- Generate 100 random numbers
   ;
                ldq r9 r0 counter     ; r9 is loop ctr
   again :      subq r9 r9 1         ; decrement counter
                brnq done            ; jump out when all 100 #'s generated
   ; 
   ;--- The following code is the random number generator algorithm
   ;
   ;      x_new = a * x_old * mod m
   ;      result = x_new/divisor
   ;
   ; Ensure seed is in memory at loc "x" if it isn't already there from the previous execution
   ; of the algorithm
   ;
                 ldq r5 r0 x     ; put new seed in reg 5
                 div r6 r5 r3    ; r6 = x div q
                 mul r7 r6 r3
                 sub r7 r5 r7