Wikia

Petit Computer Wiki

List of Commands

Comments11
697pages on
this wiki

The following is a list of built-in commands, adapted from the help file:

V1V2V3Command
nY?

ACLS

nY?

APPEND string

YY?

BEEP [sound effect[, pitch[, volume[, balance] ] ] ]

YY?

BGCLIP x start point, y start point, x end point, y end point

nY?

BGCLR [Layer]

nY?

BGCOPY layer, start point x, start point y, end point x, end point y, transfer destination x, transfer destination y

nY?

BGFILL layer, start point x, start point y, end point x, end point y, character number, palette number, horizontal rotation, vertical rotation

nY?

BGFILL layer, start point x, start point y, end point x, end point y, screen data

nY?

BGFILL layer, start point x, start point y, end point x, end point y, screen data string

nY?

BGMCLEAR [song number]

YY?

BGMPLAY song number

nY?

BGMPLAY track number, song number[, track volume]

nY?

BGMPLAY MML string[, MML string...]

nY?

BGMPRG waveform number, A, D, S, R, waveform string

nY?

BGMSET song number, MML string[, MML string...]

nY?

BGMSETD song number, @label

nY?

BGMSETD song number, string

nY?

BGMSETV track number, variable number, value

YY?

BGMSTOP [track number[, fade time] ]

nY?

BGMVOL [track number,] volume

YY?

BGOFS layer, x, y[, interpolation time]

YY?

BGPAGE screen

YY?

BGPUT layer, x, y, character number, palette number, horizontal rotation, vertical rotation

nY?

BGPUT layer, x, y, screen data

nY?

BGPUT layer, x, y, screen data string

YY?

BGREAD (layer, x, y), CHR, PAL, H, V

nY?

BGREAD (layer, x, y), SC

nY?

BGREAD (layer, x, y), SC$

nYY

BREPEAT button ID[, start time, interval]

YY?

CHRINIT character name

YY?

CHRREAD (character name, character number), C$

YY?

CHRSET character name, character number, graphic string

YY?

CLEAR

YYY

CLS

YY?

COLINIT [color bank name[, color number] ]

YYY

COLOR number[, number]

YY?

COLREAD (color bank name, color number), variableR, variableG, variableB

YY?

COLSET color bank name, color number, color data string

YY?

CONT

YYY

DATA data[, data...]

YY?

DELETE string

nnY

DEF FunctionName [parameter1[, parameter2...] ]

YYY

DIM variable1(dimension 1[, dimension 2])[, variable2(dimension3[, dimension4])...]

YY?

DTREAD (string), variableY, variableM, variableD

YYY

END

YY?

EXEC string

YYY

FILES [resource name[, resource name...] ]

YYY

FOR numerical variable = numerical value TO numerical expression [STEP numerical expression]

YYY

GBOX x1, y1, x2, y2[, color]

YY?

GCIRCLE x, y, radius[, color[, initial angle, final angle] ]

YYY

GCLS [color]

YY?

GCOLOR color number

nY?

GCOPY [transfer page,] start point x, start point y, end point x, end point y, transfer destination x, transfer destination y, copy mode

nY?

GDRAWMD status

YYY

GFILL x1, y1, x2, y2[, color]

YY?

GLINE x1, y1, x2, y2[, color]

YYY

GOSUB @label

nY?

GOSUB string

YYY

GOTO @label

nY?

GOTO string

YY?

GPAGE screen[, drawing page, display screen]

YYY

GPAINT x, y[, color[, border color] ]

nY?

GPRIO number

YYY

GPSET x, y[, color]

YY?

GPUTCHR x, y, character name, number, palette number, scale

nnY

GYROSYNC

nnY

GYROV (), variableY, variableP, variableR

YY?

ICONCLR [icon position]

YY?

ICONSET icon position, icon number

YY?

IF numerical value GOTO label [ELSE command(s)]

YY?

IF numerical value THEN label [ELSE command(s)]

YYY

IF numerical value THEN command(s) [ELSE command(s)]

YY?

INPUT [string;] variable[, variable...]

YY?

KEY number, string

YY?

LINPUT [string;] string variable

YYY

LIST [line number]

YY?

LIST @label

YYY

LOAD string[, display control]

YY?

LOCATE x,y

nnY

LOCATE x,y,z

YY?

NEW

YYY

NEXT [variable]

YY?

ON numerical value GOTO label[, label...]

YY?

ON numerical value GOSUB label[, label...]

nnY

OPTION TOOL

YY?

PNLSTR x coordinate, y coordinate, string[, palette number]

YYY

PNLTYPE panel name

YYY

PRINT value[; value[, value...] ]

YYY

READ variable 1[, variable 2...]

nY?

REBOOT

YY?

RECVFILE string

YY?

REM [comment]

YY?

RENAME string 1, string 2

YY?

RESTORE @label

nY?

RESTORE string

YYY

RETURN

nY?

RSORT start point, number of elements, array 1[, array 2...]

YYY

RUN

YYY

SAVE string

YY?

SENDFILE string

nY?

SORT start point, number of elements, array 1[, array 2...]

YY?

SPANGLE control number, angle[, interpolation time, change direction]

YY?

SPANIM control number, number of frames, time[, loop]

YY?

SPCHR control number, sprite character number[, palette number, horizontal rotation, vertical rotation, order of precedence]

YY?

SPCLR [control number]

nY?

SPCOL control number, x, y, w, h, scale adjustment[, group]

nY?

SPCOLVEC control number[, displacement x, displacement y]

nnY

SPDEF

nnY

SPHIDE control number

nYY

SPHOME control number, x, y

YY?

SPOFS control number, x, y[, interpolation time]

nnY

SPOFS control number, x, y, z[, interpolation time]

YY?

SPPAGE screen

nY?

SPREAD (control number), X, Y[, A, S, C]

nnY

SPROT value1, value2

YYY

SPSCALE control number, scale[, interpolation time]

YYY

SPSET control number, sprite character number, palette number, horizontal rotation, vertical rotation, order of precedence[, width, height]

nY?

SPSETV control number, variable number, value

YY?

STOP

nY?

SWAP variable, variable

nJ?

TALK string[, string... ]

nJ?

TALKSTOP

YY?

TMREAD (string), variableH, variableM, variableS

nnY

TXLINE string

YY?

VISIBLE console, panel, BG0, BG1, SPRITE, 256 color graphics

nnY

VISIBLE number, number, number, number

YYY

VSYNC frame number

nYY

WAIT frame number

nnY

WEND

nnY

WHILE boolean condition

nnY

XSCREEN number, number, number

YYY

Assignment

nY?

? (PRINT)

YYY

' (REM)

The first three columns indicate whether the command is implemented in the corresponding version of SmileBasic: "Y" indicates the command is implemented, "n" indicates it is not, "J" indicates the command works in the Japanese release of Petit Computer, but not for the North American release.

List of TermsEdit

Control Number - Control numbers are identification numbers that are used to refer to the sprite after it is created with SPSET.

Start a Discussion Discussions about List of Commands

Around Wikia's network

Random Wiki