From 8998bd04c94da08dc49ab62007da5604d53895c3 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 1 May 2023 13:50:52 +0100 Subject: Initial import --- vm.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 vm.h (limited to 'vm.h') diff --git a/vm.h b/vm.h new file mode 100644 index 0000000..81a0de0 --- /dev/null +++ b/vm.h @@ -0,0 +1,18 @@ +#ifndef _TR8_H +#define _TR8_H + +typedef struct +{ + uint16_t pc; + uint16_t sp; + uint16_t ssp; + uint8_t f; + uint8_t regs[4]; + uint8_t *ram; + uint32_t icnt; +} Tr8; + +void tr8_init(Tr8 *vm, uint8_t *ram); +uint8_t tr8_eval(Tr8 *vm); + +#endif /* _TR8_H */ -- cgit v1.2.3