Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/PROG/ Challenge Number 8 - Virtual Machine

Name: Anonymous 2007-10-09 18:31

Make virtual machine and compiler for the following instruction set.

LOD - Load into accumulator
STR - Store into memory
ADD - Add acc+mem
NEG - accumulator=accumulator*-1
INP - Input number to accumulator
OUT - Output
JMP - Jump to memory location
JNZ - Jump if accumulator non zero

If you do this, I WILL be impressed.

Name: Anonymous 2007-10-10 21:24

Ok, I have designed such a language

X,Y,Z can be any of these addressing modes : absolute, indirect, register (including instruction pointer), or immediate

NOP - Do nothing

MOVE X,Y - Copy data from X to Y

AND X,Y,Z
OR X,Y,Z
NOT X,Z
Logical operation, result stored in Z

IFZ X
Execute next instruction only if X is zero

The End.  Touring-Complete.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List