end  !!! Prevent executing

Simple loop with counter.

mov r00 0
getspritenumber r01
while r00 l r01
  // --------------------
  getselsprite r00 r02
  xor r02 1
  selectsprite r00 r02
  ignoresprite r00 0
  // --------------------
  inc r00
continue

Loop executing for each object of specified type.

mov r00 -1
for each selected nonignored sector r00 // May be nonselected, ignored
  getsector r00 floorz r01
  add r01 1024
  setsector r00 floorz r01
  if r00 g 400
    break // Break loop execution.
  endif
continue

IF construction example.

if r00 ne 0 // May be e, l, g, ne, le, ge, ==, <, >, !=, >=, <=
  setsectorceilingstatnotand r01 r00
else
  deletesector r01
endif

Subfunction inserting. Here a script ScriptDemo_0 would be executed.

include 0

Indirect addressing.

mov r04 3000
mov r01 4
mov r00 2
ptr r00 r01 // Value of register r04 would be appropriated to register r02.

Auxiliary arrays accessing.

getwall r00 extra r01
setpntb1x r00 r01
getpntb1y r00 r01
setwall r00 extra r01

Full structure appropriating.

setsprite r00 = r01

// FUNCTION LIST
*** Arguments in square parentheses require 'var' type ***

// HIGH-LEVEL FUNCTIONS WITHOUT ARGUMENTS

resetselection
deselectsectors
deselectvertices
deselectwalls
deselectsprites
resetmap
multisectorrip
updatestartpossectnum
swapclipboard
flipselsectorsx
flipselsectorsy
flipselspritesx
flipselspritesy
flipselverticesx
flipselverticesy
updatewallsectnums
selectoppositewalls
resetspriteoffsets
clearclipboard
compensatespriteoffsets
equalizeceilingheights
extractselloops
extractselloopswi
hitspace
cloneselectedsectors
cloneselectedsprites
cloneselectedloops
balanceclipboard
pasteclipboard
makeselectedwallsfirst
findmovingwallsbyvertices
joinselectedsectors
splitisolatedloops
mirrorselbyz

// HIGH-LEVEL FUNCTIONS WITH ONE ARGUMENT

squarewalltexture (wall)
skyselect (sector)
updatespritesectnum (sprite)
updatenewspritesectnum (sprite)
updatesectorslope (sector)
zshiftselsectors (amount)
reversesector (sector)
reverseloop (firstwall)
clipbcheckwallpointer (wall)
copyspritetoclipboard (sprite)
deleteloop (firstwall)
deletesector (sector)
deletesectorwos (sector)
deletesprite (sprite)
deletevertex (vertex)
deletewallsng (wall)
extractloop (firstwall)
checkwallpointer (wall)
checkzerowall (wall)
cloneloop (firstwall)
clonesector (sector)
clonesprite (sprite)
alignwalltexture (wall)
alignsprite (sprite)
findmovwalls (vertex)

// HIGH-LEVEL FUNCTIONS WITH TWO ARGUMENTS

splitsector (wall1) (wall2)
joinsectors (sector1) (sector2)
intersectsectors (sector1) (sector2)
subtractsectorsab (sector1) (sector2)
subtractsectorsba (sector1) (sector2)
movesectorsp (sector) (destination)
createsprite (x) (y)
ripsectors (sector1) (sector2)
copysectortoclipboard (sector) (includesprites)
deletewall (wall) (nomove)
getselectionboundingbox [lboundxyz] [uboundxyz]
getlooporientation (wall) [return]
getprevwall (wall) [return]
setsectorfirstwall (sector) (wall)
bindvertex (wall) (tolerance)

// HIGH-LEVEL FUNCTIONS WITH THREE ARGUMENTS

insertvertex (wall) (x) (y)
scanline (xyzs1) (xyzs2) [return]
ispointinvoidzone (x) (y) [return]
movevertex (wall) (x) (y)

// HIGH-LEVEL FUNCTIONS WITH FOUR ARGUMENTS

allowsectorsplit (wall1) (wall2) (allowexternal) [return]
linearcutter (x1) (y1) (x2) (y2)
linearcutterwb (x1) (y1) (x2) (y2)
getselectionboundingrect [lboundx] [lboundy] [uboundx] [uboundy]
gettruefloorz (x) (y) (sector) [return]
gettrueceilingz (x) (y) (sector) [return]
ispointinsector (x) (y) (sector) [return]
ispointinsectorbyloop (x) (y) (sector) [return]
ispointinloop (x) (y) (firstwall) [return]
shiftsectortile (sector) (side) (x) (y)
mirrorselsectors (x1) (y1) (x2) (y2)
isselfintersecting (wall1) (wall2) (sector) [return]

// MID-LEVEL FUNCTIONS

