title ;RXMD - CP/M File Transfer Program under BYERSX - 85/12/2 ; developed from KMD08 by Irv. Hoff ; aseg; Needed by M80 assemblers, ignore if using MAC ; ; NOTE: This version assembles with ASM, LASM, MAC, M80 or SLRMAC ; (ASM requires the include files be incorporated here) ; ; NOTE: Carrier loss recovery must reset write-protection modes ; ; Verbiage, revision info, credits, etc. include rxmdhdr.mac ; ; Customization and definitions ; ; * * * * * * * * * * * * * * * * * ; vers equ 0; 0 is debug only modlev equ 0 fixlvl equ 9; 16 up debugs 0..9 fixlvl ; ; Define ASCII characters used soh equ 01h; Start of header stx equ 02h; Start of 1k header eot equ 04h; end of transmission ack equ 06h; acknowledge bs equ 08h lf equ 0ah cr equ 0dh nak equ 15h; Negative acknowledge cancel equ 18h; CTL-X for cancel crc equ 'C'; CRC request character ksnd equ 'K'; 1k block request character ; ; ; =================================================================== ; ; Conditional equates - change to suit your system, then assemble ; ; =================================================================== ; ; Normal disk systems can transfer 16k from computer to disk in 2-3-4 ; seconds and less. Some very slow 5-1/4" floppy systems (such as ; North Star) may take up to 20-30 seconds to transfer 16k. This would ; cause several timeouts at 10 seconds each. If you experience any ; timeouts, change BUFSIZ to somethng smaller, perhaps 8k or even 4k. ; bufsiz equ 16; File transfer buffer size in Kbytes ; ; =================================================================== ; ; Some modems will either go onhook immediately after carrier loss or ; can be set to wait a bit. A good value with the Smartmodem is five ; seconds, since it catches all "call forwarding" breaks. Not all is ; lost after timeout in RXMD - BYE will still wait some more, but the ; chance of someone slipping in is less now. ; timout equ 2; Seconds to abort after carrier loss ; ; =================================================================== ; ; Many main frames are not live to input immediately after a send. If ; this programs responds immediately the response will be lost and ; errors result. Allows a small delay for main from process awaken. ; pausetm equ 0; up to 255 Millisecs pause at line turn-around ; ; =================================================================== ; ; When a transmission is complete, in RCPM mode, the remote station ; usually flushes buffers and closes files. If this program exits ; immediately the system prompt will be lost. Set the delay time ; to avoid this in most cases. Depends on remote, so not positive ; waitime equ 40; * 0.1 secs wait at exit. 0 means 25.5 secs ; ; =================================================================== ; ; ; BDOS equates ; wrcon equ 2; Output to console print equ 9; Print string function cpmver equ 12; CPM version running seldsk equ 14; Select drive open equ 15; 0FFH = not found close equ 16; " " srchf equ 17; " " srchn equ 18; " " delet equ 19; Delete file read equ 20; 0=OK, 1=EOF write equ 21; 0=OK, 1=ERR, 2=?, 0FFH=no dir. space make equ 22; 0FFH=bad curdrv equ 25; Get current drive stdma equ 26; Set DMA galloc equ 27; Disk allocation vector curdpb equ 31; Current disk parameter blk setusr equ 32; Set user area to receive file rrdm equ 33; Read random filsiz equ 35; Compute file size getfre equ 46; Free space on disk, CPM 3 only ; bdos equ 0005h; Address for BDOS jump vectors tbuf equ 0080h; Default DMA address fcb equ 005CH; System FCB fcb1 equ 006CH; Secondary FCB area fcbext equ fcb+12; File extent fcbrno equ fcb+32; Record number random equ fcb+33; Random record field ; ; BYERSX status byte bits whlbit equ 080h; sysop status dunochk equ 040h; no drv/usr restrictions devices equ 020h; RDR, PUN, LST access carcks equ 010h; carrier checks (off for hard-wired) conoff equ 008h; terminal mode remon equ 004h; remote terminal enabled echol equ 002h; local terminal echoes echon equ 001h; remote terminal echoes ; ; some BYERSX extended system calls sgmaxdrv equ 69; set/get max drive allowed sgmaxusr equ 70; set/get max user allowed systate equ 84; system status delayms equ 85; delay de millisec sgbaud equ 86; set/get baud rate. 0 gets rsxmast equ 87; master rsx call swrtprt equ 91; set write protection on drives ; ; and subfunctions for rsxmast resetsecure equ 4; reset secure mode (aborts) setsecure equ 5; set secure mode (abort hangs up) grdrv equ 14; get designated rcv drive grusr equ 15; get designated rcv user area gprdrv equ 16; get designated private rcv drive gprusr equ 17; get designated private rcv user area gpsdrv equ 18; get designated private send drive gpsusr equ 19; get designated private send user area gwrtprt equ 20; get current write protection ; org 100h jmp begin ; ; ------------------------------------------------------------------- ; ; Following placed at start for easy patching. pause db pausetm; Line turn around delay, millisec waitm db waitime; Pause on exit for remote to flush ; include rxmd01.mac include rxmd02.mac include rxmd03.mac include rxmd04.mac include rxmd05.mac include rxmd06.mac include rxmd07.mac include rxmd08.mac include rxmd09.mac include rxmd10.mac include rxmd11.mac include rxmd12.mac include rxmd13.mac include rxmd14.mac include rxmd15.mac include rxmd16.mac include rxmd17.mac include rxmdata.mac ; end