Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihnss.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!ihnss!knudsen From: knudsen@ihnss.UUCP Newsgroups: net.micro.6809 Subject: Coco OS9 "C" putc() is messed up Message-ID: <2320@ihnss.UUCP> Date: Wed, 28-Nov-84 14:12:11 EST Article-I.D.: ihnss.2320 Posted: Wed Nov 28 14:12:11 1984 Date-Received: Thu, 29-Nov-84 05:45:34 EST Organization: AT&T Bell Labs, Naperville, IL Lines: 21I have finally proven to myself that the putc(char, channel) function in the stdio library is defective in Coco OS9 C. Namely, it strips off the high-order (sign) bit 7 when going to stdout. This makes it unusable for feeding graphics coordinates to CCIO, since these must range all the way up to 255 (or -128 thru -1, in C's viewpoint). I can think of 3 courses of action: (1) Write complaints to Tandy and Microware. Go into suspended animation, have HAL wake me up when we get to Pluto... (2) Write my own assembly-code substitute, and figure out some way to represent stdout to it (the rest is easy). (3) Dig around in the stdio libe with DEBUG and look for AND{a|b} $7F or some such thing in putc, and patch it out. (Say, might the & 0x7F be in the macro defn of putchar() in stdio.h? That would be a quick fix! I am using putchar(), not putc() directly. I'll take a look this evening). I know the & 0x7F is not in OS9 itself, since the PUT #1,char in BASIC09 works perfectly -- all 8 bits. mike k PS: Is it asking too much that Microware/RS at least *document* such cute features, eg, "putchar() strips the parity bit."?