[net.micro.6809] Bug

knudsen@ihnss.UUCP (04/27/84)

A limitation in BASIC09's CHR(n) function is probably irrelevant
to text-only computer users, but quite irksome to Coco hackers.
CHR$(n) masks off the high-order bit (bit 7), so your argument is
interpreted modulo 128.  Not only can you not print pretty semigraphics
characters, but you cannot send X and Y values to CCIO's hi-res
graphics routines that are >127.  A real loser, which went undetected
all those years on GIMIX and SSB OS9 machines.  Which brings up an
interesting question:
	When is Radio Shack going to give us any updates, info, typo
notices, erratas, etc etc on all that OS9 software that i BOUGHT
and duly registered via the enclosed postcards?
	Has anyone disassembled BASIC09 enough to give out a patch
for the CHR$ problem, since RS is in no hurry?	mike k

strick@gatech.UUCP (Henry A. Strickland) (05/04/84)

> CHR$(n) masks off the high-order bit (bit 7), so your argument is
> interpreted modulo 128.  Not only can you not print pretty semigraphics
> characters, but you cannot send X and Y values to CCIO's hi-res
> graphics routines that are >127.
 
    I've never tried CHR$ on codes >127;  if i'm trying to put strange 
characters to standard output (or any other path), i use PUT:
    DIM x:BYTE
    x = whatever
    PUT #1, x
Use 1 for standard output, other path number for other paths.  X must be
type byte;  integer will send two characters, real sends more.  
   Using strange characters in strings is a bad idea in the first place,
since there is a character ( is it $00 or $FF? I forget ) that is used
to mark end-of-string, like \0 in C.
   Let me know if this doesn't work.
   While I'm at it, let me add that I love having a operating system
powerful enough to show up the hardware!  Like Unix, OS9 is a great environment
for finding a quick fix to a problem, instead of a long fix.  I use it to its
fullest...
-- 
Henry Strickland
The Clouds Project, School of ICS, Georgia Tech, Atlanta GA 30332
CSNet:	Strick @ GATech		ARPA:	Strick.GATech @ CSNet-Relay
uucp:	...!{akgua,allegra,rlgvax,sb1,unmvax,ulysses,ut-sally}!gatech!strick

emjej@uokvax.UUCP (05/07/84)

#R:ihnss:-205400:uokvax:3500036:000:888
uokvax!emjej    May  6 21:53:00 1984

/***** uokvax:net.micro.6809 / ihnss!knudsen /  3:28 am  Apr 28, 1984 */
A limitation in BASIC09's CHR(n) function is probably irrelevant
to text-only computer users, but quite irksome to Coco hackers.
CHR$(n) masks off the high-order bit (bit 7), so your argument is
interpreted modulo 128.  Not only can you not print pretty semigraphics
characters, but you cannot send X and Y values to CCIO's hi-res
graphics routines that are >127.  A real loser, which went undetected
all those years on GIMIX and SSB OS9 machines. 
/* ---------- */

Yes, you *can* print semigraphics. Use the PUT command with an array of
BYTEs. Characters are glyphs on the screen; the fact that they are
often stored one per byte is an accident of implementation. Years of
C programming, in which one uses the char type for BYTE, or worse yet,
as short short int, tend to make one forget this.

						James Jones