Skip to content

mC Language Reference

Joachim Stolberg edited this page Feb 8, 2023 · 4 revisions

mC = miniC = C inspired programming language

(This wiki manual is highly inspired by the Arduino Language Reference)


The mC programming language can be divided in three main parts: functions, variables and constants, and structure.

Functions

Buildin functions

system

sleep

output

input

sizeof

Memory library (mem.asm)

memcpy

memset

memcmp

String library (string.asm)

strcpy

strlen

strcmp

strcat

strpack

Input/Output library (stdio.asm)

putchar

putstr

putnum

puthex

Math library (math.asm)

min

max

Standard library (stdlib.asm)

itoa

itoha

halt


Variables and Constants

var

static

const

string

character

array


Structure

Control Structure

break

continue

else

for

goto

if

return

while

Further Syntax

import

// (comment)

/* .. */ (comment)

; (semicolon)

{} (curly braces)

_asm_ (inline assembler)

Arithmetic Operators

% (remainder)

* (multiplication)

+ (addition)

- (subtraction)

/ (division)

= (assignment)

Comparison Operators

!= (not equal to)

< (less than)

<= (less than or equal to)

== (equal to)

> (greater)

>= (greater than or equal to)

Boolean Operators

and (logical and)

or (logical or)

Pointer Access Operators

& (reference operator)

* (dereference/value operator)

Bitwise Operators

& (bitwise and)

<< (bitshift left)

>> (bitshift right)

^ (bitwise xor)

| (bitwise or)

~ (bitwise not)

Postfix Operators

++ (increment)

/-- (decrement)

Operator Precedence

Operator Precedence