henry@utzoo.uucp (Henry Spencer) (12/01/88)
[Hmm, following up to two articles simultaneously is an interesting trick...] >Writing directly to /dev/mem is not that nice. >What if we add a new device /dev/screen or something like that. NO. NO NO NO! What we really want is something that fits in with the way Unix does things. Input comes from standard input. Output goes to standard output. Either can be piped through filters, saved in files, edited and then used again, etc. What we need are conventions for encoding things like mouse status in input, and likewise conventions for encoding graphics commands in output, plus ways for the system -- NOT THE USER!! -- to handle the mechanics of getting the bytes where they belong. Unix does an admirable job of this for hardcopy terminals common in Bell Labs circa 1976. (Look at the definitions of some of the tty output delays if you don't believe me.) It lacks a little -- just a little -- for modern hardware. But let us not throw out the baby with the bathwater. One of Unix's great strengths is that it does not require the user program to worry about newline translation, or input line editing, or output delays, or echoing, for the vast majority of normal situations. Likewise, it should not require user programs to worry about drawing bits into the frame buffer, or sharing the screen with each other, or sharing the mouse with each other (I assume we don't want to rebuild MSDOS, where every program wants the whole machine to itself and won't take no for an answer), or figuring out what the mouse's raw output means in the program's own terms. Existing attempts to hide everything about the hardware from the program tend to get awfully big and complex, but I don't see any inherent reason why that has to be so, especially if one is willing to concede a few pragmatic issues like knowledge of screen resolution and depth (e.g. is it color or not). What we need is a simple, powerful set of facilities set up to strengthen Unix, not to reinvent MSDOS or (ugh) SunOS. I've been thinking about this off and on for some time, and may present a specific proposal fairly soon. -- SunOSish, adj: requiring | Henry Spencer at U of Toronto Zoology 32-bit bug numbers. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu