Skip to content

Instantly share code, notes, and snippets.

@Konamiman
Konamiman / SDCC_Interfacing_with_assembler_code.md
Last active September 20, 2025 14:27
[SDCC] Interfacing with Z80 assembler code

SDCC - Interfacing with Z80 assembler code

The basics

When writing code to be compiled with SDCC targetting Z80, assembler code fragments can be inserted in the C functions by enclosing them between the __asm and __endasm; tags:

void DoNotDisturb()
{
  __asm

di