Hello, I'm having some problems getting int21 function 9 working correctly.

I've searched around a little bit, but I seem to be missing something still because no matter what I change it doesn't seem to display what I'd like it to.

It seems to me that it should look like:

mov ah,09h   
mov dx,msg    
int 21

msg: db 'hello$'

Any help would be splendid. Thanks.

Recommended Answers

All 2 Replies

maybe it wants: "offset message" ?

Don't forget that DS needs to be set to the segment the message is in if this code isn't already running with DS=CS

I figured it out. NASM doesn't use "Offset msg" it uses brackets: [msg]. Thanks for sending me looking in the right place. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.