summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mixlib/xmix_vm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mixlib/xmix_vm.h b/mixlib/xmix_vm.h
index c2a1db1..af1d0ae 100644
--- a/mixlib/xmix_vm.h
+++ b/mixlib/xmix_vm.h
@@ -44,6 +44,7 @@ struct mix_vm_t
GTree *line_table; /* source line no -> address */
GTree *address_table; /* adress -> source line no */
gint8 bp[MEM_CELLS_NO_/8]; /* each bit signals a break point */
+ mix_vm_clock_t *clock; /* the vm clock */
mix_symbol_table_t *symbol_table;
mix_src_file_t *src_file; /* source of last loaded code file */
};
@@ -67,6 +68,7 @@ enum { A_ = 0, X_, J_, I1_, I2_, I3_, I4_, I5_, I6_ };
#define get_cmp_(vm) (vm->cmpflag)
#define get_over_(vm) (vm->overflow)
#define get_loc_(vm) (vm->loc_count)
+#define get_clock_(vm) (vm->clock)
#define set_reg_(vm,r,x) \
do { \
@@ -97,6 +99,7 @@ do { \
#define halt_(vm,val) ((vm)->is_halted = (val))
#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)
/* Breakpoints handling */
#define bp_clear_all_(vm) memset (vm->bp, 0, MEM_CELLS_NO_/8)