Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
command_reference [2019/07/15 13:02] neilscommand_reference [2021/02/18 14:28] (current) neils
Line 1: Line 1:
 ====== XC=BASIC command reference ====== ====== XC=BASIC command reference ======
  
-The following is the list of all commands, functions and directives supported by the current version of **XC=BASIC**, in alphabetical order:+The following is the list of all commands, functions and directives supported by the current version of **XC=BASIC**: 
 + 
 +===== Core commands ===== 
 + 
 +<tabbox Alphabetical order>
  
 <html><div class="threecol"></html> <html><div class="threecol"></html>
Line 19: Line 23:
   * [[DEEK|DEEK()]]   * [[DEEK|DEEK()]]
   * [[DIM|DIM]]   * [[DIM|DIM]]
 +  * [[DISABLEIRQ|DISABLEIRQ]]
   * [[DOKE|DOKE]]   * [[DOKE|DOKE]]
 +  * [[ENABLEIRQ|ENABLEIRQ]]
   * [[END|END]]   * [[END|END]]
   * [[FERR|FERR()]]   * [[FERR|FERR()]]
   * [[FORNEXT|FOR ... NEXT]]   * [[FORNEXT|FOR ... NEXT]]
 +  * [[fun|FUN ... ENDFUN]]
   * [[GOSUBRETURN|GOSUB ... RETURN]]   * [[GOSUBRETURN|GOSUB ... RETURN]]
   * [[GOTO|GOTO]]   * [[GOTO|GOTO]]
