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.007s
<1234567…34>
  • 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 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
  • 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 …

    ... after each parameter in the DEF FN definition. There's code there ...
    Battle Bunny Battle Bunny April 2012 Emulators
  • 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)…

    ... nowhere.
    [code]
    2 DEF FN t$(n,t,d)
    +VAL$ (("FN t$("
    +STR$ (n-INT ...
    Battle Bunny Battle Bunny August 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…

    ... after every parameter of a DEF FN.

    By the time ...
    programandala.net programandala.net August 2015 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…

    ... BASIC 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 ... ROM routine that looks for DEF FN, DATA and (oddly) NEXT appears ...
    BloodBaz BloodBaz May 2022 BASIC
  • recovering the stack after an errorMy normal error handler starts with the stack as reset by LD SP,(ERR_SP) in $0053 ERROR_2, sets up some stuff and returns to BASIC via a "JP C,$1e73 …

    ... be any quicker than the DEF FN method anyway (which was the ... and gone back to using DEF FN (...)=USR ... to call the routine, looking ...
    Battle Bunny Battle Bunny October 2012 Development
  • Random Numbers, USR Return Values & Timing BASICI've been trying out Jon Ritman's random number routine, published in Your Sinclair Aug'87. Apart from a timing comparison I also did a frequency ana…

    ... , thus ensuring that the USR call returns the required decimal ... the end, so that "USR nnnnn" can be used in ... method to return from a USR call with a floating ... pointers to be returned from USR calls. Refer to the ... /> 9999 LET t1=FN t(): LET t2=FN t(): LET t0= ...
    Battle Bunny Battle Bunny January 2017 Sinclair Basic
  • New Functions for Sinclair BasicA total of 52 new functions can be added to Sinclair BASIC; 26 numeric functions (A-Z) and 26 string functions (A$-Z$). Owing to the internal structu…

    ... i])
    [code]
    DEF FN B(b$)=VAL(CHR$ 196 ... i])
    [code]
    DEF FN C$(n)=CHR$ INT (n ... br /> [code]
    DEF FN F()=65536-USR 7962
    [/code]
    [code]
    DEF FN H$(n)=CHR$ (INT (n ... i])
    [code]
    DEF FN L$(l$)=CHR$ (CODE l ...
    chev chev November 2004 Sinclair Basic
  • BASIC Keyword ReferenceRealised that the Sinclair Basic section would be a better place for discussion of BASIC keywords, so for reference the old thread is in [thread=2005…

    ... RANDOMIZE : K : T
    DEF FN : E : SYM + 1 READ ... RUN : K : R
    FN : E : SYM + 2 SAVE ... br /> LEN : E : K USR : E : L
    LET ...
    icabod icabod March 2008 Sinclair Basic
  • BASin r14d - Final bugfix for the r14 seriesOk, there's not a great deal to "show" here, as most of the work has been going on "under the hood" so to speak. And there's been a [i]lot[/i] of wor…

    ... )
    Fixed - Some evaluations (like USR 7962, the "free RAM" routine ... keyword - GO TO, GO SUB, DEF FN etc. (Ref)
    Fixed - You ... core, so a lot of USR xxxxx expressions no longer screw ...
    Dunny Dunny December 2008 Emulators
  • 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 t
    which ... , for an example: LET bc=FN t("t$()",mcworkspace,mcputt)
    USR routine is therefore not working ... the function to be simply: DEF FN t(t$,m,t)=m ...
    Battle Bunny Battle Bunny July 2010 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 …

    ... simple 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 ... h(v)*fg: DEF FN ... RANDOMIZE ap: LET bc=l+USR (vars+29): STOP
    9996 ...
    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(…

    ... this code:
    [code]10 DEF FN f(a,b)=a+b ... , if I change the DEF FN to: DEF FN f(a,b)=a, the ... call.

    [code]10 DEF FN f(a,b)=a+b ...
    20 DEF FN g(a,b)=a+b ... !
    40 PRINT FN f(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
  • Find-Fill-Copy functions for BASICThere's not much going on here, so here's three m/code routines to provide some data manipulation functions which are otherwise slow to do from BASIC…

    ... as 'b']
    . eg. FN f("z$()","b",find) -or ... - FN f("z()","",find)
    * ... value 'b'
    . eg. FN f("z$()","wxyz",fill) -or ... b' (may overlap)
    . eg. FN c(22528,22529,127,CHR ... pn],r1" or "DEF FN f(p1[,p2...,pn])=USR r1"
    with ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • 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…

    ... again.
    * DEF FN m(s$)=USR mc: LET bc=FN m(s$): whereby ... string details from within the DEF FN statement using the DEFADD pointer ... .
    * RANDOMIZE CODE "s"+USR mc: but that needs some ... the syntactically incorrect "RANDOMIZE s$+USR mc"? I was wondering ...
    Battle Bunny Battle Bunny April 2012 Sinclair Basic
  • number padding functionI wrote a number padding function in BASIC a while ago, but when I came to want it again I couldn't find it, so I've done this enhanced [url=http://w…

    ... the machine stack to get USR to return a string rather ... /> [code]
    DEF FN p$(n,l,r)=STR$ USR address: REM n ... ,0,1) := "1.0"
    FN p$(1,-5,3) := " 1 ... .000"
    FN p$(1,-5,0) := " 1 ...
    Battle Bunny Battle Bunny May 2012 Sinclair Basic
  • handy method for passing m/c parametersI knew that a single number or string parameter could be passed to a m/c routine with either: [b]LET a=b+USR address[/b] puts b on the calculator st…

    ... /> [b]LET a=b+USR address[/b]
    puts b ... [b]LET a$="abc"+STR$ USR address[/b]
    puts a ... [b]LET a=b=c+USR address[/b]
    puts b ... LET a=b=c=d+USR address[/b]
    ... LET a=b=(c=(d+USR address))[/b]
    puts ... be quicker than using a DEF/FN, as there's no ...
    Battle Bunny Battle Bunny May 2013 Sinclair Basic
  • IZX: a new standard format and driver for ZX-Spectrum icons[B]IZX[/B] is a very compact and efficient standard format to create icons for the ZX-Spectrum. You can download it from here: [LIST] [*][URL="http:…

    ... "CODE
    20 DEF FN z(r,c,i)=USR 55000[/CODE]

    [CODE]FLASH FN z(5, 8, 16)[/CODE ...
    Einar Saukas Einar Saukas July 2013 Brand new software
  • MOVE_M Object Movement Manager for BASICAs moving things around on the screen is usually the slowest part of a game written in BASIC, I've been pottering around with this routine to handle …

    ... /> 10 REM Title
    11 DEF FN p(a)=PEEK a+256 ... *PEEK (a+1): DEF FN i(d,a)=USR MOVEI:
    REM ... ): LET MOVEM=FN p(ORG+10)
    13 RESTORE USR DOTRAP: GO ... :
    REM RESTORE USR DOINT : do stuff : RESTORE USR NOINT:
    REM ...
    Battle Bunny Battle Bunny September 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…

    ... ) where FN c$() is defined as DEF FN c$(r,c)=STR$ USR ScrDol0 ...
    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…

    ... the function:
    DEF FN s$(r,k)=STR$ USR ScrDol0
    so ...
    Battle Bunny Battle Bunny November 2013 Sinclair Basic
  • dumping protected BASIC loadersI wrote this a few weeks ago but forgot to post it. It will load & list from tape/TAP/TZX any BASIC program which has been saved with SAVE, including…

    ... />
    [code]
    2 DEF FN p(a)=PEEK a+256 ... 0:
    LET bc=USR mc: IF PEEK bytes ... PRINT :
    LET ps=FN p(bytes+11): LET bs ... =FN p(bytes+15): LET ... (bytes+12): LET bc=USR mc
    10 LET ... a+PEEK (a+1);":";FN p(a+2); PAPER ...
    Battle Bunny Battle Bunny March 2014 Sinclair Basic
  • Help With AY Music Program in BASICHi, last year I started writing a BASIC program for making and recording AY Music. I thought it would be easier than learning how to use Soundtracker…

    ... READ y
    34 POKE USR "b"+x,y: REM Custom ... READ y
    44 POKE USR "c"+x,y: REM ... READ y
    54 POKE USR "d"+x,y: REM ... READ y
    64 POKE USR "e"+x,y: REM ... READ y
    104 POKE USR "i"+x,y: REM Volume ... READ y
    114 POKE USR "j"+x,y: REM Volume ...
    RetroPhase2014 RetroPhase2014 December 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…

    ...

    [code]
    1 DEF FN p(a)=256*PEEK (a ... REM DPEEK(a)
    2 DEF FN m(n,d)=n-d ... /> 3 DEF FN l(v)=v-256*FN h(v): DEF FN h(v ... RandAccess
    20 LET udg=USR "a"
    99 CLEAR ... )
    1312 DATA FN l(512),FN h(512)
    ...
    mattsteel mattsteel May 2018 Sinclair Basic
<1234567…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
usr 3.4K 6.2K

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…
  • 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…
  • 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…
  • RANDOMIZE USR, PRINT USR etcHello just wondering why is it called RANDOMIZE UsR what does randomising have to do with it ? When calling machine code routine from adress x you ty…
  • 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…
  • Randomize USR xxxxxA weird topic:<br /> When I was a kid I use to mess around with the RANDOMIZE USR xxxxx, sad I know!!!<br /> For instance RANDOMIZE USR 51234 would g…
  • Run BASIC program by R. USR xxxxxGuys, please help. Suppose I have BASIC program in my Spectrum 48K starting with line 10. I'd like to start it by RANDOMIZE USR xxxxx. Which paramete…

Related Searches

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

Copyright © 2024 World of Spectrum