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.006s
<1…18192021222324…34>
  • 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…

    ... :

    [code]
    3 DEF FN s(a$)
    =VAL a ... $(1)+VAL (("FN s(a$(2 TO ))+" AND ... TO 9:
    PRINT number,FN s(STR$ number):
    LET ...
    Richey Richey February 2017 BASIC
  • 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…

    To get FN s() working on the 128k change line 3 as shown (this will still work on the 48k as well):
    [code]
    3 LET f$=CHR$ 168+"s(a$(2"+CHR$ 204+"))+":
    DEF FN s(a$)=VAL a$(1)+VAL ((f$ AND LEN a$>1)+"+0")
    [/code]
    Battle Bunny Battle Bunny February 2017 BASIC
  • 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…

    ...

    [code]
    10 DEF FN T ( A$ ) = S + VAL ( A ... A
    60 LET S = FN T ( A$ )
    70 NEXT ...
    Richey Richey February 2017 BASIC
  • Switch from 128k BASIC to 48k BasicHello, Is there a way to start off running a program in 128k basic (so that you can use the ramdisk facilities) but then switch back down to 48k bas…

    ... addr= 23613: LET pe=FN p(FN p(addr)): LET pe1 ... LET pe2=4867: POKE FN p(addr),(3 AND pe ... pe2): POKE 23611,205: DEF FN p(x)=PEEK x+256 ... addr= 23613: LET pe=FN p(FN p(addr)): LET pe1 ... LET pe2=4867: POKE FN p(addr),(3 AND pe ... pe2): POKE 23611,205: DEF FN p(x)=PEEK x+256 ...
    david_retro david_retro March 2017 Sinclair Basic
  • Trying to enter a line from a book fails for some reasonI am reading through the book "[i]Spectrum Machine Language for the Absolute Beginner edited William Tang[/i]". I have got to the section where I nee…

    ... />

    [code]
    130 DEF FN d(s$) = ( s$ > "9 ...
    dbolli dbolli April 2017 Sinclair Basic
  • How to separate a character from a number in a string?Hi I've been writing a kind of logo type program in BASIC that takes a string a$ from INPUT and then draws according to what you give it. Say you w…

    ... "" if unknown action)
    5 DEF FN p(a)=PEEK a+256 ... *PEEK (a+1):
    DEF FN d$(a$)=d$+(a$ AND ... (d$="" AND FN p(23621)=sub)):
    REM ...
    Battle Bunny Battle Bunny May 2017 Sinclair Basic
  • The trouble with good code isLots of times I've come here to ask for help and always got it pretty promptly. Which is wonderful and one of the reasons why I don't think there's a…

    ... yours.
    so things like DEF FN , LINE , OPEN , ATN , RAND, COS ...
    ASH-II ASH-II May 2017 Chit chat
  • The trouble with good code isLots of times I've come here to ask for help and always got it pretty promptly. Which is wonderful and one of the reasons why I don't think there's a…

    ... yours.
    so things like DEF FN , LINE , OPEN , ATN , RAND, COS ...
    mik3d3nch mik3d3nch May 2017 Chit chat
  • The trouble with good code isLots of times I've come here to ask for help and always got it pretty promptly. Which is wonderful and one of the reasons why I don't think there's a…

    ... yours.
    so things like DEF FN , LINE , OPEN , ATN , RAND, COS ...
    mel the bell mel the bell May 2017 Chit chat
  • Akalabeth gamei found now that someone ported an ansi-basic game (coded in 1979?) to msx-basic - what about a zx-spectrum basic version of it? ;) https://plus.goo…

    ... "u-3>io OR FN r(1)>0.4 ... '17
    4 Removed redundant "DEF FN p$(p,q)".
    12 ...
    Battle Bunny Battle Bunny June 2017 Sinclair Basic
  • Akalabeth gamei found now that someone ported an ansi-basic game (coded in 1979?) to msx-basic - what about a zx-spectrum basic version of it? ;) https://plus.goo…

    ... down things a bit. The "DEF FN z(r$)=VAL "8800" ... GO ... SUB FN z(y$)" method is a ...
    Battle Bunny Battle Bunny June 2017 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…

    ... attribute copy parameters
    101 DEF FN a$(w$)="":
    RESTORE 101 ... : LET da=FN p(23639)+9: POKE da ...
    Battle Bunny Battle Bunny June 2017 Sinclair Basic
  • Finished with my dice rolling programTook me all day but I'm rather proud of it, simple though it is. Its up at Dropbox if anyones interested https://www.dropbox.com/s/qdgtfc0zyy94hxm…

    ... br /> [code]
    * change "10*FN b(INT (a/2))+" in ... br />
    [code]
    1 DEF FN p(a)=PEEK a+256 ... PEEK (a+1)
    2 DEF FN b(a)=(a-INT (a ... $=CHR$ k: LET bitsat=FN p(23606)+CODE c$*8 ... 7:
    LET n$=STR$ FN b(PEEK (bitsat+a)):
    Battle Bunny Battle Bunny July 2017 BASIC
  • How to improve my program using oversized numbersI'd like my dice program to print out the number four times bigger than normal if possible. Anyone know how to do this? Or I could write a sub rou…

    ... br /> [code]
    * change "10*FN b(INT (a/2))+" in ... br />
    [code]
    1 DEF FN p(a)=PEEK a+256 ... PEEK (a+1)
    2 DEF FN b(a)=(a-INT (a ... $=CHR$ k: LET bitsat=FN p(23606)+CODE c$*8 ... 7:
    LET n$=STR$ FN b(PEEK (bitsat+a)):
    Battle Bunny Battle Bunny July 2017 BASIC
  • are there any machine code to basic converters?i know it sounds stupid but for amature programmers like me it would be great. i could speed up the basic on an emulator and it would give me more of…

    ... ,2:
    [code]
    1001 DEF FN b(a,b,c,d ... =0 TO 2: GO SUB FN b(val1,val2,o,8 ...
    Battle Bunny Battle Bunny July 2017 Sinclair Basic
  • 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 …

    ... SUB stack. Calling a FN is slower as every ... as long as a DEF FN only references its own local ... its parameters within its DEF FN extent which is always ... searched first; but a DEF FN is restricted in the code ... GO SUB routine. Recursive DEF FNs use much more ...
    Battle Bunny Battle Bunny August 2017 Sinclair Basic
  • Is there a way to suppress error R Tape Loading Error in Basic when trying to load only part of fileHi, is there a way to suppress error R Tape Loading Error in Basic when trying to load only part of file. E.g.: I have a Tape-Code-File Start f…

    ... +1):
    DEF FN a()=FN p(23613):
    DEF FN i()=FN p(FN a())
    1011 LET er=FN ... i(): POKE FN a ...
    Battle Bunny Battle Bunny September 2017 Sinclair Basic
  • 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…

    ... "
    20 RANDOMIZE USR 14070:DEF FN a()=CODE INKEY$ #4+256 ... =2):POINT #4;FN a()+10:POINT #4;FN a()+off:POINT ... #4;FN a()
    35 ...
    roko roko December 2017 Wanted
  • 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…

    ... REM PlotDraw191.BAS
    4 DEF FN p(a)=PEEK a+256 ... /> 11 LET p191=FN p(PD): LET d191=FN p(PD+2 ...
    Battle Bunny Battle Bunny January 2018 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…

    ... .:
    * declare the dummy FN: DEF FN a$(b$,s$)=""
    * initialise ... the variables in the FN space: LET a$=FN a$("B","S ... locations & lengths into the FN space
    (9 bytes: letter ... DEFADD to point to the FN space
    * copy the display ...
    Battle Bunny Battle Bunny January 2018 Sinclair Basic
  • BREAK key on 128k SpectrumWhat happens when BREAK is pressed on a 128k Spectrum? Why is it different from what happens on a 48k Spectrum. Is there a way to disable it or to …

    ... [code]
    4 DEF FN p(a)=VAL "PEEK a ... /> DEF FN g(v)=VAL "v-FN h(v)*256": DEF FN h ... (v)=VAL "INT (v/256)":
    DEF FN ... c()=FN ... 23681+1: LET erl=FN p(23615):
    ...
    Battle Bunny Battle Bunny February 2018 Sinclair Basic
  • Need Some Basic HelpHi all, I’ve decided to give programming in Spectrum Basic a go again (bit of nostalgia trip!) and I’m trying to develop a CYOA style game. How…

    ... =9KB
    [code]
    3 DEF FN p(a)=PEEK a+256 ... 2001
    1010 LET apos=FN p(23627)+8:
    REM ... /> "PROG= ";FN p(23627)-FN p(23635),,
    "VARS= ";FN p(23641)-FN p ...
    Battle Bunny Battle Bunny April 2018 Sinclair Basic
  • Loading Images/Screens mid-gameHi all, Looking to get back into a bit of coding and I couldn't figure out a way to do the following: I have an image/SCREEN that I'd like to b…

    ... used first
    103 DEF FN s$(s$)="": DEF FN p(a)=PEEK a ... /> 105 RESTORE 103: LET da=FN p(23639)+9: POKE da ... +7,0:
    REM initialise FN s$() to hold screen data ...
    Battle Bunny Battle Bunny April 2018 Sinclair Basic
  • Loading Images/Screens mid-gameHi all, Looking to get back into a bit of coding and I couldn't figure out a way to do the following: I have an image/SCREEN that I'd like to b…

    ... ):
    RESTORE 103: LET da=FN p(23639)+9: POKE da ... +ro-1
    103 DEF FN s$(s$)="": DEF FN p(a)=PEEK a ...
    Battle Bunny Battle Bunny April 2018 Sinclair Basic
  • Loading Images/Screens mid-gameHi all, Looking to get back into a bit of coding and I couldn't figure out a way to do the following: I have an image/SCREEN that I'd like to b…

    ... : RETURN

    100 DEF FN s$(s$)="": DEF FN p(a)=PEEK a ... ):
    RESTORE 100: LET da=FN p(23639)+9: POKE da ...
    Battle Bunny Battle Bunny April 2018 Sinclair Basic
  • Passing parameter from BASIC to assembler routineWas there a "clean" way of passing parameter(s) from a BASIC program to an assembler routine? Something like parameterising RANDOMIZE USR call? I fac…

    I've seen using DEF FN to pass parameters. The parameters go to the calculator stack, but using standard speccy numbers (5 bytes / parameter).
    Zup Zup November 2018 Development
  • Passing parameter from BASIC to assembler routineWas there a "clean" way of passing parameter(s) from a BASIC program to an assembler routine? Something like parameterising RANDOMIZE USR call? I fac…

    ... />
    1) You can use DEF FN, and read them back in ...
    Timmy Timmy November 2018 Development
<1…18192021222324…34>

Latest Posts

  • I am currently watching.....
    Paradigm Shifter on 12:49AM
  • New video about S-video modification on Issue two 48K Spectrum.
    Renegade on April 21
  • Fixed Speccy Software. And which games remained unfixed?
    John Elliott on April 21
  • Happy 40th Birthday to the Amstrad CPC464!
    rich_chandler on April 21
  • Another Birthday! The Game Boy Is 35!
    mel the bell on April 21
  • European Software Titles with an English version
    harriusherbartio on April 21
  • Elusive Strategy Games done by the Smaller or less Prolific Software Houses.
    harriusherbartio on April 21
  • 1992 Spectrum Software
    harriusherbartio on April 21
  • +3 Disk drive motor
    AndyC on April 21
  • Celebrity deaths...
    mel the bell on April 20

HitBox

Word Docs Hits
hex 1.7K 2.4K
def 11.7K 12.9K
fn 866 4.4K

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…
  • 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…
  • New Forums at 'Def Guide to ZZAP!64' siteI know that there are some C64 fans and ex-readers of 'ZZAP!64' here, so just to let you know that Iain has added a new style message board to his si…
  • Why Hex in place of Denary?Ok - most MC books / tutorials advocate the use of hex instead of denary.<br /> <br /> But the Speccy doesn't actually have a Hex converter so you ne…
  • A very Slovakian adventure........Forever Hex DemopartyHey guys........I will be traveling from London Luton to Bratislava, and then onto Trencin for Forever Hex (the 8-bit Demo party - March 18-20)......…

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