I have a list of hooks, CSW character output,
KSW keyboard input.. also some in Basic.System
global page..
at any time during a command prompt input
(basic.system ] prompt, prodos ] prompt)
I want to catch APPLE-1.. if Apple (C061)
is held down, and 1 is pressed, I want to run
some of my own code.
if Apple-1 isn't pressed, the "waiting for keypress"
cursor keeps on blinking happily, waiting for a
prodos or basic command..
for instance:
]RUN HELLO (APPLE-1)
my 6502 code is ececuted
]run hello (return)
basic program hello is RUN from
disk.
](apple-1)
my 6502 code is executed
I've tried poking around at the pointers, and small
assembly programs to patch the pointers... but
none of my code seems to work correctly.
Any help is appreciated!
Rich
|
|
0
|
|
|
|
Reply
|
aiiadict (1731)
|
1/18/2007 10:36:28 PM |
|
aiiadict@gmail.com wrote:
> I have a list of hooks, CSW character output,
> KSW keyboard input.. also some in Basic.System
> global page..
>
> at any time during a command prompt input
> (basic.system ] prompt, prodos ] prompt)
>
> I want to catch APPLE-1.. if Apple (C061)
> is held down, and 1 is pressed, I want to run
> some of my own code.
>
> if Apple-1 isn't pressed, the "waiting for keypress"
> cursor keeps on blinking happily, waiting for a
> prodos or basic command..
P8 and Basic.system don't like you changing the vectors like that.
Although I have seen this done with an HRCG a long time ago. I have
software for that somewhere around here.
You might try a different environment such as PDOS (RDOS for ProDOS 8)
or my hack AmperDOS for 128k with Applesoft. Neither use the I/O hooks
so this method of key grabbing should work easily. Of course these have
other limitations which you might not care for. For example, AmperDOS
can't return a variable from assembly as I can't figure out how to do
this with Beagle Bros. Extra Variables software.
Another option if you can find it would be Kitchen Sink's MicroDOT
system for P8 and Applesoft. Kitchen Sink will allow it to be released
as free use software if someone can locate a copy.
Cheers,
Mike T.
|
|
0
|
|
|
|
Reply
|
BluPhoenyx
|
1/19/2007 6:06:05 AM
|
|
BluPhoenyx wrote:
> aiiadict@gmail.com wrote:
>
>> I have a list of hooks, CSW character output,
>> KSW keyboard input.. also some in Basic.System
>> global page..
>>
>> at any time during a command prompt input
>> (basic.system ] prompt, prodos ] prompt)
>>
>> I want to catch APPLE-1.. if Apple (C061)
>> is held down, and 1 is pressed, I want to run
>> some of my own code.
>>
>> if Apple-1 isn't pressed, the "waiting for keypress"
>> cursor keeps on blinking happily, waiting for a
>> prodos or basic command..
>
>
> P8 and Basic.system don't like you changing the vectors like that.
> Although I have seen this done with an HRCG a long time ago. I have
> software for that somewhere around here.
Right.
You have to use the equivalent of Ctl-D"pr#a<addr>", where
<addr> is the address you want ProDOS to use for character
output. The "in#" command has the same option.
Both DOS and ProDOS intercept the input and output hooks, and
the real hook addresses are maintained inside the system and
changed by Ctl-D"PR#xxx" and Ctl-D"IN#xxx" commands.
These commands can also be executed from M/L programs by JSRing
to the DOSCMD entry point in BASIC.SYSTEM ($BE03) after placing
the desired high-ASCII command in the input buffer at $200
followed by $8D (CR).
DOSCMD is documented in section A.3.1 in the ProDOS Technical
Reference Manual.
-michael
NadaNet networking for Apple II computers!
Home page: http://members.aol.com/MJMahon/
"The wastebasket is our most important design
tool--and it's seriously underused."
|
|
0
|
|
|
|
Reply
|
Michael
|
1/19/2007 10:11:02 AM
|
|
Michael J. Mahon wrote:
> You have to use the equivalent of Ctl-D"pr#a<addr>", where
> <addr> is the address you want ProDOS to use for character
> output. The "in#" command has the same option.
I read the section on DOSCMD in the tech ref manual..
I also searched for PR# and in# and found little information
in the manual...
what is the syntax for IN#<address> commands?
I type:
in#$300 and I get syntax error
in#300 and I get range error...
Rich
|
|
0
|
|
|
|
Reply
|
aiiadict
|
1/19/2007 7:56:07 PM
|
|
aiiadict@gmail.com wrote:
> Michael J. Mahon wrote:
> > You have to use the equivalent of Ctl-D"pr#a<addr>", where
> > <addr> is the address you want ProDOS to use for character
> > output.
<addr> is the address of the _slot_ you want I/O from.
> in#$300 and I get syntax error
>
> in#300 and I get range error...
You don't have 300 (or 0x300) slots, evidently. :-)
|
|
0
|
|
|
|
Reply
|
schmidtd
|
1/19/2007 8:57:49 PM
|
|
In article <1169236567.859684.256790@51g2000cwl.googlegroups.com>,
aiiadict@gmail.com wrote:
> Michael J. Mahon wrote:
> > You have to use the equivalent of Ctl-D"pr#a<addr>", where
> > <addr> is the address you want ProDOS to use for character
> > output. The "in#" command has the same option.
>
>
> I read the section on DOSCMD in the tech ref manual..
>
> I also searched for PR# and in# and found little information
> in the manual...
>
> what is the syntax for IN#<address> commands?
>
> I type:
>
> in#$300 and I get syntax error
>
> in#300 and I get range error...
>
>
> Rich
>
You missed the "a" - It's "in#a<address>" not "in#<address>"
(Look closely to spot the difference...)
--
Don Bruder - dakidd@sonic.net - If your "From:" address isn't on my whitelist,
or the subject of the message doesn't contain the exact text "PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd> for more info
|
|
0
|
|
|
|
Reply
|
Don
|
1/19/2007 9:08:10 PM
|
|
Don Bruder wrote:
> In article <1169236567.859684.256790@51g2000cwl.googlegroups.com>,
> aiiadict@gmail.com wrote:
> > what is the syntax for IN#<address> commands?
> You missed the "a" - It's "in#a<address>" not "in#<address>"
There are three different ways of using IN# and PR# under BASIC.SYSTEM.
Here is the comment from the BASIC.SYSTEM source (at $AFA7)
"The following routines, PRNUM and INNUM, change the I/O hooks to
specified or implied addresses. Where a slot number is specified, the
address is looked up in the Globals for the corresponding slot. If an
address is given, that address becomes the I/O address where characters
are sent or requested. If both slot and address are specified, the
address is entered into the Globals for the specified slot (the I/O
vector is not changed until the next time a PR# or IN# is issued).
Addresses below $C000 are checked for an CLD ($D8) instruction as the
first byte and are considered invalid if it is not present. Addresses
above $C000 are checked only for ROMs. (The Apple II data bus is
unstable if no ROM or RAM is at the address tested)."
Thus:
PR#3
PR#A$C300
both mean the same thing but
PR#3,A$300 (or PR#3,A768)
only changes where a future PR#3 will send its output.
|
|
0
|
|
|
|
Reply
|
David
|
1/20/2007 9:58:09 AM
|
|
David Wilson wrote:
> PR#3
> PR#A$C300
>
> both mean the same thing but
Slight correction to the above - they are the same only if you have not
messed around with the BI Globals slot 3 output vector with the
following command or similar code.
> PR#3,A$300 (or PR#3,A768)
|
|
0
|
|
|
|
Reply
|
David
|
1/20/2007 10:05:19 AM
|
|
|
7 Replies
175 Views
(page loaded in 0.047 seconds)
|