Hii.. i m new to dis MASM32.. erm.. i would like to do the coding to let user input four integer..den can output the multiplication of the four integer..can anyone help me create a code for this?? i really no idea with it...
That is challenging :bg
Here is a working example, exe attached. It's Genuine MasmTM, although your teacher might be a bit surprised ::)
include \masm32\MasmBasic\MasmBasic.inc ; download (http://www.masm32.com/board/index.php?topic=12460)
Init
.Repeat
push Val(Input$("1st integer: ", "123"))
fild stack
push Val(Input$("2nd integer: ", "1"))
fimul stack
push Val(Input$("3rd integer: ", "1"))
fimul stack
MovVal f:xmm0, Input$("and 1 float: ", "0.01")
movlps REAL8 PTR [esp], xmm0
fmul REAL8 PTR [esp]
add esp, 3*DWORD
Inkey Str$("The result is %f - one more (y)?\n\n", ST(0))
fstp st
.Until eax!="y"
Exit
end start
But it appear fatal error A1000:cannot open file: \ masm32\MasmBasic\MasmBasic.inc Init
Assembly error....
What should i do?? izit any plc i did wrong??
Click on "download" above after MasmBasic.inc...
Is there other method??
I trying to edit this coding... can help?? :dazzled:
include \masm32\include\masm32rt.inc
.code
SIZE_OF_BUFFER = 100
.data
output1 db 'Please Enter Your Name : ',0
output2 db 13,10, 'Your name is %s',0
.data?
buffer db SIZE_OF_BUFFER dup(?)
.code
start:
invoke crt_printf,ADDR output1
invoke StdIn,ADDR buffer, SIZE_OF_BUFFER
invoke crt_printf,ADDR output2,ADDR buffer
invoke ExitProcess,0
END start[/color]
Quote from: minsiong on May 08, 2012, 04:00:03 PM
Is there other method??
Plenty of, but yes, this code (http://www.masm32.com/board/index.php?topic=10123.0) is a good start. Don't forget \Masm32\help\masmlib.chm, though, and the Forum instructions (http://www.masm32.com/board/index.php?topic=1295.0). When do you have to deliver?
I nid to submit it day after 2mr.. hope can finish it tonite.. already discover it for few days.. really not good in MASM.. :'(
Good luck. Check atodw in \Masm32\help\masmlib.chm, you will need it. Re the multiply, you can use the method shown in the MasmBasic example above, i.e. use the FPU, otherwise mul is your choice.
Can u give me the download link for the MASMBasic??
http://www.masm32.com/board/index.php?topic=12460.msg95703#msg95703