how to display $ character in assembly

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.

Comments

  • 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:
    [code]
    mov ah, 2
    mov dl, '$'
    int 21h
    [/code]
    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!

Categories