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/loadchat.dasm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/loadchat.dasm (limited to 'src/loadchat.dasm') diff --git a/src/loadchat.dasm b/src/loadchat.dasm new file mode 100644 index 0000000..c63ed41 --- /dev/null +++ b/src/loadchat.dasm @@ -0,0 +1,54 @@ + +; If no R: driver is loaded, load DEFAULT.SER +; Then, load FujiChat + +; This is needed because e.g. Bob-verter loads at $5000, smack in the +; middle of FujiChat's code. This tiny little loader program should be +; small enough and out-of-the-way enough that nothing will stomp on it. + + processor 6502 + include "equates.inc" + +atari_exec = $0600 +main = $2E00 ; same place as cc65 + +; segment header + org main-6 + word $FFFF + word main + word endmain-1 + + org main + +; search handler table for R entry + ldx #0 +tabloop: + lda HATABS,x + cmp #'R + beq load_chat + inx + inx + inx + cpx #$24 ; 12 entries * 3 bytes = 36 + bne tabloop + +; no R: driver found, load one + lda #driver_filename + jsr atari_exec + +; load main fujichat program (does not return) +; (in fact it better not return, it overwrites this program!) +load_chat: + lda #chat_filename + jmp atari_exec + +driver_filename .byte "D:DEFAULT.SER", 0 +chat_filename .byte "D:FUJICHAT.COM", 0 +endmain + +; segment header + word RUNAD + word RUNAD+1 + word main -- cgit v1.2.3