User:Alidonis12/sandbox/casm

From Esolang
Jump to navigation Jump to search

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

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

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 (value, address, register) Load to register A.
STA (address, register) Store register A.