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

  1.     .title    fcsdir    return fcs/dir error text into 64 byte array
  2.  
  3.     .ident    /82.1.2/
  4. ;
  5. ;
  6. ;    edits:    BDN    09-Dec-83 21:03    Change FCSERR psect to I space
  7. ;                    since it will be in an overlay
  8. ;        EJR    29-Dec-83 15:52 Changed from FCSERR to DIRERR
  9. ;                    changed from 2 to 3 digit error number
  10. ;        BDN    08-Jan-84 13:40    RSX11M-PLUS data psects
  11. ;        EJR    20-Jan-84 10:05 changed to both dir and fcs error
  12. ;        BDN    23-Oct-85 10:00    Remove FCS only errors for Kermit
  13. ;
  14. ;
  15. ;    usage:    call fcsdir(errnum,errtxt)
  16. ;
  17. ;    errtxt is returned .asciz
  18.  
  19.     .psect
  20.  
  21. ;    F C S D I R
  22. ;
  23. ;    module size:    5200 (8) bytes ?
  24.  
  25.  
  26. direrr::
  27. fcsdir::mov    r1    ,-(sp)        ; save R1
  28.     mov    r2    ,-(sp)        ; save R2
  29.     mov    R3    ,-(sp)        ; save R3        ; ejr
  30.     mov    4(r5)    ,r2        ; get addr of return text
  31.     mov    #100    ,r1        ; clear returned text first
  32. 10$:    movb    #40    ,(r2)+        ; simple
  33.     sob    r1    ,10$        ; next please
  34.     mov    4(r5)    ,r2        ; dest for the text
  35.     clrb    @r2            ; 
  36.     mov    @2(r5)    ,r1        ; error number to return
  37.     bgt    20$            ; > 0 ?
  38.     neg    r1            ; always insure error > 0
  39. 20$:    mov    r1    ,-(sp)        ; save error number
  40.     clr    r0            ; and setup to convert to ascii
  41.     div    #10.    ,r0        ; get the last digit    ; ejr
  42.     add    #'0    ,r1        ; make it ascii    ch[1]    ; ejr
  43.     mov    R1    ,R3        ; save it        ; ejr
  44.     mov    R0    ,R1        ; get the remainder    ; ejr
  45.     clr    R0            ; set up to convert    ; ejr
  46.     div    #10.    ,R0        ; get the second digit    ; ejr
  47.     add    #60    ,R1        ; make it ascii    ch[2]    ; ejr
  48.     add    #60    ,R0        ; make it ascii    ch[3]    ; ejr
  49.     movb    #40    ,(r2)+        ; errortext[1] := ' ';
  50.     movb    #'-    ,(r2)+        ; errortext[2] := '-';
  51.     movb    r0    ,(r2)+        ; errortext[3] := ch[1] ;
  52.     movb    r1    ,(r2)+        ; errortext[4] := ch[2] ;
  53.     movb    r3    ,(r2)+        ; errortext[5] := ch[3] ;
  54.     movb    #40    ,(r2)+        ; errortext[6] := ' '
  55.     clrb    @r2
  56.     mov    (sp)+    ,r1        ; restore error number
  57.     cmp    r1    ,#127.        ; range ok ?
  58.     bgt    100$            ; no, just exit
  59.     asl    r1            ; convert to word offset
  60.     mov    msgtbl-2(r1),r1        ; get address of the text
  61.     beq    100$            ; nothing (unused error)
  62.     mov    #100-6    ,r0        ; maximum number of characters to copy
  63. 30$:    movb    (r1)+    ,(r2)+        ; copy until null
  64.     beq    100$            ;
  65.     sob    r0    ,30$        ; next please
  66. 100$:    mov    (SP)+    ,R3        ; restore R3        ; ejr
  67.     mov    (sp)+    ,r2        ; restore R2
  68.     mov    (sp)+    ,r1        ; and r1 also please
  69.     return                ; bye
  70.  
  71.  
  72.     .psect    direrr    ,ro,d,lcl,rel,con
  73.  
  74.  
  75. msgtbl:    .word       1$,  2$,  3$,  4$,  5$,  6$,  7$,  8$,  9$, 10$
  76.     .word      11$, 12$, 13$, 14$, 15$, 16$, 17$, 18$, 19$, 20$
  77.     .word      21$, 22$, 23$, 24$, 25$, 26$, 27$, 28$, 29$, 30$
  78.     .word      31$, 32$, 33$, 34$, 35$, 36$, 37$, 38$, 39$, 40$
  79.     .word      41$, 42$, 43$, 44$, 45$, 46$, 47$, 48$, 49$, 50$
  80.     .word      51$, 52$, 53$, 54$, 55$, 56$, 57$, 58$, 59$, 60$
  81.     .word      61$, 62$, 63$, 64$, 65$, 66$, 67$, 68$, 69$, 70$
  82.     .word      71$, 72$, 73$, 74$, 75$, 76$, 77$, 78$, 79$, 80$
  83.     .word      81$, 82$, 83$, 84$, 85$, 86$, 87$, 88$, 89$, 90$
  84.     .word      91$, 92$, 93$, 94$, 95$, 96$, 97$, 98$, 99$,100$
  85.     .word     101$,102$,103$,104$,105$,106$,107$,108$,109$,110$
  86.     .word     111$,112$,113$,114$,115$,116$,117$,118$,119$,120$
  87.     .word     121$,122$,123$,124$,125$,126$,127$
  88.  
  89.  
  90.     .enabl    lc
  91.  
  92. 1$:    .asciz    \Bad parameters/Insufficient dynamic storage\
  93. 2$:    .asciz    \Invalid function code\
  94. 3$:    .asciz    \Device not ready\
  95. 4$:    .asciz    \Parity error/Insufficient dynamic storage for send\
  96. 5$:    .asciz    \Hardware option not present/Un-assigned LUN\
  97. 6$:    .asciz    \Illegal user buffer/Device handler not resident\
  98. 7$:    .asciz    \Device not attached/Task not active\
  99. 8$:    .asciz    \Device already attached\
  100. 9$:    .asciz    \Device not attachable\
  101. 10$:    .asciz    \End of file detected/Issuing task not checkpointable\
  102. 11$:    .asciz    \End of volume detected/Task is checkpointable\
  103. 12$:    .asciz    \Write attempted to locked unit\
  104. 13$:    .asciz    \Data overrun\
  105. 14$:    .asciz    \Send/receive failure\
  106. 15$:    .asciz    \Request terminated\
  107. 16$:    .asciz    \Privilege violation\
  108. 17$:    .asciz    \Sharable resource in use\
  109. 18$:    .asciz    \Illegal overlay request/No swap space available\
  110. 19$:    .asciz    \Odd byte count\
  111. 20$:    .asciz    \LBN too large\
  112. 21$:    .asciz    \Invalid UDC module #\
  113. 22$:    .asciz    \UDC connect error\
  114. 23$:    .asciz    \Caller's nodes exhausted\
  115. 24$:    .asciz    \Device full\
  116. 25$:
  117. 26$:
  118. 27$:
  119. 28$:
  120. 29$:
  121. 30$:
  122. 31$:
  123. 32$:
  124. 33$:
  125. 34$:
  126. 35$:
  127. 36$:
  128. 37$:
  129. 38$:
  130. 39$:
  131. 40$:
  132. 41$:
  133. 42$:
  134. 43$:
  135. 44$:
  136. 45$:
  137. 46$:
  138. 47$:
  139. 48$:
  140. 49$:
  141. 50$:
  142. 51$:
  143. 52$:
  144. 53$:
  145. 54$:
  146. 55$:
  147. 56$:
  148. 57$:
  149. 58$:    .byte    0
  150. 59$:    .asciz    \Fatal hardware error\
  151. 60$:
  152. 61$:
  153. 62$:
  154. 63$:
  155. 64$:
  156. 65$:    .asciz    \device off line\
  157. 66$:    .asciz    \Block check, CRC, or framing error\
  158. 67$:    .asciz    \Device online\
  159. 68$:    .asciz    \No such node\
  160. 69$:    .asciz    \Path lost to partner\
  161. 70$:    .asciz    \Bad logical buffer\
  162. 71$:    .byte    0
  163. 72$:    .asciz    \No dynamic space available\
  164. 73$:
  165. 74$:
  166. 75$:
  167. 76$:
  168. 77$:    .byte    0
  169. 78$:    .asciz    \No data available\
  170. 79$:    .asciz    \Task not linked to ICS/ICR\
  171. 80$:    .asciz    \Task not installed\
  172. 81$:    .asciz    \Device offline/Illegal mapping specified\
  173. 82$:    .asciz    \Invalid escape sequence\
  174. 83$:    .asciz    \Partial escape sequence\
  175. 84$:    .asciz    \Alignment error\
  176. 85$:    .asciz    \Address window allocation overflow\
  177. 86$:    .asciz    \Invalid region ID\
  178. 87$:    .asciz    \Invalid address window ID\
  179. 88$:    .asciz    \Transfer rejected by receiving CPU/Invalid TI parameter\
  180. 89$:    .asciz    \EFN already specified/Invalid send buffer size ( > 255.)\
  181. 90$:    .asciz    \LUN locked in use\
  182. 91$:    .asciz    \Inconsistent qualifier usage/Invalid UIC\
  183. 92$:    .asciz    \Invalid device/unit or device not a terminal\
  184. 93$:    .asciz    \Invalid time parameters\
  185. 94$:    .asciz    \Not a network task/Partition/region not in system\
  186. 95$:    .asciz    \Timeout on request/Invalid priority ( .GT. 250.)\
  187. 96$:    .asciz    \Connection rejected/Invalid LUN\
  188. 97$:    .asciz    \Invalid event flag ( .GT. 64.)\
  189. 98$:    .asciz    \Part of DPB out of user's space\
  190. 99$:    .asciz    \DIC or DPB size invalid\
  191. 100$:
  192. 101$:
  193. 102$:
  194. 103$:
  195. 104$:
  196. 105$:
  197. 106$:
  198. 107$:
  199. 108$:
  200. 109$:
  201. 110$:
  202. 111$:
  203. 112$:
  204. 113$:
  205. 114$:
  206. 115$:
  207. 116$:
  208. 117$:
  209. 118$:
  210. 119$:
  211. 120$:
  212. 121$:
  213. 122$:
  214. 123$:
  215. 124$:
  216. 125$:
  217. 126$:
  218. 127$:
  219. 128$:    .byte    0
  220.  
  221.     .even
  222.  
  223.     .end
  224.