Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Tiny virtual machine for math calculations

License

NotificationsYou must be signed in to change notification settings

mandriota/impvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

By Mark Mandriota

INDEX

Memory Model

organization methodkind size
static stack64-bit

Instruction Structure

CODELOOPFLFEFGF
4-bit1-bit1-bit1-bit1-bit

(total size: 8-bit)

Instruction Set

codenamearg stackret stacksynopsis
0x0REDOmmmm; mmduplicate last
0x1UNDOmmdelete last
0x2HROTmm; mmmm; mmrotate stack up-down
0x3TROTmm; mmmm; mmrotate stack down-up
0x4SWAPmm; mmmm; mmexchange 2 elements
0x5JUMPmmjump to code position
0x6TESTmmcompare values
0x7IPUTmmget in data
0x8OPUTmmput out data
0x9LINCmm; mmmmx+y
0xALDECmm; mmmmx-y
0xBQINCmm; mmmmx=x+k
0xCQDECmm; mmmmx=x-k
0xD
0xE
0xF

LOOPF

If flag is setted, then popsN from the stack andrepeats instruction whilecondf≠0 and k<N

Combined Conditional Flags

codenamecombinationsynopsis
0b100LFLFx<y (lower)
0b011NLFGF;EFx≥y (not lower)
0b010EFEFx=y (equal)
0b101NEFLF;GFx≠y (not equal)
0b001GFGFx>y (greater)
0b110NGFLF;EFx≤y (not greater)
0b111AFLF;GF;EF1 (always)
0b000AF1 (always)

About

Tiny virtual machine for math calculations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp