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
<1234567…34>
  • Dim commandI try o find a BASIC COMPILER for ZX SPECTRUM 128 that use DIM command with two or more letter as 10 DIM AB(10) instead of 10 DIM A(10) Any iforma…

    ... .[/quote]

    A DEF FN has to have a fixed ... , so you could have DEF FN w(a$, b$, c$)=1 ... all of those with FN so print FN w(a$,b$) would ... , now your example uses the USR function which is not missing ...
    chev chev December 2009 Sinclair Basic
  • Randomize usrHi, I've often wondered why/how they came up with RANDOMIZE USR <memory address> to invoke machine code couldn't they have used a better keyword (e…

    ... />
    [code]
    10 DEF FN a$(a)=""
    20 CLEAR ... : REM RET
    40 PRINT FN a$(USR 40000);
    [/code]
    chev chev December 2009 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…

    ... use. The result of the USR call is 1 if the ... +n), 255
    1030 PRINT USR(prog + 5)
    [/CODE]
    FN may want to move argument ... could just be DEF FN e(a$) = USR (prog+5)
    [CODE ...
    John Elliott John Elliott May 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…

    ... check routine which uses DEF FN to define the file name ... definition is:
    DEF FN o(f$)=USR 49050
    where f ... 92 ;DEFADD holds start of FN o(f$) arg
    ld ...
    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…

    ... /> Errrm ... use DEF FN to pass arguments to USR routines, as exampled ...
    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…

    ... 9220: DEF FN o(f$)=USR 49050: DEF FN p(t,e ... )=USR 47000
    ...
    900 LET r$=l$(item): IF FN ... r$

    The USR 49050 routine is the one ... slightly modified version of) USR 49050. The file name ...
    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

    ... ,20
    40 RANDOMISE USR 64002
    50 PRINT ... BASIC you could use a FN. Your example would become ... address of first character after FN
    INC HL
    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…

    ... twice, once with the USR call and once without, ... the difference to get the USR time. Unfortunately using FRAMES ... demo
    2 DEF FN t()=65536*PEEK 23674+256 ... LET bc=0: LET bc=USR 30010
    70 GO ... /> 90 LET t1=FN t(): LET t2=FN t():
    LET ...
    Battle Bunny Battle Bunny September 2010 Sinclair Basic
  • automatic relocating of non-relocatable codeI was pondering upon the problem of changing absolute addresses used by CALL, JP, etc. when code is moved, without reassembling at the new location; …

    ... 's "scanning" method for passing USR arguments which, once I got ... former method of using DEF FN. The changes are that I ... from BASIC by:
    ;PRINT USR stack[,arg1,arg2...,argn],addr ...
    ld sp,hl ;undo USR
    GETARG: rst $20
    Battle Bunny Battle Bunny August 2011 Development
  • Keys redefine routine and key check.I have written some asm code which allows me to redefine keys (for a game etc.), and also allows me to be able to check any keypresses for the redefi…

    ... /> [code]
    10 LET bc=USR main: LET b$="00000000"
    [code]
    1 DEF FN b$(b)="00000000"(TO 8 ... STR$ FN b(b))+STR$ FN b(b):
    DEF FN b(b ... -INT (b/2)*2+10*FN b(INT (b/2))" AND ... b))
    10 LET b$=FN b(USR main)
    [/code]
    Battle Bunny Battle Bunny September 2011 Development
  • checking bits in BASICThe question of manipulating bit patterns in BASIC was raised recently in this [thread=35728]Keys redefine routine and key check[/thread] thread. I s…

    ... /> [CODE]
    DEF FN b$(b,u)=("" AND USR u)+"0000000000000000"
    3 DEF FN b$(b,u)=("" AND USR u)+"0000000000001110": REM ... br /> 2022 LET usr=FN x(a$)
    2023 PRINT "usr",usr
    2025 ... INPUT j
    2030 PRINT "FN b$(j)",FN b ...
    mattsteel mattsteel September 2011 Sinclair Basic
  • checking bits in BASICThe question of manipulating bit patterns in BASIC was raised recently in this [thread=35728]Keys redefine routine and key check[/thread] thread. I s…

    ...

    DEF FN b$(b,u)=("" AND USR u)+"0000000000000000"

    but became

    DEF FN b ... $(b,u)=("" AND USR u)+"0000000000001110"
    mattsteel mattsteel September 2011 Sinclair Basic
  • checking bits in BASICThe question of manipulating bit patterns in BASIC was raised recently in this [thread=35728]Keys redefine routine and key check[/thread] thread. I s…

    ... starting address using the DEF FN x(a$).[/QUOTE]
    ... plus 5 bytes for the FN x(a$) entry and a ... INKEY$ function combined with FN h() which accepted the ... of VARS, so the USR address would be (VARS)+ ... program and variables, so the USR address would then be ( ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • checking bits in BASICThe question of manipulating bit patterns in BASIC was raised recently in this [thread=35728]Keys redefine routine and key check[/thread] thread. I s…

    ... by: LET a$="123" AND USR address
    ; or: LET ... a$= STR$ var AND USR address
    ;test:
    ... /> ;IF (STR$ var AND USR address)(8 TO 10)="101 ... strings by means of USR, I saw no reason ... for combination with DEF FN.
    Still treasures ...
    roko roko September 2011 Sinclair Basic
  • checking bits in BASICThe question of manipulating bit patterns in BASIC was raised recently in this [thread=35728]Keys redefine routine and key check[/thread] thread. I s…

    ... handling strings by means of USR, I saw no reason for ... combination with DEF FN.
    Still treasures can be ... ]
    I found useful DEF FN because all variables are vectorized ...
    mattsteel mattsteel September 2011 Sinclair Basic
  • INSTR function...Hi Folks, Another little program that people might find useful: [CODE]100 DIM i(4) 110 LET a$="This is some sample text" 120 LET b$="text" 130 GO S…

    ... p, defined as a DEF FN plus a *small* (117 ... br /> 1 DEF FN i(n,t$,s$)=USR 23296
    [/ ... br /> 1 DEF FN i(n,t$,s$)=USR 23296
    ... 2 DEF FN n(n$)= ... 3 DEF FN h(h$)=16*FN n(h$(1))+FN n(h ... br /> 2020 LET p=FN i(p,"is",s$)
    mattsteel mattsteel 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 …

    ... br /> 9990 CLS: RANDOMIZE USR VAL "FN p(23637)+96":
    ... LET v=FN p(VAL "16384"): LET ... "
    9993 LET a0=FN p(VAL "23635"): LET l1 ... br /> PAUSE k0: RANDOMIZE USR VAL "m+88": STOP
    USR VAL "m+20":
    ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • 3 lines of funHello! I'm looking for a tattoo to remember forever our fabulous 8 bit era. A part the pictures I posted here [url]http://www.worldofspectrum.org/for…

    ... />
    [code]
    10 DEF FN h(n)=(n-48)*(n ...
    Geoff Geoff October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ... />
    It's a single FN function, defined as this:
    [code]DEF FN z(a,b,o$)=USR dir[/code]
    [code]FN z(first_expression,second_expression,"&")[/code ... ]FN z(FN z(a, FN z(b,0,"~"),"&"),FN z(b, FN z ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ...
    Yes, using FN so that the USR function can pick up ... "USR address" part is only specified in the DEF FN. ... nested function rather than just FN z(a,b,"^").
    ... To avoid having the USR address on every call but ... I could use DEF FN a(a$)=USR address+VAL a$ ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ... be avoided by defining another FN with the same parameters and ... /> DEF FN z(a,b,o$)=USR dir
    DEF FN y(a ... ,b,o$)=USR dir ... written as:
    FN z(FN z(scr, FN y(msdk,0,"~"),"& ... a little:
    FN z(FN z(PEEK dscr, FN y(PEEK dmsk ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ... so this is OK:
    USR mc+VAL "N,PEEK dmsk ... with "", this:
    USR mc+VAL "O,(USR mc+VAL ""A,PEEK ... same way as the DEF FN method did, as the operator ... of "". As I said, the FN method is neater.)

    FN method come out at 25 ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • Mazes and Tremaux's AlgorithmI've done a version of Tremaux's maze solving algorithm which solves my current test maze with 400 junctions and 715 connections in a reasonably quic…

    ... : LET so=go:
    PRINT USR ms,k2,em,"v$()",mi ... 1224
    1218 LET st=FN s(y$(i))-k3*ir ... STEP k3:
    LET loc=FN p(a+bo)
    1220 ...
    Battle Bunny Battle Bunny November 2011 Development
  • BREAK from GOSUBHere's another one. Just in case you wanted to break out of multiple GOSUB levels with a single command, here's a routine to do it, tested on all mod…

    ... been loaded at address 'retsub'. FN c() is quite handy as ... : GO SUB FN c()+5: PRINT FN c(): GO TO FN c():
    DEF FN c()=PEEK ... (): RETURN
    90 PRINT FN c(): RANDOMIZE break+USR retsub
    [/code]
    Battle Bunny Battle Bunny December 2011 Sinclair Basic
  • Procrustean PrintingHere's a short routine to manage printing of text with command tokens, to avoid messing up the screen when they are expanded. It just prints as many …

    ... by:
    ;PRINT USR stack,arg1[,arg2...,argn],address ... /> ld sp,hl ;undo USR
    ld ix,0< ... of using the "PRINT USR to calculator stack" method ... function call:
    PRINT USR stack,arg1[,arg2...,argn], ... a function; eg. "FN d(2,0)
    Battle Bunny Battle Bunny December 2011 Sinclair Basic
  • Procrustean PrintingHere's a short routine to manage printing of text with command tokens, to avoid messing up the screen when they are expanded. It just prints as many …

    ... by:
    ;PRINT USR stack,arg1[,arg2...,argn],address ... /> ld sp,hl ;undo USR
    ld ix,0< ... of using the "PRINT USR to calculator stack" method ... function call:
    PRINT USR stack,arg1[,arg2...,argn], ... a function; eg. "FN d(2,0)
    Dunny Dunny December 2011 Sinclair Basic
  • Procrustean PrintingHere's a short routine to manage printing of text with command tokens, to avoid messing up the screen when they are expanded. It just prints as many …

    ... - no spaces either side
    FN to BIN - trailing space
    [code]
    ;PRINT USR stack,string_expression,max_length,substr;
    Battle Bunny Battle Bunny December 2011 Sinclair Basic
  • Generating a constant of 2?Hi Folks, Through "The Wizard of WOS" I learnt that you can generate constants as follows: [B]NOT PI=0 SGN PI=1 INT PI=3[/B] Is there a quick way …

    ... variable assignments for the USR calls also need to ... 9200 LET s=VAL "FN p(23627)-24": LET p ... =FN p(s):
    FOR ... a=s TO VAL "FN p(23627)-4" STEP ... 2":
    LET d=FN p(a): PRINT d,"+";d ... if I put the USR call addresses in an ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • Poking a string to memory...I'm looking to poke a string of characters including colour control codes to memory, I'm currently doing it by hand: 16,2,19,1,22,1,1,144 That equa…

    ... sets up a dummy DEF FN of a$:

    [CODE ...
    120 FOR a=USR "A" TO USR "A"+8
    130 ... ) Closing parenthesis for the DEF FN[/CODE]
    Next we need ...
    Paddy Coleman Paddy Coleman March 2012 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
fn 866 4.4K
usr 3.4K 6.2K

Related Threads

  • 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…
  • 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…
  • POKE, PEEK and RANDOMIZE USRAnyone got a store of useful POKES, or RANDOMIZE USR statements with interesting effects?<br /> <br /> As a start, try anything from RANDOMIZE USR 12…
  • List of RANDOMIZE USR code effects?Hi chaps,<br /> Does anyone have one of these please?<br /> Thanks.
  • 'usr 0 mode'Can anybody explain why some programs can't be just loaded after turning spectrum on but you must type 'usr 0' before loading them?
  • What's the RAND USR code for the test screen?And what versions of hardware does it work on?<br /> <br /> Ta!
  • Those RANDOMIZE USR lines that look like tape loading...I often see on here people mentioning those RANDOMIZE USR lines which when entered, seem to simulate a tape loading, with the colours and lines in th…
  • Happy Birthday Randomize UsrDon't know who you are, but have a good one dude! Hope you have many more.<br /> <br /> :)
  • 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…

Related Searches

  • randomize usr
  • otla settings clear usr
  • otla clear usr
  • usr 15619
  • usr 0
  • usr 0 128
  • usr 328
  • scroll usr 328
  • scroll usr
  • rom scroll usr
  • strange loading randomize usr
  • modulo function def fn
  • rand usr
  • tr dos randomize usr
  • randomize usr pokes
  • randomize usr 3280
  • fuse def fn keyboard
  • usr
  • print usr
  • fn usr

Copyright © 2024 World of Spectrum