#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include "vm_instr.h"
#include "vm.h"
#include "vm_asm.h"
#include "vm_heap.h"
Functions | |
void | not_implemented (struct instr_set_entry *e) |
this subroutine writes an error message for not implemented instructions. | |
void | dump_stack (int verbose, vm_mem_t *vm) |
this subroutine dumps the current machine stack to stderr | |
void | dump_status (int verbose, vm_mem_t *vm) |
this subroutine dumps the current machine status to stderr | |
void | dump_instruction (int verbose, struct instr_set_entry *e, int arg, int pc) |
this subroutine writes a disassembled instruction to stderr | |
void | instr_fopen (int verbose, vm_mem_t *vm) |
implementation of FOPEN virual machine instruction | |
void | instr_fclose (int verbose, vm_mem_t *vm) |
implementation of FCLOSE virual machine instruction | |
void | instr_putc (int verbose, vm_mem_t *vm) |
implementation of PUTC virual machine instruction | |
void | instr_getc (int verbose, vm_mem_t *vm) |
implementation of GETC virual machine instruction | |
void | instr_read (int verbose, vm_mem_t *vm) |
implementation of READ virual machine instruction | |
void | instr_write (int verbose, vm_mem_t *vm) |
implementation of WRITE virual machine instruction | |
void | instr_new (int verbose, vm_mem_t *vm) |
implementation of NEW virual machine instruction | |
void | instr_del (int verbose, vm_mem_t *vm) |
implementation of DEL virual machine instruction | |
void | instr_ret_i (int verbose, vm_mem_t *vm) |
implementation of RET_I virual machine instruction | |
void | instr_ret_l (int verbose, vm_mem_t *vm) |
implementation of RET_L virual machine instruction | |
void | instr_ret_f (int verbose, vm_mem_t *vm) |
implementation of RET_F virual machine instruction | |
void | instr_ret_d (int verbose, vm_mem_t *vm) |
implementation of RET_D virual machine instruction | |
void | instr_ret (int verbose, vm_mem_t *vm) |
implementation of RET virual machine instruction | |
void | instr_jsr (int verbose, vm_mem_t *vm, vm_addr_t dest) |
implementation of JSR virual machine instruction | |
int | run_vm (int verbose, vm_mem_t *vm) |
run the loaded executable |
|
this subroutine writes a disassembled instruction to stderr
|
|
this subroutine dumps the current machine stack to stderr
|
|
this subroutine dumps the current machine status to stderr
|
|
implementation of DEL virual machine instruction
|
|
implementation of FCLOSE virual machine instruction
|
|
implementation of FOPEN virual machine instruction
|
|
implementation of GETC virual machine instruction
|
|
implementation of JSR virual machine instruction
|
|
implementation of NEW virual machine instruction
|
|
implementation of PUTC virual machine instruction
|
|
implementation of READ virual machine instruction
|
|
implementation of RET virual machine instruction
|
|
implementation of RET_D virual machine instruction
|
|
implementation of RET_F virual machine instruction
|
|
implementation of RET_I virual machine instruction
|
|
implementation of RET_L virual machine instruction
|
|
implementation of WRITE virual machine instruction
|
|
this subroutine writes an error message for not implemented instructions.
|
|
run the loaded executable
|