Sign in to follow this  

A little problem with assembly

Recommended Posts

mov dx,Text		; DS:DX points to message
mov ah,9 			; function 9 - display string
int 21h 			; all dos service

mov ax,4C00h  		; exit to dos
int 21h

Text db "This is some text.$"
If I know what I'm doing (which I'm not sure), this little bit of assembly, assembled using nasm and outputted as an exe, should display "This is some text." in the dos shell when I execute it. It prints out a few lines of garbage before it displays my text though. By the way, I'm just assembling it like this: nasm test.asm

Share this post

Link to post
Share on other sites
Original post by Azrioc
If it's a COM executable (which it _should_ be), then did you remember to ORG 0x100 at the top?

Heh, guess it should be a com.. I added the org 0x100 at the top and now it works :)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this