Skip to content

ichbinstudent/mima_emu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

mima_emu

This is a simple emulator for mima code.

To use it just paste your instructions inside the asm variable. You can use any seperator you like between the instructions.

asm = 	""" 
	LDC 0,
	STV y,
	LABEL while,
	LDC 0,
	NOT,
	ADD x,
	JMN end,
	LDC 0,
	NOT,
	ADD x,
	AND x,
	STV x,
	LDC 1,
	ADD y,
	STV y,
	JMP while,
	LABEL end,
	HALT
	"""

You only need to change the label naming from "loop:" to "LABEL loop". The memory is stored in a dictionary. You can add your own addresses and values.

memory = Memory({
	'addr1':	12345,
	'y':		0,
	'add42':	42,
	})

The instruction set is not complete! Supported are the following: AND, LDC, ADD, LDV, STV, LDIV, STIV, EQL, NOT, JMP, JMN, HALT

About

Emulator for the MIMA programming language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages