From 9da31398baa93e8485aa70fc09cbca66daa0fa40 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 22 Oct 2023 20:30:05 +0100 Subject: Implemented vm_* routines for OP_DUP and vm_execute code --- src/runtime.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/runtime.h') diff --git a/src/runtime.h b/src/runtime.h index 5ee5f9b..b13654e 100644 --- a/src/runtime.h +++ b/src/runtime.h @@ -98,6 +98,16 @@ static const mov_f MOV_ROUTINES[] = { [OP_MOV_WORD] = vm_mov_word, }; +void vm_dup_byte(vm_t *, word); +void vm_dup_hword(vm_t *, word); +void vm_dup_word(vm_t *, word); + +typedef void (*dup_f)(vm_t *, word); +static const dup_f DUP_ROUTINES[] = { + [OP_DUP_BYTE] = vm_dup_byte, + [OP_DUP_HWORD] = vm_dup_hword, + [OP_DUP_WORD] = vm_dup_word, +}; void vm_not_byte(vm_t *); void vm_not_hword(vm_t *); -- cgit v1.2.3-13-gbd6f