1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-06-09 16:29:34 +00:00
millfork/docs/stdlib/stdlib.md
Karol Stasiak 63ff28e94e Changes to macros and parameter list syntax:
* non-asm macros can now take `const` and `call` parameters
* register parameters to asm functions and macros can be given names if annotated explicitly
2020-03-30 19:23:48 +02:00

820 B

< back to index

stdlib

The stdlib module is automatically imported on most targets.

macro asm void poke(word const addr, byte register(a) value)

Stores a byte at given constant address. Will not be optimized away by the optimizer.

macro asm byte peek(word const addr)

Reads a byte from given constant address. Will not be optimized away by the optimizer.

macro asm void disable_irq()

Disables interrupts.

macro asm void enable_irq()

Enables interrupts.

byte hi_nibble_to_hex(byte register(a) value)

Returns an ASCII representation of the upper nibble of the given byte.

byte lo_nibble_to_hex(byte register(a) value)

Returns an ASCII representation of the lower nibble of the given byte.

macro asm void panic()

Crashes the program.