home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / test / pdp11 / krter4.mac < prev    next >
Text File  |  1996-10-17  |  6KB  |  163 lines

  1.     .title    krter4    overlay 4 of 4 for misc error text
  2.     .ident    /V04.64/
  3.  
  4. ; /E64/    10-May-96  John Santos
  5. ;
  6. ;    New module with RSTS/E-Kermit-specific error messages, roughly
  7. ;    corresponding to KRTERR.MAC
  8. ;    Returns error text for fake RSTS/E errors with error codes
  9. ;    greater than 256., which are kermit internal error messages.
  10.  
  11.     .include "IN:KRTMAC.MAC"
  12.     .iif ndf  KRTINC  .error    <; .include for IN:KRTMAC.MAC failed>
  13.  
  14.     .include    /SY:[1,2]COMMON.MAC/
  15.     .iif ndf, xrb   , .error ; INCULDE for [1,2]COMMON.MAC failed
  16.  
  17.     .title    krter4
  18.  
  19.     .psect    $pdata
  20.     .sbttl    Error codes defined
  21.  
  22.  
  23.     er$lgf    ==    256.+1.        ; please open a logfile first
  24.     er$raw    ==    256.+2.        ; can't log raw I/O with other opts
  25.     er$rax    ==    256.+3.        ; can't do this with raw logging
  26.     er$mal    ==    256.+4.        ; malloc can't get enough memory
  27.     er$spe    ==    256.+5.        ; unknown speed
  28.     er$bnl    ==    256.+6.        ; binary types list is full
  29.     er$one    ==    256.+7.        ; illegal file type
  30.     er$try    ==    256.+8.        ; retries must be 3 to 30 only
  31.     er$tim    ==    256.+9.        ; set time_out error
  32.     er$txp    ==    256.+10.    ; /62/ packet min len is 20 bytes
  33.     er$bad    ==    256.+11.    ; bad option or value
  34.     er$sam    ==    256.+12.    ; ambiguous set command
  35.     er$sun    ==    256.+13.    ; unrecognizable set command
  36.     er$tt    ==    256.+14.    ; can't connect TT to TT
  37.     er$ass    ==    256.+15.    ; assign error
  38.     er$get    ==    256.+16.    ; get syntax error
  39.     er$tam    ==    256.+17.    ; ambiguous topic
  40.     er$tun    ==    256.+18.    ; unrecognizable topic
  41.     er$ser    ==    256.+19.    ; no server subcommands
  42.     er$dcd    ==    256.+20.    ; can't dial whilst DCD is asserted
  43.     er$inr    ==    256.+21.    ; invalid number of retries
  44.     er$npn    ==    256.+22.    ; no previous number dialed
  45.     er$mdm    ==    256.+23.    ; please set modem first
  46.     er$ndf    ==    256.+24.    ; no dial formatting string
  47.     er$idl    ==    256.+25.    ; can't release modem
  48.     er$unm    ==    256.+26.    ; unknown modem type
  49.     er$nnf    ==    256.+27.    ; no number found for name
  50.     er$abk    ==    256.+28.    ; aborted from keyboard
  51.     er$wke    ==    256.+29.    ; can't get wake string from modem
  52.     er$oct    ==    256.+30.    ; must be octal 1 to 36 only
  53.     er$iln    ==    256.+31.    ; illegal logical name
  54.     er$wks    ==    256.+32.    ; wake string is undefined
  55.     er$pls    ==    256.+33.    ; please SET LINE first
  56.     er$lwe    ==    256.+34.    ; logfile write error
  57.     er$amb    ==    256.+35.    ; ambiguous command
  58.     er$not    ==    256.+36.    ; not a local Kermit..
  59.     er$ram    ==    256.+37.    ; ambiguous REMOTE command
  60.     er$run    ==    256.+38.    ; unrecognizable REMOTE command
  61.     er$ttx    ==    256.+39.    ; /63/ TT not supported here
  62.     er$unr    ==    256.+40.    ; unrecognizable command
  63.     er$snd    ==    256.+41.    ; send syntax error
  64.     er$uns    ==    256.+42.    ; /E64/ unsupported command
  65.     er$amo    ==    256.+43.    ; /E64/ Ambiguous option or value
  66.  
  67.     maxerr    =    43.        ; must be abs(maxerr)
  68.  
  69.  
  70.     .sbttl    Error messages mapped
  71.  
  72. errmap:    .word    baderr        ; come here when error doesn't map
  73.     .word          10$, 20$, 30$, 40$, 50$, 60$, 70$, 80$, 90$
  74.     .word    100$,110$,120$,130$,140$,150$,160$,170$,180$,190$
  75.     .word    200$,210$,220$,230$,240$,250$,260$,270$,280$,290$
  76.     .word    300$,310$,320$,330$,340$,350$,360$,370$,380$,390$
  77.     .word    400$,410$,420$,430$
  78.  
  79.  
  80. 10$:    .asciz    "Please open a LOGFILE first"
  81. 20$:    .asciz    "Can't log RAW I/O with another disk_based DEBUG option set"
  82. 30$:    .asciz    "Can't do this with RAW I/O logging on"
  83. 40$:    .asciz    "Insufficient free memory remaining"
  84. 50$:    .asciz    "Unknown speed"
  85. 60$:    .asciz    "Maximum of 31 entries in the BINARY_TYPE list"
  86. 70$:    .asciz    "Illegal file type string"
  87. 80$:    .asciz    "Retries must be between 3 and 30"
  88. 90$:    .asciz    "Time_out must be between 0 and 94"    ; /62/
  89. 100$:    .asciz    "Minimum packet length is 20"        ; /62/
  90. 110$:    .asciz    "Bad option or value"
  91. 120$:    .asciz    "Ambiguous SET command"
  92. 130$:    .asciz    "Unrecognizable SET command"
  93. 140$:    .asciz    "Can't connect TT to TT"
  94. 150$:    .asciz    "Syntax is ASS dev DK, only DK is supported"
  95. 160$:    .asciz    "Syntax is GET file.typ [dev:][asfile.new]"
  96. 170$:    .asciz    "Ambiguous topic"
  97. 180$:    .asciz    "Unrecognizable topic"
  98. 190$:    .asciz    "Server sub-commands are not supported"
  99. 200$:    .asciz    "Can't DIAL whilst DCD is asserted, use HANGUP first"
  100. 210$:    .asciz    "Invalid number of retries"
  101. 220$:    .asciz    "No previous number dialed"
  102. 230$:    .asciz    "Please SET MODEM first"
  103. 240$:    .asciz    "FORMAT string undefined"
  104. 250$:    .asciz    "Modem not restored to its idle state"
  105. 260$:    .asciz    "Unknown modem type"
  106. 270$:    .asciz    "No number found for specified name"
  107. 280$:    .asciz    "Aborted from keyboard"
  108. 290$:    .asciz    "Can't get wake$prompt from modem"
  109. 300$:    .asciz    "Range is 1 to 36 octal"
  110. 310$:    .asciz    "Illegal logical name"
  111. 320$:    .asciz    "WAKE_STRING undefined"
  112. 330$:    .asciz    "Please SET LINE first"
  113. 340$:    .asciz    "Logfile write error"
  114. 350$:    .asciz    "Ambiguous command"
  115. 360$:    .asciz    "Not running as a LOCAL Kermit"
  116. 370$:    .asciz    "Ambiguous REMOTE command"
  117. 380$:    .asciz    "Unrecognizable REMOTE command"
  118. 390$:    .asciz    "TT is not supported here"    ; /63/
  119. 400$:    .asciz    "Unrecognizable command"
  120. 410$:    .asciz    "Syntax is SEND file.typ [dev:][asfile.new]"
  121. 420$:    .asciz    "Unsupported command"        ; /E64/
  122. 430$:    .asciz    "Ambiguous option or value"    ; /E64/
  123. baderr:    .asciz    "Unknown error"
  124.     .even
  125.  
  126.     .psect    $code
  127.     .sbttl    Error message generator    ; /E64/ somewhat changed..
  128.  
  129. ;    F I P E R R
  130. ;
  131. ;    input:      (r5)    = error number
  132. ;    output:     2(r5)    = buffer for error message text
  133.  
  134. fiperr::save    <r0,r1,r2>
  135.     mov    4(r5)    ,r2        ; r2 := addr( errtxt )
  136.     mov    @2(r5)    ,r0
  137.     bgt    5$
  138.     neg    r0
  139. 5$:    cmp    r0,#256.        ; greater than 256?
  140.     bhis    6$            ; yes, internal error
  141.     movb    r0    ,@#FIRQB+fqerno    ; movbe the error number .
  142.     movb    #errfq    ,@#FIRQB+FQFUN    ; set up for sys err call
  143.     CALFIP
  144.     mov    #28.    ,r0        ; error text length
  145.     mov    #FIRQB+fqerno    ,r1    ; r1 := addr( actual msg )
  146.     br    10$            ; copy error message to buffer
  147. 6$:    sub    #256.,r0        ; get it in range
  148.     cmp    r0    ,#maxerr    ; is this a valid call today?
  149.     blos    7$            ; yes
  150.     clr    r0            ; badness
  151. 7$:    asl    r0            ; ya, get error number into word
  152.     mov    errmap(r0),r1        ; offset and get the text address
  153.     mov    #erbfsiz,r0        ; set maximum msg size
  154. 10$:    movb    (r1)+    ,(r2)+        ; go and transfer the text
  155.     beq    20$            ; did we find the end yet
  156.     sob    r0    ,10$        ; all thirty bytes worth.
  157. 20$:    clrb    @r2
  158. 40$:    unsave    <r2,r1,r0>
  159.     return                ; all done
  160.  
  161.  
  162.     .end
  163.