diff --git a/hdr/portab.h b/hdr/portab.h index b1764c8..188bf09 100644 --- a/hdr/portab.h +++ b/hdr/portab.h @@ -145,7 +145,8 @@ unsigned short getSS(void); #ifdef __FAR #define I86 -#define __int__(intno) asm volatile("int " ## #intno) +#define STRINGIFY(x) #x +#define __int__(intno) asm volatile(STRINGIFY(int $##intno)) static inline void disable(void) { asm volatile("cli"); diff --git a/kernel/prf.c b/kernel/prf.c index edff14c..3bfddb9 100644 --- a/kernel/prf.c +++ b/kernel/prf.c @@ -73,6 +73,12 @@ void put_console(int c) _DX = FP_OFF(buff); _AX = 0x13; __int__(0xe6); +#elif defined(__GNUC__) + asm volatile( + "int $0xe6\n" + : /* outputs */ + : /* inputs */ "a"(0x13), "e"(FP_SEG(buff)), "d"(FP_OFF(buff)) + ); #elif defined(I86) asm { @@ -158,7 +164,8 @@ STATIC VOID handle_char(COUNT c) STATIC void ltob(LONG n, BYTE SSFAR * s, COUNT base) { ULONG u; - BYTE SSFAR *p, SSFAR *q; + BYTE SSFAR *p; + BYTE SSFAR *q; int c; u = n;