Hello I am using RadASM. I need to learn something and make some functions. Can someone explain me how an assembly program is structured. I need to make a sum of 2 floating points numbers
Posted on 2005-04-06 23:28:30 by luisvalencia
Luis Valencia,

I already told you how to do it in the masmforum.

Start > Run > cmd > cd c:\masm32\bin
ml /c /coff /Cp msg.asm
link /SUBSYSTEM:CONSOLE /LIBPATH:c:masm32\lib msg.obj


Output to console a string of a "Hello World!".


;#####################################;
                                     
.386                  ;processor instruction
.model flat,stdcall    ;flat mode
option casemap:none    ;case sensitive

include \masm32\include\windows.inc ;include windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc 
includelib \masm32\lib\kernel32.lib ;include kernel32 library
includelib \masm32\lib\masm32.lib

.data          ;initialized data
msg1 db "Hello World!",0  ;message
                          ;string null termination of zero

.code
Start:

invoke StdOut,ADDR msg1  ;invoke standard output
invoke ExitProcess,eax   

End Start

;#####################################;

.386
.model flat,stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib


.data
msg1 db 'Please type your name',13,10,0
msg2 db 'Nice to see you ',0

.data?
buffer db 100 dup(?) ;duplicate buffer
.code

start:
invoke StdOut,ADDR msg1
invoke StdIn,ADDR buffer,100 ;receive text input
invoke StdOut,ADDR msg2
invoke StdOut,ADDR buffer
invoke ExitProcess,0
END start

Check the documentations that comes with your masm package. If you cannot understand you cannot be help in other way.
Posted on 2005-04-08 11:42:35 by Xor Stance
Hi

You can find an RadASM example here that does float math the hard way. Not finished or commented, but might be helpful.
http://radasm.visualassembler.com/projects/Demo.zip

KetilO
Posted on 2005-04-08 16:07:12 by KetilO