Skip to content

Instantly share code, notes, and snippets.

@Konamiman
Konamiman / SDCC_Interfacing_with_assembler_code.md
Last active January 21, 2025 13:28
[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

@Juvar1
Juvar1 / tinybasic.c
Last active July 25, 2023 03:00 — forked from pmachapman/tinybasic.c
A tiny BASIC Interpreter
/* A tiny BASIC interpreter */
// heavily modified from:
// https://gist.github.com/pmachapman/661f0fff9814231fde48
//
// Now it works with doubles instead of ints. Also fixed some bugs.
#include <string.h>
#include <stdio.h>
#include <setjmp.h>