getsprite (sprite_id) {TAG} [return]
getsector (sector_id) {TAG} [return]
getwall (wall_id) {TAG} [return]
setsprite (sprite_id) {TAG} (value)
setsector (sector_id) {TAG} (value)
setwall (wall_id) {TAG} (value)
getwallsectnum (wall) [return]
getwallmovestate (wall) [return]
getselsprite (sprite_id) [return]
getselsector (sector_id) [return]
getselwall (wall_id) [return]
getselvertex (wall_id) [return]
selectsprite (sprite_id) (value)
selectsector (sector_id) (value)
selectwall (wall_id) (value)
selectvertex (wall_id) (value)
getignsprite (sprite_id) [return]
getignsector (sector_id) [return]
getignwall (wall_id) [return]
ignoresprite (sprite_id) (value)
ignoresector (sector_id) (value)
ignorewall (sector_id) (value)
getspritenumber [return]
getsectornumber [return]
getwallnumber [return]
setspritenumber (value)
setsectornumber (value)
setwallnumber (value)
getfirstselectedsprite [return]
getfirstselectedsector [return]
getfirstselectedwall [return]
getfirstselectedvertex [return]
setpntb1x (id) (value)
setpntb1y (id) (value)
setpntb2x (id) (value)
setpntb2y (id) (value)
getpntb1x (id) [return]
getpntb1y (id) [return]
getpntb2x (id) [return]
getpntb2y (id) [return]
gettoolvertq [return]
settoolvertq (value)
settoolvertx (id) (value)
settoolverty (id) (value)
gettoolvertx (id) [return]
gettoolverty (id) [return]
setspritecstator (sprite_id) (value)
setwallcstator (wall_id) (value)
setsectorfloorstator (sector_id) (value)
setsectorceilingstator (sector_id) (value)
setspritecstatnotand (sprite_id) (value)
setwallcstatnotand (wall_id) (value)
setsectorfloorstatnotand (sector_id) (value)
setsectorceilingstatnotand (sector_id) (value)
setspritecstatxor (sprite_id) (value)
setwallcstatxor (wall_id) (value)
setsectorfloorstatxor (sector_id) (value)
setsectorceilingstatxor (sector_id) (value)
gethitpoint [x] [y]
sethitpoint (x) (y)
gettool [return]
settool (id)
gettooldetail [return]
settooldetail (value)
gettoolsecdetail [return]
settoolsecdetail (value)
getfsmbooleanmode [return]
setfsmbooleanmode (id)
getselectionmode [return]
setselectionmode (id)
getselareamode [return]
setselareamode (value)
getselareabelongmode [return]
setselareabelongmode (value)
selectbyarea (x1) (y1) (x2) (y2)
preparefsmreel (centerz) (zscale) (radius) (sides)
preparefsmarch1 (initfloorz) (initceilz) (width)
preparefsmarch2 (floorzinc) (ceilzinc) (sides)
preparefsmsphere1 (initfloorz) (initceilz) (sides)
preparefsmsphere2 (floorzinc) (ceilzinc) (segments)
getkalt [return]
setkalt (value)
getkctrl [return]
setkctrl (value)
getkshift [return]
setkshift (value)
gettiledim (tileid) [x] [y]
getlinewidth [return]
setlinewidth (value)
gettile (id) (x) (y) [return]
getcontourq [return]
setcontourq (value)
getcontourl (id) [xpos] [floorz] [ceilingz]
setcontourl (id) (xpos) (floorz) (ceilingz)
getcontourr (id) [xpos] [floorz] [ceilingz]
setcontourr (id) (xpos) (floorz) (ceilingz)

// LOW-LEVEL COMMANDS (ONE OPERAND)

neg [var]
inc [var]
dec [var]
rnd [var]

// LOW-LEVEL COMMANDS (TWO OPERANDS)

mov [dst] (src)
ptr [dst] (src)
xor [dst] (src)
or [dst] (src)
and [dst] (src)
not [dst] (src)
min [dst] (src)
max [dst] (src)
sgn [dst] (src)
add [dst] (src)
sub [dst] (src)
mul [dst] (src)
div [dst] (src)
mod [dst] (src)
exp [dst] (src)
log [dst] (src)
sqrt [dst] (src)
fpsqrt [dst] (src)
pow [dst] (src)
fppow [dst] (src)
sin [dst] (src)
cos [dst] (src)
tan [dst] (src)
asin [dst] (src)
acos [dst] (src)
atn [dst] (src)

// LOW-LEVEL COMMANDS (THREE OPERANDS)

hypot [dst] (x) (y)
atan2 [dst] (x) (y)

// LOW-LEVEL COMMANDS (FOUR OPERANDS)

polar [radius] [angle] (x) (y)
rectangular [x] [y] (radius) (angle)

Text coloring examples.

!!! WARNING TEXT !!!
~~~ SPOILER TEXT ~~~
*** NOTE TEXT ***
// NORMAL COMMENT