News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Printing Characters

Started by PrimeLemma, May 03, 2007, 05:33:01 PM

Previous topic - Next topic

PrimeLemma

I'm new to assembly and I'm still getting used to the different varieties of "print". Is there a way to print a variable or register value as its ASCII character? Sorry if this is a really stupid question.

Thanks

P1

PrimeLemma,

In the MASM32 library there is a good subroutine for that, it's dwtoa.  Read the help file for usage.

Google and the Forum Search are your programming friends.  As well as the tutorials and other help files.

Welcome Aboard   :U

Regards,  P1   :8)

Vortex

PrimeLemma,

Also, you can the printf function from the C run-time library.

Vineel Kumar Reddy Kovvuri

Hi PrimeLemma,

I am also new to assembly but i think my reply would help u

print chr$(65,"ssembly")
; replaces the 65 with its ascii value and print character 'A'. So it would effectively print "Assembly"
; chr$ creates the string in data segment and returns the address of
; that string to print .
; chr$ also concatnates all the strings given to it.

print str$(eax)
;It simply converts an integer(say 65) present in eax to string form.
;so that u can print the value 65 to console(not the ascii eqivalent)



any how ur query helped me in clearly figuring out the difference b/w chr$ and str$.
feel free to ask such questions os that i will aslo try for them   


I struggle a lot in figuring out these prelimany IO functions

once check out these

http://www.masm32.com/board/index.php?topic=7131.0