DR4:[356,44]K11ATR.MAC;1 w$attr::save ; save registers that we may use here r$attr::save ; just to be safe ispdp:: clr r0 ; presume failure clratr::clr at$len atrfin::save ; just in case please 5 occurrences total. DR4:[356,44]K11CDF.MAC;1 'list:: 1 occurrence total. DR4:[356,44]K11CMD.MAC;1 kermit::calls setcc ,<#cctrap> ; enable control C trapping ? c$rec:: $name c$send::$name c$serv::$name kerini::nop ; can always patch this with a 207 opentt::tst linksts ; already open ? clostt::save c$exit::call sd$off c$nop:: return ; a NO-OP command ??? c$conn::$name rm$bye:: c$bye:: $name rm$fin:: c$fin:: $name rm$get:: c$get:: $name rm$spa::$name rm$hlp::$name rm$hos::$name rm$dir::$name rm$typ::$name rm$who::$name rm$del::$name rm$ren::$name ; do a remote rename please rm$cop::$name ; do a remote Kopy please c$dir:: $name c$who:: calls systat ,<#0> c$tran::calls transf ,<#argbuf,#0> c$take::$name tkecho::.word -1 ; if <> then echo the take file c$sys:: $name c$spac::$name c$loc:: $name c$rem:: $name c$test::calls sercmd ,<#argbuf,#0> getcmd::clrb argbuf getcm0::save cctrap::cmp cccnt ,#cc$max direr$::mov r0 ,-(sp) ; direrr will select whether or not gettwo::save ; save temps please 40 occurrences total. DR4:[356,44]K11COM.MAC;1 loacmd::mov #cmdlst ,r0 loarem::mov #remlst ,r0 loaset::mov #setcmd ,r0 3 occurrences total. DR4:[356,44]K11CON.MAC;4 doconn::tstb ttname ; insure that a device name is set dorsx:: return 2 occurrences total. DR4:[356,44]K11CPY.MAC;1 copy:: save ; save r2-r4 please 1 occurrence total. DR4:[356,44]K11CVT.MAC;1 namcvt::save ; save these in case we use them 1 occurrence total. DR4:[356,44]K11DAT.MAC;1 prompt::.blkb 40 kbiost::.blkw 2 ; for RSXM/M+ terminal io status consts::.blkw 2 ; for the connect command for RSX tists:: .blkw 2 ; for the connect command for RSX mcrcmd::.blkw 1 ; if <>, then we got a mcr/ccl cmd line binmod::.blkw 1 ; for RSTS, something is open mode 1 sy.ini::.blkw 1 ; for KERMIT.INI stuff handch::.blkw 1 ; for ibm systems ? duplex::.blkw 1 ; if eq, full (default), else half sparsz::.blkw 1 ; size of our sinit packet chksiz::.blkw 1 ; current checksum size in bytes chktyp::.blkw 1 ; the current checksum type maxtry::.blkw 1 ; maximum number of retries conesc::.blkw 1 ; escape character for connection sertim::.blkw 1 ; timeout waiting for server cmd inserv::.blkw 1 ; currently we are a server testc:: .blkw 1 ; for debugging skipfl::.blkw 1 ; should we send a EOF DISCARD packet parity::.blkw 1 ; save parity setting for SHOW command logfil::.blkb 40 ; a log filename for the SHOW command cccnt:: .blkw 1 ; number of control C's so far sendat::.blkw 1 ; if zero, NEVER send attribute packets sendly::.blkw 1 ; wait before sending SINIT pauset::.blkw 1 ; wait before sending a packet defdir::.blkb filsiz+2 ; default directory for send and rec ttparm::.blkb 50 ; saved terminal settings outlun::.blkw 1 ; zero for TI else lun.ou cmdlun::.blkw 1 ; current command file lun cmdadr::.blkw 1 ; saved address of command routine cmdnum::.blkw 1 ; index into the current command list hlpbuf:: cmdbuf::.blkb 120 ; 80 byte buffer for reading commands argbuf::.blkb 120 ; also for reading args for commands hlptop:: srcnam::.blkb filsiz+2 ; original send filespec filnam::.blkb filsiz+2 ; output from directory lookup routine index:: .word 0 ; index into directory recpkt::.blkb 210 ; 128 byte buffer receive packet buffer packet::.blkb 210 ; a general packet ttname::.blkb 20 ; our current terminal link name ttdial::.blkb 20 ; save the remote name here ttcons::.blkb 20 ; our console name for virtual tty trace:: .blkw 1 ; for file and packet logging debug:: .blkw 1 ; console debugging sermod::.blkw 1 ; if we are currently a server reccnt::.blkw 1 ; total received count sencnt::.blkw 1 ; total sent count totp.r::.blkw 34 ; total rec by packet type totp.s::.blkw 34 ; total sent by packet type pcnt.r::.blkw 34 ; packet count by type for RPACK pcnt.s::.blkw 34 ; packet count by type for SPACK atrctx::.blkw 1 ; context for attribute packets senpar::.blkb 20 ; remotes connection parameters conpar:: recpar::.blkb 20 ; our connection parameters setsen::.blkb 20 ; we may override the default setrec::.blkb 20 ; save for receive parameters image:: .blkw 1 ; if in image mode $image::.blkw 1 ; save image flag for autobyte numtry::.blkw 1 ; number of retrys oldtry::.blkw 1 ; old value of numtry paknum::.blkw 1 ; current packet number mod 64 remote::.blkw 1 ; if <> then we are remote state:: .blkw 1 ; current state linkst::.blkw 1 ; if <> then a link is active outopn::.blkw 1 ; did recsw ever create anything inopn:: .blkw 1 ; did sendsw ever open anything size:: .blkw 1 ; size of last call to bufferfill xgottn::.blkw 1 ; got an xpacket in server xmode:: .blkw 1 ; if <> then doing text output to ti: do8bit::.blkw 1 ; if <> then doing 8 bit prefixing ebquot::.blkw 1 ; if doing 8 bit prefixing, this is it errtxt::.blkb 102 ; a buffer for SYSERR(errnum,buffer) rtwork::.blkw 10 ; for RT11 exec calls rtque:: .blkw 12*6 ; allocate extra que elements for RT11 at$len::.blkw 1 at$typ::.blkw 1 at$cre::.blkw 1 at$id:: .blkw 1 at$bil::.blkw 1 at$are::.blkw 1 at$pas::.blkw 1 at$bsi::.blkw 1 at$acc::.blkw 1 at$enc::.blkw 1 at$dis::.blkw 1 at$pr0::.blkw 1 at$pr1::.blkw 1 at$sys::.blkw 2 at$for::.blkw 1 at$fab::.blkw 15 at$val::.blkw 1 stklim::.blkw 600 stack:: 94 occurrences total. DR4:[356,44]K11DEB.MAC;1 texadr:: c$disp::mov #argbuf ,r0 ; locate the symbol in directory 2 occurrences total. DR4:[356,44]K11DER.MAC;1 direrr:: fcsdir::mov r1 ,-(sp) ; save R1 2 occurrences total. DR4:[356,44]K11DFH.MAC;1 defhlp::message 1 occurrence total. DR4:[356,44]K11ERR.MAC;1 rmserr::cmp @2(r5) ,#-624. rmserp::mov r1 ,-(sp) ;save fab addr rmserx::mov #77-5 ,r1 ; maxlength of 77 (8) bytes 3 occurrences total. DR4:[356,44]K11ER1.MAC;1 rmser1::save ; be nice to our caller 1 occurrence total. DR4:[356,44]K11ER2.MAC;1 rmser2::save ; be nice to our caller 1 occurrence total. DR4:[356,44]K11ER3.MAC;1 rmser3::save ; be nice to our caller 1 occurrence total. DR4:[356,44]K11E80.MAC;1 xinit:: calls l$fss ,<#200$> ; open terminal on LUN.AS ttyini::call getprv ; will need for binary open ttyfin::calls clrdlm ,<2(r5)> ; clear private delimiters gttnam::save ; may as well save it setdlm::mov #xrb ,r0 ; setup to set a private delim clrdlm:: ttrini::mov #xrb ,r0 ; setup to set a private delim ttrfin::calls clrdlm ,<#lun.tt> noecho::save ; save a temp register echo:: save ; save a temp register write:: mov #xrb ,r0 ; address of xrb parameter block read:: mov #xrb ,r0 ; address of xrb parameter block kbread::calls read ,<@r5,#80.,#0,#0> ; do the actual read now xbinre:: binrea::mov #xrb ,r0 ; address of xrb parameter block chkabo::calls binrea ,<#5,#-1> ; simple read on console terminal binwri::mov #xrb ,r0 ; address of xrb parameter block l$fss:: clrfqb l$fssx::mov @r5 ,r0 ; get the filename address l$ttyo::save ; save temps here please sttyou::mov r5 ,-(sp) l$pcrl::.print #100$ $clrxr::save $clrfq::save exit:: clrxrb ; ensure xrb is clear first logout::clrfqb ; ensure firqb is cleared out quochk::clrfqb ; try to see if the logout will work dskuse::save cantyp::save ; use r0 to point into xrb getuic::mov #xrb ,r0 ; clear xrb out first drpprv::mov #jfsys ,xrb+0 ; drop temp privs getprv::mov #jfsys ,xrb+0 ; get temp privs back please suspen::mov @r5 ,xrb+0 fcserr:: fiperr::save syserp::save syserr::save ; save a register ttypar::call ttpars ; get the terminal unit number chkpar::clr r0 ttyhan::call ttpars ; the usual, parse the device name ttydtr::call ttpars ; the usual, parse the device name ttspee::save setspd::save ttysav::save ; save registers please ttyrst::save ; save registers please ttyset::save assdev::call ttpars namcvt::save ascdat::save asctim::save dodir:: save ttxon:: save ; save a temp register sp.dev::.word 0 sp.mod::.word 0 ; use 4!40 for delete and noheader qspool::save setcc:: mov #ttast ,@#24 setsla::clr r0 fu$def::.word 177777 ; do we need a defdir for RMS11v2 58 occurrences total. DR4:[356,44]K11HLP.MAC;1 c$help::call hlpopn ; open the help file up? hnames::.word 10$,20$,30$,40$,0 2 occurrences total. DR4:[356,44]K11LCL.MAC;1 okuser::mov 2(sp) ,r0 ...uic::.word 0 ; no checks on group number ..$bye::.ascii <000>/BYE/ ; BYE ..$com::.ascii <000>/COM/ ; COMMENT ..$con::.ascii <000>/CON/ ; CONNECT ..$cop::.ascii <000>/COP/ ; COPY ..$del::.ascii <000>/DEL/ ; DELETE ..$dir::.ascii <000>/DIR/ ; DIRECT ..$dis::.ascii <000>/DIS/ ; DISCONNECT ..$era::.ascii <000>/ERA/ ; ERASE ..$exi::.ascii <000>/EXI/ ; EXIT ..$fin::.ascii <000>/FIN/ ; FINISH ..$get::.ascii <000>/GET/ ; GET ..$han::.ascii <000>/HAN/ ; HANGUP ..$hel::.ascii <000>/HEL/ ; HELP ..$loc::.ascii <000>/LOC/ ; LOCAL ..$log::.ascii <000>/LOG/ ; LOGOUT ..$not::.ascii <000>/NOT/ ; NOTE ..$qui::.ascii <000>/QUI/ ; QUIT ..$rec::.ascii <000>/REC/ ; RECEIVE ..$rem::.ascii <000>/REM/ ; REMOTE ..$ren::.ascii <000>/REN/ ; RENAME ..$sen::.ascii <000>/SEN/ ; SEND ..$ser::.ascii <000>/SER/ ; SERVER ..$set::.ascii <000>/SET/ ; SET ..$sho::.ascii <000>/SHO/ ; SHOW ..$spa::.ascii <000>/SPA/ ; SPACE ..$sys::.ascii <000>/SYS/ ; SYSTEM ..$tak::.ascii <000>/TAK/ ; TAKE ..$tra::.ascii <000>/TRA/ ; TRANSMIT ..$typ::.ascii <000>/TYP/ ; TYPE ..$who::.ascii <000>/WHO/ ; WHO 32 occurrences total. DR4:[356,44]K11MAC.MAC;1 NO occurrences DR4:[356,44]K11M41.MAC;1 fu$def::.word 0 ; if rms needs the DNA filled in xinit:: setcc:: qiow$s #io.det,#lun.tt,#ef.tt,,#kbiost ttyini:: ttyfin:: ttrini:: ttrfin:: ttysav:: ttyset:: ttyrst:: noecho:: echo:: gttnam::save ; save temps please kbread:: binrea::save binwri:: xbinre::save ; save a register for a friend chkabo::calls xbinrea ,<#lun.tt,#-1> ; simple read on console terminal l$ttyo:: sttyou:: l$pcrl:: logout:: exit:: quochk:: dskuse:: cantyp:: ttxon:: save ; use r0 to point into xrb getuic:: drpprv:: getprv:: suspen:: ttypar:: chkpar::clr r0 ttyhan::call ttpars ; the usual, parse the device name ttydtr:: ttspee:: setspd::save setsla::save ; save temps we may want ttpars:: ; NEEDS TO BE GLOBAL(RBD) assdev:: namcvt:: ascdat:: asctim:: sercmd:: systat:: dodir:: runjob:: runmcr:: rsxsys:: qspool::movb #1 ,r0 ;rsxspl::mov r0 ,-(sp) ; save temps syserp:: syserr:: 53 occurrences total. DR4:[356,44]K11NHD.MAC;1 NO occurrences DR4:[356,44]K11PAK.MAC;1 sen.sw:: sendsw::movb @r5 ,state ; do a SINIT first thing please sinfo:: save ; save ALL registers please sinit:: movb #'S&137 ,-(sp) ; normal sinit operation for sending recsw:: clr paknum ; packet_number := 0 rec.sw::movb @r5 ,state ; assume RECEIVE-INIT for starters spakin::bit #log$pa ,trace ; tracing today ? clrpar::tstb parity ; handle nothing please (no parity) checks::save ; save registers we may use crcclc::save ; save registers please bufpak::save ; save all registers we may use bufunp::save ; save temps as usual fixchk::tstb setsen+p.chkt ; did the user ever set block-check? sparin::save ; save registers we may use rparin::save ; save registers we may use error:: save prerrp::.print #200$ getnxt::save l$xor:: save scanch::save ; save temps dopari::save ; save things we will use 21 occurrences total. DR4:[356,44]K11PK.MAC;1 runjob::mov r5 ,-(sp) ; convert f4/bp2 call format $runjo::clr -(sp) $pklog:: 3 occurrences total. DR4:[356,44]K11RMS.MAC;2 sydisk::.ascii /SY:/ fablst::.word 0 ,fab1 ,fab2 ,fab3 ,fab4 namlst::.word 0 ,nam1 ,nam2 ,nam3 ,nam4 namlen::.word 0 ,0 ,0 ,0 ,0 rablst::.word 0 ,rab1 ,rab2 ,rab3 ,rab4 df$rat::.word fb$cr df$rfm::.word fb$var open:: calls fopen ,<@r5,2(r5),4(r5),#0> create::calls fcreate ,<@r5,2(r5),4(r5),#0> fopen:: save ; save registers fcreat::save ; save registers settyp::mov fablst(r0),r1 close:: save ; save registers we may have rewind::mov @r5 ,r0 binfil::save ; save registers we may use getatr::save ; save these please putatr::save ; save these please getrec::mov 2(r5) ,r0 ; get the channel number putrec::mov r1 ,-(sp) getc:: mov @r5 ,r0 getcr0::save ; save temps putc:: save ; simply save r1 and call putcr0 putcr0::save ; save registers we use fu$dir::.word 0 ; style wildcarding on your non-standard lookup::save RNFAB1::FAB$B ; Old file name RNNAM1::NAM$B ; NAM definition RNFAB2::FAB$B ; New file name RNNAM2::NAM$B ; NAM definition rename::save ; save temps please delete::save ; save registers we may overwrite fparse::save ; save registers we may overwrite getsiz::sub #40 ,sp ; use the stack for a buffer getsys::sub #40 ,sp ; use the stack for a buffer GSABAS:: ; GSA base address GSAMIN:: ; Minimum allocation GSAREQ:: ; Size of this request GSA:: getmcr::save ; just for kicks, save these 39 occurrences total. DR4:[356,44]K11RTC.MAC;1 doconn::tstb ttname ; insure that a device name is set dorsx:: return 2 occurrences total. DR4:[356,44]K11RT4.MAC;1 namlst::.word 0 ,nam1 ,nam2 ,nam3 ,nam4 namlen::.word 0 ,0 ,0 ,0 ,0 df$rfm::.word 0 df$rat::.word 0 syserr::calls rmserr ,<#2,r5,2(r5)> ; simple rmserr::save ; the registers we will use mterr:: .word er$nin ,er$nat ,er$lun ,er$iop ,er$bsy ,er$buf ,er$sys xinit:: .qset #rtque,#5 ; allocate extra que elements fopen:: open:: save ; save all the temps please en$siz::.word 0 ; 1/2 largest free or 2nd largeset fcreat:: create::save ; save all the temps please close:: save ; save registers we may have rewind::mov @r5 ,r0 ; get the channel number getrec::save ; save registers we may need putrec::save ; save registers we may need getc:: mov @r5 ,r0 getcr0::save ; use for saving the channel# putc:: save ; simply save r1 and call putcr0 putcr0::save ; save registers we use lookup::tst @4(r5) ; been called already ? rename::mov #er$iop ,r0 delete::save ; save registers we may overwrite fparse::copyz @r5 ,2(r5) ; simple l$ttyo::save ; save registers we may need sttyou::mov r5 ,-(sp) l$pcrl::print #100$ getsys::mov #7 ,r0 ; this is rt11 folks exit:: .exit ; should always work ok suspen::save ; save temps setcc:: drpprv:: getprv:: getuic:: logout:: quochk:: qspool:: noecho:: echo:: runjob:: chkabo::clr r0 asctim:: ascdat::mov @r5 ,r0 dodir:: mov #er$iop ,r0 getatr::mov #er$iop ,r0 putatr::clr r0 binfil::clr r0 chkpar::clr r0 systat:: sercmd::mov #er$iop ,r0 dskuse::mov @r5 ,r0 getmcr::mov @r5 ,r0 copy:: save ; save temp registers please direr$::mov r0 ,-(sp) ; direrr will select whether or not $mul:: mov r0 ,-(sp) $div:: mov r0 ,-(sp) $ash:: tst 2(sp) ; left shift or rigth shift? 58 occurrences total. DR4:[356,44]K11SER.MAC;1 server::mov remote ,-(sp) ; save the local/remote flag remfin::clr paknum ; packetnumber := 0 rembye::clr paknum ; packetnumber := 0 remget::call seropn ; get the link line intialzied remhos::call seropn ; get the link line intialzied remspa::calls doremo ,<#'U,#1,#null> remdir::calls doremo ,<#'D,#1,@r5> remtyp::calls doremo ,<#'T,#1,@r5> remwho::calls doremo ,<#'W,#1,#null> remera::calls doremo ,<#'E,#1,@r5> remhlp::calls doremo ,<#'H,#1,#null> remren::calls doremo ,<#'R,#2,@r5,2(r5)> remcop::calls doremo ,<#'K,#2,@r5,2(r5)> 13 occurrences total. DR4:[356,44]K11SHO.MAC;1 c$show::$name sho$ve::message sho$es::mov conesc ,r1 c$copy::$name c$rena::$name c$del:: $name c$type::$name c$prin::calls qspool ,<#argbuf,#lun.in> 8 occurrences total. DR4:[356,44]K11STT.MAC;1 c$set:: $name set$li::copyz #argbuf ,#ttname,#20 ; copy the device name please set$sp::calls l$val ,<#argbuf> ; get the speed into decimal set$de::calls getcm0 ,<#argbuf,#dbglst>; find out which option was given sd$off::bic #log$al ,trace ; clear all debug bits now set$pa::call ttchk ; insure a line is set set$ha::call ttchk ; insure a line is set set$du::call ttchk ; insure a line is set set$bl::calls getcm0 ,<#argbuf,#blklst>; find out which option was given set$dt::call ttchk ; must have already done a SET LINE c$disc:: c$hang::$name set$hu::call ttchk ; must have already done a SET LINE set$fi::calls getcm0 ,<#argbuf,#setfil> set$df::copyz #argbuf ,#defdir,#filsiz; setup a default directory set$ho::clrb defdir set$lo::call sd$off ; insure previous file is closed set$eo::calls octval ,<#argbuf> ; get the octal value now set$pl::calls l$val ,<#argbuf> ; set the arguement now set$ps::calls l$val ,<#argbuf> ; get the value set$dl::calls l$val ,<#argbuf> ; get the value set$es::calls octval ,<#argbuf> ; get the octal value now set$re::calls l$val ,<#argbuf> ; SET RETRY decimal number set$ti::calls l$val ,<#argbuf> ; SET TIMEOUT decimal number set$rf::calls getcm0 ,<#argbuf,#rfmlst>; find out which option was given set$at::calls getcm0 ,<#argbuf,#attlst>; find out which option was given set$pr::copyz #argbuf ,#prompt,#20. 27 occurrences total. DR4:[356,44]K11SUB.MAC;1 cvtn:: save num1:: call cvtn ; same as num1$ ascppn::save ; always save temps please edit$:: cvt$$:: save ; the scratch registers to use. l$len:: mov r0 ,-(sp) ; save it for later. l$wrdec:: l$cvti::save ; call common conversion sub. l$cvtnum:: mout:: save instr:: rdtoa:: l$val:: save octval::save ; save temps please l$otoa::save ; save the scratch regs. l$wroc::save copyz$::save ; save registers we may use 17 occurrences total. DR4:[356,44]K11TRA.MAC;1 transf::clr r2 ; input_open := false 1 occurrence total. DR4:[356,44]K1180S.MAC;1 systat::br 5$ ; skip the error exit sercmd::clr pkbufs ; insure no data is left in buffer 2 occurrences total. DR4:[356,44]K11RTT.MAC;1 assdev::save ; we may want to use these ttyini::save ; we will need this one ttysav::save ; we will use this one ttyrst::save ; we will use this one xbinre:: binrea::save ; we may want to use these here binwri::save ; save registers we may need ttpars::mov r1 ,-(sp) ; save scratch register please gttnam::mov @r5 ,r0 ; get the address of where to put it ttyfin::call ttpars ; finish up mt service setspd::save ; save temps that we will use ttspee::save ; save these please spdlst::.word 50. ,75. ,110. ,134. ,150. ,300. ,600. spdmap::.word 0 ,400 ,1000 ,1400 ,2000 ,2400 ,3000 ttxon:: cantyp:: ttyset:: ttydtr:: ttrfin:: ttrini::clr r0 ttyhan::mov #er$iop ,r0 kbread::mov r2 ,-(sp) 22 occurrences total.