Ngaro

Software Screenshot:
Ngaro
Software Details:
Version: 20110929
Upload Date: 11 May 15
Developer: Charles Childers
Distribution Type: Freeware
Downloads: 6

Rating: nan/5 (Total Votes: 0)

Ngaro is a portable virtual machine for a dual-stack architecture. The instruction set is essentially a subset of Forth. Though limited in its ability to interact with the underlying OS, it should be sufficient to allow a variety of programs to be written and run on it.

The package includes some basic documentation, full source code, the machine forth compiler, and a few small examples.

Usage:

./ngaro imagename

The instruction set is kept minimalistic. The exact set of instructions
changes occasionally, but the following list has been stable for about a
year. (The last three, dealing with the port-based I/O model, are new)

0 NOP Does nothing
1 LIT Push the value in the following cell to the stack
2 DUP Duplicate the top
item on the stack
3 DROP Drop the top item
on the stack
4 SWAP Exchange the top two
items on the stack
5 PUSH Push the top item on
the stack to the
address stack, drop
TOS
6 POP Pop the top item of
the address stack off
and put it on the
data stack
7 CALL Call the address that
the following literal
corresponds to
8 JUMP Jump to the address
that the following
literal corresponds
to
9 ; Return to the caller,
used with CALL
10 >JUMP Conditional jump. It
compares TOS and NOS.
11 Shift bits right
25 0; Exit (and drop) if
TOS is 0
26 1+ Increment TOS by 1
27 1- Decrement TOS by 1
28 IN Read a port
29 OUT Store to a port
30 WAIT Wait for a port-based
request to finish

If an unsupported opcode is encountered, the interal IP register is set to
the end of memory. Execution of the image code will halt when this happens.

A few instructions make use of a the following cell to contain addresses or
values. These are:

1 LIT
7 CALL
8 JUMP
10 >jump
11

What is new in this release:

  • This version brings updated versions of all implementations and substantially updated documentation.
  • There are now 14 implementations written in Python, Ruby, Perl, Common Lisp, x86 Assembly, ANS Forth, JavaScript, Retro, Lua, Java, C, C#, F#, and Go.

Other Software of Developer Charles Childers

RetroForth
RetroForth

11 May 15

RetroForth
RetroForth

6 Jun 15

Retro Forth
Retro Forth

7 May 15

Toka
Toka

3 Jun 15

Comments to Ngaro

Comments not found
Add Comment
Turn on images!