home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / typd / trap_qb.pat < prev    next >
Encoding:
Text File  |  1986-09-30  |  2.0 KB  |  61 lines

  1. Here is the recipe to remove the HALT which QuickBASIC executes
  2. when an unrecoverable error is encountered. Should be okay with
  3. all versions of QB.
  4.  
  5. Note: Make sure you have backups of any files your are going
  6. modify with DEBUG.....Edsel Murphy is not dead........
  7.  
  8. A> debug bcom20.lib
  9.  
  10. First make sure that a call to INT 16 exists. It should
  11. occur in 2 places.
  12.  
  13. -s xxxx:1 ffff cd 16
  14. Where xxxx equals the DS register.
  15.  
  16. xxxx:5509
  17. xxxx:5516
  18. -u 5503
  19.  
  20. xxxx:5503 9C            PUSHF
  21. xxxx:5504 55            PUSH  BP
  22. xxxx:5505 56            PUSH  SI
  23. xxxx:5506 57            PUSH  DI
  24. xxxx:5507 B401          MOV   AH,01
  25. xxxx:5509 CD16          INT   16   <---- #1
  26. xxxx:550B 5F            POP   DI
  27. xxxx:550C 5E            POP   SI
  28. xxxx:550D 5D            POP   BP
  29. xxxx:550E 7445          JZ    5555
  30. xxxx:5510 9D            POPF
  31. xxxx:5511 55            PUSH  BP
  32. xxxx:5512 56            PUSH  SI
  33. xxxx:5513 57            PUSH  DI
  34. xxxx:5514 B400          MOV   AH,00
  35. xxxx:5516 CD16          INT   16   <---- #2
  36.  
  37. Second, find where the INT 16 loop is re-executed.(wait for input)
  38. -s xxxx:1 ffff 9d 74 ab
  39.  
  40. xxxx:5555
  41. -u 554f
  42.  
  43. xxxx:554F 32E4          XOR   AH,AH
  44. xxxx:5551 0BE4          OR    SP,SP
  45. xxxx:5553 EB05          JMP   555A
  46. xxxx:5555 9D            POPF
  47. xxxx:5556 74AB          JZ    5503 <---- jumps back to 1st INT 16
  48.  
  49. Now patch this location with NOP's!!!!
  50.  
  51. -e xxxx:5556 90 90
  52.  
  53. This should fix the culprit once and for all.
  54.  
  55. -w
  56.  
  57. Once you have done this now comes the fun part of re-LINKing all
  58. of your programs.
  59.  
  60. Ray Horton 9/8/86
  61.