From 2973d0c78e9b8eed3c5af239927c6bd36af64604 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 13 Mar 2019 02:50:42 -0400 Subject: initial commit --- src/col80_modified/cruft/col80_init.s | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/col80_modified/cruft/col80_init.s (limited to 'src/col80_modified/cruft/col80_init.s') diff --git a/src/col80_modified/cruft/col80_init.s b/src/col80_modified/cruft/col80_init.s new file mode 100644 index 0000000..89ccf75 --- /dev/null +++ b/src/col80_modified/cruft/col80_init.s @@ -0,0 +1,35 @@ +; ---------------------------------------------------------------------------- +; Initialization callback. The OS will call this on coldstart (or would do, +; if the driver were in ROM), and also on warmstart (because we stole the +; DOSINI vector). +; This routine is also the first thing that gets called by the mainline +; init code. Its job is to install COL80 in the handler table at HATABS. +; Actually the handler is first installed as X:, then the main init code +; fixes this up to E: unless the user is holding down SELECT. This allows +; the user to toggle between the 40-column ROM E: and COL80 without doing +; a full reboot. No idea if this was a documented feature or something the +; author used for development/debugging. + +col80_init: + ldy #$00 + +next_hatab_slot: + lda HATABS,y + beq register_x_handler + iny + iny + iny + cpy #$20 + bcc next_hatab_slot + jmp return_success + +register_x_handler: + lda #$58 + sta HATABS,y + lda #col80_vector_tab + iny + sta HATABS,y + jmp return_success -- cgit v1.2.3