Hello Eduardo,

> I've found what seems an odd bug in the kernel (version 2035) while
> testing a first alpha version of nlsfunc and it is driving me mad:

> In nls.c:muxLoadPkg(), the value of cp becomes 0 right after the first
> call to muxGo() (the one that does the installation check).

solved:

*********** nls.c, 98:

STATIC COUNT muxGo(int subfct, UWORD bp, UWORD cp, UWORD cntry, UWORD bufsize,
                   void FAR *buf, UWORD *id)
{
  int ret;
  
  iregs r;
  log(("NLS: muxGo(): subfct=%x, cntry=%u, cp=%u, ES:DI=%p\n",
       subfct, cntry, cp, buf));

  /* ret = call_nls(subfct, &nlsInfo, bp, cp, cntry, bufsize, buf, id);
                                                mov     al, [bp + 4]    ; subfct
                                                mov     ah, 0x14
                                                mov     si, [bp + 6]    ; nlsinfo
                                                mov     bx, [bp + 10]   ; cp
                                                mov     dx, [bp + 12]   ; cntry
                                                mov     cx, [bp + 14]   ; bufsize
                                                les     di, [bp + 16]   ; buf
                                                push    bp
                                                mov     bp, [bp + 8]    ; bp
                                                int     0x2f
                                                pop     bp
                                                mov     bp, [bp + 20]   ; store id (in 
SS:) unless it's NULL
                                                or      bp, bp
                                                jz      nostore
                                                mov     [bp], bx
     */   
  
  r.a.b.h = 0x14;
  r.a.b.l = subfct;
  r.si  = (short)&nlsInfo;
  r.bp  = bp;
  r.b.x  = cp;
  r.d.x  = cntry;
  r.c.x  = bufsize;
  r.di  = FP_OFF(bp);
  r.es  = FP_SEG(bp);
  intr(0x2f,&r);
  
  if (*id)
      *id = r.b.x;
      
  ret = r.a.x;    


  
  log(("NLS: muxGo(): return value = %d\n", ret));
  return ret;
}

int2f,406
+%if 0 

; moved into intr() style by tom

; extern UWORD ASMCFUNC call_nls(UWORD subfct, struct nlsInfoBlock *nlsinfo,
; UWORD bp, UWORD cp, UWORD cntry, UWORD bufsize, UWORD FAR *buf, UWORD *id);

                global _call_nls
_call_nls:

int2f, 439:
                ret

+%endif


additionally, you need my recent patch, that makes intr available again.



tom








-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to