Skip to content

Instantly share code, notes, and snippets.

@mori0091
mori0091 / msxbin.sh
Created September 3, 2021 21:57
Bash script to make BLOAD format .bin file of MSX from a binary file
#!/bin/bash
# -*- coding: utf-8-unix -*-
# Usage: msxbin.sh FILE BASE RUN
# Outputs BSAVE header followed by contents of the given FILE to stdout.
#
# - FILE :: input file name of the memory image
# - BASE :: base address where the memory image would to be loaded
# - RUN :: entry point address of the memory image that shall be run by "BLOAD ..., R" command
@mori0091
mori0091 / try_catch.c
Last active May 21, 2019 11:47
Simple exception handling in C11
#include <errno.h>
#include <setjmp.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
const char* msg;
jmp_buf e;