Build: Fixup compile with GCC and -DDEBUG

This commit is contained in:
Andrew Bird 2022-01-15 16:39:58 +00:00 committed by Kenneth J Davis
parent a6781df62d
commit 7b6c8fb7fe
2 changed files with 10 additions and 2 deletions

View File

@ -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");

View File

@ -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;