nndstojmp

From Esolang
Jump to navigation Jump to search
nndstojmp
Paradigm(s) imperative
Designed by User:jan Gamecuber
Appeared in 2022
Memory system bytes that have indexes
Computational class Unknown computational class
Reference implementation Unimplemented
Influenced by OISCs in general
File extension(s)

nndstojmp is short for nand, store, jump. It is an OISC that takes 4 parameters. Parameters a and b are the 2 memory bytes which are nanded and the result is stored in memory location c. After this, you jump to memory location d. Location 0 in a or b is input, in c is output, and in d is end program.

Instructions

Given the instruction pattern

a b c d

the effect of parameter values can be summarized in the following:

Parameter Effect if zero Effect if non-zero
a Contributes the left NAND operand as the byte at the memory location a. Queries the user for a byte as the left NAND operand.
b Contributes the right NAND operand as the byte at the memory location b. Queries the user for a byte as the right NAND operand.
c Stores the NAND-combined a and b bytes in the memory location c. Prints to the standard output the NAND-combined a and b bytes.
d Moves the memory pointer to the memory location d. Halts the program immediately.

Examples

Hello, World!

This program outputs the ASCII character codes comprising the message “Hello, World!”

53 54 0 5
53 55 0 9
53 56 0 13
53 56 0 17
53 57 0 21
53 58 0 25
53 59 0 29
53 60 0 33
53 57 0 37
53 61 0 41
53 56 0 45
53 62 0 49
53 63 0 0
255 183 154 147 144 211 223 168 141 155 222

Interactive NAND

The following program repeatedly queries the user for two bytes, which are subsequently NAND-combined, ere the result is printed to the standard output.

0 0 0 1

Interpreter

  • Common Lisp implementation of the nndstojmp programming language.