;;; Disassembly of ProDOS 1.x's QUIT handler (program selector) ;;; Modifications by Joshua Bell inexorabletash@gmail.com ;;; * installs, then chains to next .SYSTEM file .setcpu "6502" .linecont + .feature string_escapes .include "apple2.inc" .include "apple2.mac" .include "../inc/apple2.inc" .include "../inc/macros.inc" .include "../inc/prodos.inc" .include "../inc/ascii.inc" ;;; ************************************************************ .include "../inc/driver_preamble.inc" ;;; ************************************************************ ;;; ------------------------------------------------------------ ;;; ProDOS Technical Reference Manual, 5.1.5.2: ;;; ;;; ProDOS MLI call $65, the QUIT call, moves addresses $D100 through ;;; $D3FF from the second 4K bank of RAM of the language card to ;;; $1000, and executes a JMP to $1000. What initially resides in that ;;; area is Apple's dispatcher code. ;;; ------------------------------------------------------------ ;;; Installer ;;; ------------------------------------------------------------ max_size = $300 .proc maybe_install_driver src := install_src end := install_src + install_size dst := $D100 ; Install location in ProDOS (bank 2) src_ptr := $19 dst_ptr := $1B sta ALTZPOFF lda ROMIN lda ROMIN lda #>src sta src_ptr+1 lda #dst sta dst_ptr+1 lda #end bne loop lda src_ptr cmp #