SHARE
TWEET

Petit Computer Instruction List

a guest Feb 2nd, 2019 146 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. System Variables:
  2.  
  3. CSRX R
  4. CSRY R
  5. FREEMEM R
  6. VERSION R
  7. ERR R
  8. ERL R
  9. RESULT R
  10. TCHX R
  11. TCHY R
  12. TCHST R
  13. TCHTIME R
  14. MAINCNTL R
  15. MAINTNTH R
  16. TABSTEP RW
  17. TRUE R
  18. FALSE R
  19. CANCEL R
  20. ICONPUSE RW
  21. ICONPAGE RW
  22. FUNCNO R
  23. FREEVAR R
  24. SYSBEEP RW
  25. KEYBOARD R
  26. SPHITNO R
  27. SPHITX R
  28. SPHITY R
  29. SPHITT R
  30. TIME$ R
  31. DATE$ R
  32. MEM$ RW
  33. PRGNAME$ R
  34. PACKAGE$ R
  35.  
  36. Run Mode:
  37. NEW
  38. LIST [num|@label]
  39. RUN
  40. CONT
  41. FILES [type$, ...]
  42. REBOOT
  43.  
  44. Declarations and variables:
  45. CLEAR
  46. VAR[$]=value
  47. DIM ARR(X, Y), ...
  48. REM comment
  49. ' comment
  50. @labelname
  51. KEY number, "string"
  52. SWAP VAR1, VAR2
  53. SORT start, num, arr1[, arr2...]
  54. RSORT start, num, arr1[, arr2...]
  55. VSYNC numframes
  56. WAIT numframes
  57.  
  58. Branch:
  59. ON value GOTO @label0, @label1, ...
  60. ON value GOSUB @label0, @label1, ...
  61. GOTO @label
  62. GOSUB @label
  63. RETURN
  64. STOP
  65. END
  66.  
  67. Repeat/compare:
  68. FOR VAR=initial TO final [STEP increase]
  69. NEXT [VAR]
  70. IF value THEN commands [ELSE commands]
  71. IF value GOTO @label [ELSE commands|label]
  72.  
  73. Read:
  74. READ VAR1[, VAR2...]
  75. DATA value, ...
  76. RESTORE @label
  77. TMREAD(time$), VARHOUR, VARMIN, VARSEC
  78. DTREAD(date$), VARYEAR, VARMON, VARDAY
  79.  
  80. Console:
  81. CLS
  82. COLOR char[, bg]
  83. LOCATE x, y
  84. PRINT value[;|, value...]
  85. CHKCHR(x, y)
  86. ACLS
  87. VISIBLE cons, panel, bg0, bg1, sprite, gfx
  88. INKEY$()
  89. INPUT ["prompt";] VAR1[, VAR2...]
  90. LINPUT ["prompt";] VAR
  91. BUTTON([type])
  92. BTRIG()
  93. BREPEAT button[, start, interval]
  94. PNLTYPE "OFF|PNL|KYA|KYM|KYK"
  95. PNLSTR x, y, "string", col
  96. ICONSET pos, num
  97. ICONCLR pos
  98. ICONCHK()
  99.  
  100. File/Comm:
  101. LOAD "type:name"[, showprompt]
  102. SAVE "type:name"[, PACKAGE$]
  103. DELETE "type:name"
  104. RENAME "type:name", "newname"
  105. RECVFILE "type:name"
  106. SENDFILE "type:name"
  107. APPEND "name"
  108. EXEC "name"
  109.  
  110. Math:
  111. FLOOR(num)
  112. RND(max)
  113. ABS(num)
  114. SGN(num)
  115. SQR(num)
  116. EXP(num)
  117. LOG(num)
  118. POW(num, exp)
  119. PI()
  120. RAD(angle)
  121. DEG(radian)
  122. SIN(radian)
  123. COS(radian)
  124. TAN(radian)
  125. ATAN(radians)
  126. ATAN(y, x)
  127.  
  128. Character:
  129. ASC(chr$)
  130. CHR$(asc)
  131. VAL(str$)
  132. STR$(val)
  133. HEX$(val[, places])
  134. LEN(str$)
  135. MID$(str$, start, len)
  136. RIGHT$(str$, len)
  137. LEFT$(str$, len)
  138. INSTR(hay$, needle$)
  139. SUBST$(orig$, start, len, replace$)
  140.  
  141. Graphics:
  142. GPAGE screen[, drawpage, showpage]
  143. GCOLOR color
  144. GCLS [color]
  145. GSPOIT(x, y)
  146. GPSET x, y[, color]
  147. GPAINT x, y[, color]
  148. GLINE x1, y1, x2, y2[, color]
  149. GBOX x1, y1, x2, y2[, color]
  150. GFILL x1, y1, x2, y2[, color]
  151. GCIRCLE x, y, w[, color[, radstart, radend]]
  152. GPRIO prio
  153. GDRAWMD status
  154. GCOPY [srcpage,] x1, y1, x2, y2, destx, desty, mode
  155. GPUTCHR x, y, "CHRTYPE", chrnum, pal, scale
  156.  
  157. Characters:
  158. COLINIT "BANK", num
  159. COLSET "BANK", num, "COLDATA"
  160. COLREAD("BANK", num), R, G, B
  161. CHRINIT "CHRTYPE"
  162. CHRSET "CHRTYPE", chrnum, "CHRDATA"
  163. CHRREAD("CHRTYPE", num), CHRDATA$
  164.  
  165. Sprites:
  166. SPPAGE screen
  167. SPSET spnum, chrnum, pal, flipx, flipy, prio
  168. SPCLR spnum
  169. SPHOME spnum, x, y
  170. SPOFS spnum, x, y[, time]
  171. SPCHR spnum, chrnum[, pal, flipx, flipy, prio]
  172. SPANIM spnum, length, time[, loop]
  173. SPANGLE spnum, rad[, time, direction]
  174. SPSCALE spnum, size[, time]
  175. SPCHK(spnum)
  176. SPREAD(spnum), x, y[, rad[, scale[, data]]]
  177. SPSETV spnum, varnum, value
  178. SPGETV(spnum, varnum)
  179. SPCOL spnum, x, y, w, h, scale[, group]
  180. SPCOLVEC spnum, dx, dy
  181. SPHIT(spnum1[, spnum2])
  182. SPHITSP(spnum1, spnum2)
  183. SPHITRC(spnum, x, y, w, h[, dx, dy])
  184.  
  185. Background:
  186. BGPAGE screen
  187. BGCLR [layer]
  188. BGCLIP x1, y1, x2, y2
  189. BGOFS layer, x, y[, time]
  190. BGPUT layer, x, y, chrnum, pal, flipx, flipy
  191. BGPUT layer, x, y, bgdata
  192. BGFILL layer, x1, y1, x2, y2, chrnum, pal, flipx, flipy
  193. BGFILL layer, x1, y1, x2, y2, bgdata
  194. BGREAD(layer, x, y), chrnum, pal, flipx, flipy
  195. BGREAD(layer, x, y), bgdata
  196. BGCHK(layer)
  197. BGCOPY layer, x1, y1, x2, y2, destx, desty
  198.  
  199. Audio:
  200. BEEP [num[, pitch[, volume[, pan]]]]
  201. BGMPLAY [tracknum,] songnum[, volume]
  202. BGMPLAY mml$[, mml2$,...]
  203. BGMSTOP [tracknum[, fade]]
  204. BGMCHK([tracknum])
  205. BGMVOL [tracknum,] volume
  206. BGMSET songnum, mml$[, mml2$,...]
  207. BGMSETD songnum, @label
  208. BGMCLEAR [songnum]
  209. BGMSETV tracknum, varnum, value
  210. BGMGETV(tracknum, varnum)
  211. BGMPRG instrument, [key,] [A, D, S, R,] waveform
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top