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…17181920212223…34>
  • Utility to create long REM Line for storing M/C program - Maximum BASIC Line LengthHi, I think there was a Utlity or Toolkit to create a long REM-Line under 48k BASIC to store some MCode in it. So I don´t have to type e.g. 5…

    ... :
    DIM r$(FN p(23670)): LET rl=FN p(23670):
    LET VARS=FN p(23627): RANDOMIZE VARS+6+ ... rv=VARS+4: LET rl=FN p(rv):
    RANDOMIZE rn ... rv+rl+1,13:
    DEF FN p(a)=PEEK a+256 ...
    Battle Bunny Battle Bunny October 2015 Sinclair Basic
  • 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 ... ]

    [code]
    2 DEF FN s$(r,c)=STR$ USR ... 50
    110 IF INKEY$=FN s$(21,4) THEN
    Battle Bunny Battle Bunny May 2016 Sinclair Basic
  • Function works in SpecBAS but not BASinSo, is there any reason why this user defined function works in SpecBAS but not BASin? [code] 10 DEF FN m$(a$,n1,n2)=a$(n1 TO n2) 20 LET a$="The…

    ... because that DEF FN is invalid in ZX BASIC. Numeric parameters in the DEF can only be single letters, as the editor assigns a fixed 8 bytes for numbers and 9 bytes for string pointers in the FN workspace.
    Battle Bunny Battle Bunny May 2016 Sinclair Basic
  • Function works in SpecBAS but not BASinSo, is there any reason why this user defined function works in SpecBAS but not BASin? [code] 10 DEF FN m$(a$,n1,n2)=a$(n1 TO n2) 20 LET a$="The…

    ... ...

    [code]
    10 DEF FN m$(a$,n,m)=a ... a$="TheManInTheMoon"
    50 PRINT FN m$(a$,12,15)
    Richey Richey May 2016 Sinclair Basic
  • Bored of the Rings coded messageI was browsing [url="https://tcrf.net/"]The Cutting Room Floor[/url] recently and stumbled upon the entry for [url="https://tcrf.net/Bored_of_the_Rin…

    ... , restricting results to A-Z (FN c() is true). With a ... ,123,226,205,32:
    DEF FN c(a)=a>=CODE ...
    Battle Bunny Battle Bunny May 2016 Games
  • Leading Zeroes on a Score in BASICI'm trying to print the score with leading zeroes such that it's always 6 characters wide, i.e.: 000010, 000150, 006100 etc. I quickly knocked thi…

    ... more):
    [code]
    10 DEF FN s$(s)="000000"(1 TO ... TO 10
    30 PRINT FN s$(10^i-1)
    ub880d ub880d July 2016 Sinclair Basic
  • Leading Zeroes on a Score in BASICI'm trying to print the score with leading zeroes such that it's always 6 characters wide, i.e.: 000010, 000150, 006100 etc. I quickly knocked thi…

    ... gone before:
    [code]PRINT FN s$(STR$ score)[/code]
    [code]DEF FN s$(s$)=p$(TO 9 ...
    Battle Bunny Battle Bunny July 2016 Sinclair Basic
  • Leading Zeroes on a Score in BASICI'm trying to print the score with leading zeroes such that it's always 6 characters wide, i.e.: 000010, 000150, 006100 etc. I quickly knocked thi…

    ... /> 5 LET st=FN t(FN f(),FN f()): PRINT #0; ... l:
    LET ft=FN t(FN f(),FN f()): PRINT #0; ... PAUSE 0: STOP
    100 DEF FN f()=(65536*PEEK 23674+256 ... +PEEK 23672)/50:
    DEF FN t(f,s)=f-(f ... +10

    7003 DEF FN s$(s$)=p$(TO 9 ...
    Battle Bunny Battle Bunny July 2016 Sinclair Basic
  • Empire - port of trs80 basic programBack when I was a little kid, I had the opportunity to play around with a trs80 model 1 with level 2 basic. One of the games I often played was call…

    ... /> 1001 RESTORE k9: LET fnw=FN p(23639)+k8:
    RANDOMIZE ...
    Battle Bunny Battle Bunny August 2016 Brand new software
  • 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…

    ...
    Functions:
    [code]
    DEF FN d(w,x)=INT ((x ... X pixel coord
    DEF FN e(y,z)=(175-z ... Y pixel coord
    DEF FN p(a)=PEEK a+256 ... a,a+1.
    DEF FN r(a)=8001
    ... X pixel coordinate
    DEF FN y(y)=175-y: HPLOT ...
    Battle Bunny Battle Bunny August 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…

    ... parameter space allocated by a DEF FN as a mini-variables area ... :
    [code]
    7 DEF FN z(r,c,z$)=8101 ... 23670":
    RESTORE 7: RANDOMIZE FN p(dt)+8: LET zlo ... :
    [code]GO SUB FN z(row_expression, col_expression, string_expression)[/code ...
    Battle Bunny Battle Bunny September 2016 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…

    ... ]
    6 DEF FN x(x)=INT (x*dp9+dp5): DEF FN y(y ... x1,y1,draws: PLOT FN x(x1),FN y(y1):
    FOR ... :
    READ x2,y2: DRAW FN x(x2),-y2:
    NEXT ...
    Battle Bunny Battle Bunny September 2016 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…

    I've converted this to ZX BASIC which came out at 40,103 bytes as a .BAS text file of the "no REMs" version. This loaded into a PROG size of 24,341 with VARS of 6,738 at run time with all arrays declared and 10,395 free. Once the map comes up it complains ...
    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…

    ... :

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

    ... :

    [code]
    10 DEF FN a(b,c)=USR 60000 ...
    20 RANDOMIZE FN a (x,y)
    [/code ... /> Also, 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…

    ... /> Also, if you use the DEF FN approach, how do you access ... evaluated, for example for DEF FN a(x,y) when x ...
    GReW GReW September 2016 Sinclair Basic
  • Arrays in BASICHi so I'm making this crappy game and I wanna store the screen positions of some UDGs in in a 50x2 array cause I have 50 characters. So I made the ar…

    ... : PRINT "PROG ends","= ";FN p(23639):
    REM ... br />
    2003 DEF FN p(a)=PEEK a+256 ... /> 2004 DEF FN v()=FN p(23641)-1-FN p(23627): ... REM =(E_LINE)-1-(VARS)
    2005 DEF FN e()=FN ... p(23627)+FN v()
    ...
    Battle Bunny Battle Bunny October 2016 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…

    ... /> [code]
    400 RESTORE FN g()+400: FOR s=O ... 791: READ w$: LET bc=FN a(w$): RETURN
    ... entirely different result. The DEF FN was put at line 2 ... :
    [code]DEF FN a(a$)=USR 65368[/code ... ]
    The assembler for FN a(a$) is:
    ...
    Battle Bunny Battle Bunny January 2017 Sinclair Basic
  • Anagram creation - not as easy as it looks?I'm writing a story and I have a mystery villain who is never revealed. My main clue was to have been that every alias he uses is an anagram of the f…

    ...

    [code]
    3 DEF FN p(a)=PEEK a+256 ... ABS size:
    LET start=FN p(23675)-size: RANDOMIZE size ... start-1:
    LET start=FN p(23730)+1: LET size ... =FN p(23670)
    10 INPUT " ...
    Battle Bunny Battle Bunny January 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…

    ... rather amazing one-line recursive DEF FNs.

    Unfortunately I ... had a think.

    def fn s(a$)=(a$"" AND VAL ... )) + ((LEN a$ > 1) AND FN s(a$(2 TO)))
    Alcoholics Anonymous Alcoholics Anonymous 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]
    3 DEF FN s(a$)
    =VAL a ... $(1)+VAL (("FN s(a$(2 TO ))+" AND ... TO 9:
    PRINT number,FN s(STR$ number):
    LET ...
    Battle Bunny Battle Bunny February 2017 BASIC
<1…17181920212223…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