Electronic Schematics (alt.binaries.schematics.electronic) A place to show and share your electronics schematic drawings.

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to alt.binaries.schematics.electronic
external usenet poster
 
Posts: 2,022
Default 8 bit PRSG for John Larkin - 8BITPRSG.EXE

'8 bit pseudo-random sequence generator with no lockup state.
'Microsoft QuickBASIC 4.0
'07 September 2007
'John Fields


SCREEN 0
COLOR 0, 7
CLS

q1 = 0
q2 = 0
q3 = 0
q4 = 0
q5 = 0
q6 = 0
q7 = 0
q8 = 0
clk = 0
new$ = "0"
s = 4500000


PRINT " Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 CLOCK"

VIEW PRINT 42 TO 43

PRINT "Press " + CHR$(34) + "f" + CHR$(34) + " to increase
display speed, " + CHR$(34) + "s" + CHR$(34) + " to decrease it, or
" + CHR$(34) + "q" + CHR$(34) + " to quit."

VIEW PRINT 3 TO 40

shift: PRINT q1; q2; q3; q4; q5; q6; q7; q8; " "; clk

nor = q1 OR q2 OR q3 OR q4 OR q5 OR q6 OR q7
IF nor = 0 THEN nor = 1 ELSE nor = 0

tap1 = q3 XOR q5
tap2 = q6 XOR q8
tap3 = tap1 XOR tap2
srin = nor XOR tap3

q8 = q7
q7 = q6
q6 = q5
q5 = q4
q4 = q3
q3 = q2
q2 = q1
q1 = srin

clk = clk + 1
IF clk = 256 THEN clk = 0

FOR t = 1 TO s: NEXT t

a$ = INKEY$
IF a$ = "f" THEN s = s - 100000
IF a$ = "s" THEN s = s + 100000
IF a$ = "q" THEN END

GOTO shift
END


I'm running XP and the executable won't run unless it's invoked from
the command prompt in a DOS window.

YMMV.


--
JF


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Big John Tom Watson Woodworking 15 July 30th 06 07:56 PM
Looking for John Paquin (sp?) Jim Bailey Woodworking 3 March 13th 05 02:42 AM
OT - Puzzle for John S. Cliff Metalworking 13 January 17th 05 01:43 PM
Larkin oak claw feet table with veneer top? Elijah Woodworking 3 January 31st 04 02:39 PM


All times are GMT +1. The time now is 02:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"