The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: t48605 on April 04, 2006, 01:59:49 AM

Title: two simple question of newbie
Post by: t48605 on April 04, 2006, 01:59:49 AM
yeah the first is about memory address , for example : 0x11223344 , what does it mean ??? ( 0x what is it ? )
and the second is two instruction ( uhm I hope I remember them exactly )
they are  mov ah,4C0h   
                and
              mov ax,09h
so what is the roles of them ???
thanks !!!
                     
Title: Re: two simple question of newbie
Post by: zcoder on April 04, 2006, 02:07:51 AM
t48605,
0x just before numbers means hex a hex value

mov ah,4C0h loads ah a 8bit reg with a value, but 4c0h is to big a value for ah

mov ax,09h is the same but it's a 16 bit reg AX is both ah and al reg's together.
ah being the high order reg while al is the low order reg, ah+al = AX.

I hope that explains it for you??

Zcoder....
Title: Re: two simple question of newbie
Post by: PBrennick on April 04, 2006, 03:35:30 AM
t48605,,
To amplify on what zcoder said, if you were to use

mov ax,4C00h

it would be a 16bit instruction that is used to exit from your program, usually to DOS.

mov ax,09h
is used to set up for the 16bit instruction called Print String.  The string would be pointed to by DX

Both of those instructions are executed by

int 21h

hth,
Paul
Title: Re: two simple question of newbie
Post by: zcoder on April 04, 2006, 04:05:02 AM
PBrennick,
You think thats what he meant? silly me LOL

Zcoder....
Title: Re: two simple question of newbie
Post by: t48605 on April 04, 2006, 12:20:53 PM
thanks ! Both of you  :P
Title: Re: two simple question of newbie
Post by: PBrennick on April 05, 2006, 03:53:54 AM
t48605,
It is our pleasure, we enjoy helping, really!

Paul