Virtual machine and VMBasic compilation engine implementation

xiaoxiao2021-03-04  56

Virtual machine and VMBasic compilation engine description

1. Description of the virtual machine and its compiler 2. Introduction to thevasic development / commissioning environment 3. About other

Download address one source program download download address two design instructions

Regarding the virtual machine and its compiler, you can remember that the 3ds / max implements a Script similar to BASIC. Animator implements a class C scripting language. Autodesk's software is a very good, good script engine for the script. Non-related, efficient and expandability, a scripting engine requires a very urgent point to a good program, so I wrote a virtual machine half a year, and recently realized a class Basic script compiler, feature description:

1 Efficient and independent of the platform: Since the virtual machine operation is to explain the binary bytecode, the speed is obviously faster than the scripting language, such as Perl and PHP, while the virtual machine's core program code has passed several C The compiler and platform test can run in multiple operating systems without modified compilation. 2 Complete open: Through the port I / O technology of the virtual machine, it is easy to expand it. VMBeta instructions communicate with the user's own procedures by output / input, and users achieve functionality by processing output input messages. Expansion, allowing it to meet your product needs, specific virtual machine implementation and design instructions Reference document VMbeta.txt 3 can set the security level: By setting the security level, the program running status is prosecuted through half a year's modification I feel virtual It is highly efficient and open, which is not much level written by the Vmbasic compiler: there is no optimization of the generated code, but it is still obviously interpreted in time, probably DOS comes with the test speed. The QBASIC program is about three times (can be experimentally experimented through several algorithms in the directory). In order to verify its efficiency and expansion, I extended the virtual machine programs to write a Windows version, and then written an air combat game with Vmbasic, although I believe I believe in GDI without choosing DDRAW, and compiles To generate 1/2 of the repetitive code, but can still see efficiency from the game (you can use Vmbide.exe to run Fire.BAS run), more detailed instructions for compiler Vmbasic see Basic.htm program description: Compressed files include virtual machine runners (VMbeta.exe) VMBasic debugging development platforms (Vmbide.exe) four algorithm examples (Alex1-4.bas) A shooting game example (Fire.bas) and its pictures, indicating that there are several ways to help documents. ...

Introduction and instructions of VMBasic development / debugging environment

The picture on the right is the full development environment left is the statement help. The middle is the code writing area. Here is the compiled error and procedure record, the system hotkey description: 1.F8 compiles to VMS file 2.f9 compile and run the program 3.f1 Help for Vmbasic 4. Sshift F1 Help IDE Other Click on the chart on the left side of the chart to view the compiled virtual machine assembly code. Click on the tool directory, you can do a series of settings: virtual machine program settings, pre-library settings, development environment settings, etc., are simple things

Shooting games written with Vmbasic: Must run the Windows version of the virtual machine program (expanded GDI graphics function)

Display View Virtual Machine Arup

转载请注明原文地址:https://www.9cbs.com/read-31742.html

New Post(0)