home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / computervision / kermit.sinit < prev    next >
Text File  |  2020-01-01  |  2KB  |  63 lines

  1. ; 18 jly 85 esj removed send @filename support
  2. ; 16 jly 85 esj converted
  3. ;;;;;;;;;;;           SINIT          ;;;;;;;;;;;;;;;;;;;;;;;;;;
  4.       E'F A:S(NWLS)
  5.       E'O SINIT.(X)
  6.  
  7. ;     send an initial packet for the first connection
  8. ;     state what my parameters are
  9.  
  10. /INCLUDE BYU.PROG.KERMIT.SYM.EQU.KERCOM
  11. /INCLUDE BYU.PROG.KERMIT.SYM.EQU.KERDEF
  12.  
  13.       I'R NUM,LEN,STATUS,LCLSTATE,TNUM
  14.       I'R AONE,BONE,TV1,TV2
  15.  
  16.  
  17.       W'R (NUMTRY.GT.MAXTRY)
  18.          LCLSTATE=BIGA        ;exceeded max # of re-try , give up
  19.  
  20.       O'E
  21.          NUMTRY=NUMTRY+1     ;try it again
  22.  
  23.  
  24.          AONE=1
  25.          BONE=1
  26.          E'E SPAR.(PACKET)                   ;get my requirement parameters
  27. #        E'E HEXDMP.(1,11,1,PACKET)
  28.          TNUM=N
  29.          TV1=BIGS
  30.          TV2=6
  31.          E'E SPACK.(TV1,TNUM,TV2,PACKET)     ;send my parameters requiremen
  32.          STATUS=RPACK.(LEN,NUM,RECPKT)        ;what was the reply ??
  33.  
  34. #        E'E TYPOUT.(2,'A000'.LOR.STATUS)
  35. #        E'E TYPEMSG.($  got dis status!$)
  36.  
  37.          W'R (STATUS.EQ.BIGN)              ;NAK it
  38.                LCLSTATE=STATE                   ;try it again
  39.  
  40.          O'R (STATUS.EQ.BIGY)         ;ACK it
  41.             W'R (N.NE.NUM)            ;but it was for the previous p
  42.                LCLSTATE=STATE              ;re-try it again
  43.  
  44.             O'E
  45.                E'E RPAR.(RECPKT)           ;get the packet reqirement of
  46.                                            ;other KERMIT if provided
  47.                NUMTRY=0
  48.                N=((N+1).MOD.64)
  49.                LCLSTATE = BIGF
  50.             E'L
  51.  
  52.          O'R (STATUS.EQ.BAD)   ;checksum error detected
  53.             LCLSTATE=STATE          ;try it again
  54.  
  55.          O'E
  56.             LCLSTATE=BIGA
  57.  
  58.          E'L
  59.       E'L
  60.  
  61.       F'N LCLSTATE
  62.       E'N
  63.