At 2024-04-12T01:27:58-0500, G. Branden Robinson wrote: > Why not use one register for the character and one for the attributes?
Please disregard that sentence. What I was trying to say was, "why not use one (16-bit) register for the text and attributes instead of the lower 8-bit halves of 2 different registers?" That way one word-sized copy ("MV") would take care of one character cell. At that point I recognized that that wouldn't buy you much; what you wanted was a block copy. I never developed much facility with x86 assembly. It seemed like such an ugly ISA. The segmented approach to memory appeared to be such an awful obfuscation. It was years before I got exposure to principles of computer architecture that enabled me to articulate a critique. To get this not quite back on topic but at least back onto Unix, I gather that some System V versions of curses used a `short` (16-bit) type to store a character cell's text and attributes together.[1] BSD curses's data type was even smaller, since it only had one attribute bit, for "standout", so it could fit a character cell into a byte, using the lower-order 7 bits to encode ASCII. (MS-DOS of course had 8-bit code pages, so they were forced to make room for more attributes. Yet even with that extra capacity, no bit for an underline or italic attribute was assigned, hamstringing the rendering of nroff documents. See the attachments in my previous mail.) The availability of only one attribute bit in BSD curses is why a lot of early curses programs were so ugly. cscope still is. And ccmake, despite being of much more recent provenance, gleefully adopted the same approach.[2] This did not help my already dubious view of CMake. I reckon you could have hacked your terminal type description (via $TERMCAP) to make the standout capability ("so") produce anything you wanted, but I never knew of anyone who did that. Next time I need to drive cscope maybe I'll attempt the terminfo version of that, to give me a pleasant green for standout instead of bathing my eyeballs in reverse video gamma rays. Regards, Branden [1] ncurses has used a wider `chtype` for a long time, maybe forever; I see `long` in ncurses 1.8.1 [1993] and `uint32_t` today. [2] For a screenshot, see: https://documentation.unified-automation.com/uasdkc/1.9.1/html/CrossCompiling.html We can tell how far advanced CMake is over silly old GNU Make and Automake by noticing that its TUI looks like it came straight off of a TRS-80 Model II from 1979. Just awful.
signature.asc
Description: PGP signature