Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marekjm/viuavm
Parallel virtual machine designed to reliably run massively concurrent programs
https://github.com/marekjm/viuavm
actor-model assembly c-plus-plus concurrency parallelism virtual-machine viua viuavm vm
Last synced: 1 day ago
JSON representation
Parallel virtual machine designed to reliably run massively concurrent programs
- Host: GitHub
- URL: https://github.com/marekjm/viuavm
- Owner: marekjm
- License: gpl-3.0
- Created: 2015-01-01T23:32:33.000Z (about 10 years ago)
- Default Branch: devel
- Last Pushed: 2024-12-28T02:11:43.000Z (about 1 month ago)
- Last Synced: 2025-01-31T02:37:20.628Z (9 days ago)
- Topics: actor-model, assembly, c-plus-plus, concurrency, parallelism, virtual-machine, viua, viuavm, vm
- Language: C++
- Homepage: https://viuavm.org/
- Size: 10.3 MB
- Stars: 72
- Watchers: 8
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.asm
- Changelog: Changelog.markdown
- Contributing: CONTRIBUTING.markdown
- License: LICENSE
Awesome Lists containing this project
README
; Main function of the program, automatically invoked by the VM.
; It must be present in every executable file.
; Valid main functions are main/0, main/1 and main/2.
;
.function: main/0
; Allocate local register set.
; This is done explicitly by the callee because it is an implementation
; detail - if a newer version of the function requires fewer (or more)
; registers the code using it should not have to be recompiled.
; Also, when a module is reloaded the code using it can stay the same as
; long as the number and types of parameters of the function stay the same.
allocate_registers %4 local; Store text value in local register with index 1.
; The text instruction shares operand order with majority of
; other instructions:
;
; ...
;
text %1 local "Hello World!\n"; Store integer value in local register 2.
; Use a 1 because it will be used to represent the standard output stream on
; UNIX-like systems.
integer %2 local 1; Write "Hello World!" on standard output. The io_write instruction will
; create an I/O request that will be carried out asynchronously and
; immediately return control to the process.
io_write %3 local %2 local %1 local; Wait for the completion of the I/O request. In this case, the timeout
; given is 1 second.
; Void register (signified by the use of 'void') is used to tell the
; instruction that the result of the I/O operation is not needed and may be
; discarded.
io_wait void %3 local 1s; The finishing sequence of every program running on Viua.
;
; Register 0 is used to store return value of a function, and
; the assembler will enforce that it is set to integer 0 for main
; function.
izero %0 local
return
.end