diff options
author | B. Watson <yalhcru@gmail.com> | 2019-03-13 02:50:42 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2019-03-13 02:50:42 -0400 |
commit | 2973d0c78e9b8eed3c5af239927c6bd36af64604 (patch) | |
tree | a0fdfe7201303edd11c6d86015ef4f79796fcf0f /src/col80_modified/cruft/col80_init.s | |
download | fujichat-2973d0c78e9b8eed3c5af239927c6bd36af64604.tar.gz |
initial commit
Diffstat (limited to 'src/col80_modified/cruft/col80_init.s')
-rw-r--r-- | src/col80_modified/cruft/col80_init.s | 35 |
1 files changed, 35 insertions, 0 deletions
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 + lda #>col80_vector_tab + iny + sta HATABS,y + jmp return_success |