The call table

Every call of profile 1, device by device: the number that goes in a7, the arguments, the result and the class that sets the base charge. How a program makes a call, and what an unknown call or a bad buffer returns, is in the article on the Terse32 machine; each device's article describes its calls in full.

Class sets the base charge: 4 for a deferred call (its result and charge follow from its arguments), 64 for an answered one (they depend on the device's state). System and Machines calls cost 4.

The system device, slot 1, always present:

a7CallArgumentsResult
100hwait_framenonethe frame counter in the frame it returns in
101hnext_eventa0 = buffer (4 bytes, written)1 and the event, or 0 if the queue is empty
102hframe_countnonethe frame counter
103hunix_timenonethe Unix time latched at the start of the frame
104hrandoma0 = buffer (written), a1 = length, at most 256the length
105hcontrollera0 = controller number, a1 = buffer (8 bytes, written)byte 0 of the state
106hexita0 = exit code (low 8 bits)does not return
107hopena0 = address of an open request (read)1 passed to the shell, 0 not
108hargumenta0 = buffer (32 bytes, written)1, or 0 if the machine has none
109hdevicea0 = device slotits version, or FFFF_FFFFh if absent
10Ahcopya0 = text (read), a1 = length, at most 65,5360 (the host takes it only for the user's copy key, Enter or press)
10Bhscreen_sizenonethe screen's width (bits 16 to 31) and height (bits 0 to 15): 0280_01E0h for 640 × 480

The terminal, slot 2:

a7CallArgumentsResultClass
200hwritea0 = buffer (read), a1 = length, at most 4,096the lengthdeferred
201hcommanda0 = command0deferred
202hset_cursora0 = column, a1 = row0deferred
203hget_cursornonea0 = column, a1 = rowanswered
204hset_coloursa0 = foreground, a1 = background0deferred
205hget_coloursnonea0 = foreground, a1 = backgroundanswered
206hcells_reada0 = first cell, a1 = buffer (written), a2 = countthe countanswered
207hcells_writea0 = first cell, a1 = buffer (read), a2 = countthe countdeferred
208hpalette_seta0 = first entry, a1 = buffer (read), a2 = countthe countdeferred
209hsizenonea0 = columns, a1 = rows (80 and 30 on 640 × 480)deferred

The 2D vector display, slot 3:

a7CallArgumentsResultClass
300hsubmita0 = list address, a1 = length0 done, 1 rejecteddeferred
301hclearnone0deferred
302hstylea0 = style0 done, 1 rejecteddeferred
303hpersistencea0 = persistence0 done, 1 rejecteddeferred
304hfilla0 = fill mode0 done, 1 rejecteddeferred

The content device, slot 4 (see blobs, feeds and named records):

a7CallArgumentsResultClass
400hsubmita0 = address of a request blocka handle 1 to 8, or 0 if rejectedanswered

The page, slot 7:

a7CallArgumentsResultClass
700hsubmita0 = document address, a1 = length0 done, 1 rejecteddeferred
701hclearnone0deferred
702hregiona0 = x, a1 = y, a2 = width, a3 = height0deferred
703hscrolla0 = y0deferred
704hbackgrounda0 = colour0deferred
705hlocatea0 = anchor id0 done, 1 rejectedanswered
706hlayera0 = layer, a1 = flags, a2 = x, a3 = y, a4 = scale0 done, 1 rejecteddeferred

Machines, slot 8, the shell only (buffer sizes in bytes):

a7CallArgumentsResult
800hstarta0 = image ID (32, read)a handle, or 0 if none is free
801hstopa0 = handle1, or 0 if not in use
802hplacea0 = handle, a1 = x, a2 = y, a3 = width, a4 = height1, or 0 if not in use
803hruna0 = handle, a1 = 1 run, 0 pause1, or 0 if refused
804hfocusa0 = handle, or 01, or 0 if refused
805hinfoa0 = handle, a1 = buffer (48, written)1, or 0 if not 1 to 8
806hbuiltina0 = index, a1 = buffer (32, written)1, or 0 past the last
807hstart_programa0 = program record (read)a handle, or 0 if none is free
808hidentitya0 = handle, a1 = buffer (81, written)1, or 0 if it has none
809hrequesta0 = handle, a1 = buffer (82, written)1, or 0 if no request waits
80Ahargumenta0 = handle, a1 = blob ID (32, read)1, or 0 if not loading
80Bhsnapshota0 = handle, a1 = slot1 accepted, 0 refused
80Chrestorea0 = slota handle, or 0 if none is free or out of range
80Dhsnapshot_infoa0 = slot, a1 = buffer (122, written)1 if it holds one, else 0
80Ehsnapshot_deletea0 = slot1, or 0 if out of range
80Fhfacea0 = handle, a1 = frames, a2 = x, a3 = y, a4 = width, a5 = height1, or 0 if refused
810hunfacea0 = frames1, or 0 if refused
811hexperimentala0 = handle, a1 = index, a2 = buffer (32, written)2 granted, 1 not, 0 none
812hstacka0 = handle or 0, a1 = x, a2 = y, a3 = width, a4 = height1, or 0 if not in use

The 3D vector display, slot 9:

a7CallArgumentsResultClass
900hsubmita0 = list address, a1 = length0 done, 1 rejecteddeferred
901hclearnone0deferred
902hstylea0 = style0 done, 1 rejecteddeferred
903hpersistencea0 = persistence0 done, 1 rejecteddeferred