Home |
Search |
Today's Posts |
![]() |
|
Electronic Schematics (alt.binaries.schematics.electronic) A place to show and share your electronics schematic drawings. |
Reply |
|
LinkBack | Thread Tools | Display Modes |
#1
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
'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 |
#2
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
John Fields wrote:
(snip) nor = q1 OR q2 OR q3 OR q4 OR q5 OR q6 OR q7 IF nor = 0 THEN nor = 1 ELSE nor = 0 Couldn't you replace that last line with an inversion of nor? |
#3
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
On Fri, 07 Sep 2007 18:24:35 -0400, PeteS
wrote: John Fields wrote: '8 bit pseudo-random sequence generator with no lockup state. 'Microsoft QuickBASIC 4.0 '07 September 2007 Dear $Deity, all is lost. Quickbasic? ![]() Yup, hopelessly outdated. Real programmers use PowerBasic. John |
#4
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
On Fri, 07 Sep 2007 13:16:50 -0400, John Popelish
wrote: John Fields wrote: (snip) nor = q1 OR q2 OR q3 OR q4 OR q5 OR q6 OR q7 IF nor = 0 THEN nor = 1 ELSE nor = 0 Couldn't you replace that last line with an inversion of nor? --- Yup. Thanks! :-) -- JF |
#5
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
On Fri, 07 Sep 2007 10:59:44 -0700, John Larkin
wrote: On Fri, 07 Sep 2007 18:24:35 -0400, PeteS wrote: John Fields wrote: '8 bit pseudo-random sequence generator with no lockup state. 'Microsoft QuickBASIC 4.0 '07 September 2007 Dear $Deity, all is lost. Quickbasic? ![]() Yup, hopelessly outdated. Real programmers use PowerBasic. --- _Real_ programmers use whatever tools they have available and get the job done against impossible odds. Oh, yeah, I forgot... :-) -- JF |
#6
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
On Fri, 07 Sep 2007 18:24:35 -0400, PeteS
wrote: John Fields wrote: '8 bit pseudo-random sequence generator with no lockup state. 'Microsoft QuickBASIC 4.0 '07 September 2007 Dear $Deity, all is lost. Quickbasic? ![]() --- Well, I've got Microsoft BASIC 6.0 but QB4 is just so... convenient. -- JF |
#7
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
John Fields wrote:
On Fri, 07 Sep 2007 18:24:35 -0400, PeteS wrote: John Fields wrote: '8 bit pseudo-random sequence generator with no lockup state. 'Microsoft QuickBASIC 4.0 '07 September 2007 Dear $Deity, all is lost. Quickbasic? ![]() --- Well, I've got Microsoft BASIC 6.0 but QB4 is just so... convenient. What do you think of VBA (the stuff that is part of Excel since '97)? Worth learning for a guy who normally never programs? -- Regards, Joerg http://www.analogconsultants.com |
#8
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
John Fields wrote:
'8 bit pseudo-random sequence generator with no lockup state. 'Microsoft QuickBASIC 4.0 '07 September 2007 Dear $Deity, all is lost. Quickbasic? ![]() Cheers PeteS |
#9
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
On Fri, 07 Sep 2007 13:16:50 -0400, John Popelish
wrote: John Fields wrote: (snip) nor = q1 OR q2 OR q3 OR q4 OR q5 OR q6 OR q7 IF nor = 0 THEN nor = 1 ELSE nor = 0 Couldn't you replace that last line with an inversion of nor? NOT 1 is usually -2! BASICs seldom have boolean types. Given that the first line can only yield 0 or 1, you could say nor = nor XOR 1 John |
#10
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
On Fri, 07 Sep 2007 18:06:02 -0700, ChairmanOfTheBored
wrote: On Fri, 07 Sep 2007 10:59:44 -0700, John Larkin wrote: On Fri, 07 Sep 2007 18:24:35 -0400, PeteS wrote: John Fields wrote: '8 bit pseudo-random sequence generator with no lockup state. 'Microsoft QuickBASIC 4.0 '07 September 2007 Dear $Deity, all is lost. Quickbasic? ![]() Yup, hopelessly outdated. Real programmers use PowerBasic. John Make a visual basic equivalent in Excel spreadsheet OR Access database. I like PowerBasic because it's a real compiler, and if I run it under DOS I can access hardware directly. I can DIM an array AT a physical address (which just happens to be, say, a VME bus), I can access PCI module registers directly, I can type assembly inline, and I can run useful FOR loops at 30 MHz. VB still compiles to pseudocode, right? John |
#11
![]()
Posted to alt.binaries.schematics.electronic
|
|||
|
|||
![]()
John Larkin wrote:
On Fri, 07 Sep 2007 18:24:35 -0400, PeteS wrote: John Fields wrote: '8 bit pseudo-random sequence generator with no lockup state. 'Microsoft QuickBASIC 4.0 '07 September 2007 Dear $Deity, all is lost. Quickbasic? ![]() Yup, hopelessly outdated. Real programmers use PowerBasic. John Snort How do I expense a new keyboard? Cheers PeteS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Big John | Woodworking | |||
Looking for John Paquin (sp?) | Woodworking | |||
OT - Puzzle for John S. | Metalworking | |||
Larkin oak claw feet table with veneer top? | Woodworking |