*** 1 page feature /750 words *** Can U: Drive? *** MAGIC_U.GIF here *** Mark Wherry takes a look at this cuckoo in the nest... It was MiNT which first introduced the U drive to our platform. It's not a real drive, but a virtual drive and enables access to some dark hidden corners somewhere inside your computer. MagiC users can also make use of this drive - if only we knew what to do with it! The virtual U drive is itself made up of virtual directories, the first few of these are named with single letters and correspond to the real drives mounted on your system. So for example the path U:\A\ is the same as A:\. In effect you can access all the drives on your system through the U drive! Still with me? Let's go deeper... There are virtual directories which do not correspond to real drives, U:\dev\ for example. This contains virtual files of 0 bytes in length which represent the BIOS (Basic Input Output System) devices on your computer. Here's a few examples ('#' device only available under MiNT): *** Bulleted list here *** * CENTR #, the centronics (printer) port * MODEM1, the RS232 serial port * MIDI, the midi port * KBD #, the intelligent keyboard controller * PRN, the printer device * AUX, the auxiliary terminal - typically the RS232 serial port * CON or TTY #, the current control terminal, which may not be the screen or keyboard * STDIN #, STDOUT #, STDERR #, the standard input, output and error devices. These can be useful for redirecting inputs and outputs to programs which normally require file names in the command line - such as TTP programs. * CONSOLE #, the physical console for the keyboard and screen * FASTTEXT #, an alternate, faster text device for the console screen. Not all programs are compatible with this MiNT device * NULL #, a null device with no output * FPRN, this device, is available to MagiC>=v4 and NVDI users and can be found in the NVDITOOLS directory. It's a parallel port output accelerator. *** end list *** All very interesting so how do we put the U drive to practical use from the desktop? Well, you can Drag&Drop files onto these devices. For example, if you drag a text file onto the printer device, it's sent to the printer and your text file will be printed. The same is true of all the devices but some are a lot more useful than others! The same actions can be achieved using a CLI (Command Line Interface) where you could create a print to file feature. Another interesting virtual directory is U:\proc\. This contains files representing the current processes in memory, whether they're running, ready or waiting. The filenames of the files in this directory represent two elements of each process. The main name part contains the name of the process and the extender contains the process ID. A file named 'A_PROGGY.004' is a program called 'A_PROGGY' running under process number 4. The size of the file indicates how much memory the file takes up in main memory and the time/date stamp indicates when the process was started. By renaming or even deleting these files you can achieve results - although you may also run straight into trouble! By renaming a file you can change the name or ID of the process and by deleting it you can terminate the process. It is however normally advisable to exit programs in the usual way rather than forcing processes to terminate. The pipe and shm directories are also fun for advanced users and programmers to explore and are usually empty unless specific programs are written to take advantage of them. The pipe directory contains files which are queues. The queue is a FIFO (First In First Out) data structure in which new elements are added to the end of the queue and elements can only be retrieved from the front. The files (used for inter-process communication) are only temporary and when the last program using a pipe (queue) closes it, it is erased. These files may be created by a window manager, printer spooler or other similar program. The shm directory is used to share memory. If a program creates a file here, a block of memory can be attached and other programs can open the file and share the memory, which is ideal for the transfer of large amounts of data between processes. Now MagiC supports the U Drive we can expect programmers to start taking advantage of these features which is good news for both MagiC and MiNT users.