Assembler Developer

Moderators: None (Apply to moderate this forum)
Number of threads: 819
Number of posts: 1580

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
how to display $ character in assembly Posted by susuteh on 27 Dec 2009 at 5:23 PM
Hi,


May i know how should i display "$" character using INT21H function 09H?

For example, "The total charge is $200"

How should i write the coding?

Thanks in advance.
Report
Re: how to display $ character in assembly Posted by anthrax11 on 27 Dec 2009 at 5:52 PM
You can't print '$' using function 9, because '$' has to be the string terminator, but you can first print "The total charge is ", then use function 2 to print a single character:
mov  ah, 2
mov  dl, '$'
int  21h

and then print the "00". It's inconvenient, but probably the simplest way to do it in DOS.
Report
Re: how to display $ character in assembly Posted by susuteh on 27 Dec 2009 at 9:19 PM
oh ya ~ i should have thaught about that. Thanks ya, anthrax!



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.