3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to write the world's smallest "Hello World!" executable for PC

Step 3Debugging and checking the code

Debugging and checking the code
«
  • helloworld30.gif
  • helloworld31.gif
Should be wise to check your code before you execute it because if something incorrect there's a big chance of DEBUG.EXE will pobably crash and all your work is lost :(

First we will dissassemble back the app in memory:

- u 0100
????:0100 B409 MOV AH, 09
????:0102 BA0801 MOV DX, 0108
????:0105 CD21 INT 21
????:0107 C3 RET

The rest is the string data that is mistakelly taken as code, the app ends at ????:0115

Why not check now the data? to do so:

- d 0100
????:0100 B4 09 BA 08 01 CD 21 C3-48 65 6C 6F 20 57 6F ......!.Hello Wo
????:0110 72 6C 64 21 24 ?? ?? ??-?? ?? ?? ?? ?? ?? ?? rld!$

Data after ????:0115 is trash that will never be executed or saved to the .COM, so, is ok if they are different from the snapshot :)

Our next step should be executing the Hello World APP!! Yay.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
0
Followers
1
Author:JustBurn