HD1_0_63.rtf

The following debug script will write zeros to the 63rd sector of
the first hard drive.  It can be modified to write to any sector
and fixed drive.
Writing to your hard drive in this manner may be hazardious to its
health.		
		  **** USE AT YOUR OWN RISK  ****

DEBUG  SCRIPT

- F 300 L200 0	Fill at offset 300 512 bytes of value 0
- A 100		Assemble at offset 100

	**** Set up registers for INT 13 - Function 03   ****

  MOV AX,301		AH= 03 INT 13 function 03 (Write Disk Sectors)
			AL= 01 indicates the number of sectors to write (1)
  MOV BX,300		BH= 03 BL= 00 will point to buffer area at offset 300
  MOV CX,3F		CH= 00 Specifies cylinder 0 for INT 13 function 03
			CL= 3F Specifies sector 63 (3F Hex)
				(MBR is sector 1)
  MOV DX,0080		DH= 00 Specifies head 0
			DL= 80 Specifies physical fixed drive 1
		  	(81=2nd drive, 82=3rd drive.  80-87 allowed )

  INT 13		call BIOS INT 13 Disk I/O Routine

	****** Insert information below to write message to screen ******

  		MOV DX, 0200	DX points to the location of the text string at offset 200
  		MOV AH,9		9 specifies String Print

  		INT 21		call DOS INT 21 Screen Handling Routine

	****** END of Insert

  INT 20		Return control to DOS or DEBUG
(enter)

		If Insert was added. Type the following line with modified text

		-A200
	 	      db ' Text here will print to the screen  $' 

-G=100		Run Program
-Q		Quit

----------------------------------------------------------

To save program to disk as "myprog10.com"

-nmyprog10.com
-RBX
    BX 0000
    :
(enter)	BX & CX Determine the size of file to be written
-RCX
    CX 0000
    : 500

-W		Write program "myprog1o.com to disk
	Writing 0500 Bytes