Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ptsfa!hoptoad!academ!killer!sentinel From: sentinel@killer.UUCP (The Sentinel) Newsgroups: comp.sys.cbm Subject: Re: C-power information for a 128 Message-ID: <1003@killer.UUCP> Date: Mon, 15-Jun-87 02:18:16 EDT Article-I.D.: killer.1003 Posted: Mon Jun 15 02:18:16 1987 Date-Received: Thu, 25-Jun-87 00:53:09 EDT References: <243@uwslh.UUCP> <3680@garfield.UUCP> <3682@garfield.UUCP> <361@polyslo.UUCP> Distribution: na Organization: A Un*x Box in Texas Lines: 35 In article <361@polyslo.UUCP>, jchikin@polyslo.UUCP (Joe Chikin) writes: > [...] Also, where > did you find the info to open the channel. [...] It's done the same way as in BASIC. open(a,b,c,"d") in C is the same as OPEN a,b,c,"d" in BASIC. The array of characters I used for the filename holds the values for the RS-232 control register, command register, and user defined baud rate in the same order you would place them in BASIC. I won't go into any more detail... just follow the instructions in the Programmers Reference Guide or any other suitable book. BTW, my mention of Kernal routines in the previous message may have been a bit unclear. It appears from my experiments that the regular C library routines are not really meant for RS-232 I/O and don't do quite what I want. You should probably try them for yourself, though. Anyway, I found that simply calling the Kernal was the easiest way of using the port... for output the C routines were OK, but for input I ended up using the Kernal directly. Finally, in the C open() function, the first number is the file number, which is the same as the channel number under C. So, you can use it anywhere a parameter of type FILE is required. I used 50 in the example, because I am not sure what range the C library uses. > [...] Also, do you know where I might find a memory map > of C-Power 128. I want to know if I can access zero-page or some > of the system vectors in low mem. I'm not sure yet. C-Power steals a couple of vectors, and probably uses every free location in zero page. It also uses the cassette buffer for arguments. If you find any more on this, please post it... in the meantime I'll keep digging and experimenting... -- Rob Tillotson ...ihnp4!killer!sentinel 3922-1 Newport Ave. -or- Fort Wayne, IN 46805 ...rutgers!unirot!sentinel (219) 483-2722 (top one preferred)