Skip to content

dkvilo/dvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DVM Fantasy Console

Work in progress

To see sample programs check scripts

Hello, World

    ; STORE STRING IN STRINGS TABLE WITH INDEX 0
    ; THIS WILL PUT INDEX INTO STACK SO YOU DON'T NEED TO PUSH_INT 0
    ; IF YOU IMMEDIATELY ARE CALLING THE CONSUMER FUNCTION
    ;
    PUSH_STRING "Hello, Sailor!"
    
    ; CALL ENGINE `print` WHERE `0` IS ADDRESS OF FUNCTION AND `1` IS NUMBER OF ARGUMENTS
    ; PUSH_INT  0 IS NO NEEDED IN THIS CASE
    ;
    CALL_NATIVE 0  1 

    HALT

Compiling Examples

./bin/dvmc ./scripts/hello-world.dvm ./bin/hello-world
./bin/dvm ./bin/hello-world

Dependencies

  • SDL3 - Window, handling input and drawing

Releases

No releases published

Packages

No packages published