Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!VAX1.CC.UAKRON.EDU!math-cs.kent.edu!usenet.ins.cwru.edu!abvax!iccgcc!lockemer From: lockemer@iccgcc.decnet.ab.com Newsgroups: comp.sys.cbm Subject: C-128 programming questions concerning memory and ML Message-ID: <685.26dbd201@iccgcc.decnet.ab.com> Date: 29 Aug 90 19:32:33 GMT Lines: 43 I need some help in three areas of 128 ML programming. 1) I am trying to figure out how to use bank switching properly. Some questions I have are: - Can you transfer control to another bank configuration that will block out the area of memory that the program is currently executing in? If so, how? For example: Bank 0 Bank 15 +---------------+ +---------------+ $ffd2 |LDA #0 | $ffd2 | BSOUT ROUTINE | |STA $ff00 | | | |JSR $ffd2 | | | I don't think this works since when the bank is switched to 15, it would not get to execute the jsr $ffd2, right? 2) Could comeone explain the purpose and/or benefits of relocating zero page and explain how to do it? What I don't understand most is, once zero page is relocated, does the system use this new zero page as well, or does it still use the original zero page? I'm concerned about what happens when interrupts take place. If it uses the new zero page, then is it necessary to copy values from the original zero page to the new location to prevent the system from going off in the weeds? Or do you simply avoid all these problems by disabling interrupts? 3) I am writing a program that needs to periodically load new code in, and that requires manipulating stored information from these many different sections of code. Is there a general strategy for organizing such a program in memory? That is, is there a certain structure that can be used which is the most efficient where variables are put in one section/bank of memory, the code to load new routines in another, and an area for loading new code? At the same time I am concerned about being able to access the kernal routines (related to (1) above). Any comments, suggestions, or most of all solutions will be greatly appreciated. Todd F. Lockemer