home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / cdactual / demobin / share / program / Asm / 86LIB3.ZIP / ERROR.8 < prev    next >
Encoding:
Text File  |  1989-01-14  |  4.6 KB  |  184 lines

  1. _window     db  '╔══════════════════════════════════════════╗'
  2.             db  '║                                          ║'
  3.             db  '╚══════════════════════════════════════════╝'
  4. ;
  5. _errorcode  db  0
  6.           db 28,'Invalid Function Number',0
  7.           db 33,'File Not Found',0
  8.           db 33,'Path Not Found',0
  9.           db 21,'Too Many Open Files (no handles left)',0
  10.           db 33,'Access Denied',0
  11.           db 33,'Invalid Handle',0
  12.           db 26,'Memory Control Blocks Destroyed',0
  13.           db 31,'Insufficient Memory',0
  14.           db 27,'Invalid Memory Block Address',0
  15.           db 30,'Invalid Environment',0
  16.           db 33,'Invalid Format',0
  17.           db 30,'Invalid Access Code',0
  18.           db 34,'Invalid Data',0
  19.           db 34,'Unknown unit',0
  20.           db 26,'Invalid Drive Was Specified',0
  21.           db 21,'Attempt to remove The Current Directory',0
  22.           db 32,'Not Same Device',0
  23.           db 33,'No More Files',0
  24.           db 30,'Disk writ protected',0
  25.           db 34,'Unknown unit',0
  26.           db 32,'Drive not ready',0
  27.           db 32,'Unknown command',0
  28.           db 32,'Data error (CRC)',0
  29.           db 27,'Bad request structure lenght',0
  30.           db 35,'Seek error',0
  31.           db 30,'Unknown media type',0
  32.           db 31,'Sector not found',0
  33.           db 29,'Printer out of paper',0
  34.           db 34,'Write fault',0
  35.           db 35,'Read fault',0
  36.           db 32,'General failure',0
  37.           db 31,'Sharing violation',0
  38.           db 33,'Lock violation',0
  39.           db 30,'Disk change invalid',0
  40.           db 33,'FCB unavailable',0
  41.           db 28,'Sharing buffer exceeded',0
  42.           db ,0,,0,,0,,0,,0,,0,,0,0,,0,,0,0,0,0
  43.           db 26,'Unsupported network request',0
  44.           db 26,'Remote machine not listening',0
  45.           db 28,'Duplicate name on network',0
  46.           db 31,'Network not found',0
  47.           db 34,'Network busy',0
  48.           db 24,'Device no longer exists on network',0
  49.           db 26,'NetBIOS command limit exceeded',0
  50.           db 24,'error in network adapter hardware',0
  51.           db 25,'Incorrect response from network',0
  52.           db 28,'Unexpected network error',0
  53.           db 28,'Remote adapter incompatible',0
  54.           db 32,'Print queue full',0
  55.           db 34,'Queue not full',0
  56.           db 26,'Not enough room for print file',0
  57.           db 29,'Network name deleted',0
  58.           db 33,'Access denied',0
  59.           db 25,'Incorrect network device type',0
  60.           db 28,'Network name not found',0
  61.           db 26,'Network name limit exceeded',0
  62.           db 25,'NetBIOS session limit exceeded',0
  63.           db 33,'Temporary pause',0
  64.           db 26,'Network request not accepted',0
  65.           db 24,'Print or disk redirection paused',0,0,0,0,0,0,0,0
  66.           db 30,'File already exists',0,0
  67.           db 29,'Cannot make directory',0
  68.           db 25,'Fail on int 24H (critical error)',0
  69.           db 31,'Out of structures',0
  70.           db 31,'Already assigned',0
  71.           db 31,'Invalid password',0
  72.           db 31,'Invalid parameter',0
  73.           db 32,'Net write fault',0
  74. ;
  75. _errorsave  dw  ?
  76. _row        db  10
  77. _col        db  19
  78. _erroradd   dw  ?
  79. _count      dw  0
  80. _pointer    dw  0
  81. _scrnbuffer dw  2001 dup ?
  82. _lenght     dw  ?
  83. ;
  84. _error:
  85.   mov ds,cs
  86.   pop _errorsave
  87.  
  88.   pop ax          ;recover error code
  89.   cmp ax,059
  90.   if z jmp _error9
  91.   mov si,offset _errorcode
  92.   mov ds,cs
  93.   mov dx,0
  94.   xchg ah,al
  95. _error1:
  96.   lodsb
  97.   cmp al,0
  98.   jnz _error1
  99.   inc dx
  100.   cmp dl,ah
  101.   jnz _error1
  102.   mov _erroradd,si
  103. ;
  104.   mov dx,-1
  105. _error6:
  106.   lodsb
  107.   inc dx
  108.   cmp al,0
  109.   jnz _error6
  110.   mov _lenght,dx
  111. ;
  112.   mov ax,_lenght
  113.   cmp ax,0
  114.   if z jmp _error9
  115.  
  116.   call _beep
  117.   push cs
  118.   mov ax,offset _scrnbuffer
  119.   push ax
  120.   call _sav_scrn
  121. ;
  122. _error2:
  123.   mov dx,_count
  124.   mov bx,_pointer
  125.   cmp dx,3
  126.   jz _error3
  127.   mov ax,120     ;IF YOU WANT A DIFFERENT ATTRIBUTE, CHANGE THIS VALUE (120)
  128.   push ax
  129.   mov ah,_row
  130.   mov al,_col
  131.   push ax
  132.   push cs
  133.   mov ax,offset _window
  134.   add ax,bx
  135.   push ax
  136.   mov ax,44
  137.   push ax
  138.   call _text_wrt
  139.   inc _count
  140.   add _pointer,44
  141.   inc _row
  142.   jmp _error2
  143. ;
  144. _error3:
  145.   mov si,_erroradd
  146.   mov ax,138
  147.   push ax
  148.   sub _row,2
  149.   inc _col
  150.   mov ah,_row
  151.   mov al,[si]           ;mov al,_col
  152.   push ax
  153.   push cs
  154.   mov ax,_erroradd
  155.   inc ax
  156.   push ax
  157.   mov ax,_lenght
  158.   push ax
  159.   call _text_wrt
  160. ;
  161.   mov dx,20
  162. _error4:
  163.   mov cx,0ffff
  164. _error5:
  165.   loop _error5
  166.   dec dx
  167.   cmp dx,0
  168.   jnz _error4
  169. ;
  170. _error7:
  171.   mov _row,10
  172.   mov _col,19
  173.   mov _count,0
  174.   mov _pointer,0
  175.  
  176.   push cs
  177.   mov ax,offset _scrnbuffer
  178.   push ax
  179.   call _rst_scrn
  180. _error9:
  181.   mov ds,cs
  182.   push _errorsave
  183.   ret
  184.