Keyword Meaning
RETURN Takes a reference to a statement off the NextBASIC Return stack, and jumps to the line after it. See also GOSUB and BANK GOSUB.
RETURN #n,var Takes the current position of stream n and stores it in variable var.
RMDIR filespec Removes an already empty folder as specified by filespec.
RUN [n] CLEAR, and then GO TO optional line n or to the first line of the program
RUN AT speed Changes the speed of the ZX Spectrum Next.
SAVE filespec [LINE n|BANK m[,o[,n]]|CODE m[,n]|DATA arrayspec|LAYER|SCREEN$] If filespec is a drivespec: Makes the named drive the current default input device for all subsequent disk operations (COPY, ERASE, MOVE etc.). If the drive letter specified is 'T:', then all subsequent SAVEs will default to tape else saves a NextBASIC program into memory with optional modifier LINE n that instructs subsequent LOAD operations to start executing the program from line n. With optional modifier BANK it SAVES the file as binary data from bank m at optional offset o and optional length n. Optional modifer CODE does the same at address m an optional length n. Optional modifier DATA saves the array specified by arrayspec. Optional modifier LAYER saves the current layer's display while SCREEN$ does the same for Layer 0 screens. See also LOAD, MERGE, VERIFY. If a drive letter is not specified in the filespec, the default drive will be used.
SPECTRUM [filespec|ATTR n|BRIGHT n|CHR$ n|FLASH n|INK n|PAPER n|SCREEN$ n,t] Sets the 128K ROM into Spectrum 48K compatibility mode. Optional filespec defining a 48K/128K/ZX80 and ZX81 snapshot loads and executes it. Optional ATTR modifier, sets the colour scheme of NextBASIC Editor. Optional BRIGHT modifier, sets the BRIGHT bit of the colour scheme of NextBASIC Editor. Optional CHR$ modifier, changes the mode to 32/64/85 columns. Optional FLASH modifier, sets the flash bit of the colour scheme of NextBASIC Editor. Optional INK modifier sets the ink colour of the NextBASIC Editor while the PAPER modifiers sets the paper colour of the NextBASIC Editor. The SCREEN$ modifier adjusts the screensaver.
SPRITE BANK b [,o,p,n] Defines all 64 sprite patterns using the 16K of data (256 bytes per sprite) in bank b or with optional values o,p,n defines n sprite patterns starting with pattern p located at offset n.
SPRITE BORDER n Enable (n=1) or disable (n=0) sprites over the border
SPRITE CLEAR Resets the sprite attributes and global settings to defaults. This is also done by NEW.
SPRITE DIM x1,y1,x2,y2 Sets the clip window for sprites from (x1,y1) to (x2,y2).
SPRITE PALETTE n [BANK m,o ]| n,i,v Switch to using palette n (0 or 1) for the Sprite System and optionally sets palette from bank m, offset o -or- defines index l for palette n as 9-bit colour v
SPRITE PRINT n Enable (n=1) or disable (n=0) sprites.
SPRITE s,x,y,i,f Set sprite s to image i, position (x,y) with flags f.
STOP Stops the program with report 9. See also CONTINUTE
TILE w,h |AT x,y [TO x2,y2] Draws a section of the screen from a tilemap. Optional AT specifies tile offset x,y in the tilemap and optional TO specifies ending tile offset x2,y2
TILE BANK n Define bank n as containing the tiles (up to 4 banks n..n+3 if 16x16 tiles).
TILE DIM n,offset,w,tilesize Define bank n as containing the tilemap, starting at offset offset in the bank. The tilemap is width w (1-2048) and uses 8x8 (tilesize=8) or 16x16 (tilesize=16) tiles.
VERIFY filespec Like LOAD (from tape), but the tape information is not loaded into RAM – instead, it is just compared against what is already in RAM.If the filespec is a drive letter, then sets the default drive. Only applicable to tape

The following is a list of all NextBASIC functions in alphabetical order with a short description regarding their purpose:

Function Meaning
ABS x Absolute Value of x
ACS x Arccosine of x in radians
ASN x Arcsine of x in radians
ATN x Arctangent of x in radians
ATTR (x,y) A number whose binary form codes the attributes of line x, column y on the display
CHR$ n The character whose code is n, rounded to the nearest integer.
CODE f The code of the first character in string f (or 0 if f is the empty string).
COS x Cosine (x in radians).
[BANK n] DPEEK a Reads a double-byte (16 bit word) from memory address a or bank n offset a.
EXP x Returns the natural exponential function of e to the power x.
FN a() FN followed by a letter calls up a user-defined function (see keyword DEF FN).
IN n The result of inputting at processor level from port n
INKEY$ Reads the keyboard.
INT x Returns the Integer part of floating point expression x (Always rounds down)
INT { x } Returns an unsigned 16-bit integer expression, from any floating point expression x
LEN string Returns the length of string
LN x Natural logarithm (to base e).

ZX Spectrum Next User Manual, 3rd Edition (ISBN 978-1-5272-5496-1), written and illustrated by Phoebus R. Dokos. Copyright © 2020-2024 Phoebus Dokos / SpecNext Ltd. Licensed under CC BY-NC-SA 4.0. This is a transcription and can contain errors; check any doubt against the printed page.