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


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

Catching prodos commands

From BLuRry <brendan.robert@gmail.com>
Newsgroups comp.sys.apple2.programmer
Subject Catching prodos commands
Date 2012-02-04 23:00 -0800
Organization http://groups.google.com
Message-ID <17766543.815.1328425255235.JavaMail.geo-discussion-forums@yqtt30> (permalink)

Show all headers | View raw


Found a fun thing to do: Re-route calls to $a685 to a custom parser in prodos.  This is the prodos syntax check routine, so if you replace the contents of the keyboard buffer with something else before resuming the command, you can essentially extend the recognized commands almost indefinitely.

Here's my proof of concept stub in the JACE code to do this, though right now I just print out the intercepted command it can be used for much more interesting things later:

new RAMListener(RAMEvent.TYPE.READ, RAMEvent.SCOPE.ADDRESS, RAMEvent.VALUE.ANY) {
                @Override
                protected void doConfig() {setScopeStart(0x0a685);}

                @Override
                protected void doEvent(RAMEvent e) {
                    if (getCpu().getProgramCounter() != getScopeStart()) return;
                    String in = "";
                    for (int i=0x0200; i < 0x0300; i++) {
                        char c = (char) (getMemory().read(i, false) & 0x07f);
                        if (c == 0x0d) break;
                        in += c;
                    }
                    System.err.println("Intercepted command: "+in);
                }

Back to comp.sys.apple2.programmer | Previous | NextNext in thread | Find similar


Thread

Catching prodos commands BLuRry <brendan.robert@gmail.com> - 2012-02-04 23:00 -0800
  Re: Catching prodos commands Antoine Vignau <antoine.vignau@laposte.net> - 2012-02-05 05:51 -0800
    Re: Catching prodos commands BLuRry <brendan.robert@gmail.com> - 2012-02-05 06:42 -0800
      Re: Catching prodos commands "Michael J. Mahon" <mjmahon@aol.com> - 2012-02-08 11:25 -0800
        Re: Catching prodos commands BLuRry <brendan.robert@gmail.com> - 2012-02-08 21:49 -0800

csiph-web