World of Spectrum
  • Categories
  • Discussions
  • FAQ
  • Sign In
Home › Search
Title Search
@title beer Word 'beer' in title
User Search
  • @user admin Only posts by Admin
Text Search
  • @body beer Word 'beer' in the text
Phrase Search
"Hello World" Exact phrase match
Exclude Terms
  • car -red Search cars that are not red
"Or" Searches
  • honda | bmw 'honda' or 'bmw' results
Multi-Field
@(title,body) hello Both contain 'hello'
WildCard
  • hond* civ* Match all with an astrix
Combination
  • @title bmw @user admin
See more supported syntax examples
Search Again :: Adv Search 1000 results in 0.003s
<1234567…34>
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... /> LET v$(i)=CHR$ (65+RND*25):
    NEXT i
    90 LET t1=(65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/50:
    LET t2=(65536*PEEK 23674+256*PEEK 23673+PEEK ...
    Battle Bunny Battle Bunny September 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... DEF FN t()=65536*PEEK 23674+256*PEEK 23673+PEEK 23672
    10 ... 50:
    LET o=INT (RND*50)+1: LET n=INT ... (RND*50)+1:
    LET o$= ...
    Battle Bunny Battle Bunny September 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    Hi Battle Bunny,

    Never ceases to amaze me the difference in performance between BASIC and MCODE. Sounds like you have a powerful routine there.

    I have modified my demo version so that it can be used (for future generations ;)) as ...
    Paddy Coleman Paddy Coleman September 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... DEF FN t()=(PEEK 23672+256*PEEK 23673+65536*PEEK 23674)/50
    p$(n)=CHR$ (RND*25+65): NEXT n
    mcleod_ideafix mcleod_ideafix October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... DEF FN t()=(PEEK 23672+256*PEEK 23673+65536*PEEK 23674)/50
    p$(n)=CHR$ (RND*25+65): NEXT n
    Paddy Coleman Paddy Coleman October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    Hi Dr Beep etc.

    Come on guys - you know more about Sinclair BASIC than is healthy! :smile: Surely you have some tips to optimise/speed up the following code.

    [CODE]100 GO SUB 250
    110 REM SHELL SORT V4
    120 LET b=INT (n ...
    Paddy Coleman Paddy Coleman October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    [QUOTE=JamesD;482918]If you can use ELSE it should look like this.
    [CODE]110 REM COMB SORT V2
    ...[/CODE][/QUOTE]

    Hi James,

    Coded up your V2 Comb Sort and got the following results:

    Paddy's original V1 Comb ...
    Paddy Coleman Paddy Coleman October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... /> 230 LET a=(65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/50:
    LET b=(65536*PEEK 23674+256*PEEK 23673+PEEK ... /> LET a$(a)=CHR$ (65+RND*25):
    NEXT a:
    Paddy Coleman Paddy Coleman October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... DEF FN t()=(PEEK 23672+256*PEEK 23673+65536*PEEK 23674)/50
    CHR$ (RND*25+65): NEXT i
    Einar Saukas Einar Saukas October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... DEF FN t()=(PEEK 23672+256*PEEK 23673+65536*PEEK 23674)/50
    RND*25+65): NEXT i
    Einar Saukas Einar Saukas October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    [B]STEP 3 -[/B] Now let's take a look at the quicksort algorithm, since we will need to properly understand it in order to find further improvements.

    The basic idea behind the quicksort algorithm can be represented by the following pseudo-code ...
    Einar Saukas Einar Saukas October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... DEF FN t()=(PEEK 23672+256*PEEK 23673+65536*PEEK 23674)/50
    RND*25+65): NEXT i
    Einar Saukas Einar Saukas October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... /> 220 LET a=(65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/50:
    LET b=(65536*PEEK 23674+256*PEEK 23673+PEEK ... /> LET a$(a)=CHR$ (65+RND*25):
    NEXT a:
    Paddy Coleman Paddy Coleman October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... /> 190 LET a=(65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/50:
    LET b=(65536*PEEK 23674+256*PEEK 23673+PEEK ... /> LET a$(a)=CHR$ (65+RND*25):
    NEXT a:
    Paddy Coleman Paddy Coleman October 2010 Sinclair Basic
  • Sorting an array...Hi Folks, Over the weekend I had a play with sorting algorithms - takes me back to my student days! :-o My first try was with the good old Bubble S…

    ... /> 190 LET a=(65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/50:
    LET b=(65536*PEEK 23674+256*PEEK 23673+PEEK ... /> LET a$(a)=CHR$ (65+RND*25):
    NEXT a:
    Einar Saukas Einar Saukas October 2010 Sinclair Basic
  • Random numbers...Hi Folks, I am not an expert when it comes to random numbers. If I have the RANDOMIZE statement the beginning of a program and then proceed to gene…

    ... should not RANDOMIZE before each RND btw) you are demonstrating ... the numbers initially generated by RND will be very close ... emans the formula used by RND to generate random numbers ... RANDOMIZE yourself. Like "RANDOMIZE PEEK x + 256*PEEK x" where x = address ...
    Alcoholics Anonymous Alcoholics Anonymous May 2011 Sinclair Basic
  • Random numbers...Hi Folks, I am not an expert when it comes to random numbers. If I have the RANDOMIZE statement the beginning of a program and then proceed to gene…

    ... ="Courier New"]xx10 RANDOMIZE PEEK 23672+256*PEEK 23672[/FONT]

    RND*100)[/FONT]

    With ... wee loop that executes the RND 10 times.

    Paddy
    Paddy Coleman Paddy Coleman May 2011 Sinclair Basic
  • Random numbers...Hi Folks, I am not an expert when it comes to random numbers. If I have the RANDOMIZE statement the beginning of a program and then proceed to gene…

    ... ="Courier New"]xx10 RANDOMIZE PEEK 23672+256*PEEK 23672[/FONT]

    RND*100)[/FONT]

    With ... wee loop that executes the RND 10 times.

    Paddy ...
    Philip Kendall Philip Kendall May 2011 Sinclair Basic
  • Random numbers...Hi Folks, I am not an expert when it comes to random numbers. If I have the RANDOMIZE statement the beginning of a program and then proceed to gene…

    ... />
    [CODE]100 RANDOMIZE PEEK 23672+256*PEEK 23672
    110 FOR ... /> 120 LET b=1+INT (RND*100)
    130 PRINT b ...
    Paddy Coleman Paddy Coleman May 2011 Sinclair Basic
  • Random numbers...Hi Folks, I am not an expert when it comes to random numbers. If I have the RANDOMIZE statement the beginning of a program and then proceed to gene…

    ... Courier New"]xx10 RANDOMIZE PEEK 23672+256*PEEK 23672[/FONT]
    RND*100)[/FONT]

    RND 10 times.
    ... /> [CODE]100 RANDOMIZE PEEK 23672+256*PEEK 23672
    110 FOR ... 120 LET b=1+INT (RND*100)
    130 PRINT ...
    Alcoholics Anonymous Alcoholics Anonymous May 2011 Sinclair Basic
  • Random numbers...Hi Folks, I am not an expert when it comes to random numbers. If I have the RANDOMIZE statement the beginning of a program and then proceed to gene…

    ... RANDOMIZE PEEK...

    110 LET a=1+INT(RND*100)
    Paddy Coleman Paddy Coleman May 2011 Sinclair Basic
  • Random numbers...Hi Folks, I am not an expert when it comes to random numbers. If I have the RANDOMIZE statement the beginning of a program and then proceed to gene…

    ... Coleman;532359]10 RANDOMIZE PEEK 23672+256*PEEK 23672[/QUOTE]
    < ... a key press before each PEEK, to ensure a variable ... 20
    30 LET a=PEEK 23672
    40 IF ... 60
    70 LET b=PEEK 23672
    80 RANDOMIZE ... /> 120 LET b=1+INT (RND*100)
    130 PRINT b ...
    Einar Saukas Einar Saukas May 2011 Sinclair Basic
  • Random numbers...Hi Folks, I am not an expert when it comes to random numbers. If I have the RANDOMIZE statement the beginning of a program and then proceed to gene…

    ... 60
    70 POKE 23671, PEEK 23672
    100 REM Remaining ... /> 120 LET b=1+INT (RND*100)
    130 PRINT b ...
    Einar Saukas Einar Saukas May 2011 Sinclair Basic
  • Storing and displaying attributes...Hi Folks, I have a requirement to store and then redisplay a line of attributes from the screen. For example: 100 DIM a$(1,32) 110 LET line=10 120…

    ... /> 160 POKE 23563,PEEK 23675: POKE 23564,PEEK 23676: IF P THEN ... LET p=INT (RND*7): LET i=INT (RND*7): IF p ...
    Paddy Coleman Paddy Coleman June 2011 Sinclair Basic
  • 3 lines of funHello! I'm looking for a tattoo to remember forever our fabulous 8 bit era. A part the pictures I posted here [url]http://www.worldofspectrum.org/for…

    ... 6*RND:IF RND < .03 THEN CLS
    3 POKE v, PEEK ... v-2: PLOT 255*RND,175*RND: DRAW 99*RND, 99*RND, v*RND:POKE ... v,PEEK v+2 ...
    Geoff Geoff October 2011 Sinclair Basic
  • Xor-shift random number generator for Z80[QUOTE=Patrik Rak;320244]Come on, people, [URL="http://www.jstatsoft.org/v08/i14/paper"]xor-shift generators[/URL] devised by Marsaglia, that's the w…

    Hi Patrik,

    Sorry to bother you again but I have noticed a "funny" issue. Now I fully accept it might be down to me and the way I altered the machine code or a bug in BASin. When I run the attached program for the first time in BASin the ...
    Paddy Coleman Paddy Coleman December 2011 Development
  • Xor-shift random number generator for Z80[QUOTE=Patrik Rak;320244]Come on, people, [URL="http://www.jstatsoft.org/v08/i14/paper"]xor-shift generators[/URL] devised by Marsaglia, that's the w…

    ... 63797
    3400 LET m=PEEK 23672:
    IF m=0 ... ,m:
    PAUSE 1+INT (RND*31):
    NEXT h[/CODE ...
    Paddy Coleman Paddy Coleman December 2011 Development
  • Xor-shift random number generator for Z80[QUOTE=Patrik Rak;320244]Come on, people, [URL="http://www.jstatsoft.org/v08/i14/paper"]xor-shift generators[/URL] devised by Marsaglia, that's the w…

    Thanks Philip. Mofied program now looks like:

    [CODE]100 REM Fast
    110 REM
    120 REM Create MCODE
    130 REM
    140 CLEAR 63793
    150 RESTORE 620: LET a=63798
    160 READ v: IF v255-(256-42*INT (256/42)) THEN GO TO 340< ...
    Paddy Coleman Paddy Coleman December 2011 Development
  • Amazonia (BUGFIX)This is a bugfix for game [URL="http://www.worldofspectrum.org/infoseekid.cgi?id=0027280"]Amazonia[/URL], please add the following "known errors" des…

    ... =48304 TO 48443: POKE f,PEEK (f+9): NEXT f: POKE ... 49359 STEP -1: POKE f,PEEK (f-2): NEXT f: POKE ... : 0b 8f 05 REG(143)+=RND(5) ;
    e31a: 01 93 ... : 0b 8f 05 REG(143)+=RND(5) ;
    e31a: 01 93 ...
    Einar Saukas Einar Saukas January 2012 Infoseek database
  • Dimming the screen...Hi Folks, I was hoping someone on here could help me with a wee machine code routine. I have written the following example in BASIC: [CODE]100 REM…

    ... : PRINT AT y,x; PAPER RND*7;" ": NEXT x: NEXT y ... 23231: POKE a,PEEK a-(64 AND PEEK a>64): NEXT ...
    Paddy Coleman Paddy Coleman May 2012 Development
<1234567…34>

Latest Posts

  • Happy 40th Birthday to the Amstrad CPC464!
    dmsmith on 12:41AM
  • i am currently listening to........
    dmsmith on April 15
  • I am currently watching.....
    zx1 on April 15
  • Fixed Speccy Software. And which games remained unfixed?
    harriusherbartio on April 15
  • Cooperative Games.
    harriusherbartio on April 15
  • Celebrity deaths...
    mel the bell on April 15
  • Minor British Sports that did become games on the ZX Spectrum
    dm_boozefreek on April 15
  • Elusive Strategy Games done by the Smaller or less Prolific Software Houses.
    harriusherbartio on April 15
  • Inside No.9 favourite episodes
    Maroc's Other Projection on April 15
  • How we became brainwashed by social media
    Scottie_uk on April 15

HitBox

Word Docs Hits
rnd 2.9K 4.1K
peek 1.9K 4.4K

Related Threads

  • Spectrum 2003 News and Info Special at PEEK N' POKE[url="http://peeknpoke.emuunlim.com/spectrum2003/pnpspectrumnews2003index.html"]http://peeknpoke.emuunlim.com/spectrum2003/pnpspectrumnews2003index.h…
  • RND not random?I recently wrote a simple Alien style game where the bad guys shoot you at random, it works fine, but after a while the Variable that is supposed to …
  • POKE, PEEK and RANDOMIZE USRAnyone got a store of useful POKES, or RANDOMIZE USR statements with interesting effects?<br /> <br /> As a start, try anything from RANDOMIZE USR 12…
  • Speed of variables vs. POKE/PEEKGreetings,<br /> <br /> I'm sure I could probably find this out after careful study of the 48K ROM disassembly, but I was wondering whether someone a…
  • Happy birthday RNDThink of a number between 0-100 RND, go on, any number.<br /> <br /> <br /> Huppy Burthus-day.
  • Happy birthday RND!!Merry birthday... Get absolutely sloshed!! (And play lots of [I]Chaos[/I]) :)
  • Happy birthday RND!!Merry birthday... drink lots!! :smile:
  • Happy birthday RND!Merry birthday... drink Chaos! :smile:
  • problem with RND (or maybe INT)I'm using this statement:<br /> <br /> LET m=(INT (RND*sn)+k1)*k2-k1<br /> <br /> to give a pointer m to a 2-byte segment of a string l$. Items k1 &a…
  • RND CommandsExactly how random are they?<br /> <br /> Reason I ask is I'm using 4 of them to generate a random number, the value of which then assigns movement c…

Related Searches

  • rom peek 128k pentagon
  • rom peek 128k pentagon 004c
  • identify pentagon 48k 128k rom peek
  • peek rom identify model
  • peek rom detect model 48k 128k 3 pentagon
  • rnd
  • peek
  • peek 1024mak
  • detect 128k peek
  • detect 16k peek
  • z88dk read address peek
  • z88dk read peek
  • z88 peek
  • z88dk peek
  • new rnd
  • rutine rnd
  • address of basic program peek
  • ram test basic poke peek program
  • ram test basic poke peek program data
  • rnd based on peek 23672

Copyright © 2024 World of Spectrum