summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mixlib/xmix_vm.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/mixlib/xmix_vm.h b/mixlib/xmix_vm.h
index e0f26ae..60185df 100644
--- a/mixlib/xmix_vm.h
+++ b/mixlib/xmix_vm.h
@@ -2,6 +2,8 @@
* This file contains internal declarations used in the implementation
* of the mix_vm_t type.
* ------------------------------------------------------------------
+ * $Id: xmix_vm.h,v 1.6 2001/09/16 22:38:43 jao Exp $
+ * ------------------------------------------------------------------
* Copyright (C) 2000 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@@ -41,7 +43,7 @@ struct mix_vm_t
gboolean overflow;
mix_cmpflag_t cmpflag;
mix_short_t loc_count;
- gboolean is_halted;
+ mix_vm_status_t status;
mix_device_t * devices[BD_NO_];
mix_address_t start_addr; /* start address of loaded file */
GTree *line_table; /* source line no -> address */
@@ -77,6 +79,7 @@ enum { A_ = 0, X_, J_, I1_, I2_, I3_, I4_, I5_, I6_ };
#define get_clock_(vm) (vm->clock)
#define get_pred_list_(vm) (vm->pred_list)
#define get_address_list_(vm) (vm->address_list)
+#define get_status_(vm) (vm->status)
#define set_reg_(vm,r,x) \
do { \
@@ -97,14 +100,16 @@ do { \
#define set_over_(vm,x) (vm)->overflow = (x)
#define set_loc_(vm,x) (vm)->loc_count = (x)&MIX_SHORT_MAX
+#define set_status_(vm,s) ((vm)->status = (s))
+
#define inc_loc_(vm) \
do { \
vm->loc_count++; \
vm->loc_count &= MIX_SHORT_MAX; \
} while(FALSE)
-#define is_halted_(vm) ((vm)->is_halted)
-#define halt_(vm,val) ((vm)->is_halted = (val))
+#define is_halted_(vm) ((vm)->status == MIX_VM_HALT)
+#define halt_(vm,val) ((vm)->status = (val)? MIX_VM_HALT : MIX_VM_RUNNING)
#define set_start_(vm,val) ((vm)->start_addr = (val))
#define reset_loc_(vm) set_loc_ (vm, vm->start_addr)
#define update_time_(vm,ins) mix_vm_clock_add_lapse (get_clock_(vm), ins)