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 898 results in 0.001s
<1234567…30>
  • problem with DEFADD storageI have a function: DEF FN t(t$,m,t)=USR t which is called with, for an example: LET bc=FN t("t$()",mcworkspace,mcputt) where, at the time: mcworkspac…

    I have a function: DEF FN t(t$,m,t)=USR ... , for an example: LET bc=FN t("t$()",mcworkspace,mcputt)

    Now, in the DEFADD area the 1st and 3rd ... function to be simply: DEF FN t(t$,m,t)=m ...
    Battle Bunny Battle Bunny July 2010 Sinclair Basic
  • DEF FN DirectivesI am looking at using some machine code functions from the DK Graphics Pack. They are machine code but they are called via Basic with the function de…

    ... function defined such as DEF FN g(x, y, p, q ...
    carlinski carlinski December 2007 Development
  • Can you improve this recursive DEF FN?I came up with this function to scan strings for characters without needing to use FOR...NEXT and IF...THEN, but it seems rather long-winded. Can any…

    ... />
    Using:

    DEF FN w(w$,o$,c)=VAL ... (("FN w(w$,o$,c+1)" ... />
    with:

    w$(FN w(w$,o$,1))
    FN w(w$,o$,1)*100).
    Battle Bunny Battle Bunny September 2010 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…

    ...
    40 POKE defadd,FN l(udg): POKE defadd+1,FN h(udg):
    60 POKE defadd,FN l(udg): POKE defadd+1,FN h(udg):
    DEFADD area (where FN variables are defined) before ...
    Battle Bunny Battle Bunny April 2011 Sinclair Basic
  • fn bug in basin?Hi. I was just trying to make myself some functions in basin and when i tryed them, the progam stopped on call. So i've tryed this simple thing: 10 …

    ... thing:

    10 def fn a(x)=x*10
    20 print fn a(10)

    and ...
    rikokun rikokun 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 …

    ... DEF FN b(h$)=16*FN n(h$(1))+FN n(h ... $(2)):
    DEF FN ... g(v)=v-FN ... 9991 LET prog=FN p(23635): LET vars=FN p(23627):< ... LET l$=CHR$ FN g(l)+CHR$ FN h(l):
    LET l2=FN p(a0+2): LET a0 ...
    Battle Bunny Battle Bunny September 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(…

    ... !
    40 PRINT FN f(FN f(2,FN g(3,1)),4 ... !
    50 PRINT FN f(FN g(2,FN f(3,1)),4 ... !
    60 PRINT FN f(FN g(2,FN g(3,1)),4 ... !
    70 PRINT FN g(FN f(2,FN f(3,1)),4 ... !
    80 PRINT FN g(FN f(2,FN g(3,1)),4 ... !
    100 PRINT FN g(FN g(2,FN g(3,1)),4 ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • storing machine code in BASICA couple of years ago I posted a routine for storing machine code between PROG & VARS, based on an idea in Toni Baker's "Mastering Machine Code". Thi…

    ... the routine assigns DEFADD to the display ... interpreter searches DEFADD before VARS. The FN d$() ... FN d$("B",FN g(nv))+FN d$("C",FN h(nv))+FN d$("D",FN ... g(n))+FN ... d$("E",FN ...
    Battle Bunny Battle Bunny January 2012 Sinclair Basic
  • more on storing mazesPrompted by Wookiee's escapades, I've been pondering on how to use DATA statements directly for displaying background graphics, thus avoiding the dup…

    ... 11 LET udg=FN p(23675): LET defadd=23563: LET ...
    REM assign a DEFADD entry for m$
    ... READ n$: LET datend=FN p(datadd):
    LET ... /> 45 POKE defadd,FN g(udg): POKE defadd+1,FN h(udg)
    80 POKE defadd,0: POKE defadd+1,0
    ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • BASin v.15 DEF FN bugThe bug would appear to be in "BASSupport.pas : Procedure ProcessDEFFN"; as it's not inserting the 6-byte variable place holder after each parameter …

    ... each parameter in the DEF FN definition. There's code there ...
    Battle Bunny Battle Bunny April 2012 Emulators
  • simplest method to pass a string to m/code?The statement "RANDOMIZE numvar+USR mc" is a simple way of passing a single numeric parameter to a m/c routine, as mc can retrieve numvar from the to…

    ... taken off again.
    * DEF FN m(s$)=USR mc: LET ... bc=FN m(s$): whereby mc can ... from within the DEF FN statement using the DEFADD pointer; but that ...
    Battle Bunny Battle Bunny April 2012 Sinclair Basic
  • Screen2StringFurther to writing that BASIC one-liner to redirect CAT to a string I thought that I'd do a general redirection routine for anything which normally p…

    ... treated as a DEF FN parameter) it can only ... appropriately
    REM 23563=DEFADD; 23631=CHANS; 23730=RAMTOP< ... CODE "$",14,0,FN g(sa),FN h(sa),0,0 ... redirected)
    DATA FN g(sa),FN h(sa):
    ... /> POKE 23563,FN g(sd): POKE 23564,FN h(sd): ...
    Battle Bunny Battle Bunny May 2012 Sinclair Basic
  • A Miscellany of Dangerous TipsHere's a selection of ideas for using some of the more obscure system variables which I've found handy on occasion. They can be very convenient if us…

    ... automatically created within the DEF FN statement itself by the ... used independently of any DEF FN statement, which allows quick ... the sub-routine by assigning DEFADD appropriately at some time ... done as a recursive DEF FN.

    Finally, knowing ...
    Battle Bunny Battle Bunny October 2012 Sinclair Basic
  • Confounded DEF FNCan anyone see why this is going wrong? I've been tinkering with it since tea time and got nowhere. [code] 2 DEF FN t$(n,t,d) =STR$ INT (n/t)…

    ... .
    [code]
    2 DEF FN t$(n,t,d)
    +VAL$ (("FN t$("
    +STR$ (n-INT ...
    Battle Bunny Battle Bunny August 2013 Sinclair Basic
  • SCREEN$ bug fixI've been using the SCREEN$() function recently for reading data off the screen rather than taking up space with an array and I got fed up with the s…

    ... $(row,col) use FN c$(row,col) where FN c$() is defined ... as DEF FN c$(r,c ... /> ScrDol: ld hl,(23563) ;HL=(DEFADD)
    push hl
    inc ...
    Battle Bunny Battle Bunny October 2013 Sinclair Basic
  • that "listing variables during runtime" thingWell, I did eventually finish this, but with my meds playing up I don't have much time each day that I can spend at the computer, so it's taken rathe…

    ... from the function:
    DEF FN s$(r,k)=STR$ USR ... called from elsewhere a dummy DEFADD space needs to be assigned ...
    Battle Bunny Battle Bunny November 2013 Sinclair Basic
  • 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. By the time, the WoS f…

    ... every parameter of a DEF FN.

    By the time ...
    programandala.net programandala.net August 2015 Sinclair Basic
  • Random-Access to Microdrive FileI am working on a BASIC program to backup a microdrive text-file to standard tape array-file. To backup a text-file from one microdrive to a secon…

    ... /> 320 POKE DEFADD,FN l(udg):
    POKE defadd+1,FN h(udg):
    1340 POKE DEFADD,FN l(udg):
    POKE defadd+1,FN h(udg):
    1410 POKE DEFADD,FN l(udg):
    POKE defadd+1,FN h(udg):
    mattsteel mattsteel May 2018 Sinclair Basic
  • BASIC Bug: DEF FN after REMHello all, Having mused the Spectrum ROM disassembly by Drs Logan ad O'Hara, I wondered about how good ZX BASIC was at locating the DEF FN when call…

    ... was at locating the DEF FN when called upon.
    ... [code]
    10 DEF FN a()=10
    20 PRINT ... code]
    10 REM : DEF FN a()=10
    20 PRINT ... routine that looks for DEF FN, DATA and (oddly) ... pigs ear of evaluating the FN call!

    ...
    BloodBaz BloodBaz May 2022 BASIC
  • New Compo IdeaI've had this idea and would like to know what do you think about it. I think that most of us here know how to code in BASIC. The problem with Specc…

    This is what I've compiled so far:

    [quote]Resources
    =========

    * Make all caps
    ---------------

    You can turn CAPS LOCK on or off using a simple poke to 23658:

    POKE 23658,8: REM CAPS ON
    ...
    na_th_an na_th_an April 2005 Development
  • how to pass arguments from Basic to MC ?can someone explain me (or give some link) how to pass arguments from basic to machine code? i mean something like this: PRINT USR xxxxx, arg1, arg2:…

    ... : define a function as DEF FN f(x)=USR nnnnn . In ... , look up the system variable DEFADD. The value of your parameter ... the address pointed to by DEFADD. For the precise details, see ...
    gasman gasman April 2006 Development
  • DEF FN DirectivesI am looking at using some machine code functions from the DK Graphics Pack. They are machine code but they are called via Basic with the function de…

    ... that was via a DEF FN.
    I defined the ... something like:[CODE]DEF FN P(A,B,A$)= ... FN function are to look at address stored in the DEFADD ... (23563) system variable which points to the DEF FN ... of your parameters into the DEFADD system variable, then call ...
    icabod icabod December 2007 Development
  • DEF FN DirectivesI am looking at using some machine code functions from the DK Graphics Pack. They are machine code but they are called via Basic with the function de…

    ... the parameters of the DEF FN.
    So in order to ... had a DEF FN of:
    [CODE]DEF FN P(A,B ... in memory by BASIC and DEFADD set to point to that ... gets called, and calling the FN from BASIC. Just look at ... address pointed to by the DEFADD sysvar.
    icabod icabod December 2007 Development
  • +3 how to detect if a file exist ?Need help. I am making a generic menu to my compilations over the spectrum +3. Exist some way programatically to detect if some file exists on the d…

    ... check routine which uses DEF FN to define the file name ... function definition is:
    DEF FN o(f$)=USR 49050
    DEFADD holds start of FN o(f$) arg
    Battle Bunny Battle Bunny June 2010 Sinclair Basic
  • +3 how to detect if a file exist ?Need help. I am making a generic menu to my compilations over the spectrum +3. Exist some way programatically to detect if some file exists on the d…

    ... day. Specifically, the use of FN o(f$) in these lines ... 9134: GO SUB 9220: DEF FN o(f$)=USR 49050: DEF ... LET r$=l$(item): IF FN o(r$+CHR$ 255) THEN ... it works. It references the DEFADD system variables area to get ... file name passed in the FN o(f$) call.

    Battle Bunny Battle Bunny June 2010 Sinclair Basic
  • BITWISE operators...Hi Folks, Another question - is there a way (fast) to do bitwise operations in Sinclair BASIC? Many thanks Paddy

    ... you could use a FN. Your example would ... ,(23563) ;DEFADD address of first character after FN
    ... ;A holds second parameter in FN
    AND B
    [CODE]
    10 DEF FN A(X,Y) = USR start_address ...
    20 PRINT FN A(10,20)
    [/ ...
    GReW GReW August 2010 Sinclair Basic
  • 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…

    ... and key offset from the DEFADD workspace, putting them in HL ... take the dimensions as additional FN parameters, as 80,32 is ...
    Battle Bunny Battle Bunny September 2010 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…

    ... area used by user-defined FN evaluations. I'd often ... so I knew how the DEFADD area was laid out. ... instead of working with the DEFADD space assigned by the ... using a user-defined FN by POKEing DEFADD with an address ... knew that LOOK-VARS checks DEFADD and if it's ...
    Battle Bunny Battle Bunny April 2011 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…

    ... /> 10 DIM s$(length): DEF FN p(a)=PEEK a+256 ... /> DEF FN l(v)=v-256*FN h(v): DEF FN h(v ... (v/256):
    LET udg=FN p(23675)
    20 LET ... =source: LET dl=length: LET defadd=23563
    ...[/code]
    chev chev April 2011 Sinclair Basic
<1234567…30>

Latest Posts

  • Your Favorite Magazine Cover Tapes.
    dm_boozefreek on 4:45PM
  • Happy 40th Birthday to the Amstrad CPC464!
    dmsmith on 4:10PM
  • "Late Entries"
    harriusherbartio on 4:00PM
  • How Do You Categorize Your Speccy Software and Games?
    harriusherbartio on 1:34PM
  • Simple Sprite Routine
    dmsmith on 1:25AM
  • I am currently watching.....
    zx1 on April 11
  • Today's BASIC program: visit attribute cells I am interested in, in pseudorandom order
    Paradigm Shifter on April 11
  • How do you share programs online?
    firelord on April 11
  • Celebrity deaths...
    Ælita on April 11
  • Who Has Got The Earliest ZX Spectrum Software?
    harriusherbartio on April 11

HitBox

Word Docs Hits
fn 866 4.4K
defadd 102 200

Related Threads

  • DEF FN DirectivesI am looking at using some machine code functions from the DK Graphics Pack. They are machine code but they are called via Basic with the function de…
  • problem with DEFADD storageI have a function: DEF FN t(t$,m,t)=USR t<br /> which is called with, for an example: LET bc=FN t("t$()",mcworkspace,mcputt)<br /> where, at the time…
  • Can you improve this recursive DEF FN?I came up with this function to scan strings for characters without needing to use FOR...NEXT and IF...THEN, but it seems rather long-winded. Can any…
  • fn bug in basin?Hi.<br /> I was just trying to make myself some functions in basin and when i tryed them, the progam stopped on call.<br /> So i've tryed this simple…
  • FN nesting error?While playing with FN functions that call assembly, I've found something weird. <br /> <br /> Check out this code:<br /> [code]10 DEF FN f(a,b)=a+b<b…
  • BASin v.15 DEF FN bugThe bug would appear to be in "BASSupport.pas : Procedure ProcessDEFFN"; as it's not inserting the 6-byte variable place holder after each parameter …
  • Confounded DEF FNCan anyone see why this is going wrong? I've been tinkering with it since tea time and got nowhere.<br /> [code]<br /> 2 DEF FN t$(n,t,d)<br /> …
  • 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…
  • BASIC Bug: DEF FN after REMHello all,<br /> Having mused the Spectrum ROM disassembly by Drs Logan ad O'Hara, I wondered about how good ZX BASIC was at locating the DEF FN whe…

Related Searches

  • modulo function def fn
  • fuse def fn keyboard
  • def fn usr
  • def fn
  • def fn within a function
  • fn h
  • upper case fn
  • def fn d
  • recursive fn
  • bin def fn
  • def fn recursive bug
  • def fn bug
  • defadd
  • def fn recursive bin
  • fn usr
  • def fn library
  • def fn v
  • def fn gosub fast
  • def fn battlebunny
  • def fn fast

Copyright © 2024 World of Spectrum