$regfile = "8535def.dat" ' specify the used micro $crystal = 8000000 ' used crystal frequency $hwstack = 80 ' default use 32 for the hardware stack $swstack = 256 ' default use 10 for the SW stack $framesize = 80 ' default use 40 for the frame space $initmicro Dim Column As Word Dim Columndata(16) As Word Dim J As Byte Dim T As Byte Dim R1 As Word Dim R2 As Word Dim Rold As Word Dim Timerbit As Word Dim ___rseed As Word Dim Daata(9) As Byte Daata(9) = 0 Daata(1) = 1 Daata(2) = 2 Daata(3) = 4 Daata(4) = 8 Daata(5) = 16 Daata(6) = 32 Daata(7) = 64 Daata(8) = 128 Column = 1 ___rseed = 10234 J = 1 Config Timer0 = Timer , Prescale = 8 On Ovf0 Updatedisplay Enable Timer0 Enable Interrupts Do If Timerbit > 300 Then Rold = R1 Do R1 = Rnd(8) Loop Until Rold <> R1 Rold = R2 Do R2 = Rnd(13) Loop Until Rold <> R2 Columndata(r2 + 1) = Daata(r1 + 1) Timerbit = 0 End If Loop Updatedisplay: Portd = 0 T = Low(column) Porta = Not T T = High(column) Portc = Not T Portd = Columndata(j) Rotate Column , Left Incr J If Column = 8192 Then J = 1 Column = 1 End If Incr Timerbit Return _init_micro: Config Portd = Output Config Porta = Output Config Portb = Output Config Portc = Output Portb = 0 Porta = 0 Portc = 0 Portd = 0 Return