home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / pcpo / pcdraw14.unp < prev    next >
Text File  |  1985-08-22  |  3KB  |  72 lines

  1. FOR THE USERS THAT HAVE 'PC-DRAW' V1.4.
  2. ---------------------------------------------
  3. The base for this procedure is PC-DRAW.UNP (for 1.2) found on this BBS.
  4. It is recommened that PC-DRAW.UNP be downloaded and read first. I will
  5. not repeat that information, but only detail the differences.
  6. ---------------------------------------------
  7. The target file to change is now PC-DRAW.EXE and not DIAGRAM.EXE.
  8. It seems that the intent of the protection is to access two different
  9. sectors on the orignal PC-DRAW #1 disk. This access is done with
  10. IBM ROM BIOS interrupt 13. On return from this interrupt the carry flag
  11. is set or reset to indicate failed or successful access. To pass the
  12. protection successfully the first access must always be successful and
  13. the second access must always fail. If this does not happen, the system
  14. will drop into an endless loop, outputting to the screen a string
  15. through interrupt 21.
  16. ---------------------------------------------
  17. Interrupt 13 is a two byte instruction. The first byte will be replaced
  18. by the instruction that sets or resets the carry flag to the condition
  19. that will allow the system not to fall into the endless loop. The
  20. second byte will be NOPed.
  21. ---------------------------------------------
  22. First access to disk.
  23. Setup for interrupt 13, exit based on CY
  24. 0A98:4D36 B200     MOV   DL,00-->drive #
  25. 0A98:4D38 B402     MOV   AH,02-->read operation
  26. 0A98:4D3A B600     MOV   DH,00-->head #
  27. 0A98:4D3C B525     MOV   CH,25-->track #
  28. 0A98:4D3E B100     MOV   CL,08-->sector #
  29. 0A98:4D40 B001     MOV   AL,01--># sectors to read
  30. 0A98:4D42 BB0000 MOV   BX,0000
  31. 0A98:4D45 CD13     INT   13----|------>CLC (First change)
  32.                   \----->NOP
  33. 0A98:4D47 721F     JB    4D68-->If access failed, CY=1. Then jump to
  34.                   endless loop. Else continue.
  35.                   (must never fail)
  36. ----------------------------------------------
  37. Second access to disk.
  38. Setup for interrupt 13, exit based on CY
  39. 0A98:4D49 B200     MOV   DL,00-->drive #
  40. 0A98:4D4B B402     MOV   AH,02-->read operation
  41. 0A98:4D4D B600     MOV   DH,00-->head #
  42. 0A98:4D4F B527     MOV   CH,27-->track #
  43. 0A98:4D51 B108     MOV   CL,08-->sector #
  44. 0A98:4D53 B001     MOV   AL,01--># of sectors to read
  45. 0A98:4D55 BB0000 MOV   BX,0000
  46. 0A98:4D58 CD13     INT   13----|------>STC (Second change)
  47.                   \----->NOP
  48. 0A98:4D5A 7209     JB    4D65-->If access failed, CY=1. Then jump to
  49.                   program continue. Else endless loop.
  50.                   (must always fail)
  51. ----------------------------------------
  52. Endless loop for second access to disk if passed.
  53. 0A98:4D5C BA0102 MOV   DX,0201
  54. 0A98:4D5F B409     MOV   AH,09-->DOS function (output string)
  55. 0A98:4D61 CD21     INT   21----->DOS function call(AH=function)
  56. 0A98:4D63 EBF7     JMP   4D5C--->Do it again (forever!!)
  57. -----------------------------------------
  58. Just passing through to program continuation.
  59. 0A98:4D65 EB0A     JMP   4D71
  60. 0A98:4D67 90     NOP
  61. -----------------------------------------
  62. Endless loop for first access to disk if failed.
  63. 0A98:4D68 BA0102 MOV    DX,0201
  64. 0A98:4D6B B409     MOV    AH,09-->DOS function (output string)
  65. 0A98:4D6D CD21     INT    21----->DOS function call(AH=function)
  66. 0A98:4D6F EFB7     JMP    4D68--->Do it again (forever!!)
  67. ------------------------------------------
  68. continue program
  69. 0A98:4D71 07     POP     ES
  70. ...
  71. JMP    4D68--->Do it again (forever!!)
  72. ----------------------------