-
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 ... -
New oneliners for 2008[INDENT][INDENT][INDENT]Here's my attempt at a first-person-perspective 3d game in one line of BASIC. It's called 'wormhole', and you've got to get t…
... AT y*3-2,23;CHR$ (64+y)," ";y;AT 0 ... ,y*3;CHR$ (71+y);AT 21,y ... *3+1;CHR$ (78+y); PAPER 1; AT ... -
detect deleteHi everone How can you detect that the caps + 0 (delete) is selected. Im making a word program for fun, but i need to be able to delete characters..…
[QUOTE=mcleod_ideafix;481181]IF INKEY$=CHR$ 12 THEN delete is pressed[/ ... serious you should investigate using CHR$ as the control codes give ... -
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…
... nelem: LET
p$(n)=CHR$ (RND*25+65): 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…
... nelem: LET
p$(n)=CHR$ (RND*25+65): 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…
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 ... -
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 ... -
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…
... TO n: LET p$(i)=CHR$ (RND*25+65): NEXT i ... -
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 ... -
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…
... TO n: LET p$(i)=CHR$ (RND*25+65): NEXT i ... -
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…
BTW, already sorted or inverse order may be best case for one sort and vice versa for another.
That may mean that one type of sort (Quicksort/Shell sort/Comb sort) is better for one program and worse for another. -
ForthTrying to search for FORTH programs and FORTH articles within the forum is proving to be a complete nightmare!! If I search for FORTH in Infoseek I …
... INK/PAPER/BORDER/FLASH/BRIGHT/INVERSE/GOVER (equivalent to BASIC OVER ... -
INSTR function...Hi Folks, Another little program that people might find useful: [CODE]100 DIM i(4) 110 LET a$="This is some sample text" 120 LET b$="text" 130 GO S…
... !"
120 LET i$(1)=CHR$ LEN a$+a$
130 ... "
140 LET i$(2)=CHR$ LEN a$+a$
150 ... -
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…
General purpose full screen input routineHi Folks, One of the things that annoyed me back in the 1980s with most BASICs was the lack of a full screen "formatted" input function. You could …
Hi Folks,
Been playing with this and made a few improvements.
[Code]100 REM *---------------------*
110 REM PSS-XINPUT DEMO
120 REM PeaSea Software \*2010
130 REM *---------------------*
140 GO SUB 9315: ...Whole upper memory lostHi! I own a rubber key Spectrum with 48K RAM. Suddenly it lost it's whole upper memory. All diagnostic programs says that it's 16K model with workin…
... of random byte values, their inverse etc), and after each poke ...Games in machine codeHi everyone, How do go about doing multiple shots like a machine gun, do you have to store every x and y position of each bullet? When you kill som…
...
xor bl,255 ; INVERSE alpha
mov al ...
xor bl,255 ; INVERSE alpha
mov al ...Mute switchOn a standard 48K machine, would it do any harm to fit a mute switch into one of the sounders connections ? I mean by 'harm' switching it on / off w…
... anode, so it will have inverse polarization, thus, no current thru ...