【文件属性】:
文件名称:vm:堆栈机的字节码解释器
文件大小:16KB
文件格式:ZIP
更新时间:2021-06-14 17:56:39
C
堆栈机的汇编语言
资源
大小为 1000 个元素的堆栈,每 4 个字节。
一个布尔位。
一个程序计数器。
你好世界程序示例
# Hello world program
__CODE__ # start code segment
# PUSH the string Hello World! in reverse order.
# 0 indicates end of string.
PUSH &end # the return address.
PUSH 0
PUSH 10 # new line.
PUSH '!'
PUSH 'D'
PUSH 'L'
PUSH 'R'
PUSH 'O'
PUSH 'W'
PUSH 32 # sp
【文件预览】:
vm-master
----tests()
--------max.vm(497B)
--------loop.vm(195B)
--------odd_or_even.vm(789B)
--------echo.vm(53B)
--------sanity.sh(1KB)
--------prime.vm(2KB)
--------hw.vm(876B)
----src()
--------decompiler.c(3KB)
--------lexer.c(3KB)
--------constants.c(3KB)
--------headers()
--------compiler.c(13KB)
--------vm.c(12KB)
--------stack.c(1KB)
----makefile(2KB)
----README.md(4KB)