Neurator Microprocessor
NMP v1.2b
A real programable microprocessor. Comes with Fibonacci Numbers Generator example.
IMPORTANT:
*******************
*Press 'R' to initialize.*
*******************
In this scene the microprocessor is programmed to generate Fibonacci Numbers (1,1,2,3,5,8,13,21,34,55,89,144...)
http://en.wikipedia.org/wiki/Fibonacci_number
Just press play and then press 'R'. It lasts a few seconds to start generating numbers.
If you have worked with microprocessors such as PIC you will better understand this scene. Now the microprocessor comes with just a basic set of commands, but I intend do increase the number of them in the future to make it able to execute much more elaborated programs.
Please tell me if it works fine to you!
PS:
If anyone is interested on how this program looks like here it is:
[["pcreset", 0], ["movex", 0], ["mstat", 0], ["mreset", 1], ["mreset", 0], ["add", 0], ["movex", 1], ["mpos", 0], ["mstat", 2], ["mstat", 0], ["movex", 1], ["mpos", 1], ["mstat", 2], ["mstat", 0], ["pcreset", 0], ["mpoint", 0], ["mpos", 0], ["mstat", 1], ["mstat", 0], ["mpoint", 1], ["mpos", 1], ["mstat", 1], ["mstat", 0], ["addyz", 0], ["mpos", 2], ["mstat", 2], ["mstat", 0], ["mpos", 1], ["mpoint", 0], ["mstat", 1], ["mstat", 0], ["movey", 0], ["mpos", 0], ["mstat", 2], ["mstat", 0], ["mpos", 2], ["mpoint", 0], ["mstat", 1], ["mstat", 0], ["movey", 0], ["mpos", 1], ["mstat", 2], ["mstat", 0], ["pcont", 14], ["pcreset", 1], ["pcont", 0], ["pcreset", 1]]
It can drive you nuts if you have to write it that way lol, so I made a piece of program to make this task a little easier. This is how the program looks like:
begin
movex 1
mpos 0
write
movex 1
mpos 1
write
#start
mpoint 0
mpos 0
read
mpoint 1
mpos 1
read
addyz
mpos 2
write
mpos 1
mpoint 0
read
movey
mpos 0
write
mpos 2
mpoint 0
read
movey
mpos 1
write
goto #start
end
If anyone is also interested (I sincerely doubt so
), I could explain more deeply about how to program this microprocessor.