scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#!/bin/sh
 2
 3sed -n "
 4     s/[ 	]*#.*//
 5     /$1/p" syscall.lst |
 6while read num name nargs
 7do
 8cat <<EOF > $name.s
 9	.file "$name.s"
10
11	.globl $name
12$name:
13	li	0,$num
14	sc
15	mfcr	0
16	b	_cerrno
17EOF
18
19done