aboutsummaryrefslogtreecommitdiff
path: root/vm.h
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-01 13:50:52 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-01 13:58:09 +0100
commit8998bd04c94da08dc49ab62007da5604d53895c3 (patch)
tree43a588f7a372ce17d035536a56fd71691fa6a73f /vm.h
downloadtr8vm-8998bd04c94da08dc49ab62007da5604d53895c3.tar.gz
tr8vm-8998bd04c94da08dc49ab62007da5604d53895c3.zip
Initial import
Diffstat (limited to 'vm.h')
-rw-r--r--vm.h18
1 files changed, 18 insertions, 0 deletions
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 */