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.038s
<1234567…34>
  • 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 ... result in A:

    [CODE]

    org 40000
    [/CODE]

    As you can ...
    Patrik Rak Patrik Rak June 2012 Development
  • 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
  • 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
  • Akalabeth gamei found now that someone ported an ansi-basic game (coded in 1979?) to msx-basic - what about a zx-spectrum basic version of it? ;) https://plus.goo…

    ... ; one is just selected at random:
    [code]
    1681 IF p ... /> GO TO VAL "1685"
    [/code]
    The two references to ... missing rounding is here:
    [code]
    9240 PRINT AT k8 ...
    Battle Bunny Battle Bunny January 2017 Sinclair Basic
  • 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 …

    ... .
    ret
    ; Simple pseudo-random number generator.
    ; Steps a pointer ...
    ld a,(hl) ; Get "random" number from location.
    inc hl ... code ''this is the bit we are interested in''. also the random number ...
    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. …

    ... a piece of code that gets you a truly random number from the ... 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
  • 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
  • Code optimisation! 16bit number to 5 digit stringJust for interest this one, any thoughts on how to make this as fast as possible? Little optimisations to this routine or a complete reimagining? …

    ... ?


    [code]number2string: ;arrive DE number, HL at end of ... /> lp: inc (hl) ;increase string number
    ld a,(hl)
    dec de ;decrease number counter
    ld a,d ... /> db '00000' ;16 bit string number
    ;[/code]
    R-Tape R-Tape December 2016 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 ... 140
    [/code]
    "This is the 32-bit random number generator routine ... 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
  • why am i getting b integer out of range in this code?ive tried running this in spin but thats what i get [code]main org 40000; ; We want a black screen. ld a,71 ; white ink (7) on black paper (0…

    ... code for AT character.
    rst 16
    call random ; get a 'random' number ... /> rst 16
    call random ; want another pseudo-random number.
    and 31 ... .
    ret
    ; Simple pseudo-random number generator.
    ; Steps a pointer ...
    digital digital June 2020 Assembler
  • Programming MC : first stepsIsn't nice to collect all kinds of short routines to help making the first steps into MC for everyone who never touched MC? What I mean is mostly th…

    ... and therefore simple to code with some standard MC ... is a simple Random number generator for every number between 0-255 ... a dice.

    [code]

    org 50000
    seed defw 0
    [/code]

    [ This Message ...
    Dr BEEP Dr BEEP August 2005 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…

    ... test. Here is the Z80 code for the (1,1,3 ... the A register:

    [CODE]
    rnd ld hl,0xA280 ...
    Patrik Rak Patrik Rak December 2008 Development
  • Randomize usrHi, I've often wondered why/how they came up with RANDOMIZE USR <memory address> to invoke machine code couldn't they have used a better keyword (e…

    ... /> RANDOMIZE USR to invoke machine code

    couldn't they ... keyword that executes the machine code
    so what does the ... know about RANDOMIZE is regarding random number sequence position
    saiwong saiwong December 2009 Sinclair Basic
  • Canny use of the 'r' register?Seeing Sokurah's code in the [URL="http://www.worldofspectrum.org/forums/showthread.php?p=583188#post583188"]crunch sound thread[/URL] has made me th…

    Seeing Sokurah's code in the [URL="http://www. ... ; easy way to get a 'random' number eg:

    ld a ...
    R-Tape R-Tape November 2011 Development
  • RND CommandsExactly how random are they? Reason I ask is I'm using 4 of them to generate a random number, the value of which then assigns movement commands to f…

    Exactly how random are they?

    ... of them to generate a random number, the value of which ...

    Is this BASIC code [I]actually[/I] randomising properly ... ?

    :???:

    [CODE]920 RANDOMIZE
    930 LET ... n=INT (RND*8)[/CODE]
    Wookiee Wookiee January 2012 Sinclair Basic
  • Interview with VERONIKA MEGLER ("The Hobbit" programmer)This interview with Veronika Megler (The Hobbit) has been published by elmundodelspectrum.com in Spanish, I copy it here for you all in its original …

    ... ?s graphics routine and his code would draw the picture. ... all the same logic and code for both.

    ... , I realized that the random number generator was producing the same ... was actually pseudo-random. So Phil wrote a random number generator that ...
    jmvbok jmvbok March 2012 Games
  • Model Railway Timetable Version 1.4.12.0313...Hi Folks, Since November 2010 I have been working on my [B]Model Railway Timetable [/B]software. Thanks to the considerable help and patience of yo…

    ... routine (Battle Bunny)
    * New random number generator (Patrik)

    ... increase performance. Getting the code to run at an acceptable ... contains some debug/development code but is fully functional ... REMs removed and the line number renumbered to 1,1. ...
    Paddy Coleman Paddy Coleman March 2012 Sinclair Basic
  • Basic BASIC help needed RNDHi all, I have recently re-discovered an old program I wrote in the early 90s which would do generate random lottery numbers. I know little now, an…

    ... 90s which would do generate random lottery numbers.

    random number between 1 and 49.

    The code I ... have written generates a semmingly random number in this ... number OVER 49!

    Here is my crappy piece of code ...
    landorb landorb March 2012 Sinclair Basic
  • They're here ! BASIC horror themed games[IMG]http://i1163.photobucket.com/albums/q541/Rygarman/theyre_here.jpg[/IMG] Because its my birthday tomorrow (38 years young) I am making these ga…

    ... computer think of a random number, and could see how ... made everything that happens random! I think there are ... the unofficial ?Dracula? borrow code from a type in game ... /> Looking at the code now I can hardly ... games from books of code and painstakingly try to ...
    retromad retromad November 2012 Brand new software
  • Issue 6 repair with a twist...(Starting with a slight grump - the forum ate my first attempt at this so this'll probably end up being a bit terse :)) I got a Issue 6 48K machine …

    ... issue is the random fill test, where a random number generator is loaded ... against the output of the random number generator. In a healthy ... a soak test where the random number generator is seeded with ... any changes and whether updated code will catch the fault.< ...
    balford balford September 2014 Hardware
  • 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
  • Computer Haiku (converted from C64)[url=https://archive.org/details/Computer_Haiku_1983_CES]Here's the original C64/PET program - "Computer Haiku" by Commodore Educational Software, 19…

    ... />
    Most of the original code was discarded as the Bread ... to the original programmer - the random number generator was set by the ...
    The Mighty Dopethrone The Mighty Dopethrone September 2020 Sinclair Basic
  • 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. …

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

    Of course, ... top of my head (pseudo-code):

    print "Wait ... bits you want in your random number; this should be pretty good ...
    Philip Kendall Philip Kendall April 2001 Sinclair Miscellaneous
  • did anybody program games for their spectrum?did anybody make games for their spectrum and have you still got them in tap/z80 format. i once attempted to make a side scrolling game but it didn…

    ... See BASIC program added.
    [code]
    10 LET X=90 ... next ball until empty
    [/code]

    Make X= ... br /> After a random number it will be
    (random =3)
    ... br /> After a random number it will be
    (random =1)
    829456713 ...
    Dr BEEP Dr BEEP December 2002 Games
  • C, Z88DK and the Sprite Pack Library I wrote a short demo that shows a taste of what can be done from C on the Spectrum: [url="http://justme895.tripod.com/zqa/pacmen.zip"]http://justme…

    ... /> Sprite Pack is a machine code library for the Spectrum, TS2068 ... mode

    + Sprites: any number, any size placed on screen ... />
    + Miscellaneous functions including a random number generator, multiplications, a pattern flood ...
    Alcoholics Anonymous Alcoholics Anonymous September 2003 Development
  • 16k/48k Sound FXI am now moving on from graphiocs to trying to build up a library of sound fx to be used with a 16k/48k Spectrum. Does anyone have any example m/cod…

    ... , thankyou very much

    [code]
    .org 8000h

    ld a,(hl) ; next "random" number.
    inc hl ; pointer.
    RET

    .end
    [/code]
    robpearmain robpearmain May 2004 Development
<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
code 41.6K 91.2K

Related Threads

  • Machine Code Sprites Example Code Using Char Based SystemBelow is my WIP code to do smooth screen wrapping sprites using char positions and offsets, as opposed to writing direct to a line (0-191) and shifti…
  • IM2 Machine Code Sprites Example Code Using Char Based SystemFurther to my earlier post, here are sprites running using char method with IM2 driving it<br /> <br /> Note, for 48k spectrum using TASM<br /> <br /…
  • 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…
  • Saving BASIC code as CODE... can't start programHi guys!<br /> <br /> I'm trying to create an adventure game for the Speccy in BASIC, called The Legend Of The Red Dragon.<br /> <br /> I'm using the…
  • 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…
  • Converting Basic code into machine codeIm just interested to know if I can converter a game I've written in basic into Machine code, Is their a program that can do this??

Related Searches

  • lowest memory for code
  • lowest memory position for machine code
  • lowest memory position machine code
  • lowest memory machine code
  • lowest memory code
  • random
  • number of spectrums manufactured
  • number of spectrums made
  • serial number
  • code 16384
  • random number basic
  • random number 32768
  • random number 32768 repeat
  • random number
  • random number generator
  • random number generation
  • generate random number interface
  • machine code random number
  • random number gen
  • print number machine code

Copyright © 2024 World of Spectrum