Changes

Jump to: navigation, search

ZACK

2,391 bytes added, 00:52, 27 September 2006
/* ZACK Programming Language */
==== ZACK Programming Language ====
<br>
<b>Commands</b><br>
<pre>
BACKGROUND (x,y) = value Set a background tile
WORD var{ ,var} Define a Word variable
</pre>
<br>
Some of these commands may not be fully implemented.<br>
<br>
<b>Functions</b><br>
<pre>
ABS expr Absolute value
BACKGROUND (x, y) Background tile (x and y in bytes)
DIR obj Direction of another object (0..7)
INKEY key Test a key
MAX (value1{, valuen}) Maximum of values
MIN (value1{, valuen}) Minimum of values
NOT expr Logical NOT
RND Random Word
</pre>
<br>
<b>System variables</b><br>
<pre>
marker Byte Current layout marker number
scroll_type Byte Current scroll type (automatic?)
x_scrl Byte Current horizontal scroll direction
y_scrl Byte Current vertical scroll direction
mk_task Byte Task for current marker
m1 .. m8 Byte Marker variables
 
lay_x Word Layout X position
lay_y Word Layout Y position
par_x Word Parallax X position
par_y Word Parallax Y position
 
object Byte Object number of current object
part Byte Part of current object (0 .. 11)
mv_task Byte Task to move object
dr_task Byte Task to draw object
x Word X position of object
y Word Y position of object
v1 .. v8 Byte Object variables
priority Byte Priority of object
 
y_pos Byte Y co-ordinate from LOCATE
x_pos Byte X co-ordinate from LOCATE
 
case Byte CAPS LOCK state
ctrl_shift Byte Shift and CONTROL state
text_mode Byte Text output mode
intno Byte Current interrupt in frame (0 .. 5)
screen_type Byte Current screen type
flash_mask Byte Mask for flashing objects
 
win_y Byte Window Y of top left
win_x Byte Window X of top left
win_h Byte Height of window
win_w Byte Width of window
org_y Byte Window Y origin
org_x Byte Window X origin
 
current Byte Current object reference
parent Byte Current parent object reference
main_pty Byte Priority of objects from tasks
back_pty Byte Priority of objects from layout
new_pty Byte Priority of next object
num_obj Byte Number of objects
hit Byte Collision object reference
escape Byte Disable/Enable the Escape key
 
high 10 Score Array of high scores
name 10 String Array of names for high scores
high_pos Byte Position from INSERT HIGH command
mask 16 Byte Array of byte masks for each ink
sequence ? Byte Background sequence array
 
.object Byte Parent object number
.part Byte Parent part
.mv_task Byte Parent Move Task
.dr_task Byte Parent Draw Task
.x Word Parent X location
.y Word Parent Y location
.v1 .. .v8 Byte Parent object variables
</pre><br>
Below is an example ZACK program:<br>
<pre>
151
edits