From 2c432b3fc179d707397b8b015edbc8075e97de04 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 30 Jan 2022 22:29:33 -0500 Subject: [PATCH] command-L toggles local/online mode. --- vt100.key.S | 23 ++++++++++++++++++++--- vt100.modem.S | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/vt100.key.S b/vt100.key.S index 3f20b66..082d5e4 100644 --- a/vt100.key.S +++ b/vt100.key.S @@ -112,6 +112,10 @@ command ; or option beq :bs cmp #$0d beq :lf + cmp #'l' + beq :local + cmp #'L' + beq :local cmp #:MIN blt :rts @@ -126,14 +130,27 @@ command ; or option :rts rts -:MIN equ 49 -:MAX equ 52 - :bs lda #$08 jmp dispatch ; :lf lda #$0a jmp dispatch + ext enable_modem,disable_modem +:local + bit LOCAL + bmi :online + lda #$80 + sta LOCAL + jmp disable_modem + +:online + stz LOCAL + jmp enable_modem + + +:MIN equ 49 +:MAX equ 52 + :table dw pf1 ; 1 diff --git a/vt100.modem.S b/vt100.modem.S index a7129ea..186e21a 100644 --- a/vt100.modem.S +++ b/vt100.modem.S @@ -31,6 +31,7 @@ SerFlag equ $e10104 ; * see IIgs TN #18 - Do-It-Yourself SCC Access init_modem ent +enable_modem ent * sep #$30 php @@ -89,6 +90,28 @@ init_modem ent db 9,%00_0_0_1_0_1_0 ; master interrupts enabled. db -1,-1 + +disable_modem ent +* local mode + mx %11 + php + sei + + lda SCCBREG ; sync access + lda #9 + sta SCCBREG + lda #%01_0_1_0_0_0_1 ; reset channel B. + sta SCCBREG + + stz read_q_head + stz read_q_tail + stz write_q_head + stz write_q_tail + + plp + rts + + write_modem_sync ent mx %11 * a: byte to send