how to display $ character in assembly


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.


  • 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.
  • oh ya ~ i should have thaught about that. Thanks ya, anthrax!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!