4 Replies - 1463 Views - Last Post: 05 April 2013 - 04:16 AM

#1 BackSlashx00  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 24-February 13

My first Hello World in Assembly

Posted 31 March 2013 - 10:16 PM

It is my first time programming in ASSEMBLY and the code looks very intimidating lol. I am running a 64-bit Windows OS so I am using a DOS-Box to view my result(s). What I really want to know is to understand every detail of this short piece of code:
ORG 100h

mov ah, 09
mov dx, msg
int 21h
mov ah, 08
int 21h
int 20h
msg db "Hello World!$"




I know mov ah 09 means move 9 into ah, but that is about all I know. Why must this source include ORG 100h and what does it mean. Can some one explain what all this means and why certain numbers are being used such as int 21h.

Is This A Good Question/Topic? 0
  • +

Replies To: My first Hello World in Assembly

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,277
  • Joined: 28-March 11

Re: My first Hello World in Assembly

Posted 01 April 2013 - 05:55 PM

Are you learning Assembly on your own, with a book or by a teacher?
Why are you learning 16Bit Assembly? Learning 16Bit Assembly is like going to school to be a mechanic/car builder and they teach you with a Model T, when everyone else is using newer, faster, better cars with electronics.
If a teacher is teaching you, do they not teach you about the code??? Are you not allowed to ask them questions???

ORGigin is used only with DOS .COM programs, it is where the machine code starts in memory. In your sample, address 100h (offset)

The rest are parameters for DOS interrupts.
Was This Post Helpful? 0
  • +
  • -

#3 BackSlashx00  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 24-February 13

Re: My first Hello World in Assembly

Posted 03 April 2013 - 09:58 PM

I am learning on my own, and it is difficult to find tutorials. I am using a FLAT ASSEMBLER (fasm).
Was This Post Helpful? 0
  • +
  • -

#4 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,277
  • Joined: 28-March 11

Re: My first Hello World in Assembly

Posted 04 April 2013 - 05:14 PM

x86 Assembly has been around for many years. There are tons of tutorials on the net. Tutorials for MASM or NASM can be used with FASM, the syntax might be a bit different, but the subject/idea is the same. 16bit (which you are teaching yourself) tutorials are almost non existent since it is dead.

I would suggest you learn 32bit Assembly or even 64bit Assembly, they are much easier to learn than 16bit DOS code which is dead - not supported on modern OS's as you can see since you need an emulator to run a program. You can do many more things with 32/64bit.
Was This Post Helpful? 0
  • +
  • -

#5 DoNotWant  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 59
  • Joined: 03-November 11

Re: My first Hello World in Assembly

Posted 05 April 2013 - 04:16 AM

http://www.youtube.c...8FEE68D&index=1
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1