Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!lll-lcc!unisoft!hoptoad!academ!killer!sentinel From: sentinel@killer.UUCP (The Sentinel) Newsgroups: comp.sys.cbm Subject: Re: assembler info wanted Message-ID: <1124@killer.UUCP> Date: Fri, 10-Jul-87 06:38:43 EDT Article-I.D.: killer.1124 Posted: Fri Jul 10 06:38:43 1987 Date-Received: Thu, 16-Jul-87 04:20:10 EDT References: <385@polyslo.UUCP> <1123@killer.UUCP> Distribution: na Organization: A Un*x Box in Texas Lines: 64 In article <1123@killer.UUCP>, elg@killer.UUCP (Eric Green) writes: > And finally, big problem #3: "C" programs run in bank 1 of memory. The > question of whether the Kernel is banked in or not is a Very Big Question, one > that I can't answer off-hand as I haven't done any C128 mode development. It > is possible you're jumping into un-initialized memory with your "jsr". I did some playing around with this a few weeks ago, and I agree with this statement. It is not safe to assume anything about the memory configuration of the 128 at the time your ML is called. You can get away with manually switching the Kernal back in temporarily *IF AND ONLY IF* you link the ML routine early enough that it will not be under the ROM. For safety, you should use the interbank routines in low memory. These are not the same as JSRFAR, JMPFAR, etc. in "normal" 128 mode. C-Power seems to move them around, probably to get more zero page space. I can't tell you offhand how to call them, but if you look at a disassembly of sys.obj and peek.obj from the library disk, it should be fairly obvious. The sys() function is just a straightforward interbank call, and peek() and poke() are simple load and store, respectively. Also, if you wish to call Kernal routines, most of them are represented in the C library by routines which do the proper interbank call. I'm sorry I can't post more detailed information right now, but I haven't dug into this too deeply yet, and what I have found out I don't know off the top of my head. > I have CASM running in 128 mode just fine. I even fixed the readline > processing to use "fgets" to make the thing faster than a crawl (although it's > still no speed-demon -- it takes 2-3 minutes to assemble 1,000 lines of code > -- a file that got out-of-hand when I was adding features, and grew from a > lowly 250 lines to that scale). I find it quite useful for development work, > because it was taking up to 10 minutes to re-assemble a diskfull of code, and > now I just have to wait the 3 minutes and then re-link (which takes virtually > no time at all). All I have to say is Good Job.... now if only the "C" > compiler produced better code! (not to mention the problem of linking in the > library -- has ANYBODY figured out a way to wait less than three minutes after > hitting the "^" key?!). Can you post a patch for the assembler with the changes you have made to it? I am interested in speeding it up, as I'm using it quite a bit now. I haven't fed it any real big programs yet, but it's nice to know it can handle them. I haven't noticed any excessive time being taken up by linking. I don't know what you're doing with it, but I don't think it's ever taken 3 minutes to search the library any time I've done it. After some observation, I've noticed that most of the time spent in library searching is in directory access time. I haven't tried C-Power with anything other than a 1571 and a 1541, but I think that a different drive would speed things up considerably. A 1581, for instance, would probably be significantly better because of it's whole track buffering, so all parts of the directory would be accessed equally fast. > -- > Eric Green elg%usl.CSNET CS student, University of SW Louisiana > {cbosgd,ihnp4}!killer!elg Apprentice Haquer, Bayou Telecommunications > Snail Mail P.O. Box 92191 BBS phone #: 318-984-3854 300/1200 baud > Lafayette, LA 70509 I disclaim my existence, and yours, too. -- Rob Tillotson ...ihnp4!killer!sentinel 3922-1 Newport Ave. -or- Fort Wayne, IN 46805 ...rutgers!unirot!sentinel (219) 483-2722 (top one preferred)