DIYbanter

DIYbanter (https://www.diybanter.com/)
-   Electronic Schematics (https://www.diybanter.com/electronic-schematics/)
-   -   8 bit PRSG for John Larkin - 8BITPRSG.EXE (https://www.diybanter.com/electronic-schematics/213661-8-bit-prsg-john-larkin-8bitprsg-exe.html)

John Fields September 7th 07 06:10 PM

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



John Popelish September 7th 07 06:16 PM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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?

John Larkin September 7th 07 06:59 PM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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



John Fields September 7th 07 10:11 PM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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

John Fields September 7th 07 10:15 PM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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

John Fields September 7th 07 10:19 PM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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

Joerg September 7th 07 10:42 PM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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

PeteS[_2_] September 7th 07 11:24 PM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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


John Larkin September 8th 07 01:10 AM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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



John Larkin September 8th 07 11:30 PM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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


PeteS[_2_] September 9th 07 01:31 AM

8 bit PRSG for John Larkin - 8BITPRSG.EXE
 
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


All times are GMT +1. The time now is 12:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 DIYbanter