Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #3310

Re: running programs in aux memory

Newsgroups comp.sys.apple2.programmer
Date 2017-03-03 12:55 -0800
References <5a125a37-dd5a-49d4-88c5-da0e540a06b5@googlegroups.com> <6dcf7880-6076-48fc-996d-336bd0f8b4df@googlegroups.com> <cbf84863-fd06-499a-95ed-2a60c8249d68@googlegroups.com> <d32ab4d6-d2ce-4278-8ce8-1c33b966d65c@googlegroups.com>
Message-ID <8d1058ea-daec-4a49-b84c-9b6c33d72feb@googlegroups.com> (permalink)
Subject Re: running programs in aux memory
From gids.rs@sasktel.net

Show all headers | View raw


> What are the kinds of problems with using XFER that you are aware of?
> 

Making ROM calls is the hardest with using XFER.  But making ROM calls from Aux mem also takes a little bit of pre-setup and knowledge of the call as well.

As long as you don't plan on making any ROM calls from Aux mem, then it is mostly  just the setup of registers and pointers you have to go through to make the call.

All you need is this simple little program to handle it all for you.  I don't recommend using zero-page for this code if making any ROM calls at all, even from Main memory.

$0100 is the best address to be at.

100:08 78 0A AA 8D 05 C0 8D
108:03 C0 20 15 01 8D 04 C0
110:8D 02 C0 28 60 7C 01 08

now just store the pointers to the calling routines at $800 in Aux memory.
LSB first then MSB, and the routines themselves at their appropriate addresses.

1/800:00 10  ; point this address to routine #1 in Aux memory
1/802:80 10  ; point this address to routine #2 in Aux memory
etc

To call Aux Mem routines, do this from main memory:

   LDA # (routine#)  - routine # to call
   JSR $0100
...

The y-reg is available to pass parameters.  If you need the Acc-reg to pass parameters as well, you can use the X-reg instead to call routines but it has to be a multiple of 2.

Just end each Aux Mem routine with an RTS, which will return automatically to Main.


You should disable the /RAM driver before using Aux mem as well.

Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

running programs in aux memory Mark Lemmert <mark.lemmert@gmail.com> - 2017-03-02 12:10 -0800
  Re: running programs in aux memory "Mark D. Overholser" <marko@markoverholser.com> - 2017-03-02 14:18 -0800
    Re: running programs in aux memory Mark Lemmert <mark.lemmert@gmail.com> - 2017-03-03 11:08 -0800
  Re: running programs in aux memory roger.shimada@gmail.com - 2017-03-02 20:41 -0800
    Re: running programs in aux memory Mark Lemmert <mark.lemmert@gmail.com> - 2017-03-03 11:18 -0800
      Re: running programs in aux memory roger.shimada@gmail.com - 2017-03-05 09:13 -0800
        Re: running programs in aux memory 6502workshop@gmail.com - 2017-03-05 20:11 -0800
  Re: running programs in aux memory gids.rs@sasktel.net - 2017-03-03 00:50 -0800
    Re: running programs in aux memory qkumba <peter.ferrie@gmail.com> - 2017-03-03 08:47 -0800
      Re: running programs in aux memory Mark Lemmert <mark.lemmert@gmail.com> - 2017-03-03 11:08 -0800
        Re: running programs in aux memory gids.rs@sasktel.net - 2017-03-03 12:55 -0800
          Re: running programs in aux memory gids.rs@sasktel.net - 2017-03-03 13:00 -0800
            Re: running programs in aux memory Antoine Vignau <antoine.vignau@laposte.net> - 2017-03-03 19:53 -0800
              Re: running programs in aux memory gids.rs@sasktel.net - 2017-03-03 20:41 -0800
                Re: running programs in aux memory qkumba <peter.ferrie@gmail.com> - 2017-03-03 21:43 -0800
                Re: running programs in aux memory gids.rs@sasktel.net - 2017-03-04 08:37 -0800
                Re: running programs in aux memory Antoine Vignau <antoine.vignau@laposte.net> - 2017-03-04 11:02 -0800
                Re: running programs in aux memory gids.rs@sasktel.net - 2017-03-04 13:54 -0800
                Re: running programs in aux memory gids.rs@sasktel.net - 2017-03-05 15:58 -0800
                Re: running programs in aux memory John Brooks <jbrooks@blueshiftinc.com> - 2017-03-05 20:16 -0800
                Re: running programs in aux memory qkumba <peter.ferrie@gmail.com> - 2017-03-06 09:30 -0800
                Re: running programs in aux memory qkumba <peter.ferrie@gmail.com> - 2017-03-04 22:11 -0800
            Re: running programs in aux memory Michael Pohoreski <michael.pohoreski@gmail.com> - 2017-03-15 19:06 -0700
    Re: running programs in aux memory Benoit0123 <bgilon@free.fr> - 2017-03-06 00:20 +0000
  Re: running programs in aux memory 6502workshop@gmail.com - 2017-03-05 20:13 -0800
  Re: running programs in aux memory laseractiveguy@gmail.com - 2017-03-08 16:33 -0800
  Re: running programs in aux memory laseractiveguy@gmail.com - 2017-03-08 17:04 -0800

csiph-web