GitXplorerGitXplorer
s

vonneumann

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
577fa4043b8eff56b7a649bd0547bfe6d154580c

Update README.md

ssenhuang42 committed 8 years ago
Unverified
4d4f9d607b305ac14f761511dc0923d07ecab581

Update README.md

ssenhuang42 committed 8 years ago
Unverified
ca2c8d45b633b538217e91be8a11da77e289935f

Update README.md

ssenhuang42 committed 8 years ago
Unverified
76ab792c0fe820c33a4c1e21fa25f8fe67b8c746

Update README.md

ssenhuang42 committed 8 years ago
Unverified
79e9ac09297988934a1d580563122db980b2de29

Update README.md

ssenhuang42 committed 8 years ago
Unverified
cacab80d1bf1a5b4f1b7aa418422d9e4f73e8c43

Update README.md

ssenhuang42 committed 8 years ago

README

The README file for this repository.

vonneumann

Simple Von Neumann Machine simulator made using Scheme/Racket. Input should be in the format of:

(define prog2
  '((start: input val)
    (load val)
    (skipzero)
    (jump continue)
    (halt)
    (continue: storei pointer)
    (load pointer)
    (add one)
    (store pointer)
    (jump start)
    (one: data 1)
    (val: data 0)
    (pointer: data table)
    (table: data 0)))

And running the procedure assemble on this yields:

(assemble prog2 0) =>
 '((0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 1) 
  (0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1) 
  (1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) 
  (0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1) 
  (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) 
  (1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0) 
  (0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0) 
  (0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0) 
  (0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0) 
  (0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0) 
  (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1) 
  (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) 
  (0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1) 
  (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))

And then when we have a config:

(define config1
 '((acc (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) 
  (pc (0 0 0 0 0 0 0 0 0 0 0 0)) 
  (run-flag 1) 
  (aeb 0) 
  (0 (0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1)) 
  (1 (0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0)) 
  (2 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) 
  (3 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1)) 
  (4 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))

(simulate config1 2)

(acc (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
(pc (0 0 0 0 0 0 0 0 0 0 0 0))
(run-flag 1)
(aeb 0)
(0 (0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1))
(1 (0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0))
(2 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
(3 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1))
(4 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))

(acc (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1))
(pc (0 0 0 0 0 0 0 0 0 0 0 1))
(run-flag 1)
(aeb 0)
(0 (0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1))
(1 (0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0))
(2 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
(3 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1))
(4 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))

(acc (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1))
(pc (0 0 0 0 0 0 0 0 0 0 1 0))
(run-flag 1)
(aeb 0)
(0 (0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1))
(1 (0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0))
(2 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
(3 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1))
(4 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1))

'steps-exhausted

Cool Stuff