z_check_arg_count
};
-void (*ext_opcodes[0x1d]) (void) = {
+void (*ext_opcodes[0x1e]) (void) = {
z_save,
z_restore,
z_log_shift,
z_restore_undo,
z_print_unicode,
z_check_unicode,
- __illegal__,
+ z_set_true_colour, /* spec 1.1 */
__illegal__,
__illegal__,
__illegal__, // glkify - z_move_window,
z_print_form,
z_make_menu,
__illegal__, // glkify - z_picture_table
+ z_buffer_screen, /* spec 1.1 */
};
/*
- * init_process
+ * init_proc
*
* Initialize process variables.
*
*/
-void init_process (void)
+void init_proc (void)
{
finished = 0;
-} /* init_process */
+} /* init_proc */
/*
*--sp = (zword) (pc >> 9);
*--sp = (zword) (pc & 0x1ff);
*--sp = (zword) (fp - stack - 1);
- *--sp = (zword) (argc | (ct << (f_setup.save_quetzal ? 12 : 8)));
+ *--sp = (zword) (argc | (ct << (option_save_quetzal ? 12 : 8)));
fp = sp;
frame_count++;
pc = (long) routine << 2;
else if (h_version <= V7)
pc = ((long) routine << 2) + ((long) h_functions_offset << 3);
- else /* h_version == V8 */
+ else if (h_version <= V8)
pc = (long) routine << 3;
+ else /* h_version == V9 */ {
+ long indirect = (long) routine << 2;
+ HIGH_LONG(indirect, pc);
+ }
if (pc >= story_size)
runtime_error (ERR_ILL_CALL_ADDR);
if (sp - stack < count)
runtime_error (ERR_STK_OVF);
- if (f_setup.save_quetzal)
+ if (option_save_quetzal)
fp[0] |= (zword) count << 8; /* Save local var count for Quetzal. */
value = 0;
sp = fp;
- ct = *sp++ >> (f_setup.save_quetzal ? 12 : 8);
+ ct = *sp++ >> (option_save_quetzal ? 12 : 8);
frame_count--;
fp = stack + 1 + *sp++;
pc = *sp++;
load_all_operands (specifier);
- if (opcode < 0x1d) /* extended opcodes from 0x1d on */
+ if (opcode < 0x1e) /* extended opcodes from 0x1e on */
ext_opcodes[opcode] (); /* are reserved for future spec' */
}/* __extended__ */
void z_catch (void)
{
- store (f_setup.save_quetzal ? frame_count : (zword) (fp - stack));
+ store (option_save_quetzal ? frame_count : (zword) (fp - stack));
}/* z_catch */
void z_throw (void)
{
- if (f_setup.save_quetzal) {
+ if (option_save_quetzal) {
if (zargs[1] > frame_count)
runtime_error (ERR_BAD_FRAME);