Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link MASM compiled object file with parms into a clarion prog.

Status
Not open for further replies.

ezsoft

Programmer
Dec 12, 2005
1
US
The damned value is on EAX coming over but I get crap. I know nothing about MASM. What do I need to to do to have the val pass?


------------------

PROGRAM

MAP
MODULE('masmtest.obj')
TestProc(ULONG),NAME('testproc')
END
!CWMessageBox PROCEDURE
END
Mval CSTRING(256)
CODE
Mval = 'XXX'
TestProc(ADDRESS(Mval))
------------------

And in the MASM obj

------------------

.486
.model flat, syscall ;32 bit memory model - syscall kills name mangling

MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD
MB_OK equ 0h
NULL equ 0h

INCLUDELIB user32.lib

.data

MbTitle DB "Linking to MASM32 Assembler .obj files",0

.code

testproc PROC TheStuff:DWORD
invoke MessageBoxA,NULL,addr TheStuff,addr MbTitle,MB_OK

ret
testproc ENDP

END

------------------------


 
I do not know much on using Assembler in Clarion, but look at the procedure attributes of RAW,PASCAL,etc which determine how parameters are passed. Check the Clarion Newsgroups. There was some posts on MASM and Clarion by Dan Gorell.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top