Skip to content

Instantly share code, notes, and snippets.

@nonarkitten
nonarkitten / amiga_gcc_tips.md
Last active April 25, 2023 06:38
Amiga GCC Tips

This is a work-in-progress note pad of all the things I've found about gcc to make the best code possible.

Do not use ixemul

Ever.

Generally, most other PC libraries are okay, including SDL and OpenGL, but ixemul will take awesome performing code and make it run like it's walking through a tar pit -- especially on any stdio file operations. When porting "small and dirty" POSIX applications where performance does not matter, then who cares, use ixemul. For everything else, don't. Don't even use libnix. Try as much as possible to use AmigaOS native functions like AllocVec over C standard functions like malloc.

Using register parameters

#define _GNU_SOURCE
#include <errno.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
@zserge
zserge / guest.S
Created May 10, 2020 08:41
A tiny KVM host to run a 16-bit real mode "kernel"
# A tiny 16-bit guest "kernel" that infinitely prints an incremented number to the debug port
#
# Build it:
#
# as -32 guest.S -o guest.o
# ld -m elf_i386 --oformat binary -N -e _start -Ttext 0x10000 -o guest guest.o
#
.globl _start
@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


@jblang
jblang / rc2014.md
Last active January 20, 2024 14:57
RC2014 Links