> - int 2f.4a00.cx=0 the kernel has to call this before it displays
>    the "Insert diskette for drive B:" (or A:...) message, to let
>    Win3 and the like show a GUI dialog instead of the message, DOS 5.0

seems to have been lost; should be


STATIC WORD play_dj(ddt * pddt)
{
  /* play the DJ ... */
  if ((pddt->ddt_descflags & (DF_MULTLOG | DF_CURLOG)) == DF_MULTLOG)
  {
    int i;
    ddt *pddt2 = getddt(0);
    for (i = 0; i < blk_dev.dh_name[0]; i++, pddt2++)
    {
      if (pddt->ddt_driveno == pddt2->ddt_driveno &&
          (pddt2->ddt_descflags & (DF_MULTLOG | DF_CURLOG)) ==
          (DF_MULTLOG | DF_CURLOG))
        break;
    }
    if (i == blk_dev.dh_name[0])
    {
      put_string("Error in the DJ mechanism!\n");   /* should not happen! */
    }
    else
    { 
                                /* according to RBIL (te 22 jul 04) */
      iregs r;
      
      r.a.x = 0x4a00;
      r.c.x = 0x0000;
      r.d.b.l = pddt->ddt_logdriveno;
      r.d.b.h = pddt2->ddt_logdriveno;
      
      intr(0x2f,&r);
      
      if (r.c.x == 0xffff) 
        {
                                /* someone else makes a nice dialog */
                }
          else
                {                               
              template_string[DRIVE_POS] = 'A' + pddt2->ddt_logdriveno;
              put_string(template_string);
              put_string("Insert");
              template_string[DRIVE_POS] = 'A' + pddt->ddt_logdriveno;
              put_string(template_string + 6);
              put_string("Press the any key to continue ... \n");
              fl_readkey();
            }  
      pddt2->ddt_descflags &= ~DF_CURLOG;
      pddt->ddt_descflags |= DF_CURLOG;
      pokeb(0, 0x504, pddt->ddt_logdriveno);
    }
    return M_CHANGED;
  }
  return M_NOT_CHANGED;
}



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freedos-kernel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to