Wikia

Petit Computer Wiki

List of Commands

Comments11
719pages on
this wiki

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

V1 V2 V3 Command
n Y ? ACLS
n Y ? APPEND string
Y Y Y BEEP [sound effect[, pitch[, volume[, balance] ] ] ]
Y Y ? BGCLIP x start point, y start point, x end point, y end point
n Y ? BGCLR [Layer]
n Y ? BGCOPY layer, start point x, start point y, end point x, end point y, transfer destination x, transfer destination y
n Y ? BGFILL layer, start point x, start point y, end point x, end point y, character number, palette number, horizontal rotation, vertical rotation
n Y ? BGFILL layer, start point x, start point y, end point x, end point y, screen data
n Y ? BGFILL layer, start point x, start point y, end point x, end point y, screen data string
n Y ? BGMCLEAR [song number]
Y Y Y BGMPLAY song number
n Y ? BGMPLAY track number, song number[, track volume]
n Y ? BGMPLAY MML string[, MML string...]
n Y ? BGMPRG waveform number, A, D, S, R, waveform string
n Y ? BGMSET song number, MML string[, MML string...]
n Y ? BGMSETD song number, @label
n Y ? BGMSETD song number, string
n Y ? BGMSETV track number, variable number, value
Y Y Y BGMSTOP
n Y ? BGMSTOP track number[, fade time]
n Y Y BGMVOL [track number,] volume
Y Y ? BGOFS layer, x, y[, interpolation time]
Y Y Y BGPAGE screen
Y Y ? BGPUT layer, x, y, character number, palette number, horizontal rotation, vertical rotation
n Y ? BGPUT layer, x, y, screen data
n Y ? BGPUT layer, x, y, screen data string
Y Y ? BGREAD (layer, x, y), CHR, PAL, H, V
n Y ? BGREAD (layer, x, y), SC
n Y ? BGREAD (layer, x, y), SC$
n n Y BREAK
n Y Y BREPEAT button ID[, start time, interval]
Y Y ? CHRINIT character name
Y Y ? CHRREAD (character name, character number), C$
Y Y ? CHRSET character name, character number, graphic string
Y Y ? CLEAR
Y Y Y CLS
Y Y ? COLINIT [color bank name[, color number] ]
Y Y Y COLOR number
n Y Y COLOR number, number
Y Y ? COLREAD (color bank name, color number), variableR, variableG, variableB
Y Y ? COLSET color bank name, color number, color data string
Y Y ? CONT
n n Y CONTINUE
Y Y Y DATA data[, data...]
Y Y ? DELETE string
n n Y DEF FunctionName [parameter1[, parameter2...] ]
Y Y Y DIM variable1(dimension 1[, dimension 2])[, variable2(dimension3[, dimension4])...]
Y Y ? DTREAD (string), variableY, variableM, variableD
Y Y Y END
Y Y ? EXEC string
Y Y Y FILES [resource name[, resource name...] ]
n n Y FONTDEF number, string
Y Y Y FOR numerical variable = numerical value TO numerical expression [STEP numerical expression]
Y Y Y GBOX x1, y1, x2, y2[, color]
Y Y ? GCIRCLE x, y, radius[, color[, initial angle, final angle] ]
Y Y Y GCLS [color]
Y Y ? GCOLOR color number
n Y ? GCOPY [transfer page,] start point x, start point y, end point x, end point y, transfer destination x, transfer destination y, copy mode
n Y ? GDRAWMD status
Y Y Y GFILL x1, y1, x2, y2[, color]
Y Y ? GLINE x1, y1, x2, y2[, color]
Y Y Y GOSUB @label
n Y ? GOSUB string
Y Y Y GOTO @label
n Y ? GOTO string
Y Y ? GPAGE screen[, drawing page, display screen]
Y Y Y GPAINT x, y[, color[, border color] ]
n Y Y GPRIO number
Y Y Y GPSET x, y[, color]
Y Y ? GPUTCHR x, y, character name, number, palette number, scale
n n Y GYROSYNC
n n Y GYROV (), variableY, variableP, variableR
Y Y ? ICONCLR [icon position]
Y Y ? ICONSET icon position, icon number
Y Y ? IF numerical value GOTO label [ELSE command(s)]
Y Y Y IF numerical value THEN label [ELSE command(s)]
Y Y Y IF numerical value THEN command(s) [ELSE command(s)]
Y Y ? INPUT [string;] variable[, variable...]
Y Y ? KEY number, string
Y Y ? LINPUT [string;] string variable
Y Y Y LIST [line number]
Y Y ? LIST @label
Y Y Y LOAD string[, display control]
Y Y ? LOCATE x,y
n n Y LOCATE x,y,z
Y Y ? NEW
Y Y Y NEXT [variable]
Y Y ? ON numerical value GOTO label[, label...]
Y Y ? ON numerical value GOSUB label[, label...]
n n Y OPTION TOOL
Y Y ? PNLSTR x coordinate, y coordinate, string[, palette number]
Y Y Y PNLTYPE panel name
n n Y PRGDEL
n n Y PRGGET
n n Y PRGINS string
n n Y PRGSET string
Y Y Y PRINT value[; value[, value...] ]
Y Y Y READ variable 1[, variable 2...]
n Y ? REBOOT
Y Y ? RECVFILE string
Y Y ? REM [comment]
Y Y ? RENAME string 1, string 2
n n Y REPEAT
Y Y ? RESTORE @label
n Y ? RESTORE string
Y Y Y RETURN
n Y Y RSORT start point, number of elements, array 1[, array 2...]
Y Y Y RUN
Y Y Y SAVE string
n Y ? SAVE string, string
n n Y SCROLL number, number
Y Y ? SENDFILE string
n Y Y SORT start point, number of elements, array 1[, array 2...]
Y Y ? SPANGLE control number, angle[, interpolation time, change direction]
Y Y ? SPANIM control number, number of frames, time[, loop]
Y Y ? SPCHR control number, sprite character number[, palette number, horizontal rotation, vertical rotation, order of precedence]
Y Y ? SPCLR [control number]
n Y ? SPCOL control number, x, y, w, h, scale adjustment[, group]
n Y ? SPCOLVEC control number[, displacement x, displacement y]
n n Y SPDEF
n n Y SPHIDE control number
n Y Y SPHOME control number, x, y
n n Y SPLINK number, number
Y Y ? SPOFS control number, x, y[, interpolation time]
n n Y SPOFS control number, x, y, z[, interpolation time]
Y Y Y SPPAGE screen
n Y ? SPREAD (control number), X, Y[, A, S, C]
n n Y SPROT value1, value2
Y Y Y SPSCALE control number, scale[, interpolation time]
Y Y Y SPSET control number, sprite character number, palette number, horizontal rotation, vertical rotation, order of precedence[, width, height]
n Y ? SPSETV control number, variable number, value
Y Y ? STOP
n Y ? SWAP variable, variable
n J ? TALK string[, string... ]
n J ? TALKSTOP
Y Y ? TMREAD (string), variableH, variableM, variableS
n n Y UNTIL boolean condition
Y Y ? VISIBLE console, panel, BG0, BG1, SPRITE, 256 color graphics
n n Y VISIBLE number, number, number, number
Y Y Y VSYNC frame number
n Y Y WAIT frame number
n n Y WEND
n n Y WHILE boolean condition
n n Y XSCREEN number[, number, number]
Y Y Y Assignment
n Y ? ? (PRINT)
Y Y Y ' (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