-
Just wrote my first useful working Speccy BASIC program in years...A nice UK National Lottery number generator. And not just any lotto number generator either. This one generates 8 lines of 6 numbers without replace…
A nice UK National Lottery number generator.
And not just any lotto number generator either. This one generates 8 lines of 6 numbers without replacement (i.e. using 48 of the 49 numbers from 1 to 49) without repeating any number twice.
< ... -
Couple of questions...Howdy, 1. Is there a decent way to get a random number in BASIC/MC? I've been using LET a=INT(RND*2)+1 but the numbers tend to stay at 1 or 2 most …
... been using LET a=INT(RND*2)+1 but the numbers ... -
Writing internet servers in ZX BASICNew Spectranet news! I have just finished adding the code to allow listening sockets to be used from BASIC. A simple example: [code] 10 %listen #4,…
Obtuse One-LinerFollowing a request in another thread, this could almost be crammed into one line. It uses a simple ON ERR CONTINUE to give a continuous display. [c…
Following a request in another thread, this could almost be crammed into one line.
It uses a simple ON ERR CONTINUE to give a continuous display.
[code]
10 INK RND*6
20 IF RNDHappy birthday RND!!Merry birthday... drink lots!! :smile:
Merry birthday... drink lots!! :smile:Die Rolling sound?Digging out my old Fighting fantasy programs (so far unsuccessfully... thanks c60) had me wondering how I'd program it these days. Hopefully better,…
... to 12
BEEP rnd/100,(-14-(rnd*5))
NEXT n ...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 p$(a)=CHR$ (65+RND*25): NEXT a
140 ... : LET p$(a)=CHR$ (65+RND*25): NEXT a
140 ...Happy birthday RND!Merry birthday... drink Chaos! :smile:
Merry birthday... drink Chaos! :smile:Birthday PlotsHello all; When browsing the web, I stumbled across an oddity known as Birthday Plots. In effect somebody enters a numeric date and the computer prin…
... )*0.01
50 I=RND(-Z*0.0000001)
60 ... I=INT(RND(Z)*10)+5
70 ...
100 R[J,1]=RND(Z)
110 IF R ... ]
150 R[J,2]=RND(Z)
160 IF R ...Jose Antonio Carrera - Jose A. Carrera MerinoThere are many probabilities that the same Jose A. Carrera who participated in King Leonard is the same one as the one in Satan by Dinamic (who also …
There are many probabilities that the same Jose A. Carrera who participated in King Leonard is the same one as the one in Satan by Dinamic (who also appears in Carlos Sainz?s instructions as one of the authors).
Cheers :)Procrustean PrintingHere's a short routine to manage printing of text with command tokens, to avoid messing up the screen when they are expanded. It just prints as many …
... /> jr c,NOSPACE ;if not RND,INKEY$,PI
ld a ...Noob needs helpSorry gents but decided to have a play with basic...see if I could knock up a shonky as hell space invader type game I seem to have gotten myself co…
... is done on a basic (RND*2) command which then determines ...SpecBAS 0.724 Now available!Hi folks - Again, a new SpecBAS for you. Some stunning bugs made their way into the last one, so I had to get a new version out sharpish. And for o…
Hi folks -
Again, a new SpecBAS for you. Some stunning bugs made their way into the last one, so I had to get a new version out sharpish. And for once, you windows folks are at the bleeding edge :)
Anyhoo, new features are few ...30th PDF IS HERE!!!!![url]ftp://ftp.worldofspectrum.org/pub/sinclair/extras/30thAnniversary/ZXSpectrum30thAnniversaryCommunitySouvenir.pdf[/url] OMG we got it out on t…
... .sendspace.com/file/cfqtn1[/url] RND's very own personal download ...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 ...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]…
... /> org 40000
call rnd ; BASIC driver
ld c ... ,0
ret
rnd ld de,0 ; c,i ... = t / 256
ld (rnd+1),de
ld ...happy birthday RNDhave a good .. if not random one..
have a good .. if not random one..Hidden message in Down To EarthJust found this in the Down To Earth code. I like reading these old messages left behind by programmers. [code]WELCOME TO ORIFICE Credits Darren B…
... FOR-NEXT loop,
a RND & a devious POKE command ...Happy birthday RND!Hope it's a good 'un. (Don't forget to RANDOMISE.)
Hope it's a good 'un.
(Don't forget to RANDOMISE.)New game: The curse of OddvilleDon't get too excited! :p Just wanted to share this because the coding of it is driving me mad, or rather the game designer is. The curse of Oddvil…
... Patrick Rak's XOR Shift RND generator, and Einar's 'Dragon ...Help a small machine code game.Hello all you clever wossers are there any GOOD?? games that are in machine code (no basic apart from the loader,rnd usr bit) but are very small ma…
... basic apart from the loader,rnd usr bit) but are very ...INPUT help?Hi folks. :) Brace yourselves, this is probably a very silly question, my BASIC knowledge is very... well, basic... Let's say, for example, I'm mak…
... number=1+INT (1+999*RND)
20 INPUT "Can you ...What's wrong with this code?[code]10 LET X=1+INT (RND*99999999): LET Y=1+INT (RND*99999999) 20 INK 4 30 PAPER 0 40 PRINT "Quest for ye flask!" 50 PRINT "?2014 Yoshiatom" 60 PRIN…
... ]10 LET X=1+INT (RND*99999999): LET Y=1+INT ... (RND*99999999)
20 INK 4< ...

