# HG changeset patch # User boisy # Date 1038339818 0 # Node ID 998bba700c4076b7fefc0c7791a9553dbe4641bc # Parent 16dc49e3a1047ad075f2e2a786a8cccaf615ce62 Added source diff -r 16dc49e3a104 -r 998bba700c40 3rdparty/utils/supercomm/defsfile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/utils/supercomm/defsfile Tue Nov 26 19:43:38 2002 +0000 @@ -0,0 +1,4 @@ +Level equ 2 + use os9defs + use scfdefs + use systype diff -r 16dc49e3a104 -r 998bba700c40 3rdparty/utils/supercomm/makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/utils/supercomm/makefile Tue Nov 26 19:43:38 2002 +0000 @@ -0,0 +1,18 @@ +include ../../../Makefile.rules + +DEPENDS = ./Makefile + +CMDS = supercomm + +ALLOBJS = $(CMDS) + +all: $(ALLOBJS) $(DEPENDS) + @$(ECHO) "*********************************************" + @$(ECHO) "* *" + @$(ECHO) "* Dave Phillipsen's Supercomm *" + @$(ECHO) "* *" + @$(ECHO) "*********************************************" + +clean: + $(RM) $(ALLOBJS) + diff -r 16dc49e3a104 -r 998bba700c40 3rdparty/utils/supercomm/supercomm.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/utils/supercomm/supercomm.asm Tue Nov 26 19:43:38 2002 +0000 @@ -0,0 +1,6916 @@ +******************************************************************** +* SuperComm - OS-9 Level Two Communications Program +* +* $Id$ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* Acquired source 02/11/20 + + nam SuperComm + ttl OS-9 Level Two Communications Program + + ifp1 + use defsfile + endc + +rev set $01 + + mod eom,name,Prgrm+Objct,ReEnt+rev,start,DSize + +name fcs /SuperComm/ +Edition fcb $01 + +************************************************* +* +* Supercomm Data Area Layout +* +* Separated from Main source for easier editing +* + + org 0 +Temp rmb 2 Temp var for whatever +u0000 rmb 2 pointer to parameters from shell +u0002 rmb 2 Ptr to max. address of receive buffer (constant) +u0004 rmb 2 Ptr to start address of receive buffer (constant) +u0006 rmb 2 Ptr to current end of receive buffer +u0C82 rmb 1 Search/Reply string # being processed +u0C88 rmb 1 MSB of size of converted output text buffer +u0C89 rmb 1 LSB of size of converted output text buffer +u0008 rmb 1 +u0009 rmb 2 +u000B rmb 1 +u000C rmb 1 +u000D rmb 2 +u000F rmb 2 +u0011 rmb 1 Copy of IT.DLO (Delete line 0=BSE, 1=CRLF) +u0012 rmb 1 Copy of IT.EKO (0=echo off, 1=echo on) +u0013 rmb 2 Ptr to device descriptor +u0015 rmb 2 Ptr to start of SuperComm +u0017 rmb 2 Size of SuperComm +u0019 rmb 1 special version flag (adds 'a' to version #) +u001A rmb 1 +u001B rmb 1 +u001C rmb 1 +u001D rmb 1 +u001E rmb 2 +u0020 rmb 1 +u0021 rmb 1 +u0022 rmb 1 +u0023 rmb 1 sending ASCII file xfer flag (1=Send ASCII) +u0024 rmb 1 +u0025 rmb 1 Flag that ASCII receive file exists +u0026 rmb 1 ASCII receive buffer open +u0027 rmb 2 +u0029 rmb 1 +u002A rmb 1 path # to recieve buffer file +u002B rmb 1 path # to serial port +u002C rmb 1 path # to file for ASCII send +u002D rmb 10 Terminal port to open (up to 10 chars) +u0037 rmb 2 +u0039 rmb 3 +u003C rmb 1 +u003D rmb 1 Path # for disk file +u003E rmb 1 path to status line window +u003F rmb 1 path to conference window (if enabled) +u0040 rmb 1 conference mode activated flag (1=Conference mode) +u0041 rmb 1 key sense data +u0042 rmb 1 path to download file +u0043 rmb 1 +u0044 rmb 1 1 byte bffr for block responses (ACK/NAK,XON/XOFF) +u0045 rmb 1 +u0046 rmb 1 flag for YModem batch +u0047 rmb 1 possible remove (not referenced anywhere) +u0048 rmb 1 \ (u0048 is also running checksum byte) +u0049 rmb 1 / running CRC for file Xfers +u004A rmb 1 last selected xfer protocol (Upload/Send) +u004B rmb 1 last selected xfer protocol (Download/Receive) +u004C rmb 1 +u004D rmb 2 used as a byte counter in download +u004F rmb 1 Internal Error # on xfer +u0050 rmb 2 Ptr to end of X/Ymodem buffer in modem recv bffr +u0052 rmb 1 Current attempt # on CheckSum receive (max=10) +u0053 rmb 2 Current block # (only LSB is used in blck hdrs) +u0055 rmb 2 True block size (includes blk/comp # & crc/chksm) +u0057 rmb 2 # data bytes needed for block (128 or 1024) +u0059 rmb 1 Current attempt # on CRC receive (max=4) +u005A rmb 1 CRC or Checksum (0=Checksum) +u005B rmb 4 4 byte longint (for file sizes) +u005F rmb 1 +u0060 rmb 2 Part of timer routine for download timeouts??? +u0062 rmb 2 +u0064 rmb 1 +u0065 rmb 1 +u0066 rmb 2 Ptr to next key in Conf mode keyboard buffer +u0068 rmb 1 Counter of # keys in Conf mode keyboard buffer +u0069 rmb 1 +u006A rmb 1 +u006B rmb 1 ZModem flag (hi bit clear=none in progress) +u006C rmb 2 pointer to ZModem start header +u006E rmb 1 duplicate of input path for ZModem (for restore) +u006F rmb 1 possible remove +u0070 rmb 1 +u0071 rmb 1 +u0072 rmb 1 path to VRN (0=No VRN present) +u0073 rmb 1 Current seconds counter (either VRN or Clock) +u0074 rmb 1 # seconds on last update done (either VRN or Clock +u0075 rmb 1 Timer on/off flag (0=Off) +u0076 rmb 1 child process # (shell, sz & rz etc...) +u0077 rmb 11 time On-Line ASCII text (with CurXY) '00:00:00' +u0082 rmb 1 Width of original screen +u0083 rmb 1 Height of original screen +u0084 rmb 1 Type of original screen (ex. 1=40x24 Hware txt) +u0085 rmb 1 background color for overlay windows +u0086 rmb 1 +u0087 rmb 1 FColor of main window +u0088 rmb 1 BColor of main window +u0089 rmb 1 FColor of conference mode window +u008A rmb 1 +u008B rmb 1 +u008C rmb 1 +u008D rmb 1 Foreground color of original screen +u008E rmb 1 Background color of original screen +u008F rmb 1 Border color of original screen +u0090 rmb 1 X size of main window +u0091 rmb 1 Y size of main window +u0092 rmb 1 +u0093 rmb 2 Ptr to next filename (from dir read) +u0095 rmb 2 +u0097 rmb 2 +u0099 rmb 1 +u009A rmb 1 +u009B rmb 1 filename present for Upload/Download flag +u009C rmb 3 FColor codes +u009F rmb 32 old filename for downloads +u00BF rmb 2 +u00C1 rmb 26 +u00DB rmb 2 +u00DD rmb 2 +u00DF rmb 1 input buffer from modem (192 bytes) +u00E0 rmb 1 +u00E1 rmb 1 +u00E2 rmb 4 +u00E6 rmb 13 +u00F3 rmb 10 +u00FD rmb 1010 +u04EF rmb 1 +u04F0 rmb 31 +u050F rmb 255 Conference mode keyboard buffer +u060E rmb 255 Generic Entry from keyboard buffer +u070D rmb 1024 output buffer to screen (with conversion) +u0B0D rmb 255 +u0C0C rmb 32 Current SS.Opt settings for local keyboard +u0C2C rmb 2 +u0C2E rmb 34 +u0C50 rmb 16 Palette settings of original screen +u0C60 rmb 1 Start of buffer for converted ANSI sequences +u0C61 rmb 1 +u0C62 rmb 30 +u0C80 rmb 2 Ptr to converted ANSI buffer (C60) +u0C83 rmb 1 +u0C84 rmb 1 Currently selected menu item # in ==> menu +u0C85 rmb 3 +u0C8A rmb 1 Flag: 0=Not processing ANSI sequence +u0C8B rmb 1 ??? (Inited to 0 if starting ANSI sequence) +u0C8C rmb 1 +u0C8D rmb 2 Ptr to ANSI sequence (raw ANSI:u0B0D) +u0C8F rmb 2 current overlay window start co-ordinates +u0C91 rmb 2 current overlay window size +u0C93 rmb 1 possible remove +u0C94 rmb 1 current cursor X position +u0C95 rmb 1 current cursor Y position +u0C96 rmb 2 current X/Y co-ordinates? +u0C98 rmb 1 +u0C99 rmb 6 Place to hold F$Time packet +u0C9F rmb 1 +u0CA0 rmb 1 seems to be flag for upload/download (0=Upload) +u0CA1 rmb 2 +u0CA3 rmb 1 +u0CA4 rmb 1 +u0CA5 rmb 1 bit 8=Stop bits, bit 6=Word Len, bits 1-3=Baud +u0CA6 rmb 1 current terminal type (0=TTY, 1=OS9, 2=ANSI) +u0CA7 rmb 1 Current Echo type (0=Off, 1=On) +u0CA8 rmb 1 +u0CA9 rmb 1 +u0CAA rmb 1 +u0CAB rmb 1 Current hangup method (0=DTR drop, else +++ATH) +u0CAC rmb 1 Current Parity setting +u0CAD rmb 1 +u0CAE rmb 1 Auto Zmodem flag (0=Yes) +u0CAF rmb 1 Pause off char. code (for ASCII receive) +u0CB0 rmb 1 Pause on char. code (for ASCII receive) +u0CB1 rmb 33 +u0CD2 rmb 32 Current data directory path list +u0CF2 rmb 39 +u0D19 rmb 1 +u0D1A rmb 2 +u0D1C rmb 128 -<1> programmable key buffer +u0D9C rmb 128 -<2> programmable key buffer +u0E1C rmb 128 -<3> programmable key buffer +u0E9C rmb 128 -<4> programmable key buffer +u0F1C rmb 128 -<5> programmable key buffer +u0F9C rmb 128 -<6> programmable key buffer +u101C rmb 128 -<7> programmable key buffer +u109C rmb 128 -<8> programmable key buffer +u111C rmb 256 SSn strings (4 of 64 bytes each) +u121C rmb 256 RSn strings (4 of 64 bytes each) +u131C rmb 128 +u139C rmb 2 Pointer to RSn string we are working on +u139E rmb 1 # download protocols supported +u139F rmb 4 +u13A3 rmb 1 +u13A4 rmb 1 +u13A5 rmb 1 +u13A6 rmb 3 +* ??? rest big buffer, most used for text, input & output ??? +u13A9 rmb 1 Temp buffer for small text, etc. +u13AA rmb 6 +u13B0 rmb 137 +u1439 rmb 16 +u1449 rmb 112 +u14B9 rmb 512 +u16B9 rmb $2000-200-. ASCII recieve buffer (expanded by #xxK modifier) +u1F38 rmb 200 stack +DSize equ . + + fcc 'Program by Dave Philipsen Copyright (c) 1988, 1989,1992' + fcc / ('92 updates by Randy K. Wilson)/ + +L006F fdb 85 # bytes this message (?) ($55) + fcb C$FORM Clear screen + fcb $02,$23,$21 CurXY @ 3,1 + fcc 'SuperComm v2.2' + fcb $02,$24,$23 CurXY @ 4,3 + fcc 'Copyright (c)' + fcb $02,$23,$24 CurXY @ 3,4 + fcc '1988, 1989, 1992' + fcb $02,$26,$26 CurXY @ 6,6 + fcc 'written by' + fcb $02,$24,$27 CurXY @ 4,7 + fcc 'Dave Philipsen' + +L00C6 fdb 35 # bytes this message ($23) + fcb C$FORM Clear screen + fcb $02,$22,$21 CurXY @ 2,1 + fcc 'with updates by' + fcb $02,$22,$22 CurXY @ 2,2 + fcc ' Randy Wilson' + +L00EB fdb 28 # bytes this message ($1C) + fcb $02,$40,$20 CurXY @ 32,0 + fcb $1B,$32,4 Foreground color= Yellow + fcc 'SuperComm v2.2 ' + fcb $1B,$32,3 Foreground color= White + fcb $02,$58,$20 CurXY @ 55,0 + fcc '=' (for port '=' baudrate) + +L0109 fdb 454 # bytes this message ($C6) + fcc ' Use key with the following keys:' + fcb C$CR,C$LF,C$LF + fcc ' A - Auto Dialer Q - Quit' + fcb C$CR,C$LF + fcc ' B - Baud Rates R - Reset Palettes' + fcb C$CR,C$LF + fcc ' C - Clear Screen S - OS9 Shell Access' + fcb C$CR,C$LF + fcc ' D - Change Directory T - Terminal Type' + fcb C$CR,C$LF + fcc ' H - Hang Up U - Update SuperComm' + fcb C$CR,C$LF + fcc ' I - Timer on/off Z - Conference Mode' + fcb C$CR,C$LF + fcc ' M - Open/Close Buffer - Upload file' + fcb C$CR,C$LF + fcc ' O - Change Options - Download File' + fcb C$LF,C$CR,C$LF + fcc ' Select function or to continue' + +L02DC fcc 'ATH' Hangup string (does not need '0' on end) + fcb C$CR + +L02E0 fcc 'Shell' + +L02E5 fcb C$CR + +L02E6 fcc 'rz' + fcb C$CR + +L02E9 fcc '-vv ' + fcb C$CR + +L02F0 fdb 40 # bytes this message ($28) + fcb $02,$34,$20 CurXY @ 20,0 + fcc 'External ZModem File Receive' + fcb C$CR,C$LF,C$LF + fcb $1B,$25,0,3,$40,7 CWArea to 0,3 - 64,10 + +L031A fcc '*' ZModem Xfer signature + fcb $18 + fcc 'B0' + fcb $00 Byte to signify end of Zmodem Xfer signature + +* Window for ZModem Send +L0322 fdb 37 # bytes this message + fcb $02,$36,$20 CurXY @ 23,1 + fcc 'External ZModem File Send' + fcb C$CR,C$LF,C$LF + fcb $1B,$25,0,3,$40,7 CWArea to 0,3 - 64,10 + +* Hangup message +L0349 fdb 15 # bytes this message + fcb C$CR,C$LF + fcc ' Hanging Up!!' + +* Device to use VRN +L0360 fcc '/nil' + fcb C$CR + fcb $00 + +* Default time on-line string +L0366 fcb $02,$2b,$20 CurXY @ 11,0 + fcc '00:00:00' + +* Palette set #1 +L0371 fcb $00,$20,$00,$3F,$10,$20,$3F,$3F + fcb $00,$20,$00,$3F,$10,$20,$3F,$3F + +* Palette set for ANSI mode +L0381 fcb $00,$24,$12,$37,$09,$28,$1F,$3F + fcb $00,$24,$12,$37,$09,$28,$1F,$3F + +* Palette set for OS-9 mode +L0391 fcb $3F,$09,$00,$12,$24,$37,$28,$1F + fcb $3F,$09,$00,$12,$24,$37,$28,$1F + +* Default FColor,BColor,Border settings for ANSI +L03A1 fcb $07,$00,$00 + +* Default FColor,BColor,Border settings for OS-9 +L03A4 fcb $00,$02,$02 + +* Inverse/Underline/Blink OFF & clear screen +L03A7 fdb 7 # bytes this message + fcb $1F,$21,$1f,$23,$1f,$25,C$FORM + +* Shadowed overlay window (save switch on) +L03B0 fdb 18 # bytes this message +L03B2 fcb $1B,$22,1,0,0,80,23,1,1 + fcb $1B,$22,1,2,1,76,21,6,0 + +* Shadowed overlay windows remove (restore original screen) +L03C4 fdb 4 # bytes this message +L03C6 fcb $1B,$23,$1b,$23 OWEnd, OWEnd + +* Default settings? +L03D6 fdb 14 # bytes this message + fcb $1F,$21 Inverse off + fcb $1F,$23 Underline off + fcb $1F,$25 Blink off + fcb $1B,$32,7 Foreground color 7 + fcb $1B,$33,0 Background color 0 + fcb $05,$21 Cursor ON + +L03E6 fcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + fdb 2 # bytes this entry + fcb $1F,$22 Underline on + fcb 0,0 + fcb 2 # bytes this entry + fcb $1F,$24 Blink on + fcb 0,0,0,0,0,0,0 + fcb 2 # bytes this entry + fcb $1F,$20 Inverse on + fcb $00 + +* Foreground color settings +L040E fdb 3 # bytes this entry + fcb $1B,$32,0 Foreground color 0 + fdb 3 # bytes this entry + fcb $1B,$32,1 Foreground color 1 + fdb 3 # bytes this entry + fcb $1B,$32,2 Foreground color 2 + fdb 3 # bytes this entry + fcb $1B,$32,3 Foreground color 3 + fdb 3 # bytes this entry + fcb $1B,$32,4 Foreground color 4 + fdb 3 # bytes this entry + fcb $1B,$32,5 Foreground color 5 + fdb 3 # bytes this entry + fcb $1B,$32,6 Foreground color 6 + fdb 3 # bytes this entry + fcb $1B,$32,7 Foreground color 7 + +* Background color settings +L0436 fdb 3 # bytes this entry + fcb $1B,$33,0 Background color 0 + fdb 3 # bytes this entry + fcb $1B,$33,1 Background color 1 + fdb 3 # bytes this entry + fcb $1B,$33,2 Background color 2 + fdb 3 # bytes this entry + fcb $1B,$33,3 Background color 3 + fdb 3 # bytes this entry + fcb $1B,$33,4 Background color 4 + fdb 3 # bytes this entry + fcb $1B,$33,5 Background color 5 + fdb 3 # bytes this entry + fcb $1B,$33,6 Background color 6 + fdb 3 # bytes this entry + fcb $1B,$33,7 Background color 7 + +* Clear screen code +L045E fdb 1 # bytes this entry + fcb C$FORM + +* Erase to end of line +L0461 fdb 1 # bytes this entry + fcb $04 + +* Erase to end of screen +L0464 fdb 1 # bytes this entry + fcb $0B + +* Generic window descriptor +L0467 fcs '/W' + +* DWSet for main window: 80x23 text from 0,1 +L0469 fcb $1B,$24 DWEnd + fcb $1B,$20,2,0,1,80,23,7,2,2,$1b,$21 DWSet:80x23 text, 1 from top + +* DWSet for status line @ top window: 80x1 with blue background +* Done on Process' current screen (which is set by L0469 above) +L0475 fcb $1B,$24 DWEnd +L0477 fcb $1B,$20,0,0,0,80,1,3,4 DWSet: 80x1, same scrn, blue bckgrnd + fcb C$FORM Clear the line + +L0481 fcb $1B,$32,0 Foreground color=0 + fcb $1B,$33,0 Background color=0 + fcb C$FORM Clear screen + + fdb 1 + fcc / / + +L048B fdb 2 + fcb $05,$21 + +L048F fdb 2 + fcb $05,$20 + +L0493 fcb $1F,$20 Inverse on + fcb $20 Space + fcb $1F,$21 Inverse off + fcb C$BSP Backspace + +L0499 fdb 22 # bytes this message + fcb C$CR,C$LF + fcc ' Are you sure? (y/N)' + +L04B1 fdb 40 # bytes this message + fcb $02,$2e,$23 CurXY @ 14,3 + fcc 'Count ' + fcb $02,$2e,$25 CurXY @ 14,5 + fcc 'Seconds ' + fcb $02,$2d,$27 CurXY @ 13,7 + fcc ' aborts' + fcb $05,$20 Turn off cursor + +L04DB fdb 8 # bytes this message + fcc 'Dialing ' + +L04E5 fdb 3 # bytes this message + fcb $02,$37,$23 CurXY @ 23,3 + +L04EA fdb 3 # bytes this message + fcb $02,$37,$25 CurXY @ 23,5 + +L04EF fdb 32 # bytes this message + fcc ' Xmodem file transfer system' + +L0511 fdb 9 # bytes this message + fcb $02,$20,$20 CurXY @ 0,0 + fcc ' Y' + +L051C fdb 17 # bytes this message + fcb $02,$2b,$26 CurXY @ 11,6 + fcc ' aborts' + +L052F fdb 17 # bytes this message + fcb $02,$2A,$28 CurXY @ 10,8 + fcc ' aborts' + + fdb 27 # bytes this message + fcb $02,$25,$22 CurXY @ 5,2 + fcc 'ASCII Processing? (Y/N) ' + +L055F fdb 10 # bytes this message + fcb $02,$21,$24 CurXY @ 1,4 + fcc 'File: ' + fcb $04 Clear to end of line + +L056B fdb 10 # bytes this message + fcb $02,$21,$22 CurXY @ 1,2 + fcc 'Recv: ' + fcb $04 Clear to end of line + +L0577 fdb 10 # bytes this message + fcb $02,$21,$23 CurXY @ 1,2 + fcc 'Size: ' + fcb $04 Clear to end of line + +L0583 fdb 14 # bytes this message + fcb $02,$21,$24 CurXY @ 1,4 + fcb $04 Clear to end of line + fcb $02,$21,$22 CurXY @ 1,2 + fcc 'Send: ' + fcb $04 Clear to end of line + +L0593 fdb 34 # bytes this message + fcb $02,$21,$25 CurXY @ 1,5 + fcc 'Block # Error #' + +L05B7 fdb 14 # bytes this message + fcb $02,$21,$27 CurXY @ 1,7 + fcc 'Last Error:' + +L05C7 fcc ' ' + fcc 'Transfer Aborted ' + fcc 'Wrong Block Number ' + fcc 'Block Check Failed ' + fcc 'Time Out ' + +L062B fdb 7 # bytes this message + fcb $02,$28,$25 CurXY @ 8,5 + fcc '0000' + +L0634 fdb 7 # bytes this message + fcb $02,$40,$25 CurXY @ 32,5 + fcc '0000' + +* ???? No label was pointing to it, was after baud rate table (L0652) +* NOTE: MAY BE POSSIBLE TO DELETE FOLLOWING 8 BYTES + fdb 6 # bytes this message + fcb $1B,$25,1,2,4,9 CWArea from 1,2 to 5,11 + +L0682 fcb C$BSP,C$BSP,C$BSP + fcc ' ' + +L0688 fcb C$FORM Clear screen + fcb C$LF,C$LF,C$LF,C$LF,C$LF,C$LF,C$LF,C$LF,C$LF,C$LF + +L0693 fcc '==>' + +L0696 fdb 24 # bytes this message + fcb C$LF,C$CR + fcc ' Terminal Type : ' + +L06B0 fcc 'OS9 ' + fcc 'ASCII' + fcc 'ANSI ' + +L06BF fcb $02,$30,$21 CurXY @ 16,1 + fcc 'ASCII' + +L06C7 fdb 8 # bytes this message + fcb $02,$30,$21 CurXY @ 16,1 + fcc ' ' + +* Keywords in ADF (Autodial) files +L06D1 fcs 'ADS' + fcs 'BPS' + fcs 'ECH' + fcs 'HEK' + fcs 'TRM' + fcs 'LNF' + fcs 'XON' + fcs 'XOF' + fcs 'RTR' + fcs 'RPS' + fcs 'PAR' + fcs 'CLK' + fcs 'WRD' + fcs 'STP' + fcs 'KM1' + fcs 'KM2' + fcs 'KM3' + fcs 'KM4' + fcs 'KM5' + fcs 'KM6' + fcs 'KM7' + fcs 'KM8' + fcs 'CNS' + fcs 'SS1' + fcs 'SS2' + fcs 'SS3' + fcs 'SS4' + fcs 'RS1' + fcs 'RS2' + fcs 'RS3' + fcs 'RS4' + fcs 'RLF' + fcs 'TLF' + +* Receive protocol menu +L0734 fdb 111 # bytes this message + fcc ' SuperComm File Receive' + fcb C$CR,C$LF,C$LF + fcc ' ASCII Receive' + fcb C$CR,C$LF + fcc ' XModem (and X-1k)' + fcb C$CR,C$LF + fcc ' YModem Batch' + fcb C$CR,C$LF + fcc ' ZModem (external)' + +* File send menu +L07A5 fdb 123 # bytes this message + fcc ' SuperComm File Send' + fcb C$CR,C$LF,C$LF + fcc ' ASCII Send' + fcb C$CR,C$LF + fcc ' XModem (and CRC)' + fcb C$CR,C$LF + fcc ' Xmodem 1K' + fcb C$CR,C$LF + fcc ' YModem Batch' + fcb C$CR,C$LF + fcc ' ZModem (external)' + +* Options menu +L0821 fdb 147 # bytes this message + fcc ' SuperComm Options' + fcb $1B,$25,5,2,14,12 CWArea from 5,2 to 19,14 + fcc 'Echo' + fcb C$CR,C$LF + fcc 'L-Feeds Rx' + fcb C$CR,C$LF + fcc 'L-Feeds Tx' + fcb C$CR,C$LF + fcc 'Click' + fcb C$CR,C$LF + fcc 'Word Length' + fcb C$CR,C$LF + fcc 'Parity' + fcb C$CR,C$LF + fcc 'Stop Bits' + fcb C$CR,C$LF + fcc 'Echo (host)' + fcb C$CR,C$LF + fcc 'Hang Up' + fcb C$CR,C$LF + fcc 'Auto Zmodem' + fcb C$CR,C$LF + fcc 'Auto Ascii' + fcb C$CR,C$LF + fcb $1B,$25,0,0,22,14 CWArea from 0,0 to 22,14 + +* Re-saving Supercomm message +L08B6 fdb 23 # bytes this message + fcb C$CR,C$LF + fcc ' Saving SuperComm...' + +L08CF fdb 23 # bytes this message + fcb C$FORM Clear screen + fcb $02,$29,$20 CurXY @ 9,0 + fcc 'File Capture System' + +L08E8 fdb 38 # bytes this message + fcc '"' + fcb $02,$21,$24 CurXY @ 1,4 + fcc 'is already open. Close it? (Y/n) ' + +L0910 fdb 19 # bytes this message + fcb $02,$2b,$22 CurXY @ 11,2 + fcb $03 Erase current line + fcc 'Send ASCII file' + +L0925 fdb 4 # bytes this message + fcb $02,$21,$22 CurXY @ 1,2 + fcc '"' + +L092B fdb 51 # bytes this message + fcb $02,$29,$20 CurXY @ 9,0 + fcc 'File already exists!' + fcb $02,$26,$22 CurXY @ 6,2 + fcc 'ppend or verwrite? ' + +* Buffer open indicator +L0960 fdb 11 # bytes this message + fcb $02,$6e,$20 CurXY @ 78,0 + fcb $1F,$24 Blinking on + fcb $1B,$32,3 Foreground color=3 + fcc 'B' + fcb $1F,$25 Blinking off + +* Buffer closed indicator +L096D fdb 10 # bytes this message + fcb $02,$6e,$20 CurXY @ 78,0 + fcb $1B,$32,0 Foreground color=0 + fcc 'B' + fcb $1B,$32,3 Foreground color=3 + +L0979 fdb 4 # bytes this message + fcc 'DTR' + fcb $04 Clear to end of line + +L0985 fdb 4 # bytes this message + fcc 'Off' + fcb $04 Clear to end of line + +L098B fdb 3 # bytes this message + fcc 'On' + fcb $04 Clear to end of line + +L0990 fcc ' ' +L0991 fcc 'Mark' +L0995 fcc 'Space' +L099A fcc ' ' +L099B fcc 'Even' +L099F fcc ' ' +L09A0 fcc 'Odd ' +L09A4 fcc ' ' +L09A5 fcc 'None' + +L09A9 fdb 54 # bytes this message + fcb $02,$28,$20 CurXY @ 8,0 + fcc 'Change Data Directory' + fcb $02,$29,$25 CurXY @ 9,5 + fcc '(use full pathname)' + fcb $02,$21,$24 CurXY @ 1,4 + fcc 'Path:' + +L09E1 fcb $02,$20,$20 + fcc / / + +L09E8 fcb $02,$20,$20 CurXY @ 0,0 + fcc 'Conf' + +L09EF fcb $1B,$25,0,1,80,2 CWArea to 0,1 to 80,3 + +* Table for converting long Integers (used for file size printing) +* Will handle sizes up to 9,999,999 bytes +L09F5 fdb $000F,$4240 1,000,000 + fdb $0001,$86A0 100,000 + fdb $0000,$2710 10,000 + fdb $0000,$03E8 1,000 + fdb $0000,$0064 100 + fdb $0000,$000A 10 + fdb $0000,$0001 1 + fdb $0000,$0001 0 + +L0A15 fcb $0E + +* Acceptable entries on help screen +L0A16 fcc 'ABCDHIMOQRSTUZ' + +* Default option switches +L0A24 fcb $04 default word length, stop bits & baud rate + fcb $02 + fcb $00 echo + fcb $00 linefeeds Rx + fcb $00 linefeeds Tx + fcb $00 key click + fcb $00 hangup method + fcb $00 parity + fcb $00 auto ASCII (0=Off) + fcb $00 auto ZModem (0=On) + fcb $11 default XON value + fcb $13 default XOFF value + fcb $00 echo (host) + +L0A31 fcs '/dd/sys/dial' + fcc ' ' + +L0A51 fcc '/dd' + fcb C$CR + fcc ' ' + +**************************** +* Main Entry point +* Note: Eventually change to use Ext. addressing +start stx u0C84 save monitor type + ora >u0C84 ??? OR with 0? + sta u0D19 + ldd #$1B32 Foreground color prefix + std u0C8F + ldd #$1609 get overlay size + std >u0C91 + lbsr L1C81 place overlay window on screen + leax L006F,pc point to title #1 + lbsr L1B03 print it + lbsr L1AE8 init small window on top line + ldx #$001C get sleep time + lbsr L0F56 sleep for title pause + ldd #$3210 get overlay start co-ordinates + std >u0C8F + ldd #$1304 get overlay size + std >u0C91 + lbsr L1C81 place overlay on screen + leax L00C6,pc point to title #2 + lbsr L1B03 print it + lbsr L3BBC copy current seconds +L0BF7 ldd #SS.Ready Get code to check data ready on Std In + os9 I$GetStt any data from keyboard? + bcc L0C08 yes, skip ahead + lbsr L3BDA check timeout + cmpa #$0A did it timeout? + blo L0BF7 no, try again + bra L0C0B + +L0C08 lbsr L2AC5 purge the data from keyboard +L0C0B lbsr L1CDE remove overlay windows + lbsr L1CDE + leax L048B,pc point to CurOn + lbsr L1B03 do it + lda #UPDAT. get mode for modem path + ldx #u002D point to modem path + os9 I$Open open it + lbcs L0F15 If error, exit with it + sta u0CA8 Auto line feed on? + beq L0C9C No, go save char in output buffer +* NOTE: CHANGE 140E TO ONLY PSHS A, ONLY LDA u0C95,u ETC. + lbsr L140E Go bump Y coord down by 1 for auto-lf on CR + inc chars& chars >128, don't save in buffer? +L0CE4 dec u0C8A Are we processing an sequence? + lbne L0D9F yes, go to ANSI processor + lda ,x+ get data + cmpa #C$SPAC printable? + blo L0D13 no, check control codes + cmpa #$80 Hi bit char? + blo L0D0A No, save it in out buffer + lda #'* Yes, replace with '*' +L0D0A lbsr L13CF update internal cursor position +L0D0D sta ,y+ Save char in buffer +L0D0F decb + bne L0CF6 + rts + +L0D13 cmpa #C$BSP is it backspace? + beq L0D31 yes, go process + cmpa #C$CR is it carriage return? + beq L0D42 yes, go process + cmpa #C$LF is it line feed? + beq L0D58 yes, go process + cmpa #C$FORM Clear screen? + beq L0D5D Yes, go process + cmpa #C$BELL - Bell? + beq L0D0A Yes, go process + cmpa #C$EOF ? + beq L0D62 Yes, ANSI code coming...go set up +L0D2B dec u0C94 get cursor X position + cmpa #$01 Already at far left side? + puls a Restore char + beq L0D2B Already @ left side, eat char & continue + dec >u0C94 Bump X cursor coord left by 1 + bra L0D0D continue processing + +* Process carriage return +L0D42 lbsr L1405 Reset X coord to 1 + tst >u0CA8 Auto LF on? + beq L0D0D No, go save CR + lbsr L140E Yes, bump up Y coord by 1 + inc +L0D62 inc >u0C8A flag received + clr >u0C8B + lda #$FF ??? Init ANSI convert buffer to empty + pshs x Save converted output buffer ptr + ldx #u0C60 ??? Point to ANSI convert buffer? + stx >u0C80 Save ptr + clr ,x Clear our 2 of ANSI convert bytes + clr 1,x + sta 2,x Flag end of ANSI convert buffer + ldx #u0B0D Point to start of ANSI seq. bffr (no ESC) + stx >u0C8D Save ptr to it + dec u0C8D get ANSI sequence buffer ptr + lda ,x+ get character + sta ,u+ save it into ANSI sequence buffer + stu >u0C8D save updated ANSI sequence buffer ptr + cmpa #'[ the start char? + beq L0DB9 yes, continue + cmpa #'@ printable char? + bhi L0DC0 yes, check for finish +L0DB9 dec -[) +L0DC0 clr >u0C8A Clear out ANSI sequence found flag??? + sta >u0C8C Save char + dec u0C80 Get ptr to converted ANSI buffer + lda #$FF Flag as unused for now + sta ,y + ldy #u0C60 Point to converted ANSI buffer + sty >u0C80 + ldy #u0B0D+1 Point to Start of ANSI sequence buffer (no ESC)+1 + sty >u0C8D Save ptr +L0DEE lda ,y+ Get char + cmpa #$40 '@' + bhi L0E3B Letter or higher, go do + cmpa #$3A ':' + blo L0DFC Possible ASCII numeric, skip ahead + ldb #$FE + bra L0E19 + +L0DFC suba #$30 Drop possible numeric down to binary equivalent + sta >u0C84 Save it + lda ,y+ Get next char + cmpa #'9 above numeric? + bhi L0E33 Yes, skip ahead + suba #$30 Bump down to binary version + sta >u0C85 Save it + lda >u0C84 Get 1st one again (10's digit) + ldb #10 Multiply by 10 + mul + addb -1,y Add in one's digit + subb #$30 +L0E19 pshs x + ldx >u0C80 + stb ,x+ + ldb #$FF + stb ,x + stb 1,x + stb 2,x + stx >u0C80 + puls x + bra L0DEE + +L0E33 leay -1,y + ldb >u0C84 + bra L0E19 + +L0E3B puls y,b + lda >u0C8C + cmpa #$6D m + beq L0E84 + cmpa #$4A J + lbeq L10E2 + cmpa #$66 f + lbeq L1467 + cmpa #$48 H + lbeq L1467 + cmpa #$43 C + lbeq L14B0 + cmpa #$44 D + lbeq L14F4 + cmpa #$41 A + lbeq L151D + cmpa #$42 B + lbeq L1546 + cmpa #$73 s + lbeq L1433 + cmpa #$75 u + lbeq L1442 + cmpa #$4B K + lbeq L1102 + lbra L0D0F + +L0E84 pshs x,d + ldx #u0C60 +L0E8A lda ,x+ + cmpa #$FF + beq L0EA6 + tsta + beq L0EDD + cmpa #$01 + beq L0E8A + cmpa #$08 + blo L0EAB + cmpa #$26 + blo L0EB3 + cmpa #$30 + blo L0EC8 + bra L0E8A + +L0EA6 puls x,d + lbra L0D0F + +L0EAB pshs x + leax >L03E6,pc + bra L0EE3 + +L0EB3 ldb L040E,pc + bra L0EE3 + +L0EC8 ldb L0436,pc + bra L0EE3 + +L0EDD pshs x + leax >L03D6,pc +L0EE3 ldb #5 + mul + leax b,x + lbsr L10D2 + puls x + bra L0E8A + +L0EEF lda L031A,pc + sty L031A,pc + sty u0CA0 + bra L10CB + +L10C7 clr >u0CA0 +L10CB lda #$FF + sta L0464,pc + bsr L10D2 +L10F4 lbra L0EA6 + +L10F7 leax >L045E,pc + bsr L10D2 + lbsr L1422 + bra L10F4 + +L1102 pshs x,d + leax >L0461,pc + bsr L10D2 + lbra L0EA6 + +* Print help screen +* Entry: None +L110D ldd #$1A01 get overlay start co-ordinates + std >u0C8F + ldd #$340D get overlay size + std >u0C91 + lbsr L1C81 place overlay + leax L0109,pc point to help screen text + lbsr L1B03 print it + leax L048F,pc turn off cursor + lbsr L1B03 +L112C lbsr L2AC5 wait for a keypress + cmpa #$20 was it space? + beq L116B yes, clean up & return + cmpa #$05 + beq L116B yes, clean up & return + cmpa #$0C + bne L113F +L113B adda #$80 + bra L1156 + +L113F cmpa #$0A + beq L113B + ldb L0A15,pc get # commands possible + leax L0A16,pc point to command table +L114B cmpa ,x+ find it? + beq L1154 yes, go parse it + decb done? + bne L114B no, keep looking + bra L112C not legal, go wait for new keypress + +L1154 adda #$A0 +L1156 pshs a + leax L03C4,pc get rid of overlay + lbsr L1B03 + leax L048B,pc turn cursor on + lbsr L1B03 + puls a restore command + lbra L1597 go parse command + +L116B leax L03C4,pc get rid of overlays + lbsr L1B03 + lbsr L1BAD purge all remaining keyboard data + leax L048B,pc turn cursor on + lbsr L1B03 + lbra L0C5E return to main loop + +* Get modem path options +L117F pshs x,d Preserve regs used + lda u0CA5 get baud + stb PD.BAU-PD.OPT,x + ldb PD.PAR-PD.OPT,x + andb #$0F + orb >u0CAC + stb PD.PAR-PD.OPT,x + ldb >u0CAF + stb PD.XON-PD.OPT,x + ldb >u0CB0 + stb PD.XOFF-PD.OPT,x + ldb >u0CB1 + stb PD.EKO-PD.OPT,x + ldb >u0CA9 + stb PD.ALF-PD.OPT,x + clr PD.PAU-PD.OPT,x + leax PD.BSP-PD.OPT,x + ldd #$000a Clear 10 bytes from BSP to BSE +L11C8 sta ,x+ + decb + bne L11C8 + lda u0CA5 get baud rate + anda #$07 keep only baud bits + ldb #5 get length of baud text entrys + mul calculate offset + leax L0652,pc point to baud rate text table + leax b,x point to baud rate + ldy #5 get length + lda u0CA5 + bitb #$20 + bne L122D + ldb #'8 + bra L122F + +L122D ldb #'7 +L122F ldx #u0044 + stb ,x + ldy #1 + os9 I$Write + ldb #$63 + ldx #u0095 + stb 1,x + ldy #3 + lda u0CAC + anda #$E0 + cmpa #$A0 + bne L125D + leax L0991,pc point to 'Mark' + bra L127F go print it + +L125D cmpa #$E0 + bne L1267 + leax L0995,pc point to 'Space' + bra L127F go print it + +L1267 cmpa #$60 + bne L1271 + leax L099B,pc point to 'Even' + bra L127F go print it +L1271 cmpa #$20 + bne L127B + leax L09A0,pc point to 'Odd' + bra L127F go print it + +L127B leax L09A5,pc point to 'None' +L127F lda u0CA5 + bpl L12A5 + ldb #'2 + bra L12A7 + +L12A5 ldb #'1 +L12A7 ldx #u0044 + stb ,x + ldy #1 + os9 I$Write +L12B3 puls d,x,y,pc + +* Setup path options for local keyboard to communicate with modems +* Entry: None +L12B5 pshs d,x,y + ldx #u13A9 point to a buffer + ldy #u0C0C point to original path options + ldb #$20 get size + lbsr L2D26 move it + ldx #u13A9 point to the buffer + clr PD.EKO-PD.OPT,x turn off echo + lda >u0CA8 + sta PD.ALF-PD.OPT,x save linefeed stat + clr PD.PAU-PD.OPT,x turn off pause + lda >u13A3 + sta PD.EOF-PD.OPT,x save EOF char + lda >u13A6 + sta PD.PSC-PD.OPT,x save pause char + lda >u13A4 + sta PD.INT-PD.OPT,x save interupt char + lda >u13A5 + sta PD.QUT-PD.OPT,x save quit char + ldd #1*256+SS.Opt Set the options + os9 I$SetStt + puls d,x,y,pc + +* Get current window settings +* +* Entry: None +L12F5 pshs d,x Preserve regs + ldd #SS.Opt Get option section path dsc. for Std In + ldx #u0C0C Buffer to hold option packet + os9 I$GetStt Get current option settings + lda PD.PAR-PD.OPT,x Get current parity (window type) + bpl L1348 If not a window, exit with error + ldd #1*256+SS.FBRgs Get fore/background/border regs from Std Out + os9 I$GetStt + std L0469,pc Point to main window DWEnd/DWSet + ldb #16 Copy 16 bytes (?) + ldx #u13A9 + lbsr L2D26 + ldx #u13A9 + lda L03A7,pc Inverse,Underline,Blink OFF/CLS + lbra L1B03 Will RTS from there + +* Add 1 to current cursor position (next line if needed) +L13CF pshs d + ldd >u0C94 get current position + inca add 1 to X + cmpa u0C94 save new position + puls d,pc restore & return + +* Subtract 1 from current cursor position +L13EC pshs d + ldd >u0C94 get current cursor position + deca subtract 1 from X + bne L13FF minimum? + lda u0C94 save new position + puls d,pc restore & return + +L1405 clr >u0C94 reset X position + inc >u0C94 add 1 + rts + +* Bump Y coord to next line down +L140E pshs a Preserve reg we use + lda >u0C95 Get current Y coord + inca Bump up + cmpa u0C95 Save new Y coord + puls pc,a Restore & return + +L1422 pshs d Preserve regs + ldd #$0101 Upper left corner of screen + std >u0C94 Save coords + puls pc,d Restore D & return + +L1433 pshs d + ldd >u0C94 + std >u0C96 + puls d + lbra L0D0F + +L1442 pshs d + lda #$02 + sta ,y+ + ldd >u0C96 + std >u0C94 + adda #$1F Bump X&Y coords to base $20 + addb #$1F + std ,y++ + ldb u0C94 + adda #$1F + sta ,y+ + lda ,x + beq L1497 + cmpa u0C95 + adda #$1F + sta ,y+ + ldb u0C94 + cmpa u0C94 +L14D5 ldb #$02 + stb ,y+ + ldd >u0C94 + adda #$1F Bump up since base=$20 (both coords) + addb #$1F + std ,y++ Save new coords + ldb u0C84 + lda >u0C94 + suba >u0C84 + bgt L1517 + lda #$01 +L1517 sta >u0C94 + bra L14D5 + +L151D pshs x,d + ldx #u0C60 + lda ,x + cmpa u0C84 + lda >u0C95 + suba >u0C84 + bgt L1540 + lda #$01 +L1540 sta >u0C95 + bra L14D5 + +L1546 pshs x,d + ldx #u0C60 + lda ,x + cmpa u0C95 + cmpa u0C95 + bra L14D5 + +L156E clra Std In + ldy #$0001 + ldx #u060E + os9 I$Read +* NOTE: SHOULD BE ABLE TO CHANGE SOME OF THE LDB u060E + clr >u060E + ldb >u0CA6 + cmpb #2 + lbeq L21F0 +* Check special command keys +L1597 cmpa #$1A download a file? (PgDn) + bne L15A5 no, check upload + ldb u04EF + tst >u0CAA key click on? + beq L1675 no, skip ahead + ldd #1*256+SS.Tone Tone to Std Out + ldx #$2801 + ldy #$0900 + os9 I$SetStt +L1675 ldy #$0001 + ldx #u04EF + lda ,x + cmpa #C$CR + bne L168F + tst >u0CA9 + beq L168F + lda #$0A + sta 1,x + leay 1,y +L168F lda u04EF + bmi L16C8 + lda >u0CA7 + beq L16C8 + tst >u0CA8 + beq L16BB + lda >u04EF + cmpa #C$CR + bne L16BB + lda #$0A + sta >u04F0 + ldy #$0002 + bra L16BF + +L16BB ldy #$0001 +L16BF ldx #u04EF + lda #$01 + os9 I$Write +L16C8 lbra L0C5E + +* Reset palettes (ALT-R) +* Entry: None +L16CB pshs a,x,y preserve regs + leax L03D6,pc reset window codes + lbsr L1B03 + lbsr L1C57 set palettes per terminal type + puls a,x,y restore regs + lbra L0C5E go back to main loop + +* Shell Access (ALT-S) +L16DC pshs u preserve data area pointer + lbsr L134D reset path options + ldb #$13 + leay L03B2,pc point to overlay for shell + ldx #u13A9 point to buffer + lbsr L2D26 move 'em + ldx #u13A9 point to buffer + lda or size B is reached + sta ,y+ + cmpa #C$SPAC + beq L175B + decb + bne L1750 +L175B rts + +* Toggle On-Line timer (ALT-I) +L175C tst u0C8F + ldd #$400A get overlay size + std >u0C91 + lbsr L1C81 place overlay + leax >L02F0,pc point to 'Zmodem file receive...' + lbsr L1B03 print it + leax >L048F,pc turn off cursor + lbsr L1B03 + ldx #u13A9 point to a buffer + ldd #1*256+SS.Opt Get path options for Std Out + os9 I$GetStt + ldx #u13A9 + ldd #$0100 SS.Opt for Std Out & settings below + sta $05,x + stb $07,x + os9 I$SetStt Set them + clra Duplicate window path + os9 I$Dup + sta L02E9,pc point to parameters for RZ + leax >L02E6,pc point to RZ + ldy #$000A get size of parameters + ldd #$1100 Type/Lang & default mem size + os9 F$Fork Call RZ + ldu #$0000 + pshs cc + sta u13A9 + cmpa #$05 + bne L1836 + lbsr L197B +L1836 os9 F$Wait + bcs L1846 + cmpa L048B,pc + lbsr L1B03 + lbsr L12B5 + lbsr L1BAD + lbra L0C5E + +* Send file via ZModem +L1859 ldd #$0802 get overlay start co-ordinates + std >u0C8F save 'em + ldd #$400A get overlay size + std >u0C91 save 'em + lbsr L1C81 place overlay + leax L0322,pc point to 'External ZModem file send' + lbsr L1B03 print it + ldy #u070D point to parameter buffer + sty u13A9 + cmpa #$05 + bne L1958 + bsr L197B +L1958 os9 F$Wait + bcs L1968 + cmpa u0C8F + ldd #$0E03 + std >u0C91 + lbsr L1C81 + leax >L048F,pc + lbsr L1B03 + leax >L0349,pc + lbsr L1B03 + tst >u0CAB + bne L19E2 + tst L0981,pc point to '+++' + ldy #$0001 + os9 I$Write + ldx #$000C + lbsr L0F56 + decb + bne L19E7 + ldx #$0080 + lbsr L0F56 + leax >L02DC,pc point to 'ATH' + ldy #$0004 + os9 I$Write +L1A0C lbsr L1CDE + leax >L048B,pc + lbsr L1B03 + lbra L0C5E + +L1A19 pshs y,x,d + ldx #u131C + bra L1A2E + +L1A21 pshs y,x,d + suba #$B1 + ldb #$80 + mul + ldx #u0D1C + leax d,x +L1A2E pshs x + clrb +L1A31 lda ,x+ + incb + cmpb #$80 Hi bit set char? + bhi L1A3C Yes, skip ahead + cmpa #C$CR Carriage return? + bne L1A31 +L1A3C decb + clra + puls x + tstb + beq L1A4F +L1A43 lda ,x+ + decb + cmpa #'\ + beq L1A5D + bsr L1A76 +L1A4C tstb + bne L1A43 +L1A4F puls pc,y,x,d + +L1A51 pshs x + ldx #$001E + lbsr L0F56 + puls x + bra L1A4C + +L1A5D lda ,x+ + decb + cmpa #'^ + beq L1A72 + cmpa #'* + beq L1A51 + cmpa #'\ + beq L1A6E + suba #$40 +L1A6E bsr L1A76 + bra L1A4C + +L1A72 lda #$1B ? + bra L1A6E + +* Write char in A to modem +L1A76 pshs y,x,a Preserve regs + leax ,s Point X to char to write + ldy #$0001 Write char out to modem + lda u0C84 Save copy + sta 8,x Save in DWSet command + sta u0C84 Save copy + sta 6,x save it into DWSet + sta u0C84 get current height + deca subtract 1 + cmpa #10 do we have any room? + bhi L1AB5 yes, try again + comb set carry + ldb #E$IWDef Illegal Window Definition error + bra L1AD6 return with error + +L1AE8 leax L0467,pc Point to '/w' + lda #WRITE. + os9 I$Open Open path to new window + sta L0477,pc Point to DWSet for status line window + ldy #$000A + os9 I$Write + rts + +* Generic WRITE routine +L1B03 lda #$01 Std out path +L1B05 ldy ,x++ Get length to write + os9 I$Write Write it out + rts + +* NOTE: SHOULD MOVE THESE ROUTINES? +L1B0C bsr L1B1D + cmpa #'y + lbeq L0EEF + cmpa #'Y + lbeq L0EEF + lbra L0C5E + +L1B1D pshs y + ldd #$1D04 + std >u0C8F + ldd #$1603 + std >u0C91 + lbsr L1C81 + leax >L0499,pc + bsr L1B03 + leax >L048F,pc + bsr L1B03 + lbsr L2ABC + pshs a + leax >L048B,pc + bsr L1B03 + lbsr L1CDE + puls pc,y,a + +L1B4E pshs x,b + ldx #u0C99 + os9 F$Time + lda $05,x Get seconds + ldx #$0002 Sleep for 2 tics + os9 F$Sleep + puls pc,x,b + +* Get input string locally +* Entry: B=Count? +L1B61 pshs d,x,y + clr -<1-8> function key init routine +L1BC7 pshs x,d + ldb #$08 # function keys to init + ldx #u0D1C Point to start of -<1> key buffer + lda #C$CR +L1BD1 sta ,x Save 2 CR's as default for each key + sta 1,x + leax >$0080,x Move to next key + decb Do until all function keys initialized + bne L1BD1 + puls pc,x,d + +* TAB HANDLER GOES HERE (CHR$(9)) +* L1BDE rts + +L1BDF lda L0371,pc Point to a set of palettes for monochrome + bra L1C16 + +* Monitor type is color (comp or RGB) +L1BEC tst >u0CA6 Check current terminal type + bne L1C12 If Not TTY, skip ahead +* TTY: Color + leay >L0391,pc Point to OS9 terminal type palette defaults + ldd #$0601 Reset some stored colors + std L0381,pc Point to ANSI terminal type palette defaults +L1C16 ldd #$0504 + std u0CA6 + bne L1C6C + leax >L03A4,pc + bra L1C70 + +L1C6C leax >L03A1,pc +L1C70 lda ,x + lbsr L2347 + lda $01,x + lbsr L233B + lda $02,x + lbsr L2341 + puls pc,x,a + +* Generic shadowed overlay window set routine +* Uses 9 byte buffer from u13A9 to hold OWSet command +* u0C8F : Start X,Y coords +* u0C91 : X,Y width +L1C81 pshs y,x,d Preserve regs + ldx #u13A9 Point to buffer + ldd #$1B22 OWSet prefix (Draw shadow part of overlay) + std ,x + lda #$01 Save switch on + sta 2,x + ldd >u0C8F Get start coords + adda #$01 Bump up by 1 + addb #$01 + std 3,x Save in string + ldd >u0C91 Get width & height + std 5,x Save in string + ldb >u0085 Get bckground color + clra Foreground color=0 + std 7,x Save in string + lda #$01 Pop overlay window onto screen + ldy #$0009 + os9 I$Write + ldd #$1B22 Now, draw main overlay window + std ,x + lda #$01 + sta $02,x + ldd >u0C8F + std 3,x + ldd >u0C91 + std 5,x + lda - Baud rate +L1D2F pshs y,x,d + leax >L048F,pc Cursor OFF + lbsr L1B03 + ldd #$1E03 Set start coords & size of overlay window + std >u0C8F + ldd #$1203 + std >u0C91 + lbsr L1C81 Put shadowed overlay on screen + leax u0CA5 Get word len/stop bits/baud rate + andb #%00000111 Just want baud rate +L1D56 stb >u0C84 Save baud rate + leax u0C84 + mul + leax d,x + lda #$01 Write it out + ldy #$0005 + os9 I$Write +L1D7D lbsr L2ABC ??? + cmpa #C$CR Carriage return? + beq L1D9B Yes, skip ahead + cmpa #$05 - (BREAK)? + beq L1D9B Yes, skip ahead + cmpa #C$SPAC (next baud)? + bne L1D7D No, go get another key since current is illegal + ldb >u0C84 Get baud rate + incb Bump up to next one + cmpb #8 Wrap past 19200? + bne L1D56 No, go update baud rate on screen + clrb Reset baud to 110 + bra L1D56 Go update baud rate on screen + +L1D9B ldb >u0CA5 Get stop bits/word len/baud rate + andb #%11111000 Mask out the baud rate + orb >u0C84 Merge new baud rate + stb >u0CA5 Save as new setting + lbsr L1CDE Remove overlay windows + lbsr L118F Update port settings & status line + leax >L048B,pc Turn cursor ON + lbsr L1B03 + puls pc,y,x,d Restore & return + +* ==> Menu handler +* Entry: B=current menu # (0 base) selected +* u0C84 : current menu # selected +* u139E : Max. # items on menu +L1DB8 pshs y,x,a Preserve regs + clr >u0099 + stb >u0C84 Save current menu item # selected + ldx #u13A9 Point to temp buffer + ldd #$1B25 CWArea prefix + std ,x Save it + ldd #$0102 Start X,Y = 1,2 + std 2,x + lda #$04 Width=4 + ldb >u139E Height=# entries in menu (0 base) + incb +1 + std 4,x Save it + lda #$01 Change working area of window + ldy #$0006 + os9 I$Write + ldb >u0C84 Get B back +L1DE6 clra D=B+1 + incb + tfr d,y Move to Y + leax >L0688,pc Clear working area & print Y # line feeds + inca A=1 (Std Out) + os9 I$Write + leax >L0693,pc Point to '==>' cursor + ldy #$0003 Write that out + os9 I$Write +L1DFE lbsr L2AC5 Go get key + anda #$7F Mask out high bit + cmpa #C$LF Down arrow? + beq L1E19 Yes, skip ahead + cmpa #C$FORM Up arrow? + beq L1E2B Yes, skip ahead + cmpa #C$SPAC Space bar? + beq L1E39 Yes, get menu item selected & exit + cmpa #$05 - or ? + beq L1E3F + cmpa #C$CR Carriage return? + bne L1DFE No, other keys illegal: go get another key +L1E4A inc u0C84 Get menu item # selected + puls pc,y,x,a Restore regs & return + +* Down arrow in ==> menu +L1E19 ldb >u0C84 Get current menu # + incb Bump up + cmpb >u139E Past maximum + blo L1E25 No, skip ahead + clrb Reset to menu item #0 +L1E25 stb >u0C84 Save new menu item selected + bra L1DE6 Update menu arrow & get next key + +* Up arrow in ==> menu +L1E2B ldb >u0C84 Get current menu # + decb Bump down + bpl L1E25 If still legit, save it & update menu arrow + ldb >u139E Get # items in menu + decb Make base 0 + bra L1E25 Save & update menu arrow + +* - / +L1E3F ldb >u139E Get # items in menu + incb +1 (to flag cancel?) + stb >u0C84 Save as current menu item selected + puls pc,y,x,a Restore & return + +* Select terminal type (-) +L1E50 pshs y,x,d Preserve regs + leax >L048F,pc Cursor OFF + lbsr L1B03 + ldd #$1C03 Set up shadowed overlay window 23x3 + std >u0C8F + ldd #$1703 + std >u0C91 + lbsr L1C81 + leax >L0696,pc 'Terminal type' + lbsr L1B03 + ldb >u0CA6 Get current terminal type +L1E75 stb >u0C84 Save as # entries in menu + leax >L03CA,pc Point to Backspaces + lda #$01 Blank out 5 chars + ldy #$0005 + os9 I$Write + leax >L06B0,pc Point to terminal type table + lda #$05 Calculate offset to currently selected type + ldb >u0C84 + mul + leax d,x + ldy #$0005 Print it out + lda #$01 + os9 I$Write +L1E9C lbsr L2ABC Go get keypress + cmpa #C$CR Carriage return (keep new setting)? + beq L1EBA Yes, go process + cmpa #$05 - or ? + beq L1EBA Yes, go process + cmpa #C$SPAC (change setting)? + bne L1E9C No, illegal key, try again + ldb >u0C84 Get terminal type + incb Bump up to next one + cmpb #3 Past maximum? + bne L1E75 No, go print new selection & back to menu handler + clrb Reset to 1st & back to menu handler + bra L1E75 + +L1EBA ldb >u0C84 Get selected terminal type + stb >u0CA6 Save as new terminal type + lbsr L1BDF Go reset palettes for new terminal type + lbsr L1CDE Remove overlay windows + lbsr L1C57 Go set fore/back/border colors + bsr L1EDC Go clear the screen + tst L048B,pc Cursor ON + lbsr L1B03 + puls pc,y,x,d Restore & return + +* Clear screen +L1EDC pshs a Preserve A + lda #C$FORM Clear screen code + bsr L1F0B Write it out + puls pc,a Restore & return + +* Setup conference mode again +L1EE5 pshs y,x,d Preserve regs + ldx #u13A9 Point to buffer + ldd #$1B25 CWArea prefix + std ,x + ldd #$0000 Start @ 0,0 + std 2,x + ldd #$5003 80x3 size + std 4,x + lda #1 Home Cursor + sta 6,x + ldy #$0007 Send CWArea/Home cursor to conference window + lda - Options menu +L1F1D pshs y,x,d Preserve regs + leax L048F,pc Cursor OFF + lbsr L1B03 + ldd #$1F03 Do shadowed overlay of 31x3 + std >u0C8F + ldd #$160E + std >u0C91 + lbsr L1C81 + leax L0821,pc Print out Options menu + lbsr L1B03 + lbsr L20DB Print Echo status + lbsr L2108 Print Rx LF status + lbsr L2118 Print Tx LF status + lbsr L20F8 Print Key click status + lbsr L21D5 Print Word Length setting + lbsr L2174 Print Parity setting + lbsr L21B9 Print Stop bits setting + lbsr L2128 Print Host Echo setting + lbsr L2138 Print Hangup type setting + lbsr L2148 Print Auto-Zmodem setting + lbsr L2158 Print Auto-ASCII setting + lda #$0B Get # items on menu + sta >u139E Save for ==> menu handler + clrb Default to menu item #0 +L1F66 lbsr L1DB8 Go get menu selection + ldx #u13A9 + ldd #$1B25 CWArea + std ,x + ldd #$0000 from 0,0 + std 2,x + ldd #$160E to 22,14 (on overlay window) + std 4,x + ldy #$0006 + lda #$01 + os9 I$Write + tst u0C84 Get menu item # that was changed + cmpb #$0A Was it -/BREAK (1 higher than max)? + lbhi L20CF Yes, remove Options menu & return + tstb Was it Echo status? + bne L1FAB No, try next + lda >u0CA7 Get echo type + bne L1FA7 If 1, change to 0 + inc >u0CA7 If 0, change to 1 + bra L1FAB + +L1FA7 clr >u0CA7 +L1FAB lbsr L20DB Print setting (0=Off, 1=On) + cmpb #$03 + bne L1FC2 + lda >u0CAA + bne L1FBE + inc >u0CAA + bra L1FC2 + +L1FBE clr >u0CAA +L1FC2 lbsr L20F8 + cmpb #$07 + bne L1FD9 + lda >u0CB1 + bne L1FD5 + inc >u0CB1 + bra L1FD9 + +L1FD5 clr >u0CB1 +L1FD9 lbsr L2128 + lbsr L118F + cmpb #$05 + bne L200C + lda >u0CAC + anda #$E0 + tsta + beq L2011 + cmpa #$E0 + beq L2015 + adda #$40 +L1FF3 pshs b + ldb >u0CAC + andb #$1F + stb >u0CAC + puls b + ora >u0CAC + sta >u0CAC + lbsr L118F +L200C lbsr L2174 + bra L2018 + +L2011 adda #$20 + bra L1FF3 + +L2015 clra + bra L1FF3 + +L2018 cmpb #$06 + bne L2032 + lda >u0CA5 + bpl L2026 + anda #$7F + bra L2028 + +L2026 ora #$80 +L2028 sta >u0CA5 + lbsr L118F + lbsr L21B9 +L2032 cmpb #$04 + bne L204E + lda >u0CA5 + bita #$20 + beq L2042 + anda #$DF + bra L2044 + +L2042 ora #$20 +L2044 sta >u0CA5 + lbsr L118F + lbsr L21D5 +L204E cmpb #$01 + bne L2062 + lda >u0CA8 + bne L205E + inc >u0CA8 + bra L2062 + +L205E clr >u0CA8 +L2062 lbsr L2108 + cmpb #$02 + bne L207C + lda >u0CA9 + bne L2075 + inc >u0CA9 + bra L207C + +L2075 clr >u0CA9 + lbsr L118F +L207C lbsr L2118 + cmpb #$08 + bne L2093 + tst >u0CAB + bne L208F + inc >u0CAB + bra L2093 + +L208F clr >u0CAB +L2093 lbsr L2158 + cmpb #$09 + bne L20AA + tst >u0CAE + bne L20A6 + inc >u0CAE + bra L20AA + +L20A6 clr >u0CAE +L20AA lbsr L2148 + cmpb #$0A + bne L20C1 + tst >u0CAD + bne L20BD + inc >u0CAD + bra L20C1 + +L20BD clr >u0CAD +L20C1 bsr L2138 + cmpb #$0A + bhi L20CF + ldb >u0C84 + lbra L1F66 + +L20CF lbsr L1CDE Turn off overlay windows + leax >L048B,pc Point to Cursor On + lbsr L1B03 Print it + puls pc,y,x,d Restore regs & return + +L20DB pshs x,d + ldd #$1102 + lbsr L2294 + lda >u0CA7 +L20E7 bne L20F2 +L20E9 leax >L0985,pc Point to word 'Off' +L20ED lbsr L1B03 Print it + puls pc,x,d + +L20F2 leax >L098B,pc Point to word 'On' + bra L20ED + +L20F8 pshs x,d + ldd #$1105 + lbsr L2294 + lda >u0CAA + bra L20E7 Go print 'on' or 'off' + +L2108 pshs x,d + ldd #$1103 + lbsr L2294 + lda >u0CA8 + bra L20E7 Go print 'on' or 'off' + +L2118 pshs x,d + ldd #$1104 + lbsr L2294 + lda >u0CA9 + bra L20E7 Go print 'on' or 'off' + +L2128 pshs x,d + ldd #$1109 + lbsr L2294 + lda >u0CB1 + bra L20E7 Go print 'on' or 'off' + +L2138 pshs x,d + ldd #$110C + lbsr L2294 + lda >u0CAD + bra L20E7 Go print 'on' or 'off' + +L2148 pshs x,d Preserve regs + ldd #$110B CurXY to 17,11 in options window + lbsr L2294 + lda >u0CAE Get Auto-ZModem flag (0=yes) + deca Adjust flag so routine works + bra L20E7 Go print 'on' or 'off' + +L2158 pshs x,d + ldd #$110A + lbsr L2294 + lda >u0CAB Get current hangup method + bne L216D <>0 is +++ + leax >L0979,pc Point to 'dtr' + bra L20ED + +L097F fdb 4 # bytes this message +L0981 fcc '+++' + fcb 4 (Clear to EOL) + +L216D leax u0CAC + anda #$E0 + cmpa #$A0 + bne L218C + leax >L0990,pc Point to 'Mark' + bra L21AE + +L218C cmpa #$E0 + bne L2196 + leax >L0995,pc Point to 'Space' + bra L21AE + +L2196 cmpa #$60 + bne L21A0 + leax >L099A,pc Point to 'Even' + bra L21AE + +L21A0 cmpa #$20 + bne L21AA + leax >L099F,pc Point to 'Odd' + bra L21AE + +L21AA leax >L09A4,pc Point to 'None' +L21AE lda #$01 Std Out + ldy #$0005 Size of parity string + os9 I$Write Print it out + puls pc,y,x,d + +* Print current Stop bits setting +L21B9 pshs x,d + ldd #$1208 Go position cursor @ 18,8 + lbsr L2294 + lda >u0CA5 Get # stop bits (hi bit) + bpl L21CE + lda #'2 + bra L21D0 + +L21CE lda #'1 +L21D0 lbsr L1F0B + puls pc,x,d + +* Print current Word Length setting +L21D5 pshs x,d + ldd #$1206 Position cursor @ 18,6 + lbsr L2294 + lda >u0CA5 Get word length + bita #$20 + bne L21E9 + lda #'8 + bra L21EB + +L21E9 lda #'7 +L21EB lbsr L1F0B + puls pc,x,d + +L21F0 cmpa #$8C -? + bne L21F8 + ldd #'A*256+9 ANSI/OS9 cursor up codes + bra L2239 + +L21F8 cmpa #$8A -? + bne L2200 + ldd #'B*256+$A ANSI/OS9 cursor down codes + bra L2239 + +L2200 cmpa #$88 -? + bne L2208 + ldd #'D*256+8 ANSI/OS9 cursor left code + bra L2239 + +L2208 cmpa #$89 -? + bne L2210 + ldd #'C*256+6 ANSI/OS9 cursor right code + bra L2239 + +L2210 ldb -? + bne L2221 No, skip ahead + ldd #'H*256+1 ANSI/OS9 Home cursor codes + bra L2239 + +L2221 cmpa #$12 -? + bne L2229 + ldd #'K*256 ANSI end (screen or line?) / No OS9 + bra L2239 + +L2229 cmpa #$10 -? + bne L2231 + ldd #'P*256 ANSI delete char / No OS9 + bra L2239 + +L2231 cmpa #$11 -? + lbne L1597 No, go check for SuperComm special keys + ldd #'@*256 ANSI insert char / No OS9 +L2239 ldx #u04EF Point to buffer for 3 byte ANSI sequence + sta 2,x Save as ANSI post byte + pshs b Save OS9 code until ANSI sequence sent + ldd #$1B5B ANSI prefix: [ + std ,x + lda u0CA7 ??? Check if we have to do local cursor change + lbeq L0C5E No, go back to main processing loop + ldb ,s+ Get OS9 code back + lbeq L0C5E None, return to main processing loop + stb ,x Save it in buffer + lda #1 Std Out (screen) + ldy #$0001 + os9 I$Write Write out OS9 code + lbra L0C5E Return to main processing loop + +* Position cursor at A,B +L2294 pshs y,x,d Preserve regs + ldx #u0095 Point to buffer area + adda #$20 Bump cursor pos. to OS9 equivalent (+$20) + addb #$20 + std $01,x Save OS9 coords + lda #$02 CurXY prefix + sta ,x Save that too + deca A=1 (Std Out) + ldy #$0003 Size of CurXY command + os9 I$Write Position cursor + puls pc,y,x,d Restore regs & return + +* Change Data Directory command +L22B1 pshs y,x,d + ldd #$1504 Place overlay window from 21,4 to 58,11 + std >u0C8F + ldd #$2507 + std >u0C91 + lbsr L1C81 + leax >L051C,pc Point to 'break aborts' + lbsr L1B03 + ldd #$0102 Position cursor @ 1,2 + bsr L2294 + lda #$01 + ldx #u0CD2 Point to current data dir + ldy #$0020 + os9 I$WritLn + ldb #$1F + leax >L09A9,pc Point to 'change data dir' message + lbsr L1B03 + lbsr L1B61 + tst u060E Get first char that user typed in + cmpa #C$CR If just CR, skip ahead + beq L230E + lda #READ. ChgDir in read mode + ldx #u060E Point to user-typed directory path + os9 I$ChgDir Change to it + bcs L2313 Error, skip ahead + ldx #u060E Did it, copy user path list to default path list + ldy #u0CD2 + ldb #$20 + lbsr L2D1E Copy data +L230E lbsr L1CDE Overlay Window end + puls pc,y,x,d Restore & return + +* Print error message to user +L2313 lda #C$BELL Beep at user + lbsr L1F0B + pshs b + ldd #$0D02 CurXY @ 13,2 + lbsr L2294 + leax >L048F,pc Cursor OFF + lbsr L1B03 + puls b + os9 F$PErr Print error message + ldx #60 + lbsr L0F56 ??? (something with Timer) + leax >L048B,pc Cursor ON + lbsr L1B03 + bra L230E Overlay window end & return + +* Change background color to A +L233B pshs y,x,d Preserve regs + ldb #$33 Background color code + bra L234B + +* Change border color to A +L2341 pshs y,x,d Preserve regs + ldb #$34 Border color code + bra L234B + +* Change foreground color to A +L2347 pshs y,x,d Preserve regs + ldb #$32 Foreground color code +L234B ldx #u13A9 Point to temp buffer + sta 2,x Save palette # + lda #$1B OS9 window code prefix + std ,x Save it + lda #1 Std Out + ldy #$0003 Change appropriate color, restore regs & return + os9 I$Write + puls pc,y,x,d + +L2364 tst L096D,pc Point to buffer close string (for status line) + ldx #u13A9 + ldb #12 Copy it + lbsr L2D26 + ldx #u13A9 Get ptr back + lda L0960,pc Point to buffer on string (for status line) + ldx #u13A9 + ldb #13 + lbsr L2D26 + ldx #u13A9 + lda - for X/Ymodem padding to even block +L2443 sta ,x+ + leay -1,y + bne L2443 + +L2449 ldx #u00DF Point to modem buffer + ldd u139C + puls x + ldb #$40 Get max size of Send string +L252D lda ,x+ Copy until CR or 64 chars is hit + cmpa #C$CR + beq L253E + cmpa #'\ Control code? + beq L2544 Yes, process for that +L2537 sta ,y+ + decb + bne L252D + puls pc,y,x,d +L253E clrb + stb ,y +L2541 puls pc,y,x,d + +L2544 lda ,x+ Get code + suba #$40 Knock down to equivalent + bra L2537 Save & continue + +* Entry: X=Ptr to converted text buffer? +L254A pshs y,x,d Preserve regs + ldb u139C Get ptr to ??? +L2555 lda ,x+ Get char + anda #$7F Strip high bit + decb Drop count in buffer + clr u139C Save ptr + puls b Restore count + tst u139C + tst ,y + bne L2582 + lda u0C83 + ldb #$40 + mul + ldy #u111C Point to search strings buffer + leay d,y Point to entry within buffer + sty >u139C Save new SSn string ptr to check + puls pc,y,x,d + +* Deal with RSn buffer strings +L25B1 pshs y,x,d + clr >u0C83 + lda + cmpa #'* 1/2 second pause? + beq L25EA Yes, go do + cmpa #'\ Double '\\'? + beq L2607 Yes, go send '\' + suba #$40 Any others drop by $40 (ctrl chars) +L2607 lbsr L1A76 Send to modem + bra L25E5 Continue until RSn string is done + +L260C lda #C$EOF Send escape code + bra L2607 + +* Copy main DWSet sequence into buffer +L2620 leax >L0469,pc Point to main DWSet + ldy #u13A9 Point to buffer + ldb #$0C 12 bytes to copy + lbra L2D1E Go copy them & return from there + +* - conference mode toggle +L2610 pshs y,x,d Preserve regs +L2612 tst L0467,pc + os9 I$Open + bcs L2612 Error, shut conference mode off & exit + sta L09EF,pc Change working area to use only 2 lines + ldy #$0006 (to keep '---'... line on screen) + os9 I$Write + lbsr L284E Do Inv On/Space/Inv Off/Bsp (WHY???) + leax >L09E8,pc Point to 'Conf' + lda L0475,pc DWEnd the conference window + lda L09E1,pc CurXY @ 0,0 & print 4 spaces + lda u060E Get key read + cmpa #$8C Higher than - ? + lbhi L157B Yes, go check for special (keysense) keys + cmpa #$7F Alt Arrows, etc. ($80-$8c)? + lbhi L0C5E Yes, return to main loop + cmpa #$18 - (SHIFT-BSP)? + bne L2765 No, check next + lda #$7F Yes, replace with real DEL/RUBOUT key + bra L27A1 Go save in buffer @ X + +L2765 cmpa #$1A -/-? + lbeq L157B Yes, go check key-sense bytes + cmpa #$1C -? + lbeq L157B Yes, go check keysense bytes + cmpa #$0A / LF? + lbeq L0C5E Yes, return to main loop + cmpa #$0C / Clear screen? + lbeq L0C5E Yes, return to main loop + cmpa #$09 / Up 1 line? + lbeq L0C5E Yes, return to main loop + cmpa #$08 / BSP? + bne L2796 No, skip ahead +* Backspace + ldb - beep + ldx #u13A9 Write it out + sta ,x + lda #$01 + ldy #$0001 + os9 I$Write + lbra L0C5E Go back to main loop + +L27C6 lda #C$LF Append LF + sta ,x+ + ldb u0CA9 + beq L27D4 + incb Bump up count by 1 +L27D4 clra + tfr d,y Move count to Y + lda u060E + bsr L27FD Process CR + lda #C$LF Stick LF in start of normal keyboard buffer + sta >u060E + bsr L27FD Process LF + lbra L0C5E Return to main loop + +L27FD lda >u060E Get last key read + cmpa #C$CR CR (send line)? + bne L281C No, skip ahead + ldd #$200D Space & CR + ldx #u13A9 Save in temp buffer + std ,x + lda u060E Get key pressed + cmpa #C$CR Is it CR? + bne L284E Yes, skip ahead + rts Otherwise return + +L284E lda L0493,pc + ldy #$0006 + os9 I$Write + rts + +* Filename parse for Batch Receive??? +* YModem Batch (WXModem) header as follows: +* Block # (1 byte) +* Compliment of block # (1 byte) +* Some sort of filename parse: allows upper/lower case, numbers +* Unknown chars are forced to be Underscores (_) +L2860 pshs y,x,d Preserve regs + ldx #u00DF+3 Point 3 bytes into input buffer from modem + pshs x Save ptr to start of list +L2868 lda ,x+ Hunt for 1st 0 byte @ u00E2 + bne L2868 + leax -1,x + pshs x Save ptr to 1st 0 byte + clr ?@ then change to underscore _ + cmpa #'0 + bhs L2874 If 0-9, its fine + cmpa #'. If period, it's fine + beq L2874 + cmpa #'/ Path separator? + beq L28AA Special check +L28A0 lda #'_ Force to be underscore + sta ,x Replace original char in buffer + bra L2874 Continue checking + +* USELESS, CAN ONLY GET CALLED IF CHAR IS CHR$($7B-$7F), AND BACKSLASH IS $5C +* COULD BE USED TO CHANGE PATH SEPARATORS (EX. MS-DOS) TO NORMAL ONES +L28A6 cmpa #'\ Backslash? + bne L28A0 No, force to underscore +* Backslash handler +L28AA leax 1,x Point to char again + lda ,x Get it + beq L28C2 If NUL skip ahead + cmpa #C$CR End of line? + beq L28C2 Yes skip ahead + cmpa #'A Char below alpha? + blo L28BC Yes, skip ahead + cmpa #'_ Underscore? + bne L28C2 No, skip ahead +* Underscore or below A go here - these get replace by 'x' +L28BC leax -1,x Bump ptr back + lda #'x Force char to be 'x' + sta ,x +L28C2 stx 2,s Save ptr as beginning ptr + tst L056B,pc Print 'Recv:' + lbsr L1B03 + ldx #u009F + lda ,x + beq L2938 + cmpa #C$CR + beq L2938 + lda #$01 Std Out + ldy #$0020 + os9 I$WritLn + leax >L048F,pc Cursor OFF + lbsr L1B03 + ldd L0577,pc Print 'Size:' + lbsr L1B03 + ldx #u13AA + ldy #$0007 +L2953 lda ,x + cmpa #'0 + bne L2961 + leax 1,x + leay -1,y + beq L2926 Go create the download file + bra L2953 + +L2961 lda #$01 Write to Std Out + os9 I$Write + bra L2926 + +L2968 pshs y,x,d + ldd #$0000 Init file size to 0 bytes + std L09F5,pc Point to table for decimal conversion + clrb Start at highest level (1,000,000) +* B=Current position to convert (0=1,000,000 1=100,000 etc.) +* X=Ptr to 4 byte integer conversion table +* Y= +L29A8 pshs b,x Preserve digit field # & table ptr + lda #$04 4 bytes / entry (for Long Ints) + mul + leax d,x Point to proper entry + ldb ,s Get which digit we are on + lda b,y + suba #'0 + tfr a,b + beq L29E9 +L29C2 lda 3,x Add 4 byte table to 4 byte longint variable + adda - / was pressed by user +* Entry: None +* Exit: Carry clear if no in keyboard buffer +* Carry set if one was pressed +* All regs preserved +L29EB pshs y,x,d Preserve regs + lbsr L13C2 Go check if any data waiting in keyboard buffer + bcs L2A0F No, skip ahead + clra Yes, put # bytes waiting into Y + tfr d,y + ldx #u060E Point to keyboard buffer + clra Std In + os9 I$Read Go read it in + bcs L2A0F Error, skip ahead + tfr y,d + ldx #u060E Point to beginning of buffer again +L2A06 lda ,x+ Get keypress + cmpa #$05 - / ? + beq L2A12 Yes, exit with carry set + decb Check whole keyboard buffer for it + bne L2A06 +L2A0F clrb No break key, exit with carry clear + puls pc,y,x,d + +L2A12 comb key found, exit with carry set + puls pc,y,x,d + +L2A15 pshs y,x,b Preserve regs + lbsr L3BBC Go update seconds (via VRN if present else CLOCK) +L2A1A bsr L29EB Check if was pressed by user + bcs L2A4C Yes, restore regs & return + lda u04EF Get key pressed + clr >u04EF Clear out the buffer +L2A49 clrb No error & return with char in A + puls pc,y,x,b Restore & return + +L2A4F clra Clear char to NUL? + bra L2A49 Exit with carry clear? + +L2A52 pshs y,x,d Preserve regs + leax >L048B,pc Turn cursor ON + lbsr L1B03 + clrb 1st 32 bytes of screen + ldx #u070D Point to screen output buffer +L2A60 pshs x,b Preserve + bsr L2A81 Print 'File:' & filename + puls x,b Restore ptrs + lda >u060E Get 1st char of filename + cmpa #C$CR Was it CR? + beq L2A78 Yes, go turn cursor back on + tst L048F,pc Turn cursor ON & return + lbsr L1B03 + puls pc,y,x,d + +* Entry: X=Ptr to screen output buffer +* B=??? +L2A81 lda #$20 Each B represents 32 bytes + mul + leax d,x Point that far into screen buffer + pshs x Preserve it + leax L055F,pc point to 'File:' + lbsr L1B03 print it + ldb #30 + lbsr L1B61 Get input string locally (?) + puls x Restore pointer + ldy #u060E Point to where filename is + ldb #32 get length + lbra L2D26 Copy 32 bytes from Y to X (filename into scrn bffr) + +L2AA0 pshs y,x,d + ldb u0C84 Save ptr + tfr x,d Move to D + ldx u13A9 get the descriptor address + leax IT.DLO,x Point to Delete line offset + ldd >u0C84 Get ptr to DAT image + ldy #$0002 Get DELETE line & echo settings + ldu #u0011 Where to put copies of them + os9 F$CpyMem +* NOTE: Should be able to remove this LDU entirely + ldu #$0000 Reset U to normal + rts + +L2B50 pshs y,x,d Preserve regs + ldx #u13A9 Point to temp buffer + ldd #$0253 CurXY to 51,1 + std ,x + lda #$20 + sta $02,x + ldy #$0003 + lda L0481,pc Foreground/background color sets & clear scrn + ldx #u13A9 Buffer to hold + pshs x + ldb #$07 Copy all 3 commands into buffer + lbsr L2D26 + puls x + lda L09E8,pc + ldy #$0007 + os9 I$Write +L2BC0 leay >L00EB,pc Copy 'Supercomm' header into buffer + ldx #u13A9 + ldb #$1E + lbsr L2D26 + ldx #u13A9 Modify colors + lda L09EF,pc Point to CWArea 0,1 to 80,3 string + ldy #u13A9 Point to buffer + ldb #$06 + lbsr L2D1E Copy it + ldx #u13A9 Point to buffer again + clra + sta 3,x Change so CWArea 0,0 to 80,2 + lda #3 + sta 5,x + ldy #$0006 + lda L0481,pc Clear out the conference window + ldx #u13A9 + pshs x + ldb #$07 + lbsr L2D26 + puls x + ldd L09EF,pc Point to CWArea again (from 0,1 to 80,3) + ldy #$0006 Change to new working area + os9 I$Write +L2C71 rts + +* Error with size of file, so set internal vars to indicate size=0 bytes +L2C8D ldd #$0000 Save size as 0 bytes + std L09F5,pc Point to decimal conversion table + pshs x Preserve ptr to buffer for ASCII # + ldd #$3007 Fill buffer with 7 '0's +L2CA4 sta ,x+ + decb + bne L2CA4 + puls x Point to beginnning again + clrb Digit 0 (1,000,000) is where we start +L2CAC pshs y,x,d Preserve regs again + bsr L2CDB Convert the digit + puls y,x,d Restore regs + incb Point to next ASCII converted digit + cmpb #8 Done all of them? + bne L2CAC No, continue + pshs x Save ptr to ASCII string + leax >L0577,pc Print 'Size:' + lbsr L1B03 + puls x Get ptr to ASCII string + ldy #$0007 Size of # +L2CC6 lda ,x Get char + cmpa #'0 Is it a 0? + bne L2CD4 No, can print rest of string + leax 1,x Point to next char in ASCII string + leay -1,y Bump # bytes to print down + bne L2CC6 Still some left, see if they are 0's + puls pc,y,x,d If 0, just exit + +L2CD4 lda #$01 Write the size to Std Out + os9 I$Write + puls pc,y,x,d + +* Entry: Y=Ptr to decimal conversion table +* X=Ptr to 7 byte buffer for ASCII # (up to 9,999,999) +* B=which ASCII # (0-6) (from million to 1) we are currently doing +* Does one digit, adjusting file size in mem down with repeated subtracts +L2CDB leax b,x Point to appropriate table entry in ASC # bffr + clra Calculate which 4 byte longint to try in table + lslb + rola + lslb + rola + leay d,y Point to it +L2CE2 ldd ,y Get MSW of table entry + cmpd 64K, skip ahead + ldd L0652,pc Point to baud rate table + clrb +* NOTE: ELIMINATE F$CMPNAM WITH LOCAL VERSION!!! +L2DB3 pshs y,x,b Preserve regs + ldb #$05 Size to compare + os9 F$CmpNam Check if they match + puls y,x,b Restore regs + bcc L2DC7 They match, skip ahead + leax 5,x Point to next baud rate to check + incb Inc baud rate counter + cmpb #8 Done all 8 possible baud rates + bne L2DB3 No, try next + rts Yes, return + +* Found baud rate match +L2DC7 lda >u0CA5 Get baud/stop bits/word len + anda #%11111000 Keep all but baud + sta >u0CA5 Save result + orb >u0CA5 Merge in baud rate + stb >u0CA5 Save with new baud rate + lbra L118F Go update the status line & return + +* NOTE FIX CMPNAM BELOW TO NOT USE SYSTEM CALL!!! +L2DDD pshs y,x,d Preserve regs + lbsr L2D50 Check for data ready on modem + bcs L2E1B Nope, Exit with carry set + sty L0A24,pc Point to default option settings + ldy #u0CA5 Point to current option settings + ldb #$4D Copy current options, dial directory & + lbsr L2D26 Default dir into code (for init) + ldd #$1603 Set overlay window size to 22x3 + std >u0C91 Save + ldd #$1D04 Start coords @ 29,4 + std >u0C8F + lbsr L1C81 Pop up the overlay window + leax >L048F,pc Cursor OFF + lbsr L1B03 + leax >L08B6,pc Print 'Saving SuperComm' + lbsr L1B03 + bsr L2E3E Re-Calc CRC for supercomm & save it + leax >L048B,pc Turn Cursor ON + lbsr L1B03 + lbsr L1CDE Remove overlay windows + puls pc,y,x,d Restore regs & return + +L2EBF pshs y,x,d + tst L0366,pc Point to default timer string + ldy #u0077 Point to buffer for ASCII timer string + ldb #$0B Copy default into current + lbsr L2D1E + lbsr L0F20 Update the timer on-screen +L2ED8 lbsr L43CA ??? Do something with receive buffer? + tst u0C8F + ldd #$4411 + std >u0C91 + lbsr L1C81 Go put it on screen + lda #$81 + leax >L0A31,pc point to path to dial directory + os9 I$Open + bcs L2F9A + sta u0C98 + lda u131C + lbsr L1EDC + leax >L048F,pc + lbsr L1B03 + lbsr L314B +L2F79 lbsr L1CDE + lbsr L1BDF + lbsr L1C57 + lbsr L1EDC + leax >L048B,pc + lbsr L1B03 + puls y,x,d Restore regs + ldx #u00DF Get ptr to modem buffer + ldy L048F,pc Cursor OFF + lbsr L1B03 + lda #$01 + sta u0C98 + bls L3059 + lda >u0C98 + sta ' + lda #$01 + ldy #$0003 + os9 I$Write + leax >L0693,pc Print '==>' + ldy #$0003 + os9 I$Write +L3090 lbsr L2AC5 + cmpa #$08 + bne L30A7 +L3097 lda u0C98 + sta u0C98 + beq L30E1 + adda #$01 + sta L048B,pc + lbsr L1B03 + puls pc,y,x,d + +L30F6 cmpa #$05 + bne L3090 + clr ' from previous menu selection + lda #$01 + leax >L0682,pc Write out 3 BSP/SPC's to Std Out + ldy #$0006 + os9 I$Write + puls pc,y,x,a + +L3118 pshs y,x,d + ldx #u13A9 + lda ,x + beq L3148 + ldb #$1B +L3124 lda ,x+ + decb + cmpa #'. + beq L3130 +L312B tstb + bne L3124 +L3148 comb + puls pc,y,x,d + +L3130 lda ,x+ + decb + cmpa #'a + bne L312B + lda ,x+ + decb + cmpa #'d + bne L312B + lda ,x+ + decb + cmpa #$E6 + bne L312B + clrb +L3146 puls pc,y,x,d + +L314B pshs y,x,d + lda L0A31,pc Point to '/dd/sys/dial' +L3169 lda ,y+ Copy path to buffer + bmi L3171 Do until high bit set (terminates string) + sta ,x+ + bra L3169 + +L3171 suba #$80 Bump down to normal char + ldb #'/ Append slash to allow for filename + std ,x++ Save in buffer + tfr x,y + ldx u0D19 + lda #$1E + sta >u0D1A +L31A7 lda L06D1,pc Point to keyword list +L31DB ldx #u13A9 Point to buffer + ldb #$03 Size of keyword=3 + inca On keyword 1 + os9 F$CmpNam + leay 3,y Point to next keyword + bcc L31ED Found match, skip ahead + cmpa #32 Done all 32 keywords? + blo L31DB No, keep checking +L31ED cmpa #31 Is it 32? + bhi L326F Yes, exit + leax 3,x Point past keyword + ldb ,x+ Get next char + cmpb #'= Is it an '='? + bne L326F No, exit +* Change to use DECA instead of repeated CMPA's + cmpa #$01 ADS (Auto Dial String)? + beq L3271 + cmpa #$02 BPS (Bits per second (Baud))? + lbeq L328A + cmpa #$03 ECH (Keyboard echo)? + lbeq L32A3 + cmpa #$04 HEK (Host Echo)? + lbeq L32B1 + cmpa #$05 TRM (Terminal Type) + lbeq L32BF + cmpa #$06 LNF (Line Feeds on in & outgoing text) + lbeq L32CE + cmpa #$07 XON (XON char) + lbeq L32E0 + cmpa #$08 XOF (XOFF char) + lbeq L32E9 + cmpa #$09 RTR (# of retries) + lbeq L32F3 + cmpa #$0A RPS (Time each entry lasts) + lbeq L32FD + cmpa #$0B PAR (Parity) + lbeq L3307 + cmpa #$0C CLK (Keyclick) + lbeq L3311 + cmpa #$0D WRD (Word Length) + lbeq L3320 + cmpa #$0E STP (Stop bits) + lbeq L3338 + cmpa #$16 KM1-8 (Keyboard macros) + lbls L3358 Go handle all of them + cmpa #$17 CNS (String to send on Connect) + lbeq L337E + cmpa #$1B SS1-4 (Search string for auto-login) + lbls L2508 Go handle them + cmpa #$1F RS1-4 (Reply strings for SSn's) + lbls L24E3 + cmpa #$20 RLF (Line feeds added to received text) + lbeq L3392 + cmpa #$21 TLF (Line feeds added to xmitted text) + lbeq L33A1 +L326F puls pc,y,x,d Restore & return + +L3271 ldy #u0CF2 + ldb #$20 Max size=32 bytes +L3277 lda ,x+ Get char + sta ,y+ Copy it + cmpa #C$CR End of line? + beq L3284 Yes, skip ahead + decb Hit max size? + bne L3277 No, keep copying + puls pc,y,x,d Restore & return + +L3284 clr ,y+ Append NUL + puls pc,y,x,d Restore & return + +L328A lbsr L33B0 + andb #%00000111 Just keep baud rate + lda >u0CA5 Get baud/word len/stop bits + anda #%11111000 Keep all but baud + sta >u0CA5 Save it + orb >u0CA5 Merge with B + stb >u0CA5 Save new baud rate + puls pc,y,x,d + +L32A3 lbsr L33B0 + tstb + beq L32AB + ldb #$01 +L32AB stb >u0CA7 Save echo type + puls pc,y,x,d + +L32B1 lbsr L33B0 + tstb + beq L32B9 + ldb #$01 +L32B9 stb >u0CB1 + puls pc,y,x,d + +L32BF lbsr L33B0 + cmpb #$03 + blo L32C8 + ldb #$02 +L32C8 stb >u0CA6 + puls pc,y,x,d + +L32CE lbsr L33B0 + tstb + beq L32D6 + ldb #$01 +L32D6 stb >u0CA8 + stb >u0CA9 + puls pc,y,x,d + +L32E0 lbsr L33B0 + stb >u0CAF Pause off character code + puls pc,y,x,d + +L32E9 lbsr L33B0 + stb >u0CB0 Pause on character code + puls pc,y,x,d + +L32F3 lbsr L33B0 + stb >u0D19 + puls pc,y,x,d + +L32FD lbsr L33B0 + stb >u0D1A + puls pc,y,x,d + +L3307 lbsr L33B0 + stb >u0CAC Save parity + puls pc,y,x,d + +L3311 lbsr L33B0 + tstb + beq L3319 + ldb #$01 +L3319 stb >u0CAA + puls pc,y,x,d + +L3320 bsr L33B0 + lda >u0CA5 + anda #%01001111 Keep baud rate + sta >u0CA5 Save it + orb >u0CA5 Mask in Word Len/Stop bits + stb >u0CA5 Save new result + puls pc,y,x,d + +L3338 bsr L33B0 + tstb + beq L3344 + cmpb #$80 + beq L3344 + puls pc,y,x,d + +L3344 lda >u0CA5 + anda #%01111111 Keep all but Stop bits + sta >u0CA5 + orb >u0CA5 Merge in stop bit setting + stb >u0CA5 + puls pc,y,x,d + +L3358 lda -2,x Get macro # + suba #$31 Convert ASCII 1-8 to binary 0-7 + cmpa #7 Make sure only 0-7 + bhi L337B Not, exit + ldb #$80 128 bytes reserved per key + mul + ldy #u0D1C Point to start of programmable keys buffer + leay d,y Point to appropriate key in table + ldb #$80 Max size allowed=128 bytes +L336B lda ,x+ Get char + cmpa #C$CR Hit end of line? + beq L3378 Yes, flag end with NUL & exit + sta ,y+ Save char + decb Past max size? + bne L336B No, keep copying + puls pc,y,x,d + +L3378 clrb Append NUL byte + std ,y Save CR & NUL +L337B puls pc,y,x,d Return + +L337E ldy #u131C + ldb #$80 +L3384 lda ,x+ + cmpa #C$CR Hit end? + beq L3378 Yes, append NUL & exit + sta ,y+ + decb + bne L3384 + puls pc,y,x,d + +L3392 bsr L33B0 + tstb + beq L339A + ldb #$01 +L339A stb >u0CA9 + puls pc,y,x,d + +L33A1 bsr L33B0 + tstb + beq L33A9 + ldb #$01 +L33A9 stb >u0CA8 + puls pc,y,x,d + +L33B0 lda 1,x + cmpa #$21 + blo L33D2 Space or control char, skip ahead + lda ,x + suba #$30 Convert to Binary # + cmpa #10 Possibly legit digit? + blo L33C0 + suba #$07 +L33C0 ldb #$10 + mul + lda 1,x + suba #$30 Convert to Binary # + cmpa #10 Possibly legit digit + blo L33CD Decimal digit, skip ahead + suba #$07 +L33CD sta 1,x + addb 1,x + rts + +L33D2 lda ,x + suba #$30 + cmpa #10 + blo L33DC + suba #$07 +L33DC tfr a,b + rts + +L33E0 tst >u0D19 + bne L33ED + clr >u131C + lbra L3533 + +L33ED lbsr L1CDE + ldd #$1403 + std >u0C8F + ldd #$2808 + std >u0C91 + lbsr L1C81 + leax >L04B1,pc Print to 'Count', 'Seconds', etc. + lbsr L1B03 + lbsr L23D0 Center text + leax >L04DB,pc Print 'Dialing' + lbsr L1B03 + lbsr L2FDE + leax >L04E5,pc CurXY @ 23,3 + lbsr L1B03 + ldb #$01 + stb >u139F + lbsr L354B + ldx #u0CF2 + clrb +L342A lda ,x+ + incb + cmpb #$20 + bhi L3434 + tsta + bne L342A +L3434 decb + bne L343E + clr >u131C + lbra L3533 + +L343E clra + tfr d,y + sty >u0CA1 +L3446 leax >L02DC,pc Write out 'ATH ' to modem + ldy #$0004 + lda u0CA1 + ldx #u0CF2 + lda u0CA4 +L348E lbsr L1B4E + sta >u0CA3 +L3495 tst u131C + bra L3533 + +L34BC lbsr L1B4E + cmpa >u0CA3 + beq L3495 + inc >u0CA4 + leax >L04EA,pc + lbsr L1B03 + ldb >u0CA4 + bsr L354B + cmpb >u0D1A + blo L348E +L34DC inc >u139F + leax >L04E5,pc + lbsr L1B03 + ldb >u139F + bsr L354B + ldb >u0D19 + cmpb #$FF + lbeq L3446 + ldb >u139F + cmpb >u0D19 + lblo L3446 + clr >u131C + bra L3533 + +L3509 ldd #1*256+SS.Tone Send Tone to Std Out + ldx #$3F06 + ldy #$0D00 + os9 I$SetStt + ldy #$0E00 + os9 I$SetStt Send another one (higher frequency) + ldy #$0F00 + os9 I$SetStt Send another one (still higher frequency) + tst u131C + beq L3545 + lbsr L1A19 +L3545 lbsr L12B5 + puls pc,y,x,d + +L354B pshs x,d + ldx #u13A9 + clra +L3552 cmpb #$64 + blo L355B + subb #$64 + inca + bra L3552 + +L355B adda #$30 + sta ,x+ + clra +L3560 cmpb #10 + blo L3569 + subb #$0A + inca + bra L3560 + +L3569 adda #$30 + sta ,x+ + addb #$30 + stb ,x+ + ldx #u13A9 + ldy #$0003 + lda #$01 Write 3 bytes to Std Out + os9 I$Write + puls pc,x,d + +* Download a file processing (PgDn from command state) +L3580 leax >L048F,pc turn off cursor + inc >u0CA0 + lbsr L1B03 + ldd #$1C05 get start co-ordinates of overlay + std >u0C8F + ldd #$1907 get size of overlay + std >u0C91 + lbsr L1C81 place overlay + leax >L0734,pc print available protocols + lbsr L1B03 + lda #$04 get max # protocols + sta >u139E save it + ldb L048B,pc turn cursor back on + lbsr L1B03 + clr u0C84 get selected type + beq L35D6 ASCII, skip ahead + cmpb #$03 within max? + lbhi L0C5E no, go back to main loop + stb L048F,pc point to CurOff + clr >u0CA0 + lbsr L1B03 turn cursor off + ldd #$1C05 + std >u0C8F + ldd #$1908 + std >u0C91 + lbsr L1C81 + leax >L07A5,pc Point to file send menu + lbsr L1B03 Print it + lda #$05 + sta >u139E + ldb L048B,pc Cursor On + lbsr L1B03 + clr u0C84 + beq L363F + cmpb #$04 + lbhi L0C5E + stb u0CB0 + ldb >u0CAF + pshs d + clra + sta >u0CAF + sta >u0CB0 + lbsr L43CA + puls d + sta >u0CB0 + stb >u0CAF + ldd #0 + std u0C8F + ldd #$2509 get size + std >u0C91 + lbra L1C81 place xfer overlay window + +L36CD pshs y,x,d +L36CF lbsr L3BBC +L36D2 lda L04EF,pc point to 'Xmodem file Xfer...' + lbsr L1B03 print it + tst L0511,pc point to 'Y' + lbsr L1B03 print it +L370A leax >L052F,pc point to ' aborts' + lbsr L1B03 print it + tst L048F,pc turn cursor off + lbsr L1B03 + bra L376A skip to + +* Get filename for X/Ymodem receive +L371F leax L055F,pc point to 'File:' + lbsr L1B03 print it + lbsr L455D scan for old filename + tst u0CA0 Up/Download? + lbeq L3F08 +* NOTE: SHOULD CHANGE TO USE BILL'S SS.FILL CALL TO ALLOW EDITING OF 'GUESSED' +* FILENAME +L3772 ldy #u060E point to user entered filename + ldx #u009F point to old filename buffer + lda ,y get the first character + cmpa #C$CR user just hit enter? + bne L378A no, skip ahead + tst u0CA0 Upload? + lbeq L3F08 Yes, go do + tst aborts' + lbsr L1B03 print it + lbsr L3E83 print '0000' for + lbsr L3E9B print '0000' for + tst to abort + lbcs L3992 Yes, abort transfer + lbsr L3BDA get # seconds + cmpa #$03 timeout? + blo L382C no, try again + tst to abort + lbcs L3992 Yes, go abort transfer + lbsr L3BDA get # seconds waiting + cmpa #10 timeout? + blo L3852 no, try again + inc u0CA0 ??? Set xmit/recv flag to xmit??? + lbsr L1D09 Go sound a tone + lda L048F,pc Cursor OFF + lbsr L1B03 + puls b + os9 F$PErr Print Error + ldx #$003C + lbsr L0F56 + leax >L048B,pc Cursor ON + lbsr L1B03 + bra L3954 Go remove windows & exit xfer + +* Cancel file receive (comes here if key pressed) +L3992 lda -'s +L39BB sta ,x+ place in buffer + decb done? + bne L39BB no, keep going + lda L06BF,pc Print 'ASCII' + ldy #$0008 + os9 I$Write + lda L05C7,pc Point to Download error list + leax d,x Point to specific error we want + lda #$01 Print it to the user + ldy #$0014 + os9 I$Write +L3BA9 comb + puls pc,y,x + +L3BAC inc L062B,pc Point to '0000' packet # text with CurXY @ 8,5 + ldy #u1449 + ldb #$09 + lbsr L2D1E + ldx #u1449 + lbsr L1B03 + puls d,x,y,pc + +L3E9B pshs y,x,d + leax >L0634,pc Point to '0000' packet # text with CurXY @ 32,5 + ldy #u1439 + ldb #$09 + lbsr L2D1E + ldx #u1439 + lbsr L1B03 + puls pc,y,x,d + +L3EB3 pshs y,x,d + ldx #u1439 + ldd #$3030 '00' + std $05,x + std $07,x + lbsr L1B03 + puls pc,y,x,d + +L3EC5 pshs y,x,a + ldx #u1439 + bsr L3EEA + lbsr L1B03 + puls pc,y,x,a + +* ??? NEVER CALLED? +* pshs y,x,a +* leax >u1449,u +* lbsr L1B03 +* puls pc,y,x,a + +L3EDD pshs y,x,a + ldx #u1449 + bsr L3EEA + lbsr L1B03 + puls pc,y,x,a + +L3EEA pshs b + ldb #$08 +L3EEE bsr L3EF9 + cmpa #$30 + bne L3EF7 + decb + bcc L3EEE +L3EF7 puls pc,b + +L3EF9 lda b,x + inca + cmpa #$39 Higher than ASCII '9'? + bhi L3F03 + sta b,x + rts + +L3F03 lda #$30 Force to ASCII '0' + sta b,x + rts + +L3F08 tst L0583,pc + lbsr L1B03 + ldx #u009F + lda #$01 + ldy #$0020 + os9 I$WritLn + leax >L048F,pc Cursor OFF + lbsr L1B03 + leax >L06C7,pc + lbsr L1B03 + lda #$01 + ldx #u009F + os9 I$Open + bcc L3F53 +L3F47 tst L0593,pc + lbsr L1B03 + leax >L052F,pc + lbsr L1B03 + lbsr L3E83 + lbsr L3E9B + tst L06BF,pc + ldy #$0008 + os9 I$Write + ldx #u009C + ldb - to abort Xfer? + lbeq L39AA Yes, go abort + bra L4007 + +* Send X/Ymodem block & retry counter routine +L4041 inc u0CAD + beq L422E + inc u0C8F + ldd #$2507 + std >u0C91 + lbsr L1C81 + leax >L048F,pc Cursor OFF + lbsr L1B03 + tst >u0CA0 + lbeq L444C + leax >L08CF,pc 'File Capture System' + lbsr L1B03 + leax >L051C,pc 'Break aborts' + lbsr L1B03 + leax >L048B,pc Cursor ON + lbsr L1B03 + tst L0925,pc Print a double quote + lbsr L1B03 + ldx #u00BF + lda #$01 + ldy L08E8,pc 'is already open' + lbsr L1B03 +* Loop for response to file already open +L428A lbsr L2AC5 + cmpa #'Y + beq L42A3 + cmpa #'N + lbeq L4332 + cmpa #$05 -? + lbeq L4332 + cmpa #C$CR + bne L428A Illegal responses; ignore & try again + +L42A3 lbsr L43CA + lbsr L44E1 + lda L055F,pc 'File:' + lbsr L1B03 + ldb #$1E Max file size allowed? + lbsr L1B61 Go get filename from user + tst L092B,pc Append or overwrite message + lbsr L1B03 +L4305 lbsr L2AC5 + cmpa #'A Append? + beq L4363 + cmpa #'O Overwrite? + beq L438A + cmpa #C$CR CR? + beq L4332 + bra L4305 + +L4318 sta L048F,pc Cursor OFF + lbsr L1B03 + puls b + os9 F$PErr Print error message + ldx #$003C + lbsr L0F56 + leax >L048B,pc Cursor ON + lbsr L1B03 + bra L4332 + +L4363 ldx #u00BF + lda #UPDAT. + os9 I$Open + bcc L4379 + os9 F$PErr + ldx #$003C + lbsr L0F56 + bra L433B + +L4379 sta u0CB0 Get pause on char + beq L43E1 None, wing it & hope we don't overflow + sta u0CAF Get pause off char + beq L43FD None, skip ahead + sta L0910,pc 'Send ASCII file' + lbsr L1B03 + leax >L048B,pc Cursor ON + lbsr L1B03 + leax >L055F,pc 'File:' + lbsr L1B03 + ldb #$1E + lbsr L1B61 + tst