Neucomp

From Esolang
Jump to navigation Jump to search

Neucomp is short for Neumann stiled Computer

Examples for a Computer

Add 2 and 2

 Let 1 2
 Let 2 2
 ALU 1 2 + 3
 Out 3


Outputs 4


Cmds

Intruction Description
Let a b Let a in memory equal b
ALU a b operation d Let d in memory equal a operation b
In a Accept input into a
Out a Output a in numbers
If a operation b If a operation b equals true then read intrutions in If

until end

Prt a Prt a’s ASCII value
Go a Goto line a
Val a Value at a
Halt End program
End End If
# Comment

Hello World

 Let 1 72  #H
 Let 2 101 #e
 Let 3 108 #ll
 Let 4 111 #o
 Let 5 32  # 
 Let 6 87  #W
 Let 7 114 #r
 Let 8 100 #d
 Prt 1
 Prt 2
 Prt 3
 Prt 3
 Prt 4
 Prt 5
 Prt 6
 Prt 4
 Prt 7
 Prt 3
 Prt 8

Explenation

Hello World into ASCII is

 72 101 108 108 111 32
 87 111 114 108 100

cat

 Let 1 1
 Let 2 2
 ALU 2 1 + 2
 In Val 2
 If Val 2 = 10
 Go 9
 End
 Go 3
 Let 2 2
 ALU 2 1 + 2
 Prt Val 2
 Go 10

Input H i enter

Output Hi

Explenation

ALU adds 1 to var2

Go 3 is a loop

If breaks the loop


Truth Machine

 In 10
 Let 0 0
 Let 1 1
 If 10 = 0
 Out 10
 End
 If 10 = 1
 Out 10
 Go 8
 End
 Go 4