Hi! - callerARG1 declared as xreag instead UWORD.
--- Begin Message ---diff -ruNp old/kernel/inthndlr.c new/kernel/inthndlr.c --- old/kernel/inthndlr.c 2004-07-15 00:42:06.000000000 +0000 +++ new/kernel/inthndlr.c 2004-07-15 02:16:58.000000000 +0000 @@ -1623,9 +1623,10 @@ STATIC VOID StartTrace(VOID) } #endif -/* this function is called from an assembler wrapper function - and serves the internal dos calls - int2f/12xx and int2f/4a01,4a02. +/* this function is called from an assembler wrapper function and + serves the internal dos calls - int2f/12xx and int2f/4a01,4a02 */ + struct int2f12regs { #ifdef I386 #ifdef __WATCOMC__ @@ -1644,7 +1645,7 @@ struct int2f12regs { UWORD di, si, bp; xreg b, d, c, a; UWORD ip, cs, flags; - UWORD callerARG1; /* used if called from INT2F/12 */ + xreg callerARG1; /* used if called from INT2F/12 */ }; /* WARNING: modifications in `r' are used outside of int2F_12_handler() @@ -1684,12 +1685,12 @@ VOID ASMCFUNC int2F_12_handler(struct in r.DS = FP_SEG(&nul_dev); break; - case 0x06: /* invoke critical error */ - - /* code, drive number, error, device header */ - r.AL = CriticalError(r.callerARG1 >> 8, - (r.callerARG1 & (EFLG_CHAR << 8)) ? 0 : - r.callerARG1 & 0xff, r.DI, MK_FP(r.BP, r.SI)); + case 0x06: /* invoke critical error */ + /* code, drive number, error, device header */ + r.AL = CriticalError(r.callerARG1.b.h, + (r.callerARG1.b.h & EFLG_CHAR) + ? 0 : r.callerARG1.b.l, + r.DI, MK_FP(r.BP, r.SI)); break; case 0x08: /* decrease SFT reference count */ @@ -1747,19 +1748,19 @@ VOID ASMCFUNC int2F_12_handler(struct in break; } - case 0x12: /* get length of asciiz string */ - + case 0x12: /* get length of asciiz string */ r.CX = fstrlen(MK_FP(r.ES, r.DI)) + 1; - break; - case 0x13: - /* uppercase character */ - /* for now, ASCII only because nls.c cannot handle DS!=SS */ - r.AL = (unsigned char)r.callerARG1; - if (r.AL >= 'a' && r.AL <= 'z') - r.AL -= 'a' - 'A'; + case 0x13: /* uppercase character */ + { + /* for now, ASCII only because nls.c cannot handle DS!=SS */ + UBYTE ch = r.callerARG1.b.l; + if (_islower(ch)) + ch -= (UBYTE)('a' - 'A'); + r.AL = ch; break; + } case 0x16: /* get address of system file table entry - used by NET.EXE @@ -1795,10 +1796,9 @@ VOID ASMCFUNC int2F_12_handler(struct in ; ; probable use: get sizeof(CDSentry) */ - { - struct cds FAR *cdsp = get_cds(r.callerARG1 & 0xff); - - if (cdsp == NULL) + { + const struct cds FAR *cdsp; + if ((cdsp = get_cds(r.callerARG1.b.l)) == NULL) { r.FLAGS |= FLG_CARRY; break; @@ -1807,7 +1807,7 @@ VOID ASMCFUNC int2F_12_handler(struct in r.SI = FP_OFF(cdsp); r.FLAGS &= ~FLG_CARRY; break; - } + } case 0x18: /* get caller's registers */
--- End Message ---
