<<< Stack Machine Implementation | Index | Additional Features and Improvements >>> |
It's best to begin with a very simple interface to the stack machine implementation. All communication could be accomplished by two procedures,
SM_LOAD_COMMAND( opcode, arg ); // Load command into the machine SM_RUN(); // Execute program
STM.zip sample demonstrates a prototype of SM_RUN( ) call. It includes the following files:
M13_main.cpp ( download ) is the main driver of the program.
M13_externs.h ( download ) C++ header file declaring all extern data and functions.
M13_externs.cpp ( download ) C++ implementation file defining externally visible data and functions.
M13_SM_RUN.ASM ( download ) Assembly program simulating the stack machine.
M13_compile.bat ( download ) Batch command file to compile, assemble and link M13.exe.
<<< Stack Machine Implementation | Index | Additional Features and Improvements >>> |