1/* 2** Copyright 2002, Travis Geiselbrecht. All rights reserved. 3** Distributed under the terms of the NewOS License. 4*/ 5 6#define FUNC(name) .align 2 ; .globl name ; .type name,@function ; name: 7 8/* lure the preprocessor to not substitute the syscall as string */ 9#define IMM # 10 11#define SYSCALL0(name, n) \ 12FUNC(name) \ 13 move.l IMM n,%d0 ; \ 14 trap #0 ; \ 15 rts 16 17#define SYSCALL1(name, n) \ 18FUNC(name) \ 19 move.l IMM n,%d0 ; \ 20 trap #0 ; \ 21 rts 22 23#define SYSCALL2(name, n) \ 24FUNC(name) \ 25 move.l IMM n,%d0 ; \ 26 trap #0 ; \ 27 rts 28 29#define SYSCALL3(name, n) \ 30FUNC(name) \ 31 move.l IMM n,%d0 ; \ 32 trap #0 ; \ 33 rts 34 35#define SYSCALL4(name, n) \ 36FUNC(name) \ 37 move.l IMM n,%d0 ; \ 38 trap #0 ; \ 39 rts 40 41#define SYSCALL5(name, n) \ 42FUNC(name) \ 43 move.l IMM n,%d0 ; \ 44 trap #0 ; \ 45 rts 46 47#define SYSCALL6(name, n) \ 48FUNC(name) \ 49 move.l IMM n,%d0 ; \ 50 trap #0 ; \ 51 rts 52 53#define SYSCALL7(name, n) \ 54FUNC(name) \ 55 move.l IMM n,%d0 ; \ 56 trap #0 ; \ 57 rts 58 59#define SYSCALL8(name, n) \ 60FUNC(name) \ 61 move.l IMM n,%d0 ; \ 62 trap #0 ; \ 63 rts 64 65#define SYSCALL9(name, n) \ 66FUNC(name) \ 67 move.l IMM n,%d0 ; \ 68 trap #0 ; \ 69 rts 70 71#define SYSCALL10(name, n) \ 72FUNC(name) \ 73 move.l IMM n,%d0 ; \ 74 trap #0 ; \ 75 rts 76 77#define SYSCALL11(name, n) \ 78FUNC(name) \ 79 move.l IMM n,%d0 ; \ 80 trap #0 ; \ 81 rts 82 83#define SYSCALL12(name, n) \ 84FUNC(name) \ 85 move.l IMM n,%d0 ; \ 86 trap #0 ; \ 87 rts 88 89#define SYSCALL13(name, n) \ 90FUNC(name) \ 91 move.l IMM n,%d0 ; \ 92 trap #0 ; \ 93 rts 94 95