====== XC=BASIC command reference ====== The following is the list of all commands, functions and directives supported by the current version of **XC=BASIC**: ===== Core commands =====
* [[AT|@ (address of)]] * [[ABS|ABS()]] * [[ASM|ASM]] * [[ATN|ATN()]] * [[CAST|CAST()]] * [[CALL|CALL]] * [[CHARAT|CHARAT]] * [[CONST|CONST]] * [[COS|COS()]] * [[CURPOS|CURPOS]] * [[DATA|DATA]] * [[DEC|DEC]] * [[DEEK|DEEK()]] * [[DIM|DIM]] * [[DISABLEIRQ|DISABLEIRQ]] * [[DOKE|DOKE]] * [[ENABLEIRQ|ENABLEIRQ]] * [[END|END]] * [[FERR|FERR()]] * [[FORNEXT|FOR ... NEXT]] * [[fun|FUN ... ENDFUN]] * [[GOSUBRETURN|GOSUB ... RETURN]] * [[GOTO|GOTO]] * [[IFTHENELSE|IF ... THEN ... ELSE]] * [[INC|INC]] * [[INCBIN|INCBIN]] * [[INCLUDE|INCLUDE]] * [[INKEY|INKEY()]] * [[INPUT|INPUT]] * [[LET|LET]] * [[LOAD|LOAD]] * [[LSHIFT|LSHIFT()]] * [[memcpy|MEMCPY]] * [[memset|MEMSET]] * [[memshift|MEMSHIFT]] * [[ON|ON]] * [[ORIGIN|ORIGIN]] * [[PEEK|PEEK()]] * [[POKE|POKE]] * [[pragma|PRAGMA]] * [[PRINT|PRINT]] * [[PROC|PROC ... ENDPROC]] * [[REM|REM]] * [[repeat|REPEAT ... UNTIL]] * [[RND|RND()]] * [[RSHIFT|RSHIFT()]] * [[SAVE|SAVE]] * [[SGN|SGN()]] * [[SIN|SIN()]] * [[SQR|SQR()]] * [[STRCMP|STRCMP()]] * [[STRCPY|STRCPY]] * [[STRLEN|STRLEN()]] * [[STRNCPY|STRNCPY]] * [[STRPOS|STRPOS()]] * [[SYS|SYS]] * [[TAN|TAN()]] * [[TEXTAT|TEXTAT]] * [[USR|USR()]] * [[VAL|VAL()]] * [[WAIT|WAIT]] * [[WATCH|WATCH]] * [[while|WHILE ... ENDWHILE]]

Numeric

* [[ABS|ABS()]] * [[RND|RND()]] * [[SGN|SGN()]] * [[SQR|SQR()]] * [[ATN|ATN()]] * [[COS|COS()]] * [[SIN|SIN()]] * [[TAN|TAN()]] * [[LSHIFT|LSHIFT()]] * [[RSHIFT|RSHIFT()]] * [[DEC|DEC]] * [[INC|INC]]

Strings

* [[STRCMP|STRCMP()]] * [[STRCPY|STRCPY]] * [[STRLEN|STRLEN()]] * [[STRNCPY|STRNCPY]] * [[STRPOS|STRPOS()]]

Variables

* [[AT|@ (address of)]] * [[CAST|CAST()]] * [[CONST|CONST]] * [[DATA|DATA]] * [[DIM|DIM]] * [[LET|LET]] * [[VAL|VAL()]]

Control structures

* [[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]]

Compiler directives

* [[pragma|PRAGMA]] * [[ASM|ASM]] * [[ORIGIN|ORIGIN]] * [[INCBIN|INCBIN]] * [[INCLUDE|INCLUDE]]

System

* [[DISABLEIRQ|DISABLEIRQ]] * [[ENABLEIRQ|ENABLEIRQ]] * [[SYS|SYS]] * [[USR|USR()]] * [[WAIT|WAIT]] * [[WATCH|WATCH]]

Input/output

* [[CHARAT|CHARAT]] * [[CURPOS|CURPOS]] * [[TEXTAT|TEXTAT]] * [[PRINT|PRINT]] * [[INKEY|INKEY()]] * [[INPUT|INPUT]] * [[FERR|FERR()]] * [[LOAD|LOAD]] * [[SAVE|SAVE]]

Memory

* [[DEEK|DEEK()]] * [[DOKE|DOKE]] * [[PEEK|PEEK()]] * [[POKE|POKE]] * [[memcpy|MEMCPY]] * [[memset|MEMSET]] * [[memshift|MEMSHIFT]]
----
===== Extended commands ===== The following commands are provided with extensions. You can read more about extensions [[extensions|here]]. ==== Sprites ====
* [[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()]]
==== Joystick ====
* [[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()]]
==== Raster interrupts ====
* [[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]]
==== Sound effects ====
* [[SFX_INIT|SFX_INIT]] * [[SFX_PLAY|SFX_PLAY]] * [[SFX_START|SFX_START]]
==== Hi-Res graphics ====
* [[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]]