-
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 …
... main Substring section; it's just the method by which ... all, even though it's called via a PRINT statement ... got the stack idea from Dr Beep, which I enhanced to accept ... ). In this case it's the Substring routine which does ... printed a function; eg. "FN d(2,0) -
Copying a SCREEN$ in ZX BASIC in 1 second?!Following on from the revived "[thread=20207]Saving a complete SCREEN$ in BASIC[/thread]" thread (although Arjun really only needed a suitable POKE i…
[QUOTE=Dr BEEP;525373]No need to set ... :
IF P THEN LET S$=A$
70 IF NOT ... $=S$
80 RETURN
[/code][/QUOTE]
Hi Dr BEEP ... define the name of the DEF string?
14,
0 ... -
Poking a string to memory...I'm looking to poke a string of characters including colour control codes to memory, I'm currently doing it by hand: 16,2,19,1,22,1,1,144 That equa…
... on some changes made by Dr BEEP on WOS. Note: as described ... code sets up a dummy DEF FN of a$:
[CODE ... 29 ) Closing parenthesis for the DEF FN[/CODE]
Next we need ... -
Keyboard problem...Hi Folks, I have hit a problem in MRT and I cannot see how to get around it. Please allow me to explain. I have a list of items from which one can…
... TO, GO SUB, DEF FN (I think that's all there is, ... corrupted, so probably something's not getting popped off a ... beforehand then a self-contained FN would work, but it ... impossible to use nested or recursive FNs - and using a ... LETs prior to every FN call isn't very ... -
Cricket: Duckworth/Lewis CalculatorIdeal for any one-day cricket match which uses the Duckworth/Lewis method to calculate the target score if there is an interruption to play. The alg…
... ;649088][code]
10 DEF FN d(o,w,u)=299 ...
[code]
10 DEF FN d(o,u)=299.76148 ... use it.
its not recursive , or i really mis something ... three EXP functions in that DEF FN, as each of them involves ... look-up.
That's not to say I didn ... -
WibbleBibble's Basic threadHi in an attempt to keep my questions from spamming the forum. I think its better to put them all in one place. Thanks everyone so far, I feel I am …
... PRINT statement, then there's no need to reset them ... LET m=FN m(n).
* It's unnecessary to ... function argument in () if there's only one; eg. INT ( ... DEF FN i()=INT (RND*6)+1: DEF FN n()=FN i()+FN i():
DEF FN ... LET p(p)=0: BEEP 0.02,(p+1)*5 ... -
Average age of a Spectrum fanHi! I'm wondering what's the average age of us, readers of this forum. I'm 29 and started playing and programming on the Spectrum when I was 13 (infl…
... Ed
6 34+10 Dr BEEP
7 25+10 Arjun ... Sokurah
77 36 Maroc's Astral Projection
79 35 ... 32 GreenCard
89 34 def chris
90 54 Mevweb ... -
Project on ZX Spectrum in UniversityHi everyone, I am Max, student of media studies in berlin, and I have to do a little project on the spectrum. I am working on a sinclair zx spectrum…
... to write certain forms of recursive function. For example, this function ... />
DEF FN j$(s,l)=CHR$ PEEK (s)+VAL$ (("FN j$("+STR$ (s+1)+","+STR ... tracing routes on a map). 's' is the node address and ... nodes).
Also, it's possible to make the RH ... -
calculator and sinusok, look at the Sysel's routine: [PHP]3 5b00 *s 4 5b00 tabsin = #7000 03 mksin 19.11.1995 Busy soft …
Here's the changes to that routine ... self-modifying code and a recursive function to boot.
[ ... TO ):
LET b(i)=FN i(0,LEN n$): LET ... );" ";:
NEXT i
2012 DEF FN i(i,j)=VAL (("(CODE ... than n.
[code] 10 DEF FN h$(n)=CHR$ (INT n ... -
BIN2BAS (load BASIC text into emulator) utilityI've nearly finished testing this. It allows a BASIC program to be loaded from a text file in any emulator which has a "load binary" option. I was wo…
... for general testing, here's the artificial constructs which ... PLAY "cdefgabC"
1006 SAVE ! "S": CAT !: ERASE ! "E": LOAD ... ! "M"
1008 SAVE!"S": CAT !: ERASE!"E": LOAD!"L ... +3 commands
11 BEEP 1,2: BORDER 3: ... 17 DATA 1,2,3: DEF FN a(b,c)=b+c ... -
Spectrum Utility Routines Compendium (pending)I couldn't make up my mind into which section to put this, so it's ended up here for some tenuous reason. I haven't forgotten about this. I've been …
... bug in the recursive version of the Hex2Dec ... in the appendix. That's what happens when you ... 5F5E0FF = 99999999)
3051 DEF FN d(h$)=16^(LEN h ... 64))
+VAL (("FN d(h$(2 TO))+" ... change, I updated the recursive versions of AND, OR, ... -
Been busy today.... Protesting!Today I went to Amsterdam to protest against the government. Here I am when someone took a photo of the political leader of the dutch socialist part…
[QUOTE=def chris;724791]nice deep political ... :D[/QUOTE]
[QUOTE=Dr BEEP;724792]Now why doesn't ... />
Oh I see, it's Mel's![/QUOTE]
well ... -
Was there a 'great' golf game on the spec?So...a few sports had games made of them on the speccy that were more or less as good as you could hope for IMO. Emlyn for football*, konami's ping p…
[QUOTE=Dr BEEP;727186]I liked Konami Golf[/QUOTE]
Yes, that's pretty ... good in my opinion.
[QUOTE=def chris;727187 ... [/QUOTE]
Me too, it's just that I don't ... -
hash function permutation tableI'm using a simple Pearson hash function to generate keys for a $(103,6) array using a 256-byte permutation table. How do I arrange the entries in th…
... ]
char *strings[] = {
"BEEP", "BIN", "BORDER", "BRIGHT", "CAT", "CIRCLE ... CLS", "CONTINUE",
"COPY", "DATA", "DEF FN", "DIM", "DRAW", "ERASE", "FLASH", ... {
h = pear_perm[(h + *s++)&63];
}
return ... -
hash function permutation tableI'm using a simple Pearson hash function to generate keys for a $(103,6) array using a 256-byte permutation table. How do I arrange the entries in th…
... code]
char *strings[] = {
"BEEP", "BIN", "BORDER", "BRIGHT", "CAT", "CIRCLE ... CLS", "CONTINUE",
"COPY", "DATA", "DEF FN", "DIM", "DRAW", "ERASE", "FLASH", " ... {
h = pear_perm[(h + *s++)&63];
}
return ... -
User defined function in Sinclair BASICI'm looking to create a user defined function in Sinclair BASIC to add up numbers being input. This is the program without a user defined function be…
... . However the function can be recursive and this leads to much ... in rather amazing one-line recursive DEF FNs.
Unfortunately I ... had a think.
def fn s(a$)=(a$"" AND VAL a ... )) + ((LEN a$ > 1) AND FN s(a$(2 TO))) -
Go to, gosub or something different?I'm going to write an arcade game in basic. May compile it. In both basic and compiled basic would a goto or gosub be faster? Also if I stored …
... as long as a DEF FN only references its own ... its parameters within its DEF FN extent which is always ... searched first; but a DEF FN is restricted in the code ... a GO SUB routine. Recursive DEF FNs use much more memory ... the byte, realise it's a REM and skip to ... -
Floppy drive fixI know this might be a long shot but does anyone know or does anyone fix floppy drives I ha e an nous discovery and the controller on the floppy driv…
... br /> 20 RANDOMIZE USR 14070:DEF FN a()=CODE INKEY$ #4+256 ... off=(1AND dr=1)+(4AND dr=2):POINT #4;FN a()+10 ... :POINT #4;FN a ... 0
200 FORMAT "m";dr;n$:BEEP .1,10:CLS :CAT ... dr
9998 STOP
9999 ... -
This can (not) be true!Yesterday I programmed an entire spreadsheet in just 1 line of code (see also TOPIC ONELINERS). It can calculate formula's, use text and fieldvalues …
... ONELINERS). It can calculate formula's, use text and fieldvalues just ... .gif[/img]
Johan "Dr BEEP" Koelman -
2 days Meeting in Holland 27-04-2002 and 28-04-2002For you who were not there, a short compilation! "Moorhuhn", the addictive internetgame which keeps 1000's of Germans out of work is released for th…
... addictive internetgame which keeps 1000's of Germans out of work ... ....
Well, that's just my short impression.
Dr Beep. -
OUT to file, IN from fileOUT - sentences won't do much on emulators since they mostly communicate with external devices. If there was an emulator that would write the (last) …
... to light up some LED's.
The emulator could write ... and show the matching LED's. The other way 'round as ... /> [ This Message was edited by: Dr BEEP on 2002-08-11 16 ... -
ZX PC Interface : The manual, schematics and more info... ZX <-> PC Interface ------------------- Contents 1) The ZX <-> PC Interface 1.1) What is it? 1.2) What does it do? 2) Install…
... S | /IO A14| S | B
BSY| S | P2 | S ... +
H | 7 | | |
S | 4 | |--+ |
Q | L | ... br /> Dr Beep on [ ... -
ZX PC InterfaceZX <-> PC Interface Contents 1) The ZX <-> PC Interface 1.1) What is it? 1.2) What does it do? 2) Installation 2.1) The softwa…
... | S | /IO A14| S | +B
*BSY| S | *P2 | S ... br /> +H | 7 | | |
+S | 4 | |--+ |
+Q | L ... br /> Dr. Beep on [url ... -
Z80 Emulator Source?Found a link to this on comp.sys.amstrad.8bit. i havent been with the discussion long but supposedly this is the source for a Z80 emulator. Forgive m…
... don't know if it's a Z80 emulator for Spectrum ... might be interested. I saw DR. Beep posted there, maybe he can ... -
The Spectrum in NederlandThe Speccy wasn't really that popular in Holland, was it? Martijn can answer this, and Dr BEEP too. I'm asking because a Dutch poster on another gami…
... ? Martijn can answer this, and Dr BEEP too. I'm asking because ... !
That's an odd contradiction. So Martijn, Dr BEEP and anyone else ...