I/O redirection in Prodos and Dos



http://www.umich.edu/~archive/apple2/technotes/tn/pdos/TN.PDOS.004

Apple II
Technical Notes
_____________________________________________________________________________
Developer Technical
Support


ProDOS 8
#4: I/O Redirection in DOS and ProDOS

Revised by: Matt Deatherage
November 1988
Revised by: Pete McDonald
November 1985

This Technical Note discusses I/O redirection differences between DOS
3.3 and
ProDOS.
_____________________________________________________________________________

Under DOS 3.3, all that is necessary to change the I/O hooks is
installing
your I/O routine addresses in the character-out vector ($36-$37) and
the key-
in vector ($38-$39) and notifying DOS (JSR $3EA) to take your
addresses and
swap in its intercept routine addresses.

Under ProDOS, there is no instruction installed at $3EA, so what do
you do?

You simply leave the ProDOS BASIC command interpreter's intercept
addresses
installed at $36-$39 and install your I/O addresses in the global page
at
$BE30-$BE33. The locations $BE30-$BE31 should contain the output
address
(normally $FDF0, the Monitor COUT1 routine), while $BE32-$BE33 should
contain
the input address (normally $FD1B, the Monitor KEYIN routine).

By keeping these vectors in a global page, a special routine for
moving the
vectors is no longer needed, thus, no $3EA instruction. You install
the
addresses at their destination yourself.

If you intend to switch between devices (i.e., the screen and the
printer),
you should save the hooks you find in $BE30-$BE33 and restore them
when you
are done. Blindly replacing the values in the global page could
easily leave
you no way to restore input or output to the previous device when you
are
done.

.



Relevant Pages

  • Re: cc65 and "Hello World"
    ... it only does I/O to the console. ... ProDOS due to the way the standard I/O library is written. ... ProDOS block) loader that directly loads the binary from disk right to ... the final destination than to load the whole binary to the wrong ...
    (comp.sys.apple2.programmer)
  • Re: Getting Large Files off DOS 3.3 volumes?
    ... that can write to a ProDOS disk? ... any DOS 3.3 utility that can patch a DOS 3.3 in memory to write ... will have to create the file in parts small enough to fit into memory) ...
    (comp.sys.apple2)
  • Re: Applesoft versus Commodore Basic 2
    ... Quick check of DOS 3.3 source ... So - maybe ProDOS had these tricks. ... programmer to OPEN, POSITION, BLOCK_READ, BLOCK_WRITE and CLOSE ... case of Aztec C compiled on native Apple DOS. ...
    (comp.sys.apple2.programmer)
  • Pseudo-disk *almost* ready for the big time.
    ... "Later Days Apples Pseudo-disk" proudly presented by (previously unheared ... In a nutshell the board can act as a ProDOS disk or a DOS 3.3 disk. ...
    (comp.sys.apple2)
  • Re: Aztec C SHELLS - Unix-Like Environment for DOS 3.3 and ProDOS 8
    ... DOS 3.3 so maybe it's more. ... ProDOS 8 or DOS 3.3 ... This program is a filter that displays a text file ... int argc; ...
    (comp.sys.apple2.programmer)

Loading