User:Alidonis12/sandbox/casm

From Esolang
Jump to navigation Jump to search

ON HOLD I have not yet re-started work on this esolang. Maybe later, maybe not. The trashcan is still there if I need it.

Casm (pronounced /ˈkæzəm/) is an esoteric programming language invented by Alidonis12 (talk) inspired by 6502 assembly.

Goals

Casm is meant to be useable but not useful, and to force you to work with arbitrary limitations

Working with memory

Casm uses 16-bit addresses. Therefore, it is only be able to address up to '64K' (65535) bytes of contiguous memory. However, data values are only 8-bit.

Casm has 4 independently controlled registers in addition to the accumulator, labeled A through D.

There are 3 possible addressing mode: value, address and register. The first is written with #, the second with & and the third with A,B,C or D

Syntax

Statements

Memory addressing

Operation Description
LDAC (value, address, register) Load to accumulator. Doesn't have much use, because the accumulator is overridden frequently.
STAC (address, register) Store accumulator. Move the stored value of the accumulator to an address in memory or a register.
LDA, LDB, LDC , LDD (value, address, register) Load from memory to register A, B, C, or D respectively.
STA, STB, STDC, STD (address, register) Store register A, B, C, or D respectively into memory.

Examples

Interpreters

A .NET IL compiler is currently under works