Step 5Storing the Hello World executable to "hellow.com"
To finish our app, type:
-n C:\hellow.com
-r BX
BX 0000
:0
-r CX
CX 0000
:15
-w
Writing 00015 bytes
Note that i've used 15 due for numeric values in DEBUG.EXE are threated as hexadecimals: 0x15 = 21 decimal
After writing, "hellow.com" file is created at C:\ !!!
You can change the filename and path of command "n" at your choice.
Before we terminate, let me explain what each command do:
"n" = Name (filename that will be used to load/save files into DEBUG's Memory)
"r" = Register (used to change register value, but while writing to file BX:CX it's used to specify the length to write)
"w" = Write to a file or to a sector on a disk if you specify the drive and the sector.
But let's not worry about "w" command being able to write directlly to a disk sector, if you just write "w (address)", nothing bad happens.
I wont teach you how to read/write to a sector but in case you want to read/write to a sector of a disk, use the Drive A (0) for experiments.
Don't try to modify the floopy disk boot image with this Hello World code because it won't work, INTR 21h is only installed when COMMAND.COM is executed.
To finish the tutorial, type:
-q
Then execute the "hellow.com" file!
C:\WINDOWS> cd C:\
C:\> hellow.com
Hello World!
C:\>
Congratulations! We have our Hello World executable created and running! :D
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|












