Line 65: Line 72:
   * [[WATCH|WATCH]]   * [[WATCH|WATCH]]
   * [[while|WHILE ... ENDWHILE]]   * [[while|WHILE ... ENDWHILE]]
 +
 +<html></div></html>
 +
 +<tabbox By category>
 +
 +<html><h3>Numeric</h3></tml>
 +<html><div class="threecol"></html>
 +
 +  * [[ABS|ABS()]]
 +  * [[RND|RND()]]
 +  * [[SGN|SGN()]]
 +  * [[SQR|SQR()]]
 +  * [[ATN|ATN()]]
 +  * [[COS|COS()]]
 +  * [[SIN|SIN()]]
 +  * [[TAN|TAN()]]
 +  * [[LSHIFT|LSHIFT()]]
 +  * [[RSHIFT|RSHIFT()]]
 +  * [[DEC|DEC]]
 +  * [[INC|INC]]
 +
 +<html></div></html>
 +
 +<html><h3>Strings</h3></tml>
 +<html><div class="threecol"></html>
 +
 +  * [[STRCMP|STRCMP()]]
 +  * [[STRCPY|STRCPY]]
 +  * [[STRLEN|STRLEN()]]
 +  * [[STRNCPY|STRNCPY]]
 +  * [[STRPOS|STRPOS()]]
 +
 +<html></div></html>
 +
 +<html><h3>Variables</h3></tml>
 +<html><div class="threecol"></html>
 +
 +  * [[AT|@ (address of)]]
 +  * [[CAST|CAST()]]
 +  * [[CONST|CONST]]
 +  * [[DATA|DATA]]
 +  * [[DIM|DIM]]
 +  * [[LET|LET]]
 +  * [[VAL|VAL()]]
 +
 +<html></div></html>
 +
 +<html><h3>Control structures</h3></tml>
 +<html><div class="threecol"></html>
 +
 +  * [[CALL|CALL]]
 +  * [[PROC|PROC ... ENDPROC]]
 +  * [[END|END]]
 +  * [[FORNEXT|FOR ... NEXT]]
 +  * [[fun|FUN ... ENDFUN]]
 +  * [[GOSUBRETURN|GOSUB ... RETURN]]
 +  * [[GOTO|GOTO]]
 +  * [[IFTHENELSE|IF ... THEN ... ELSE]]
 +  * [[ON|ON]]
 +  * [[repeat|REPEAT ... UNTIL]]
 +  * [[while|WHILE ... ENDWHILE]]
 +  * [[REM|REM]]
 +
 +<html></div></html>
 +
 +<html><h3>Compiler directives</h3></tml>
 +<html><div class="threecol"></html>
 +
 +  * [[pragma|PRAGMA]]
 +  * [[ASM|ASM]]
 +  * [[ORIGIN|ORIGIN]]
 +  * [[INCBIN|INCBIN]]
 +  * [[INCLUDE|INCLUDE]]
 +
 +<html></div></html>
 +
 +<html><h3>System</h3></tml>
 +<html><div class="threecol"></html>
 +
 +  * [[DISABLEIRQ|DISABLEIRQ]]
 +  * [[ENABLEIRQ|ENABLEIRQ]]
 +  * [[SYS|SYS]]
 +  * [[USR|USR()]]
 +  * [[WAIT|WAIT]]
 +  * [[WATCH|WATCH]]
 +
 +<html></div></html>
 +
 +<html><h3>Input/output</h3></tml>
 +<html><div class="threecol"></html>
 +
 +  * [[CHARAT|CHARAT]]
 +  * [[CURPOS|CURPOS]]
 +  * [[TEXTAT|TEXTAT]]
 +  * [[PRINT|PRINT]]
 +  * [[INKEY|INKEY()]]
 +  * [[INPUT|INPUT]]
 +  * [[FERR|FERR()]]
 +  * [[LOAD|LOAD]]
 +  * [[SAVE|SAVE]]
 +
 +<html></div></html>
 +
 +<html><h3>Memory</h3></tml>
 +<html><div class="threecol"></html>
 +
 +  * [[DEEK|DEEK()]]
 +  * [[DOKE|DOKE]]
 +  * [[PEEK|PEEK()]]
 +  * [[POKE|POKE]]
 +  * [[memcpy|MEMCPY]]
 +  * [[memset|MEMSET]]
 +  * [[memshift|MEMSHIFT]]
 +
 +<html></div></html>
 +
 +----
 +
 +</tabbox>
 +
 +===== Extended commands =====
 +
 +The following commands are provided with extensions. You can read more about extensions [[extensions|here]].
 +
 +==== Sprites ====
 +
 +<html><div class="threecol"></html>
 +
 +  * [[SPR_BEHINDBG|SPR_BEHINDBG]]
 +  * [[SPR_CLEARDBLHEIGHT|SPR_CLEARDBLHEIGHT]]
 +  * [[SPR_CLEARDBLWIDTH|SPR_CLEARDBLWIDTH]]
 +  * [[SPR_DATA_COLLISION|SPR_DATA_COLLISION()]]
 +  * [[SPR_DISABLE|SPR_DISABLE]]
 +  * [[SPR_ENABLE|SPR_ENABLE]]
 +  * [[SPR_OVERBG|SPR_OVERBG]]
 +  * [[SPR_SETCOLOR|SPR_SETCOLOR]]
 +  * [[SPR_SETDBLHEIGHT|SPR_SETDBLHEIGHT]]
 +  * [[SPR_SETDBLWIDTH|SPR_SETDBLWIDTH]]
 +  * [[SPR_SETHIRES|SPR_SETHIRES]]
 +  * [[SPR_SETMULTI|SPR_SETMULTI]]
 +  * [[SPR_SETPOS|SPR_SETPOS]]
 +  * [[SPR_SETPOSX|SPR_SETPOSX]]
 +  * [[SPR_SETPOSY|SPR_SETPOSY]]
 +  * [[SPR_SETSHAPE|SPR_SETSHAPE]]
 +  * [[SPR_SPR_COLLISION|SPR_SPR_COLLISION()]]
 +
 +<html></div></html>
 +
 +==== Joystick ====
 +
 +<html><div class="threecol"></html>
 +
 +  * [[JOY_1_UP|JOY_1_UP()]]
 +  * [[JOY_1_DOWN|JOY_1_DOWN()]]
 +  * [[JOY_1_LEFT|JOY_1_LEFT()]]
 +  * [[JOY_1_RIGHT|JOY_1_RIGHT()]]
 +  * [[JOY_1_FIRE|JOY_1_FIRE()]]
 +  * [[JOY_2_UP|JOY_2_UP()]]
 +  * [[JOY_2_DOWN|JOY_2_DOWN()]]
 +  * [[JOY_2_LEFT|JOY_2_LEFT()]]
 +  * [[JOY_2_RIGHT|JOY_2_RIGHT()]]
 +  * [[JOY_2_FIRE|JOY_2_FIRE()]]
 +
 +<html></div></html>
 +
 +==== Raster interrupts ====
 +
 +<html><div class="threecol"></html>
 +
 +  * [[RI_ON|RI_ON]]
 +  * [[RI_OFF|RI_OFF]]
 +  * [[RI_SET_ISR|RI_SET_ISR]]
 +  * [[RI_SYSHANDLER_ON|RI_SYSHANDLER_ON]]
 +  * [[RI_SYSHANDLER_OFF|RI_SYSHANDLER_OFF]]
 +
 +<html></div></html>
 +
 +==== Sound effects ====
 +
 +<html><div class="threecol"></html>
 +
 +  * [[SFX_INIT|SFX_INIT]]
 +  * [[SFX_PLAY|SFX_PLAY]]
 +  * [[SFX_START|SFX_START]]
 +
 +<html></div></html>
 +
 +==== Hi-Res graphics ====
 +
 +<html><div class="threecol"></html>
 +
 +  * [[hi_bitmapon|HI_BITMAPON]]
 +  * [[hi_bitmapoff|HI_BITMAPOFF]]
 +  * [[hi_box|HI_BOX]]
 +  * [[hi_circle|HI_CIRCLE]]
 +  * [[hi_clear|HI_CLEAR]]
 +  * [[hi_dot|HI_DOT]]
 +  * [[hi_dotset|HI_DOTSET()]]
 +  * [[hi_fill|HI_FILL]]
 +  * [[hi_line|HI_LINE]]
 +  * [[hi_rect|HI_RECT]]
  
 <html></div></html> <html></div></html>