Hexadecimal Stacking Pseudo-Assembly Language

From Esolang
(Redirected from HSPAL)
Jump to: navigation, search

The Hexadecimal Stacking Pseudo-Assembly Language (HSPAL) is a programming language by SuperJedi224 in which a program is represented by a list of six-digit hexidecimal numbers seperated by line breaks (or not at all, the line breaks are optional and, in fact, all other whitespace is forbidden).

Data is stored as 16-bit unsigned integers in up to 256 unbounded-capacity stacks and a single register.

Control structure takes the form of simple conditionals (of exactly one command) and goto statements.

The specifications include a proof of Turing completeness.

Examples

The Hello, World! program:

200021
400000
200064
400000
20006C
400000
200072
400000
20006F
400000
200057
400000
200020
400000
20002C
400000
20006F
400000
20006C
400000
20006C
400000
200065
400000
200048
400000
140000

A (horribly slow) 16-bit Brainf*** interpreter

Translated from Daniel B Cristofani's Brainf*** self-interpreter. It can be found here. Input is program source followed by program input, seperated by an !. Technically non-standard, as it uses unsigned shorts while Brainf*** proper uses unsigned bytes.

Interpreters

The source for a java-based interpreter can be found here.

Additionally, there exists a Ruby interpreter which relaxes the syntactic restrictions mandated by the specification, but otherwise aims to hew very closely to the behavior defined therein.