photo of chronos logo

created by Felsner Felipe 2024

what is chronos

    Chronos is my first programming language. It was started as a joke, and was never meant to be fast or have good syntax. I based myself in assembly because it was the most simple type of code I could imagine, and the first prototype interpreter was created in about a week using Python.

all commands:

    here are all commands that are already included in Chronos. The details of how to make you own commands will be after this section.

memory values may be called 'bytes' but they do not occupy one byte of memory.

add

[memory adress or value](value 01 and 02){two bytes}

adds two values together, it adds the hold register with the value or memory adress given and the result goes to the hold register

easter egg

aadd

(value 05) {one byte} # single-cycle

adds two values together, it adds the hold register with the value in the a register and the result goes to the hold register

sub

[memory adress or value]: (value 03 and 04) {two bytes}

subtracts two values together, it subtracts the hold register with the value or the memory adress given.

still an easter egg

asub

(value 06) {one byte} # single-cycle

subtracts two values together, it subtracts the hold register with the value in the a register and the result goes to the hold register

mult

[memory address or value] (value 0F,10) {two bytes}

multiplies two values, it multiplies the hold register with the value on the memory adress given and the result goes to thehold register

surprise muther******

amult

(value 11) {one byte} # single-cycle

multiplies two values, it multiplies the hold register with the value in the a register

div

[memory address or value] (value 0C,0D ) {two bytes}

divides two values, divides the hold register with the value or the memory adress given and the result goes to the hold register

is this even funny anymore?

adiv

(value 0E ) {one byte} # single-cycle

divides two values, divides the hold register with the value in the a register and the result goes to the hold register

cnde

[memory address or value] (value 18,19 ) {two bytes}

a instruction that compares the hold register with the value given and executes the next line if they are equal.

https://www.youtube.com/watch?v=dQw4w9WgXcQ

cndb

[memory address or value] (value 1A,1B ) {two bytes}

a instruction that compares the hold register with the value given and executes the next line if hold is bigger.

check the link ;)

cnds

[memory address or value] (value 1C,1D ) {two bytes}

a instruction that compares the hold register with the value given and executes the next line if hold is smaller

mark

[memory address or value] (value 1E,1F ) {two bytes}

a litteral mark that is used by jumps to repeat a line.

kilroy was here

jmpup

[memory address or value] (value 20,21 ) {two bytes}

a instruction that tries to find a mark, executing it again. it searches a mark of the same value above its current line. if no mark is given an error will accour

nothing

jmpdown

[memory address or value] (value 22,23 ) {two bytes}

a instruction that tries to find a mark and pc variable as it, executing it again. it searches a mark of the same value below its current line. if no mark is given an error will accour

nothing

goto

[line number]: (value 07 ) {two bytes}

a instruction that jumps you to the index given. It changes the program counter directly

hold

[memory address or value] (value 09,0A ) {two bytes}

a instruction that stores the info given in the hold register, all previous info stored in the hold register will be erased.

space

ahold

(value 0B ) {one bytes} # single-cycle

a instruction that stores the info in the a register into the hold register, all previous info stored in the hold register will be erased.

emptyness

aput

[memory or value] (value 16,17 ) {two bytes}

a instruction that stores the info given in the a register, all previous info stored in the a register will be erased

void

str

[memory address or value] (value 12,13) {two bytes}

stores a value in memory from hold register

nothingness

astr

[memory address or value] (value 14) {two bytes}

stores a value in memory from the a register

in

(value 24 ) {one byte} # single-cycle

a instruction that will stop the current and wait a value to be inputed

space

out

[memory or value] (value 25,26 ) {two bytes}

a intruction that will output a value as a number

space

outl

[memory or value] (value 27,28 ) {two bytes}

a intruction that will output a value as a letter using ascii

cmt

just type 'cmt' at the start of the line and it will not be executed

halt

(value 0) {one byte} # single-cycle

a instruction that kills the current task

things to note:

    chronos is a simple language, it can be used for simple code and new operations can be written easily as the source code is very flexible. here are the main structures you need to know to code in chronos and eventually make you own commands:

future additions: