Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!vrdxhq!verdix!ogcvax!schaefer From: schaefer@ogcvax.UUCP Newsgroups: comp.sys.cbm,comp.sys.misc Subject: C-Power 64 sys call -- HELP! Message-ID: <1244@ogcvax.UUCP> Date: Sun, 5-Apr-87 21:20:59 EST Article-I.D.: ogcvax.1244 Posted: Sun Apr 5 21:20:59 1987 Date-Received: Tue, 7-Apr-87 05:42:08 EST Reply-To: schaefer@ogcvax.UUCP (Barton E. Schaefer) Organization: Oregon Graduate Center, Beaverton, OR Lines: 47 Xref: utgpu comp.sys.cbm:305 comp.sys.misc:483 Summary: sys doesn't work [I always see these silly line-eater things, so here's mine] I am having massive difficulties with the sys function in C-Power. I am trying to make a call to GETIN (0xFFE4) to read a character from the keyboard without having to wait for a carriage return. (If you know of a way to do this without using sys, I'd like to know about it.) Following the example on page 46 of the C-Power manual, I wrote: #define peek(x) *((char *)(x)) #define poke(x,y) *((char *)(x))=(y) xget(c) char *c; { char x, y, d; d = peek(0x99); /* save the current input device */ poke(0x99,0); /* set input from keyboard */ for (*c = '\0'; (*c == '\0'); ) sys(15,0xffe4,c,&x,&y); /* call GETIN */ poke(0x99,d) /* restore the input device */ } The result of this, when I tested it in a short program, was to kick me clear out of the shell and back to a VERY screwed-up BASIC. I then tried the example from page 46 (calling CHROUT to print a string), and this had the same effect. I tried calling CHROUT through the jump table (0xffd2) and directly (0xf1ca), and with every bank number from 0 to 15 (the first argument to sys is the bank number, with a mysterious reference to the BASIC BANK command -- is this C-128 related?), and the only differences were that some odd (i.e., non-even) bank numbers locked up the system completely instead of just clobbering BASIC. What's going on here? Is my C-64 weird in some way, or do I have a strange sys manual page, or does sys just plain not work? HELP! HELP! HELP! Please reply via a posting rather than through E-mail, as a recent "upgrade" to 4.3 BSD has (temporarily?) messed up mail from some of our UUCP connections. Thanks in advance .... -- Bart Schaefer Dept. of CS&E CSNET: schaefer@Oregon-Grad Oregon Graduate Center UUCP: {ihnp4,seismo,sun}!verdix \ 19600 NW Von Neumann Dr {hplabs,ucbvax,decvax}!tektronix !ogcvax!schaefer Beaverton, OR 97006