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.076s
<1…78910111213…34>
  • Any ideas on how to solve this equation?If I have three numbers 10:A:B where A & B are equal +ve integers <10, what formula could I apply to pairs of numbers (A,10) or (10,B) such that the …

    ... ; replace action.

    Thanks for the suggestions on the conversion ... and develop a single recursive DEF FN which could do the same ... destination base, which then worked for any combination, but it seemed ... ))

    DEF FN n(n,f,t)=FN b(FN b(n,f ...
    Battle Bunny Battle Bunny September 2011 Development
  • numbers to binaryHi everyone, I have looked through the manual and have found nothing. How do you change a number to binary easily? I know you can go binary to decim…

    ... subordinate functions are:
    FN k$(n) - get character ... used as the basis for a simple encryption routine, ... for unjumbling.

    [code]
    DEF FN n$(n$,o,p)=FN t$(FN ... f(n$,o,1),p)

    DEF FN ... f(n$,b,c)=FN m(n$(c ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • saving part of a BASIC programHere's a short routine to save part of a BASIC program. The idea is that it can be merged into a program and then used to save sub-routines, etc. to …

    ... now just loops around prompting for "From" and "To" ... s variables (ie. those for the program into which the ... 'e' into "To" (short for "From VARS To E_LINE"). The ... 1 DEF FN g(v)=VAL "v-FN h(v)*256": DEF FN h(v ... br /> RETURN
    9996 FOR s=k0 TO k0 STEP ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • 3 lines of funHello! I'm looking for a tattoo to remember forever our fabulous 8 bit era. A part the pictures I posted here [url]http://www.worldofspectrum.org/for…

    ...

    [code]
    10 DEF FN h(n)=(n-48)*(n ...
    Geoff Geoff October 2011 Sinclair Basic
  • Display half a screenWorking in 128 Basic and saving screens to memory via - SAVE! "image" SCREEN$ . Is it possible to display just the top half (or the bottom half) of t…

    ... fragments. The example below is for the 1st (top) 1 ... /6th; just add 2048 for the 3rd (middle) 1 ... to calculate the base address for each fragment. It would ... quickly by using the DEF FN trick which Paddy mentioned ... -> 1919

    FOR a=0 TO 1792 STEP ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ... as this:
    [code]DEF FN z(a,b,o$)=USR ... br /> To use this function for bitwise AND operation between two ... amp;" for AND operations, "|" for OR operations, "~" for NOT operations, and "^" for XOR ... keypresses. The assembled code for the function can be ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ... ]

    Yes, using FN so that the USR function ... is only specified in the DEF FN. Your code is easy to ... the same I could use DEF FN a(a$)=USR address+ ... a$ contains "B,a,b" for BIT and so on. As ... seem to open up scope for even more flexibility. Although there ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • FN nesting error?While playing with FN functions that call assembly, I've found something weird. Check out this code: [code]10 DEF FN f(a,b)=a+b 20 PRINT FN f(FN f(…

    ... , is stored in its corresponding DEF FN "hidden place".
    2. ... places for "a" and "b" in the storage assigned to DEF FN ... code searching for a matching DEF FN function when a FN expression is ... places in the DEF FN function. When the FN function has been ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • FN nesting error?While playing with FN functions that call assembly, I've found something weird. Check out this code: [code]10 DEF FN f(a,b)=a+b 20 PRINT FN f(FN f(…

    For completeness, the same occurs with string functions although I believe FN stores ... :

    [code]
    10 DEF FN a$(a$,b$)=a$+b ... $
    20 PRINT FN a$("aaa","AAA")
    30 ... ")
    40 PRINT FN a$(FN a$("aaa","AAA"),FN a$("bbb","BBB ...
    BloodBaz BloodBaz October 2011 Sinclair Basic
  • FN nesting error?While playing with FN functions that call assembly, I've found something weird. Check out this code: [code]10 DEF FN f(a,b)=a+b 20 PRINT FN f(FN f(…

    ... DE ; discard pointer to 'DEF FN'.
    POP DE ; restore ... HL ; save address in DEF FN statement
    PUSH DE ... current parameter list for
    ;the DEF FN into machine ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • FN nesting error?While playing with FN functions that call assembly, I've found something weird. Check out this code: [code]10 DEF FN f(a,b)=a+b 20 PRINT FN f(FN f(…

    ... HL ; save address in DEF FN statement
    PUSH DE ... DE ; discard pointer to 'DEF FN'.
    POP DE ; restore ... the DEF FN param definition, skipping over hidden places for ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    Using DEF FN is neater but really slows ... /> I did some relative timings for 1000 AND+XOR+OR actions ... yet)
    +7.1 MI FN version
    +7.3 BB ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ... QUOTE=Battle Bunny;571301]Using DEF FN is neater but really slows ... expression, so SCANNING is called for parameter evaluation. Your version doesn ... to use a separate variable for that if you want to ... expression for the above demo can be written as:
    FN z(FN ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ... excluding literals can be used for either parameter, so this is ... the same way as the DEF FN method did, as the operator ... , the FN method is neater.)

    Timings for that nested ... function for 1000 VAL method and 1000 FN method ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • Mazes and Tremaux's AlgorithmI've done a version of Tremaux's maze solving algorithm which solves my current test maze with 400 junctions and 715 connections in a reasonably quic…

    ... eventually used my own idea for a reverse search method to ... to assemble the route segment for any other key points it ... 1216 LET hs=k0:
    FOR i=k1 TO em: IF ... 1224
    1218 LET st=FN s(y$(i))-k3*ir ... STEP k3:
    LET loc=FN p(a+bo)
    1220 ...
    Battle Bunny Battle Bunny November 2011 Development
  • BREAK from GOSUBHere's another one. Just in case you wanted to break out of multiple GOSUB levels with a single command, here's a routine to do it, tested on all mod…

    ... little program which I used for testing, assuming the routine has ... been loaded at address 'retsub'. FN c() is quite handy as ... SUB FN c()+5: PRINT FN c(): GO TO FN c():
    DEF FN c ... ()=PEEK 23621+256*PEEK 23622
    10 GO SUB FN ...
    Battle Bunny Battle Bunny December 2011 Sinclair Basic
  • Generating a constant of 2?Hi Folks, Through "The Wizard of WOS" I learnt that you can generate constants as follows: [B]NOT PI=0 SGN PI=1 INT PI=3[/B] Is there a quick way …

    ... of BOB's input routine, for example.

    I ... : k0-k9, kA-kF for 10-15 or kA-kZ ... for 1-26, then kC0=100 ... using "GO TO/SUB variable" for frequently referenced routines (which I ... saved by defining:
    DEF FN c()=VAL "FN p(23621)"
    and ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • Generating a constant of 2?Hi Folks, Through "The Wizard of WOS" I learnt that you can generate constants as follows: [B]NOT PI=0 SGN PI=1 INT PI=3[/B] Is there a quick way …

    ... : k0-k9, kA-kF for 10-15 or kA-kZ ... for 1-26, then kC0=100 ... "GO TO/SUB variable" for frequently referenced routines (which I ... saved by defining:
    DEF FN c()=VAL "FN p(23621)"
    and ... ... IF (error) THEN GO TO FN c()
    [/QUOTE]
    ...
    Paddy Coleman Paddy Coleman February 2012 Sinclair Basic
  • 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…

    OK, I've been patient for all of fifteen minutes, and ... I can't wait for Dr.Beep any longer.
    DEF FN and the calculator; the 14 ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • 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…

    ... the name. In addition, as DEF FN parameters can only have single ... a string definition is set for a simple string and reset ... for either type of subscripted string ... to be '0' in a DEF FN string variable; putting in a ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • 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…

    ... use the latter location for a couple of routines ... VARS is also useful for preservation, as CLEAR won ... doesn't call SLICING for the destination, thus giving ... avoid this problem, to do for example:
    LET a ... memory after use of the DEF FN memory move. If I ...
    Paddy Coleman Paddy Coleman February 2012 Sinclair Basic
  • 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…

    ... code sets up a dummy DEF FN of a$:

    [CODE ... /> 110 RESTORE 100
    120 FOR a=USR "A" TO USR ... /> 41 29 ) Closing parenthesis for the DEF FN[/CODE]
    Next we need ...
    Paddy Coleman Paddy Coleman March 2012 Sinclair Basic
  • 80s thrash band i.d?trying to remember this hardcore/thrash album fom 1985 or 86 I used to have. all I remember is it was supposed to be known as one of the earliest thr…

    ... />
    gay metal - like aerosmith, def leppord, dave lee roth
    for music, canibal corpses, carcass



    as for other music it should either ... a small indie record shop, look for the "Heavy Metal" bit and ...
    Bermondsey Bob Bermondsey Bob March 2012 Chit chat
  • Reading interface 2 using the IN commandHow do you read using the IN command from BASIC? You can read multiple keys at once, but I cant remember the values...

    ... function that allows to ask for the state of one specific ... position p, we will use for w = 2^p . Returns the ... of how to use it for reading all the keys in ... example).

    [code]10 DEF FN b(n,w)=1 AND ... );
    70 LET right=NOT FN b(t,8): PRINT ("RIGHT ...
    mcleod_ideafix mcleod_ideafix March 2012 Sinclair Basic
  • LZ77 en/decodingI've written an LZ77 en/decoding routine as I couldn't find one around for the Spectrum. Initially I'm just doing it in BASIC to get the logic right.…

    ... 2",NOT PI;l'':
    FOR a=SGN PI TO s ... (x-y))/2:
    DEF FN u()=VAL "65536*PEEK 23674 ... 23672"/50:
    DEF FN t()=FN m(FN u(),FN u())
    [/code ... as seen in post #21, for example. I'll do an ... packer hadn't been checking for EOF at the right ...
    Battle Bunny Battle Bunny March 2012 Development
  • Increasing the number of UDGs...Hi Folks, I know by default the Spectrum can have 21 UDGs (48K) and 19 (128K) and that the address of the bit patterns is pointed to by the UDG syst…

    ... and written a short routine for handling 256 UDGs, using ...
    Note that it checks for control characters and restores the ... 1):
    DEF FN g(v)=v-FN h(v)*256: DEF FN h(v ...
    cp c ;check for at least 3 following characters ...
    Battle Bunny Battle Bunny March 2012 Sinclair Basic
  • those darned recursive functions againI've been stuck on this one all evening. I want to dump out some memory in binary to debug a program. I've got a simple mod 2 division loop to do tha…

    ... , then stick the DEF FN in the middle, replace the "DEF FN...=" with PRINT ... time, which should be handy for debugging recursive DEF FNs.
    Battle Bunny Battle Bunny March 2012 Sinclair Basic
  • LZ77 en/decodingI've written an LZ77 en/decoding routine as I couldn't find one around for the Spectrum. Initially I'm just doing it in BASIC to get the logic right.…

    ... of actual distinct words for a text file is ... around 700 and for graphics around 1000.
    ... history table of addresses for the first character of ... time, maintaining a table for the first two characters ... />
    [code]
    1 DEF FN m(n,m)=n-INT ...
    Battle Bunny Battle Bunny March 2012 Development
  • 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…

    If:
    DEF FN n()=PEEK 23621+256*PEEK ... as simply:
    GO TO FN n()
    so it'll ... - and look, no line numbers!

    And if:
    DEF FN n ... as simply:
    GO TO FN n(keychar)
    Battle Bunny Battle Bunny April 2012 Sinclair Basic
<1…78910111213…34>

Latest Posts

  • Where to Buy the New or Fairly Recent , Excellent ZX Spectrum Games Software?
    Your Spec-chum on 1:34PM
  • i am currently listening to........
    mel the bell on 11:34AM
  • Mis-labeled cassette titles or a name change?
    harriusherbartio on 11:06AM
  • Ways to preserve Speccy Tapes in the loft
    harriusherbartio on 10:58AM
  • Fixed Speccy Software. And which games remained unfixed?
    harriusherbartio on 10:47AM
  • Minor British Sports that did become games on the ZX Spectrum
    harriusherbartio on 10:30AM
  • How to return to basic properly from ASM
    Paradigm Shifter on 1:54AM
  • Frankie's ZX Spectrum Digouts
    Zup on April 8
  • Elusive Strategy Games done by the Smaller or less Prolific Software Houses.
    harriusherbartio on April 8
  • 1992 Spectrum Software
    harriusherbartio on April 7

HitBox

Word Docs Hits
def 11.7K 12.9K
fn 866 4.4K
look 49.6K 56.6K
for 352.6K 637.2K

Related Threads

  • Fix for the DEF FN bug of zmakebasSome months ago I discovered a bug in zmakebas: it does not include the 5 bytes required after every parameter of a DEF FN.<br /> <br /> By the tim…
  • Corona Encantada for MSX and Invasion of the Zombie Monsters for CPC, from RELEVO, for saleWe have a remaining of the stock of games we offered in the crowfunding of the book "Enciclopedia Homebrew". They are Corona Encantad for MSX in cart…
  • Looking for the game Rex for spectrumHello,<br /> I am looking for the game Rex(I think there are two parts 1&amp;2) by Martech.
  • Heres one for you tooo make some money :) For MIA`sYou have a massive archive "INFOSEEK", but i know you dont allow offsite looking at this source of info.<br /> <br /> But if you produced a CD with t…
  • ANNOUNCE: Speccy-Player (AY file player for a Real Spectrum) version 0.1 available for downloadI finally managed to get my AY file player for Real Spectrum 128 (working title "Speccy-Player") into a suitable state to unleash it on the unsuspect…
  • Spectaculator - any hope for support for CTRL ?When running CP/M for +3, the CONTROL key is SSHIFT+CAPSS (i.e. EXTENDED).<br /> 1. It would be fine to emulate this to the PC's CTRL key. At present…
  • Anyone want to swap all my tapes, for all systems, for game carts?I live in terrace house, not much bigger than the ones on Coronation Street. I don't have a whole lot of spare room left, and my wife, bless her, obj…
  • Recommend a 48k music program for me, or teach me how to search for them in infoseek. ThxThe only 48k music tracker I happen to know is Wham!<br /> <br /> Which ones do you like?<br /> <br /> Can anybody point me to some old threads on th…
  • Search plugin for Firefox/Mozilla..... for WoS?Hello!<br /> <br /> Is there a searchplugin made for Firefox/Mozilla.... thats work with WoS - Sinclair Infoseek? If not can someone make one please.…

Related Searches

  • modulo function def fn
  • fuse def fn keyboard
  • def fn usr
  • def fn
  • def fn within a function
  • def fn d
  • bin def fn
  • def fn recursive bug
  • def fn bug
  • def fn recursive bin
  • def fn library
  • def fn v
  • def fn gosub fast
  • def fn battlebunny
  • def fn fast
  • spaghetti def fn
  • dr beep s recursive def fn
  • dr beep def fn
  • def fn trick
  • def fn copying

Copyright © 2024 World of Spectrum