Skip to content

AdeRegt/Sanderslando-Virtual-Machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sanderslando-Virtual-Machine

Internals

Instructionset

visible

machinestatus
0x00 HLT _ END OF CODE

registerstatus
0x01 LMA M LOAD MEMORY TO REGISTER A
0x02 LAM M LOAD REGISTER A TO MEMORY

math
0x03 ADD M ADD MEMORYLOCATION TO REGISTER A
0x04 DIS M DISTRACT REGISTER A BY MEMORYLOCATION
0x05 MUL M MULTIPLY REGISTER A BY MEMORYLOCATION
0x06 DIV M DIVIDE REGISTER A BY MEMORYLOCATION

compare and jump
0x07 CMP M COMPARE REGISTER A BY MEMORYLOCATION
0x08 JEQ M IF CMP IS EQU THEN GOTO MEMORYLOCATION
0x09 QNE M IF CMP IS NOT EQU THEN GOTO MEMORYLOCATION
0x0A JMO M IF CMP IS MORE THEN GOTO MEMORYLOCATION
0x0B JNM M IF CMP IS NOT MORE THEN GOTO MEMORYLOCATION
0x0C JLE M IF CMP IS LESS THEN GOTO MEMORYLOCATION
0x0D JNL M IF CMP IS NOT LESS THEN GOTO MEMORYLOCATION
0x0E JMP M JUMP TO MEMORYLOCATION
0x0F CAL M CALL TO MEMORYLOCATION
0x10 RET _ RETURN

binairy
0x11 LEF _ SHIFT ONE BYTE TO LEFT
0x12 RIG _ SHIFT ONE BYTE TO RIGHT
0x13 AND M AND TO MEMORYLOCATION
0x14 ORM M OR TO MEMORYLOCATION

operatingsystem
0x15 SYS M PREFORM SYSTEMCALL WITH STRUCT

invisible

VAR defines varabele
REM defines a comment
DAT write raw data

operatingsystem calls

code: 0
args: none
exp: exit

code: 1
args: width,height,value,color
exp: prints value at x,y with color and value.

code: 2
args: none
exp: waits for keypress and returns its value in registerA

Assambler

Virtual machine

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages