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>
  • 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…

    ... routine as well as from FN s$().

    So ... br />
    ; USAGE:
    ; DEF FN s$(r,c)=STR$ USR ... ScrDol0
    ; ... FN s$(row,col) ...
    ScrDol0 ... /> ScrDol1:ld hl,(23563) ;HL=(DEFADD)
    inc hl
    inc ...
    Battle Bunny Battle Bunny November 2013 Sinclair Basic
  • 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 …

    ... 48k ROM routines
    ** Calculating FN memory usage
    ** Insert a ... REM enhancement
    ** Using the DEFADD area for extra variables
    Battle Bunny Battle Bunny December 2013 Announcements
  • Block RoutineHi Folks, I want to draw a block on the screen dependent on providing the X,Y,W,H values. I came up with the following: [CODE]100 LET l$=" …

    ... :

    [CODE]1 DEF FN a(x,y,h,v ... 0
    25 LET i=FN a(5,5,20,15 ... />
    [CODE]63000 LD HL,(DEFADD)
    LD BC,4
    Paddy Coleman Paddy Coleman July 2014 Sinclair Basic
  • Block RoutineHi Folks, I want to draw a block on the screen dependent on providing the X,Y,W,H values. I came up with the following: [CODE]100 LET l$=" …

    ... and then:
    LET i=FN a(x,y,h,v ... #2.

    [code]
    DEFADD: equ 23563

    org ...

    a63000: LD HL,(DEFADD)
    LD BC,4
    Battle Bunny Battle Bunny July 2014 Sinclair Basic
  • Block RoutineHi Folks, I want to draw a block on the screen dependent on providing the X,Y,W,H values. I came up with the following: [CODE]100 LET l$=" …

    ... ]
    100 CLEAR 62999: DEF FN b(x,y,w,h ...
    Battle Bunny Battle Bunny July 2014 Sinclair Basic
  • Experimenting with turboloadersHello, My first post, having lurked here for a while. I'm a lifelong computer nerd, Spectrum fan since childhood in the eighties, and have recently…

    ...
    1 DEF FN l(x,y)=USR ... block with, say, RANDOMIZE FN l(16384, 6912)
            ;; definition like FN l(x,y).  The first ... DE
            ;; DEFADD is the system variable containing ...         ld      ix,(23563)      ; DEFADD
            ld      l,(ix+ ...
    stephenw32768 stephenw32768 May 2015 Development
  • Double height text...<p>Is here any good routines for printing a font double height?</p><p>I've concocted this ridiculous routine but I'm sure it can be done much better.…

    ... work either.)

    ;DEF FN d(d$,r,c)=USR ... DoubleHeight
    ;LET bc=FN d(d$,r,c): REM ... A
            ld   ix,(23563)      ;DEFADD
            ld   a,(ix+6 ...
    Battle Bunny Battle Bunny June 2015 Development
  • Double height text...<p>Is here any good routines for printing a font double height?</p><p>I've concocted this ridiculous routine but I'm sure it can be done much better.…

    ... Courier.)

    ;DEF FN d(d$,r,c)=USR ... DoubleHeight
    ;LET bc=FN d(d$,r,c): REM ... DoubleHeight:
            ld   ix,(23563)      ;(DEFADD)
            ld   a,(ix+6 ... SmallINT:
            ld   hl,(23563)      ;(DEFADD)
            add  hl,bc
    Battle Bunny Battle Bunny June 2015 Development
  • What am I doing wrong here?[code]IF INKEY$=SCREEN$ (21,4) THEN LET SCORE=SCORE+1[/code] It's delivering a positive every time.

    ... [code]
    ; USAGE:
    ; DEF FN s$(r,c)=STR$ USR ... ScrDol1
    ; ... FN s$(row,col) ...
    org ... ScrDol1:ld hl,(23563) ;HL=(DEFADD)
    inc hl
    ...
    [code]
    2 DEF FN s$(r,c)=STR$ USR ...
    Battle Bunny Battle Bunny May 2016 Sinclair Basic
  • Speeding up programs by hacking the SysVarsPositively pleased to properly discover this area of the forum! I have a couple of recent tricks that might be of interest - they're probably old hat…

    ... ":
    RESTORE 7: RANDOMIZE FN p(dt)+8: LET zlo ... parameter space for the FN and saves the start ... name. The SysVars referenced are DEFADD, DATADD, SEED.)

    ... :
    [code]GO SUB FN z(row_expression, col_expression, string_expression)[/code ...
    Battle Bunny Battle Bunny September 2016 Sinclair Basic
  • POKE taking a variable amount of time...Hi Folks, Does anyone know why the following POKE statements seem to vary in their execution time? [code]100 POKE 60000,10 110 POKE 60001,16…

    ... BASIC; you can use the DEFADD system variable within your machine ... />
    [code]
    10 DEF FN a(b,c)=USR 60000 ...
    20 RANDOMIZE FN a (x,y)
    [/code ...
    GReW GReW September 2016 Sinclair Basic
  • POKE taking a variable amount of time...Hi Folks, Does anyone know why the following POKE statements seem to vary in their execution time? [code]100 POKE 60000,10 110 POKE 60001,16…

    ... BASIC; you can use the DEFADD system variable within your machine ... />
    [code]
    10 DEF FN a(b,c)=USR 60000 ...
    20 RANDOMIZE FN a (x,y)
    [/code ... , if you use the DEF FN approach, how do you access ...
    Paddy Coleman Paddy Coleman September 2016 Sinclair Basic
  • POKE taking a variable amount of time...Hi Folks, Does anyone know why the following POKE statements seem to vary in their execution time? [code]100 POKE 60000,10 110 POKE 60001,16…

    ... if you use the DEF FN approach, how do you ... />
    The system variable DEFADD points to the parameters of ... the current FN being evaluated, for example ... for DEF FN a(x,y) when ... at the address in DEFADD and access the parameters ...
    GReW GReW September 2016 Sinclair Basic
  • im looking for a horizontal scroll routinehi, im looking for a horizontal scroll routine. i read somewhere that you can do it with at 'to' statement, somewhere in a print routine. althoug…

    ... parameters
    101 DEF FN a$(w$)="":
    RESTORE ... 101: LET da=FN p(23639)+9: POKE da ... activate attribute copy parameters via DEFADD
    102 RANDOMIZE da: ... deactivate attribute copy parameters via DEFADD & stop timer
    ...
    Battle Bunny Battle Bunny June 2017 Sinclair Basic
  • Why no PLOT, etc. on bottom two lines?I was pondering if there was any way to get PLOT, etc. to address the full screen from BASIC without having to write a few lines of assembler to bypa…

    ... a dummy FN ; eg.:
    * declare the dummy FN: DEF FN a$(b ... locations & lengths into the FN space
    (9 bytes: ... ) + "," or ")" )
    * POKE DEFADD to point to the FN space
    * copy ... : LET b$=s$
    * reset DEFADD: POKE DEFADD(hi),0
    Battle Bunny Battle Bunny January 2018 Sinclair Basic
  • Adding command to BASICI am looking for an article about adding commands via software to sinclair basic. I know there was one published and to the best of my knowledge it w…

    ... DEF FN x(a,b$)=USR 32768, you can then use DEFADD ...
    Turtle_Quality Turtle_Quality August 2019 Sinclair Basic
  • Ported whole casettes of backuped utiltilitiesHi! A friend of mine gave me a few casettes he found in the attic - he used these to backup ORIGINAL casettes he had back in the spectrum games. The…

    ...
    11-102B9: Program : 3d fn Length: 19 Normal Speed ,Pause ...
    Tom-Cat Tom-Cat August 2003 MIA/STP/SDP
  • BASin Release 10a is up...Well, none of my releases ever get far before the inevitable bug fix version... Go grab it at [url="http://homepage.ntlworld.com/paul.dunn4/BASin_…

    ... ignored (BadBeard)
    Fixed DEF FN statements - not correctly tokenised (Chris ...
    Dunny Dunny June 2004 Emulators
  • Is there much ?Do you think there`s much cooperation, and in fact co-development now goes on within the 8-bit community.. in fact is there any? I know that`s a daf…

    ... thing or two regarding Def FN and special pokes etc etc ...
    CKay CKay November 2004 Development
  • 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…

    ... AND INT (FN V(FN V(FN V(FN V(FN V(FN V(x, ... 2)+INT (FN V(FN V(FN V(FN V(FN V(FN V(y, ... AND INT FN V(FN V(FN V(FN V(FN V(FN V(FN V(x ... 2)+INT FN V(FN V(FN V(FN V…
    chev chev November 2004 Sinclair Basic
  • BASin release 12b available for downloadOk, there were a few nasty bugs in the last release, so in fine SPIN team tradition here's a new release that possibly fixes those errors. In this r…

    ... Crisis's bug with DEF FN, and colin's problem with ...
    Dunny Dunny October 2005 Sinclair Basic
  • Lesser used BASIC commandsAre there any interesting articles or books that explore some of the lesser used BASIC commands/functions e.g. DEF FN, IN, OUT etc? The Spectrum BAS…

    Are there any interesting articles or books that explore some of the lesser used BASIC commands/functions e.g. DEF FN, IN, OUT etc?

    The Spectrum BASIC manual only glosses over them without going into a lot of detail.

    Necros.
    Ian Hamilton Ian Hamilton January 2006 Sinclair Basic
  • BASin Release 13 is now availableI'm still at it. BASin is now in it's 13th incarnation (disregarding the inter-version updates) and is now available at [url="http://homepage.ntlw…

    ... a bit.
    Fixed - DEF FN lines were getting their last ... meant that REM and DEF FN behaved incorrectly.
    Fixed - REM ...
    Dunny Dunny January 2006 Emulators
  • BASin Release 13 is now available[unashamedly x-posted from Emulators forum] I'm still at it. BASin is now in it's 13th incarnation (disregarding the inter-version updates) and is …

    ... a bit.
    Fixed - DEF FN lines were getting their last ... meant that REM and DEF FN behaved incorrectly.
    Fixed - REM ...
    Dunny Dunny January 2006 Sinclair Basic
  • Recursive functionsA while ago Phil demonstrated a nice example of recursiveness in a DEF FN function. Sadly it doesn't appear to be online anymore and I have difficult…

    A while ago Phil demonstrated a nice example of recursiveness in a DEF FN function. Sadly it doesn't appear to be online anymore and I have difficulties finding it out myself: does anyone have a good example? Thx.
    Paul van der Laan Paul van der Laan November 2006 Sinclair Basic
  • Firefox (new thoughts)Maybe more people would use Firefox if there was a version for the Speccy! [code] 10 PRINT AT 2, 2; "Press F for Firefox or I for M$IE" 20 LET K$=IN…

    ... TO 20
    60 DEF FN M$(IE)=""+M$(IE)+""" is ... evil"
    70 PRINT FN M$(IE)
    REM etc ...
    Where's that AY chip gone... Where's that AY chip gone... November 2006 Chit chat
  • 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 : E ... + V RUN : K : R
    FN : E : SYM + 2 SAVE : K ...
    icabod icabod March 2008 Sinclair Basic
  • Terminal Velocity!Hi, Don't know if I should be posting this sort of thing here, but I read the FAQ and didn't spot any "Don't" rules. So here you have my example of …

    ... e: ";e
    210 DEF FN h(e,x)=((e^((2 ... *x))-1))
    220 DEF FN v(a,c,e,g ... *m*g)/(p*a*c)))*FN h(e,(t*(SQR ((g ... =60
    240 LET v=FN v(a,c,e,g ...
    gcallard gcallard May 2008 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