Skip to content

BenMagill/lmc-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lmc-simulator

npm bundle size

Lmc-simulator is a library that allows LMC (Little Man Computer) code to be assembled and executed.

Installation

npm install lmc-simulator

Usage

var Machine = require("lmc-simulator")

var code = `
        INP
loop    OUT   
        STA count
        SUB # 2
	    STA count
        BRP loop ; This is a comment
        HLT
one     DAT 1
count   DAT  
`

var lmc = new Machine()

lmc.loadToRAM(code)

lmc.run()

About

A library that allows LMC (Little Man Computer) code to be assembled and executed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors