Hi to all folks here. I have a simple question.
How can I print bytes,words, real4,real 8 and so on to the Console Output?
.data
b2 byte 2
b3 word 100
r1 real8 200.1 ;How to print this values?
.code ; Tell MASM where the code starts
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
start: ; The CODE entry point to the program
print (I gues Something but what)?
exit
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start ; Tell MASM where the program ends
If someone cna tell me i will be so happy :(
Hello Drith, take a look at the FpuFLtoA function explained inside \masm32\help\FpuLib.hlp
(FpuLib Courtesy of Raymond Filiatreault.) :U
Welcome on board.
You can try also the printf function from C run-time libraries.
<shameless self promotion>Also, have a look at the Print (or Format) function in my ASM Runtime (http://www.masm32.com/board/index.php?topic=3148.msg29508#msg29508). It can print basically whatever data type you want in a variety of formats.</shameless self promotion>
Though it does use Raymond's FpuFLtoA function for real numbers, so you'll get the same results using that directly.
Cheers,
Zooba :U
Thanks alot people. I want to ask something more. Is there any tutorials about Console Applications?
Thanks :U
Hmm... not that I know of. Did you try googling? Console apps are generally simpler than GUI apps in many ways. I think the example in \masm32\examples\advanced\msort contains nearly all the common console elements. Try to learn from that and start experimenting with this code:
; compile using "console assemble and link"
include masm32rt.inc
.data
MyString db "Hello world!",13,10,13,10,0
.code
start:
print chr$(" MyConsoleApp v0.1...",13,10,13,10)
print offset MyString
mov eax,input(" Press ENTER to exit.")
invoke ExitProcess,0
end start
Some of Hutch's masm32 examples are console applications, check the masm32 package.
Thanks alot. I will learn it what ever it will cost me. :)
Everything is mental work.
Thanks again!
check this link:
http://www.adrianxw.dk/SoftwareSite/Consoles/Consoles1.html
it is not asm,but
explain a lot about consoles...