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.016s
<1234567…34>
  • How do I get a random numberHi, I need a simple routine to get a random number from 1 to 4. I don't need nothing very complex or that much random, it just have to produce diffe…

    ... simple routine to get a random number from 1 to 4. I ... very complex or that much random, it just have to produce ...
    AE.Vasconcelos AE.Vasconcelos May 2005 Development
  • CMWC random number generator for Z80Seeing the interest regarding the [URL="http://www.worldofspectrum.org/forums/showthread.php?t=23070"]Xor-Shift random number generator for Z80[/URL]…

    ... .php?t=23070"]Xor-Shift random number generator for Z80[/URL], I ...
    Patrik Rak Patrik Rak June 2012 Development
  • Random number from a rangeHow can I generate in assembly a random number from a range, let's say 0-21 or 0-57? There are generators which make it 0-255. By using bit masks I…

    How can I generate in assembly a random number from a range, let's say 0-21 or 0-57?

    There are generators which make it 0-255.

    By using bit masks I can make it 0-127,0-63,0-31 and so on. But what if my range isn't that "equal"?
    Ralf Ralf September 2012 Development
  • Deterministic random number generatorI'm looking for a random number generator in assembly which, given a seed, the generated sequence is always the same. You change the seed, you get a …

    I'm looking for a random number generator in assembly which, given a seed, the generated sequence is always the same. You change the seed, you get a different sequence, but same seed = same sequence.

    Any pointers?
    na_th_an na_th_an February 2014 Development
  • So where is the random number in the Speccy ?So I am messing around with ZX Spectrum Assembler and I want a random number. I looked up previous posts and one of the links said that random number…

    ... Assembler and I want a random number. I looked up previous posts ... of the links said that random numbers are in the ROM ... /> LD HL, 14000 but the number doesn't seem to change ...
    ivanb303 ivanb303 November 2016 Assembler
  • Getting an even random numberWhat would be the best, simplest way to do this ? I was thinking of say: A = RND*100 Then a conditional along the lines of: IF A / 2 <> I…

    ... fraction (its a complete whole number) then it must be an ... even number not an odd number" , if that makes ... not matter I require a random number between 0 and 63 (or ... must always be an even number.
    spider spider November 2018 Sinclair Basic
  • Help needed - UK lottery number generator in c++I'm trying to write a c++ program to generate 9 lines of 6 numbers for the uk national lottery. Anybody got any idea where I'm going wrong? I'm com…

    I'm trying to write a c++ program to generate 9 lines of 6 numbers for the uk national lottery.

    Anybody got any idea where I'm going wrong?

    I'm compiling this program in dev c++, but it doesn't seem to want to come out of the line ...
    BigBadMick BigBadMick April 2007 Chit chat
  • Project: M.u.l.e.Wokani came up with a great idea about trying an open-development approach for spectrum games, and I thought why not try with a game I have under dev…

    ... int std_seed(23672); // random number seed placed on top of ... 32768, 32768, 32768, 32768, 32768 };
    static uint amp1[] = { 0, 0, 34, 5298, 27470, 32734, 32768, 32768, 32768 ... 9);

    // repeat experiment 1000 times

    Alcoholics Anonymous Alcoholics Anonymous July 2007 Development
  • CMWC random number generator for Z80Seeing the interest regarding the [URL="http://www.worldofspectrum.org/forums/showthread.php?t=23070"]Xor-Shift random number generator for Z80[/URL]…

    ... quickly, however, as it could repeat multiple times. In practice I ... of needing to redo the random number, so multiple cycles rapidly asymptote ... not easy to get a random number between arbitrary values from ... at the 16th bit. (so +/- 32768 with a decimal part of ...
    Gedlion Gedlion September 2014 Development
  • random numbersCan you write a piece of code that gets you a truly random number from the Spectrum, or is it only capable of generating a pseudo-random number (ie. …

    ... that gets you a truly random number from the Spectrum, or is ... capable of generating a pseudo-random number (ie. one from a run ...
    Spector Spector April 2001 Sinclair Miscellaneous
  • I need ASM for random numberI need to generate a random pair of coardinates in asm so that x=random no between 0 and 31, y=random no between 0 and 23. Any ideas on how to code …

    I need to generate a random pair of coardinates in asm so that x=random no between 0 and 31, y=random no between 0 and 23.

    Any ideas on how to code the above

    Cheers
    robpearmain robpearmain September 2004 Development
  • Random Numbers, USR Return Values & Timing BASICI've been trying out Jon Ritman's random number routine, published in Your Sinclair Aug'87. Apart from a timing comparison I also did a frequency ana…

    ... trying out Jon Ritman's random number routine, published in Your Sinclair ... /> "This is the 32-bit random number generator routine I used in ... HL holding a 16-bit random number. However,
    if you ... version. So for a random number function 3*speed of RND ...
    Battle Bunny Battle Bunny January 2017 Sinclair Basic
  • random number generator without using rnd in basicwhat is the simplest way to generate random numbers in basic (0-255), without using the rnd statement? i also want it to always generate the same…

    what is the simplest way to generate random numbers in basic (0-255), without using the rnd statement?

    i also want it to always generate the same numbers over and over again.
    digital digital June 2019 Development
  • this code wont give me a random starfieldim using a peice of code that ive copied from a book, ignore most of it as it is redundant. for some reason i get a strange random starfield instead …

    ... interested in-----------
    call random ;v v
    and ... ret
    ; Simple pseudo-random number generator.
    ; Steps a pointer ... ld a,(hl) ; Get "random" number from location.
    inc hl ... in''. also the random number generator
    digital digital July 2020 Assembler
  • random numbersCan you write a piece of code that gets you a truly random number from the Spectrum, or is it only capable of generating a pseudo-random number (ie. …

    ... possible source of truly random numbers would be the measurement ... known by current physics) completely random.

    Of course ...
    let start = number of frames since reset
    Repeat for the number of bits you want in your random number; this ...
    Philip Kendall Philip Kendall April 2001 Sinclair Miscellaneous
  • I need ASM for random numberI need to generate a random pair of coardinates in asm so that x=random no between 0 and 31, y=random no between 0 and 23. Any ideas on how to code …

    ... />
    [code]

    ORG 32768
    LD HL, (23672)
    random number generation
    LD BC, 10 ...


    ; GET A RANDOM NUMBER (Taken from Z88DK)
    ; Range ...
    horace horace September 2004 Development
  • New Compo IdeaI've had this idea and would like to know what do you think about it. I think that most of us here know how to code in BASIC. The problem with Specc…

    ... (corresponding to the first line number) with 0 (see the system ... of memory remember that every number in your program takes 5 ...

    Controls error report number and normally has a value ... appear as a flashing letter, number, symbol or even a keyword ...
    na_th_an na_th_an April 2005 Development
  • Project: M.u.l.e.Wokani came up with a great idea about trying an open-development approach for spectrum games, and I thought why not try with a game I have under dev…

    ... random number generator; all pseudo random number generators actually calculate the next random number ... generates different sequences of random numbers on every run ... .

    We repeat 8 times for all 8 ... />
    And we repeat that lot until we reach ...
    Alcoholics Anonymous Alcoholics Anonymous June 2007 Development
  • Project: M.u.l.e.Wokani came up with a great idea about trying an open-development approach for spectrum games, and I thought why not try with a game I have under dev…

    ... /> is the random number generators. u_rnd() returns a random number from 0 to ... 32768, 32768, 32768, 32768, 32768 };
    static uint amp1[] = { 0, 0, 34, 5298, 27470, 32734, 32768, 32768, 32768 ... 10199, 22569, 30532, 32579, 32768 };

    int ...
    Alcoholics Anonymous Alcoholics Anonymous July 2007 Development
  • 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…

    ... 't find that the numbers repeat themselves after a certain period ... repeat -- all prngs have to since they are not a true random ... source. It may be that the repeat period is ... in S, the seed/current random number in the sequence). Given C ...
    Alcoholics Anonymous Alcoholics Anonymous May 2011 Sinclair Basic
  • same game diffrent versionwhich games have diffrent versions of the same game

    ... />
    [I]1. generate a random number

    2. pick a ... why the topics happen to repeat :)
    Ralf Ralf October 2011 Games
  • Arcade Game Designer 3The latest version of the arcade game creation tool for the 128K Spectrum. AGD 3 now boasts pop-up menu and inventory facilities for arcade adventur…

    ... , you could try getting a random number between 0 and 8, then ... in a REPEAT 100 and you should have a random list of ...
    jonathan jonathan December 2012 Brand new software
  • Arcade Game Designer 3The latest version of the arcade game creation tool for the 128K Spectrum. AGD 3 now boasts pop-up menu and inventory facilities for arcade adventur…

    ... , you could try getting a random number between 0 and 8, then ... in a REPEAT 100 and you should have a random list of ...
    BiNMaN BiNMaN December 2012 Brand new software
  • A quick newbish questionI'm reading through 'mastering machine code on your spectrum',as kindly posted by Mr bert on this forum. Correct me if I'm wrong from what i read,bu…

    ... own (e.g. 10 USR 32768), you have to do something ... value for the BASIC RND random number command). You can use any ...
    guesser guesser March 2013 Development
  • display file addressing; screen slicingWhile working on this Compendium I'm updating or rewriting a lot of stuff. One thing I eventually came to appreciate was the simple & clever way in w…

    ... not a good choice for random number generation (except on very specific ... [/B], then this routine will repeat another iteration, [B]LD A ...
    Einar Saukas Einar Saukas October 2013 Sinclair Basic
  • cluless journo's talk retro[url]http://www.dailymail.co.uk/sciencetech/article-2479087/Over-30-Then-game-Tetris-Pac-Man-Atari-classed-digital-ARCHAEOLOGY.html[/url] magic mine…

    ... :

    10 FOR N=32768 TO 65535
    20 POKE ... N
    40 RANDOMIZE USR 32768[/QUOTE]

    Probably not ... the Spectrum's not-very random number generator would limit the results ...
    Matt_B Matt_B October 2013 Chit chat
  • Random object placementI'm looking for some advice on placing objects randomly in a game. I have a routine that reads a table and prints the corresponding object: 0 prints…

    [QUOTE=Jerri;817782][QUOTE=Einar Saukas;817774]I just run a simple empirical test (plotting randomly on screen) to compare the random generator algorithms mentioned here:

    [CODE]10 FOR f=0 TO 20000
    20 LET y=USR 32768: IF y
    Einar Saukas Einar Saukas February 2015 Development
  • Procedurally generated levelsThere seems to be a myth roaming the internet that Spelunky was the first game to use procedurally generated levels. I'm pretty sure there are ear…

    ... just 'pseudo-random'. They appear to be random but they're ... to make sure that a 'random' sequence of numbers is ... that sequence will repeat.

    Some crap random number generators will output ... they're all done, then repeat the sequence. Other, better ...
    joefish joefish June 2015 Chit chat
  • Summary : Fifty Pascal Programs by SybexI got around getting [url="http://www.worldofspectrum.org/infoseekid.cgi?id=2001037"]this book[/url] and have had a look through it which consists of…

    ... /> The program also adds a random number function which is only there ... );
    940 page;
    950 REPEAT
    960 writeln ('Enter a ... ..100];
    1000 number:=inumber/100;
    1010 REPEAT
    1020 write ...
    CP/M User CP/M User July 2018 Sinclair Miscellaneous
  • Summary : Fifty Pascal Programs by SybexI got around getting [url="http://www.worldofspectrum.org/infoseekid.cgi?id=2001037"]this book[/url] and have had a look through it which consists of…

    ... that and put my own random number generator, which is used in ... to generate a random number. On the Amstrad version random(0); is used ... ? ');
    510 {$C-}
    520 REPEAT
    530 response:=inch;
    CP/M User CP/M User July 2018 Sinclair Miscellaneous
<1234567…34>

Latest Posts

  • I am currently watching.....
    Paradigm Shifter on 12:49AM
  • New video about S-video modification on Issue two 48K Spectrum.
    Renegade on April 21
  • Fixed Speccy Software. And which games remained unfixed?
    John Elliott on April 21
  • Happy 40th Birthday to the Amstrad CPC464!
    rich_chandler on April 21
  • Another Birthday! The Game Boy Is 35!
    mel the bell on April 21
  • European Software Titles with an English version
    harriusherbartio on April 21
  • Elusive Strategy Games done by the Smaller or less Prolific Software Houses.
    harriusherbartio on April 21
  • 1992 Spectrum Software
    harriusherbartio on April 21
  • +3 Disk drive motor
    AndyC on April 21
  • Celebrity deaths...
    mel the bell on April 20

HitBox

Word Docs Hits
random 6.6K 8.2K
number 18.5K 25.1K
32768 1.2K 2K
repeat 2.6K 2.9K

Related Threads

  • I need ASM for random numberI need to generate a random pair of coardinates in asm so that x=random no between 0 and 31, y=random no between 0 and 23.<br /> <br /> Any ideas on …
  • How do I get a random numberHi,<br /> <br /> I need a simple routine to get a random number from 1 to 4. I don't need nothing very complex or that much random, it just have to p…
  • issue number of ZX Spectrum 48K by means of serial numberIt is possible to identify the board issue of ZX Spectrum 48K/+ by means of the serial number?<br /> If yes, how?<br /> <br /> <br /> [ This Message…
  • 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…
  • CMWC random number generator for Z80Seeing the interest regarding the [URL="http://www.worldofspectrum.org/forums/showthread.php?t=23070"]Xor-Shift random number generator for Z80[/URL]…
  • Random number from a rangeHow can I generate in assembly a random number from a range, let's say 0-21 or 0-57?<br /> <br /> There are generators which make it 0-255.<br /> <br…
  • Deterministic random number generatorI'm looking for a random number generator in assembly which, given a seed, the generated sequence is always the same. You change the seed, you get a …
  • So where is the random number in the Speccy ?So I am messing around with ZX Spectrum Assembler and I want a random number. I looked up previous posts and one of the links said that random number…
  • Getting an even random numberWhat would be the best, simplest way to do this ?<br /> <br /> I was thinking of say:<br /> <br /> A = RND*100<br /> <br /> Then a conditional …
  • random number generator without using rnd in basicwhat is the simplest way to generate random numbers in basic (0-255), without using the rnd statement? <br /> <br /> i also want it to always gener…

Related Searches

  • random
  • number of spectrums manufactured
  • number of spectrums made
  • serial number
  • divide out 32768
  • random assembly
  • random number code
  • input number
  • validate input is a number
  • not a number
  • validate input is number
  • if input is not a number
  • random number basic
  • random number 32768
  • random number
  • random number generator
  • random number generation
  • generate random number interface
  • machine code random number
  • random number gen

Copyright © 2024 World of Spectrum