#include <OS2.h>
#include <Stdio.h>
#include <String.h>

#define Main main

VOID Main ()
{
  ULONG Current_drive = 0; ULONG Drive_map = 0; 
  DosQueryCurrentDisk (&Current_drive, &Drive_map);

  ULONG Drives['Z' + 1] = {0};

  for (INT Drive = 'A'; Drive <= 'Z'; Drive ++)
  {
    ULONG Drive_number = Drive - 'A';
    ULONG Drive_bit = 1 << Drive_number;  

    if (Drive_map & Drive_bit) Drives[Drive] = 1;
  }

  for (INT Letter = 'A'; Letter <= 'Z'; Letter ++)
  {
    BYTE Drive_letter[] = { Letter, 0 };

    if (Drives[Letter]) printf ("Found: %s:" "\r\n", Drive_letter);
  }
}