Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!PSUVM.BITNET!JEL From: JEL@PSUVM.BITNET.UUCP Newsgroups: comp.sys.apple Subject: Re: Bankswitching Message-ID: <8703121104.aa29101@SPARK.BRL.ARPA> Date: Thu, 12-Mar-87 11:00:00 EST Article-I.D.: SPARK.8703121104.aa29101 Posted: Thu Mar 12 11:00:00 1987 Date-Received: Fri, 13-Mar-87 23:32:37 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 53 Original note: > I was wondering if anyone could tell me a simple >way to do bankswitching. I presently own a unenhanced >][e with 128K. I'd like to know if the sequence of >operations to bank switching can be inserted in the >beginning of a basic program or if operation has to >be incorporated into its own program, which must be >run before running the basic program. I realize that >basic is a memory consuming language, but I really don't >know too much about binary to make a decent program. The built in Applesoft ROM's are incapable of using the bank switched memory. This is because when you switch to a new bank, the Applesoft ROM is switched out. Therefore, you can only do bank switching from machine language. I think I have heard of versions of BASIC that have the necessary routines to allow bank switching. Maybe directly, or more likely, as a means of storing large arrays. You might also want to consider using the 128K as a RAM card, and storing things there. This CAN be done from Applesoft, I think. I don't use ProDOS, so I can't really tell you much about this. ProDOS may be smart enuf to locate some of it's code in the extra banks, I'm not sure. If it isn't, I think there are versions that do, and would also give you more main bank memory useable from Applesoft. > Also, sometimes my programs have 'blown up' and reverted >into code of some sort .... a bunch of symbols and lower >case lettering. Is there anyway that the program can be >recovered, assuming that the file has not been saved. Is >there anyway that I can interpret this code? This is a prime example of why you should always save a program before you run it. It is usually a lesson learned the hard way. If you've been playing with your bank switches, chances are, that just switching back to the main bank will restore your program. Either that, or maybe if you're playing with POKE, you may have overwritten the area in memory that stores your program. This is almost always $800 up to HIMEM. In large programs, there is also the danger of overwriting either the program, or it's data storage if you use the hires graphics pages. If you think this might be happening, use HGR2, and set himem at $3FFF, just below the storage area for HGR2. HGR1 starts at $2000, so you would have even less space for prog/data if you were to set himem there. If you're REALLY desperate for space, I suppose you could use PEEK's and POKE's to directly use the space between the end of HGR2 ($5FFF) and HIMEM. Hope this helps... - Jon ------------------------------------------------------------------------------ What good are deadlines if you don't use them? (I suppose I should put a dead - line at the beginning for the lineater?) ------------------------------------------------------------------------------