home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / pdp11 / k11rte.mac < prev    next >
Text File  |  2020-01-01  |  6KB  |  202 lines

  1.     .title    k11rte    error codes and message text for kermit-11/rt11
  2.     .ident    /2.22/
  3.  
  4.  
  5.     .if ndf, K11INC
  6.     .ift
  7.     .include    /IN:K11MAC.MAC/
  8.     .endc
  9.  
  10.  
  11. ;    Brian Nelson  10-Aug-84  09:24:56
  12. ;
  13. ;    Removed from K11RT4.MAC to save total size
  14. ;
  15. ;
  16. ;    Copyright (C) 1984 Change Software, Inc.
  17.  
  18.  
  19.  
  20.  
  21.  
  22.     .psect    $code
  23.     .psect    errdat    ,ro,d,lcl,rel,con
  24.     .sbttl    error codes that we will need thoughout Kermit-11
  25.  
  26.  
  27.     er$cre    ==    -1        ; can't create a file
  28.     er$dev    ==    -2        ; invalid device name
  29.     er$eof    ==    -3        ; end of file
  30.     er$fnf    ==    -4        ; file not found
  31.     er$fnm    ==    -5        ; bad filename
  32.     er$ful    ==    -6        ; device full
  33.     er$nmf    ==    -7        ; no more files found
  34.     er$iop    ==    -10        ; invalid i/o request
  35.     er$sys    ==    -11        ; system error
  36.     er$lby    ==    -12        ; lun open
  37.     er$rer    ==    -13        ; read error
  38.     er$wer    ==    -14        ; write error
  39.     er$prv    ==    -15        ; protection error
  40.     er$rtb    ==    -16        ; record too big
  41.     er$que    ==    -17        ; no que elements
  42.     er$nin    ==    -20        ; no input for .mtget
  43.     er$nat    ==    -21        ; not attached for .mtxxxx
  44.     er$lun    ==    -22        ; non-existant lun for .mtxxxx
  45.     er$bsy    ==    -23        ; device not available
  46.     er$buf    ==    -24        ; invalid buffer for xm exec
  47.     er$sup    ==    -25        ; missing exec feature
  48.     er$map    ==    -26        ; terminal unit not initialized
  49.     er$spe    ==    -27
  50.     er$sy1    ==    -30
  51.     er$sy2    ==    -31
  52.     er$sy3    ==    -32
  53.     er$sy4    ==    -33
  54.     er$vol    ==    -34        ; not an rt11 volume
  55.     er$nop    ==    -35        ; i/o channel not open
  56.     er$wld    ==    -36        ; no wildcard support
  57.     er$xco    ==    -37        ; could not access XC:/XL:
  58.     er$fun    ==    -40        ; invalid .spfun code
  59.     er$hrd    ==    -41        ; hard i/o error
  60.     er$fet    ==    -42        ; no room to load handler
  61.     er$ukn    ==    -43
  62.  
  63.     fa$imp    ==    -44        ; /51/ .SERR fatal errors
  64.     fa$nhd    ==    -45        ; /51/ No device handler
  65.     fa$dio    ==    -46        ; /51/ Error in directory I/O
  66.     fa$fet    ==    -47        ; /51/ Fetch error
  67.     fa$ovr    ==    -50        ; /51/ Overlay error
  68.     fa$dfl    ==    -51        ; /51/ Directory full
  69.     fa$adr    ==    -52        ; /51/ Bad address
  70.     fa$lun    ==    -53        ; /51/ Bad lun
  71.     fa$idr    ==    -54        ; /51/ Bad directory
  72.     er$fgf    ==    -55        ; /51/ Fetching in FG
  73.     er$pla    ==    -56        ; /51/ General PLAS error
  74.  
  75.     er$lin    ==    -57        ; /59/ Bad line for TSX+
  76.     maxerr    ==    57        ; must be abs(maxerr)
  77.     nodata    ==    er$nin        ; no data available
  78.  
  79.     .psect    errdat            ; error message text
  80.     .enabl    lc
  81.  
  82. baderr:    .asciz    #Unknown error call#
  83. nosup:    .asciz    #Missing executive feature#
  84.     .even
  85.  
  86. errmap:    .word    5$,10$,20$,30$,40$,50$,60$,70$,100$,110$,120$
  87.     .word    130$,140$,150$,160$,170$,200$,210$,220$,230$,240$,250$
  88.     .word    260$,270$,300$,310$,320$,330$,340$,350$,360$,370$,400$
  89.     .word    410$,420$,430$,440$,450$,460$,470$,500$,510$,520$,530$
  90.     .word    540$,550$,560$,570$
  91.     .word    baderr,0
  92. 5$:    .byte    0
  93. 10$:    .asciz    #Can't create file#
  94. 20$:    .asciz    #Invalid device name#
  95. 30$:    .asciz    #End of file#
  96. 40$:    .asciz    #File not found#
  97. 50$:    .asciz    #Bad filename#
  98. 60$:    .asciz    #Device full#
  99. 70$:    .asciz    #No more files#
  100. 100$:    .asciz    #Invalid i/o operation request#
  101. 110$:    .asciz    #System error#
  102. 120$:    .asciz    #Logical unit already open#
  103. 130$:    .asciz    #Device read error#
  104. 140$:    .asciz    #Device write error#
  105. 150$:    .asciz    #File is protected#
  106. 160$:    .asciz    #Record too large for user buffer#
  107. 170$:    .asciz    #No QUE elements available#
  108. 200$:    .asciz    #MT service - No data available/Buffer overflow#
  109. 210$:    .asciz    #MT service - Line not attached#
  110. 220$:    .asciz    #MT service - Non-existent unit#
  111. 230$:    .asciz    #MT service - Device not available#
  112. 240$:    .asciz    #MT service - Bad user buffer address (XM)#
  113. 250$:    .asciz    #Multiple Terminal Service support not present in executive#
  114. 260$:    .asciz    #MT service - RT11 device unit not mapped to internal LUN#
  115. 270$:    .asciz    #Unknown speed#
  116. 300$:    .asciz    #System error from RT11 .CLOSE#
  117. 310$:    .asciz    #System error from RT11 .CSISPC#
  118. 320$:    .asciz    #System error from RT11 .ENTER#
  119. 330$:    .asciz    #System error from RT11 .FETCH#
  120. 340$:    .asciz    #Disk home block is not RT11 format#
  121. 350$:    .asciz    #I/O channel not open#
  122. 360$:    .asciz    #Wildcarding not supported for this operation#
  123. 370$:    .asciz    #Could not open the XC/XL port#
  124. 400$:    .asciz    #Invalid function code to .SPFUN for XC:/XL:#
  125. 410$:    .asciz    #Hard I/O error on device XC:/XL:#
  126. 420$:    .asciz    #Insufficient lowcore memory to load handler#
  127. 430$:    .asciz    #Unknown serial line device name#
  128. 440$:    .asciz    #Internal/unknown error from .SERR#    ; /51/
  129. 450$:    .asciz    #NO device handler#            ; /51/
  130. 460$:    .asciz    #Error doing directory I/O#        ; /51/
  131. 470$:    .asciz    #.FETCH error, please manually load handler# ; /51/
  132. 500$:    .asciz    #Overlay read error#            ; /51/
  133. 510$:    .asciz    #No room for file in directory#        ; /51/
  134. 520$:    .asciz    #Invalid address#            ; /51/
  135. 530$:    .asciz    #Invalid channel#            ; /51/
  136. 540$:    .asciz    #Invalid directory structure#        ; /51/
  137. 550$:    .asciz    #Can't .FETCH handler in Foreground. Please LOAD it# ; /51/
  138. 560$:    .asciz    #PLAS mapping error#
  139. 570$:    .asciz    #Invalid line for TSX - use a CL line, as in CL1:#
  140.     .even
  141.  
  142. plaser::.word    5$,10$,20$,30$,40$,50$,60$,70$,100$,110$
  143. 5$:    .asciz    #PLAS- Window alingnment error#
  144. 10$:    .asciz    #PLAS- Attempt to define more the seven windows#
  145. 20$:    .asciz    #PLAS- Invalid region identifier#
  146. 30$:    .asciz    #PLAS- Invalid window identifier#
  147. 40$:    .asciz    #PLAS- Offset into window inconsistent with map size#
  148. 50$:    .asciz    #PLAS- Specified window not mapped#
  149. 60$:    .asciz    #PLAS- No region control blocks available#
  150. 70$:    .asciz    #PLAS- Insufficient memory available to create region#
  151. 100$:    .asciz    #PLAS- Invalid region size or insufficient contiguous memory#
  152. 110$:    .asciz    #PLAS- Unknown plas error#
  153.     .even
  154.  
  155.  
  156.     .sbttl    error print and mapping
  157.  
  158.     .psect    $code
  159.  
  160. maperr::asl    r0
  161.     mov    plaser(r0),r0
  162.     return
  163.  
  164.  
  165. ;    R M S E R R 
  166. ;
  167. ;    input:    @2(r5)    error number    (fortran/bp2 calling standard)
  168. ;    output:    4(r5)    the error text
  169.  
  170.  
  171. syserr::calls    rmserr    ,<#2,r5,2(r5)>    ; simple
  172.     return
  173.  
  174. rmserr::save    <r0,r1>            ; the registers we will use
  175.     mov    #baderr    ,r1        ; preset bad error text
  176.     mov    4(r5)    ,r0        ; insure default of nothing
  177.     clrb    @r0            ; .asciz
  178.     mov    @2(r5)    ,r0        ; the error number
  179.     bge    10$            ; must change into > 0
  180.     neg    r0            ; make it > 0
  181. 10$:    cmp    r0    ,#maxerr    ; is this a valid call today?
  182.     bhi    20$            ; yes
  183.     asl    r0            ; no, get error number into word
  184.     mov    errmap(r0),r1        ; offset and get the text address
  185. 20$:    mov    4(r5)    ,r0        ; where to put the error text
  186.     mov    r1    ,-(sp)
  187. 30$:    movb    (r1)+    ,(r0)+        ; copy it until a null byte
  188.     bne    30$            ; next please
  189.     cmp    (sp)+    ,#baderr    ; ?Unknown error call ?
  190.     bne    100$            ; no
  191.     movb    #'(    ,-1(r0)        ; yes, convert the error number
  192.     deccvt    @2(r5)    ,r0        ; so we can see what it was
  193.     add    #6    ,r0        ; skip past the converted number
  194.     movb    #')    ,(r0)+        ; terminate the string
  195.     movb    #40    ,(r0)+        ; a space to be nice
  196.     clrb    @r0            ; finally, .asciz please
  197. 100$:    unsave    <r1,r0>            ; pop registers we used and exit
  198.     return                ; bye
  199.     
  200.  
  201.     .end
  202.