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 [2020/08/13 07:03] 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 ===== ===== Core commands =====
 +
 +<tabbox Alphabetical order>
  
 <html><div class="threecol"></html> <html><div class="threecol"></html>
Line 73: Line 75:
 <html></div></html> <html></div></html>
  
-===== Commands added by extensions =====+<tabbox By category>
  
-The following commands are provided by specific extensions that must be included in your project before using them. You can read more about extensions [[extensions|here]].+<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 ==== ==== Sprites ====
Line 115: Line 234:
   * [[JOY_2_RIGHT|JOY_2_RIGHT()]]   * [[JOY_2_RIGHT|JOY_2_RIGHT()]]
   * [[JOY_2_FIRE|JOY_2_FIRE()]]   * [[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>