diff --git a/hdr/device.h b/hdr/device.h index ce2ac59..9da8cc8 100644 --- a/hdr/device.h +++ b/hdr/device.h @@ -496,7 +496,7 @@ WORD ASMCFUNC FAR clk_driver(rqptr rp); /* execrh.asm */ #if defined(__WATCOMC__) && _M_IX86 >= 300 WORD execrh(request FAR *, struct dhdr FAR *); -#pragma aux execrh "^" parm reverse routine [] modify [ax bx cx dx es fs gs] +#pragma aux execrh "^" __parm __reverse __routine [] __modify [__ax __bx __cx __dx __es __fs __gs] #else WORD ASMPASCAL execrh(request FAR *, struct dhdr FAR *); #endif diff --git a/hdr/portab.h b/hdr/portab.h index b178aa2..bc79aed 100644 --- a/hdr/portab.h +++ b/hdr/portab.h @@ -107,9 +107,9 @@ static unsigned short __inline getSS(void) #define I86 #define __int__(intno) asm int intno; void disable(void); -#pragma aux disable = "cli" modify exact []; +#pragma aux disable = "cli" __modify __exact []; void enable(void); -#pragma aux enable = "sti" modify exact []; +#pragma aux enable = "sti" __modify __exact []; #define asm __asm #define far __far #define CDECL __cdecl @@ -117,12 +117,12 @@ void enable(void); #define PASCAL pascal #define _CS getCS() unsigned short getCS(void); -#pragma aux getCS = "mov dx,cs" value [dx] modify exact[dx]; +#pragma aux getCS = "mov dx,cs" __value [__dx] __modify __exact[__dx]; #define _SS getSS() unsigned short getSS(void); -#pragma aux getSS = "mov dx,ss" value [dx] modify exact[dx]; +#pragma aux getSS = "mov dx,ss" __value [__dx] __modify __exact[__dx]; #if !defined(FORSYS) && !defined(EXEFLAT) && _M_IX86 >= 300 -#pragma aux default parm [ax dx cx] modify [ax dx es fs] /* min.unpacked size */ +#pragma aux __default __parm [__ax __dx __cx] __modify [__ax __dx __es __fs] /* min.unpacked size */ #endif /* enable Possible loss of precision warning for compatibility with Borland */ diff --git a/kernel/chario.c b/kernel/chario.c index 529a88d..4041f96 100644 --- a/kernel/chario.c +++ b/kernel/chario.c @@ -142,7 +142,7 @@ int ndread(struct dhdr FAR **pdev) #ifdef __WATCOMC__ void fast_put_char(char c); -#pragma aux fast_put_char = "int 29h" parm[al] modify exact [bx] +#pragma aux fast_put_char = "int 29h" __parm[__al] __modify __exact [__bx] #else /* writes a character in raw mode using int29 for speed */ diff --git a/kernel/dsk.c b/kernel/dsk.c index 70c4a8f..0b07f7c 100644 --- a/kernel/dsk.c +++ b/kernel/dsk.c @@ -56,12 +56,12 @@ extern COUNT ASMPASCAL fl_lba_ReadWrite(BYTE drive, WORD mode, * dap_p); UWORD ASMPASCAL floppy_change(UWORD); #ifdef __WATCOMC__ -#pragma aux (pascal) fl_reset modify exact [ax dx] -#pragma aux (pascal) fl_diskchanged modify exact [ax dx] -#pragma aux (pascal) fl_setdisktype modify exact [ax bx dx] -#pragma aux (pascal) fl_readkey modify exact [ax] -#pragma aux (pascal) fl_lba_ReadWrite modify exact [ax dx] -#pragma aux (pascal) floppy_change modify exact [ax cx dx] +#pragma aux (__pascal) fl_reset __modify __exact [__ax __dx] +#pragma aux (__pascal) fl_diskchanged __modify __exact [__ax __dx] +#pragma aux (__pascal) fl_setdisktype __modify __exact [__ax __bx __dx] +#pragma aux (__pascal) fl_readkey __modify __exact [__ax] +#pragma aux (__pascal) fl_lba_ReadWrite __modify __exact [__ax __dx] +#pragma aux (__pascal) floppy_change __modify __exact [__ax __cx __dx] #endif STATIC int LBA_Transfer(ddt * pddt, UWORD mode, VOID FAR * buffer, diff --git a/kernel/globals.h b/kernel/globals.h index f00649d..ac21eca 100644 --- a/kernel/globals.h +++ b/kernel/globals.h @@ -372,9 +372,9 @@ VOID ASMPASCAL WriteATClock(BYTE *, BYTE, BYTE, BYTE); VOID ASMPASCAL WritePCClock(ULONG); intvec getvec(unsigned char); #ifdef __WATCOMC__ -#pragma aux (pascal) ReadPCClock modify exact [ax cx dx] -#pragma aux (pascal) WriteATClock modify exact [ax bx cx dx] -#pragma aux (pascal) WritePCClock modify exact [ax cx dx] +#pragma aux (__pascal) ReadPCClock __modify __exact [__ax __cx __dx] +#pragma aux (__pascal) WriteATClock __modify __exact [__ax __bx __cx __dx] +#pragma aux (__pascal) WritePCClock __modify __exact [__ax __cx __dx] #endif /* */ @@ -410,7 +410,7 @@ void setvec(unsigned char intno, intvec vector); /* ^Break handling */ #ifdef __WATCOMC__ -#pragma aux (cdecl) spawn_int23 aborts; +#pragma aux (__cdecl) spawn_int23 __aborts; #endif void ASMCFUNC spawn_int23(void); /* procsupt.asm */ void ASMCFUNC DosIdle_hlt(void); /* dosidle.asm */ diff --git a/kernel/init-mod.h b/kernel/init-mod.h index aa1902e..314dd99 100644 --- a/kernel/init-mod.h +++ b/kernel/init-mod.h @@ -84,18 +84,18 @@ char * ASMPASCAL strchr(const char *s, int ch); #ifdef __WATCOMC__ /* bx, cx, dx and es not used or clobbered for all asmsupt.asm functions except (f)memchr/(f)strchr (which clobber dx) */ -#pragma aux (pascal) pascal_ax modify exact [ax] +#pragma aux (__pascal) pascal_ax __modify __exact [__ax] #pragma aux (pascal_ax) memset #pragma aux (pascal_ax) fmemset #pragma aux (pascal_ax) memcpy #pragma aux (pascal_ax) fmemcpy -#pragma aux (pascal_ax) memcmp modify nomemory -#pragma aux (pascal_ax) fmemcmp modify nomemory +#pragma aux (pascal_ax) memcmp __modify __nomemory +#pragma aux (pascal_ax) fmemcmp __modify __nomemory #pragma aux (pascal_ax) strcpy #pragma aux (pascal_ax) fstrcpy -#pragma aux (pascal_ax) strlen modify nomemory -#pragma aux (pascal_ax) fstrlen modify nomemory -#pragma aux (pascal) strchr modify exact [ax dx] nomemory +#pragma aux (pascal_ax) strlen __modify __nomemory +#pragma aux (pascal_ax) fstrlen __modify __nomemory +#pragma aux (__pascal) strchr __modify __exact [__ax __dx] __nomemory #endif #undef LINESIZE @@ -147,7 +147,7 @@ COUNT ASMPASCAL Umb_Test(void); COUNT ASMPASCAL UMB_get_largest(void FAR * driverAddress, UCOUNT * seg, UCOUNT * size); #ifdef __WATCOMC__ -#pragma aux (pascal) UMB_get_largest modify exact [ax bx cx dx] +#pragma aux (__pascal) UMB_get_largest __modify __exact [__ax __bx __cx __dx] #endif /* inithma.c */ @@ -185,18 +185,18 @@ int ASMPASCAL init_switchar(int chr); void ASMPASCAL keycheck(void); void ASMPASCAL set_DTA(void far *dta); #ifdef __WATCOMC__ -#pragma aux (pascal) init_call_intr modify exact [ax] -#pragma aux (pascal) read modify exact [ax bx cx dx] -#pragma aux (pascal) init_DosOpen modify exact [ax bx dx] -#pragma aux (pascal) close modify exact [ax bx] -#pragma aux (pascal) dup2 modify exact [ax bx cx] -#pragma aux (pascal) allocmem modify exact [ax bx] -#pragma aux (pascal) init_PSPSet modify exact [ax bx] -#pragma aux (pascal) init_DosExec modify exact [ax bx dx es] -#pragma aux (pascal) init_setdrive modify exact [ax bx dx] -#pragma aux (pascal) init_switchar modify exact [ax bx dx] -#pragma aux (pascal) keycheck modify exact [ax] -#pragma aux (pascal) set_DTA modify exact [ax bx dx] +#pragma aux (__pascal) init_call_intr __modify __exact [__ax] +#pragma aux (__pascal) read __modify __exact [__ax __bx __cx __dx] +#pragma aux (__pascal) init_DosOpen __modify __exact [__ax __bx __dx] +#pragma aux (__pascal) close __modify __exact [__ax __bx] +#pragma aux (__pascal) dup2 __modify __exact [__ax __bx __cx] +#pragma aux (__pascal) allocmem __modify __exact [__ax __bx] +#pragma aux (__pascal) init_PSPSet __modify __exact [__ax __bx] +#pragma aux (__pascal) init_DosExec __modify __exact [__ax __bx __dx __es] +#pragma aux (__pascal) init_setdrive __modify __exact [__ax __bx __dx] +#pragma aux (__pascal) init_switchar __modify __exact [__ax __bx __dx] +#pragma aux (__pascal) keycheck __modify __exact [__ax] +#pragma aux (__pascal) set_DTA __modify __exact [__ax __bx __dx] #endif /* irqstack.asm */ @@ -333,9 +333,9 @@ extern void FAR * ASMPASCAL DetectXMSDriver(VOID); extern int ASMPASCAL init_call_XMScall(void FAR * driverAddress, UWORD ax, UWORD dx); #ifdef __WATCOMC__ -#pragma aux (pascal) DetectXMSDriver modify exact [ax dx] -#pragma aux (pascal) _EnableA20 modify exact [ax] -#pragma aux (pascal) _DisableA20 modify exact [ax] +#pragma aux (__pascal) DetectXMSDriver __modify __exact [__ax __dx] +#pragma aux (__pascal) _EnableA20 __modify __exact [__ax] +#pragma aux (__pascal) _DisableA20 __modify __exact [__ax] #endif #if defined(WATCOM) && 0 diff --git a/kernel/prf.c b/kernel/prf.c index c10bce2..baa01f0 100644 --- a/kernel/prf.c +++ b/kernel/prf.c @@ -99,13 +99,13 @@ void put_console(int c) #else #ifdef __WATCOMC__ void int29(char c); -#pragma aux int29 = "int 0x29" parm [al] modify exact [bx]; +#pragma aux int29 = "int 0x29" __parm [__al] __modify __exact [__bx]; #ifdef DEBUG_PRINT_COMPORT void fastComPrint(char c); #pragma aux fastComPrint = \ "mov bx, 0xFD05" \ - "int 0x29" parm [al] modify exact [bx]; + "int 0x29" __parm [__al] __modify __exact [__bx]; #endif #endif @@ -428,7 +428,7 @@ void hexd(char *title, UBYTE FAR * p, COUNT numBytes) { put_unsigned(p[loop], 16, 2); put_console(' '); - } + } for (loop = start; loop < numBytes && loop < start+16;loop++) put_console(p[loop] < 0x20 ? '.' : p[loop]); put_console('\n'); diff --git a/kernel/proto.h b/kernel/proto.h index 7b511d9..cbabd9c 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -54,7 +54,7 @@ unsigned char ctrl_break_pressed(void); unsigned char check_handle_break(struct dhdr FAR **pdev); void handle_break(struct dhdr FAR **pdev, int sft_out); #ifdef __WATCOMC__ -#pragma aux handle_break aborts; +#pragma aux handle_break __aborts; #endif /* chario.c */ @@ -127,8 +127,8 @@ COUNT DosTruename(const char FAR * src, char FAR * dest); VOID ASMCFUNC DosIdle_int(void); VOID ASMCFUNC DosIdle_hlt(void); #ifdef __WATCOMC__ -#pragma aux (cdecl) DosIdle_int modify exact [] -#pragma aux (cdecl) DosIdle_hlt modify exact [] +#pragma aux (__cdecl) DosIdle_int __modify __exact [] +#pragma aux (__cdecl) DosIdle_hlt __modify __exact [] #endif /* error.c */ @@ -222,9 +222,9 @@ UWORD ASMPASCAL call_intr(WORD nr, iregs FAR * rp); COUNT ASMPASCAL res_DosExec(COUNT mode, exec_blk * ep, BYTE * lp); UCOUNT ASMPASCAL res_read(int fd, void *buf, UCOUNT count); #ifdef __WATCOMC__ -#pragma aux (pascal) call_intr modify exact [ax] -#pragma aux (pascal) res_DosExec modify exact [ax bx dx es] -#pragma aux (pascal) res_read modify exact [ax bx cx dx] +#pragma aux (__pascal) call_intr __modify __exact [__ax] +#pragma aux (__pascal) res_DosExec __modify __exact [__ax __bx __dx __es] +#pragma aux (__pascal) res_read __modify __exact [__ax __bx __cx __dx] #endif /* ioctl.c */ @@ -318,21 +318,21 @@ int /*ASMCFUNC*/ ASMPASCAL fmemcmp(const void FAR *m1, const void FAR *m2, size_ #ifdef __WATCOMC__ /* bx, cx, dx and es not used or clobbered for all asmsupt.asm functions except (f)memchr/(f)strchr (which clobber dx) */ -#pragma aux (pascal) pascal_ax modify exact [ax] +#pragma aux (__pascal) pascal_ax __modify __exact [__ax] #pragma aux (pascal_ax) fmemcpy #pragma aux (pascal_ax) memcpy #pragma aux (pascal_ax) fmemset #pragma aux (pascal_ax) memset -#pragma aux (pascal_ax) fmemcmp modify nomemory -#pragma aux (pascal_ax) memcmp modify nomemory +#pragma aux (pascal_ax) fmemcmp __modify __nomemory +#pragma aux (pascal_ax) memcmp __modify __nomemory #pragma aux (pascal_ax) fstrcpy #pragma aux (pascal_ax) strcpy -#pragma aux (pascal_ax) fstrlen modify nomemory -#pragma aux (pascal_ax) strlen modify nomemory -#pragma aux (pascal) memchr modify exact [ax dx] nomemory -#pragma aux (pascal) fmemchr modify exact [ax dx] nomemory -#pragma aux (pascal) strchr modify exact [ax dx] nomemory -#pragma aux (pascal) fstrchr modify exact [ax dx] nomemory +#pragma aux (pascal_ax) fstrlen __modify __nomemory +#pragma aux (pascal_ax) strlen __modify __nomemory +#pragma aux (__pascal) memchr __modify __exact [__ax __dx] __nomemory +#pragma aux (__pascal) fmemchr __modify __exact [__ax __dx] __nomemory +#pragma aux (__pascal) strchr __modify __exact [__ax __dx] __nomemory +#pragma aux (__pascal) fstrchr __modify __exact [__ax __dx] __nomemory #endif /* sysclk.c */ diff --git a/sys/fdkrncfg.c b/sys/fdkrncfg.c index 40e7110..c35a0af 100644 --- a/sys/fdkrncfg.c +++ b/sys/fdkrncfg.c @@ -43,8 +43,8 @@ unsigned long lseek(int fildes, unsigned long offset, int whence); #pragma aux lseek = \ "mov ah, 0x42" \ "int 0x21" \ - parm [bx] [dx cx] [ax] \ - value [dx ax]; + __parm [__bx] [__dx __cx] [__ax] \ + __value [__dx __ax]; #elif defined(__GNUC__) #include diff --git a/sys/sys.c b/sys/sys.c index 23ec133..a3ea645 100644 --- a/sys/sys.c +++ b/sys/sys.c @@ -231,7 +231,7 @@ unsigned getcurdrive(void); "mov ah, 0x19" \ "int 0x21" \ "xor ah, ah" \ - value [ax]; + __value [__ax]; long filelength(int __handle); @@ -248,9 +248,9 @@ long filelength(int __handle); "int 0x21" \ "pop dx" \ "pop ax" \ - parm [bx] \ - modify [cx] \ - value [dx ax]; + __parm [__bx] \ + __modify [__cx] \ + __value [__dx __ax]; extern int unlink(const char *pathname); @@ -1076,9 +1076,9 @@ int absread(int DosDrive, int nsects, int foo, void *diskReadPacket); "sbb ax, ax" \ "popf" \ "pop bp" \ - parm [ax] [cx] [dx] [bx] \ - modify [si di] \ - value [ax]; + __parm [__ax] [__cx] [__dx] [__bx] \ + __modify [__si __di] \ + __value [__ax]; int abswrite(int DosDrive, int nsects, int foo, void *diskReadPacket); #pragma aux abswrite = \ @@ -1087,9 +1087,9 @@ int abswrite(int DosDrive, int nsects, int foo, void *diskReadPacket); "sbb ax, ax" \ "popf" \ "pop bp" \ - parm [ax] [cx] [dx] [bx] \ - modify [si di] \ - value [ax]; + __parm [__ax] [__cx] [__dx] [__bx] \ + __modify [__si __di] \ + __value [__ax]; int fat32readwrite(int DosDrive, void *diskReadPacket, unsigned intno); #pragma aux fat32readwrite = \ @@ -1097,9 +1097,9 @@ int fat32readwrite(int DosDrive, void *diskReadPacket, unsigned intno); "mov cx, 0xffff" \ "int 0x21" \ "sbb ax, ax" \ - parm [dx] [bx] [si] \ - modify [cx dx si] \ - value [ax]; + __parm [__dx] [__bx] [__si] \ + __modify [__cx __dx __si] \ + __value [__ax]; void reset_drive(int DosDrive); #pragma aux reset_drive = \ @@ -1110,22 +1110,22 @@ void reset_drive(int DosDrive); "mov ah,0x32" \ "int 0x21" \ "pop ds" \ - parm [dx] \ - modify [ax bx]; + __parm [__dx] \ + __modify [__ax __bx]; void truename(char far *dest, const char *src); #pragma aux truename = \ "mov ah,0x60" \ "int 0x21" \ - parm [es di] [si]; + __parm [__es __di] [__si]; int generic_block_ioctl(unsigned drive, unsigned cx, unsigned char *par); #pragma aux generic_block_ioctl = \ "mov ax, 0x440d" \ "int 0x21" \ "sbb ax, ax" \ - value [ax] \ - parm [bx] [cx] [dx]; /* BH must be 0 for lock! */ + __value [__ax] \ + __parm [__bx] [__cx] [__dx]; /* BH must be 0 for lock! */ #else @@ -1162,7 +1162,7 @@ int fat32readwrite(int DosDrive, void *diskReadPacket, unsigned intno) regs.x.cx = 0xffff; regs.x.si = intno; intdos(®s, ®s); - + return regs.x.cflag; } /* fat32readwrite */ @@ -1237,8 +1237,8 @@ unsigned getextdrivespace(void far *drivename, void *buf, unsigned buf_size); "stc" \ "int 0x21" \ "sbb ax, ax" \ - parm [es dx] [di] [cx] \ - value [ax]; + __parm [__es __dx] [__di] [__cx] \ + __value [__ax]; #else /* !defined __WATCOMC__ */ @@ -1279,8 +1279,8 @@ BOOL haveLBA(void); /* return TRUE if we have LBA BIOS, FALSE otherwise */ "and cx, 1" \ "xchg cx, ax" \ "quit:" \ - modify [bx cx dx] \ - value [ax]; + __modify [__bx __cx __dx] \ + __value [__ax]; #else BOOL haveLBA(void)