Hey guys, Ive been trying to find a way to run this code but somewhoe the compiler that my professor preferred us to download doesnt work for me so I download Masm32, but still cant figure to run this, when I did i got this error.
Code:
INCLUDE Irvine32.inc
.data
str1 BYTE "Random Messages",0
.code
main PROC
mov eax, blue + (white * 16)
mov ecx,4
L1: call SetTextColor
mov edx,OFFSET str1
call WriteString
call Crlf
add eax,2
loop L1
exit
main ENDP
END main
When I go to project and compile resource files I got this error in CMD.
(http://uploadpic.org/storage/2011/thumb_U2i5zGFNeERWli60K3RFuyCPM.jpg) (http://uploadpic.org/v.php?img=HPxKpp4Sxw)
Please help me out guys Im new to this program and this whole assembly language stuff. Thanks
It looks like you are opening the file in QEditor and selecting Compile Resource File from the Project menu. Since that command is hard coded to compile a resource definition file named rsrc.rc, and there is no such file in your working directory, you get an error. You probably should be selecting Console Assemble & Link.
Okay I did that now I get error,
C:\mams3\lab5.asm(1) : fatal error A1000: cannot open file : Irvine32.inc
Assembly error
Press any key to continue
You need to have your source file and all of the Irvine components in your working directory.
But when I went to msam32 folder and go to Include folder I dont see Irvine as a file there, can that be the reason why? and it is there I saved it inside msam32 folder
Irvine32.inc won't be in there since it isn't a part of the masm package.
I did a search for the file, but only found references to it.
Andy
Making the Irvine library run with Masm32 is unfortunately not trivial. Attached is a short demo showing how the 32-bit examples can be used in parallel with Masm32 and/or MasmBasic (http://www.masm32.com/board/index.php?topic=94.0).
If I place this source:
INCLUDE Irvine32.inc
INCLUDELIB Irvine32.lib
INCLUDELIB \masm32\lib\kernel32.lib
.data
str1 BYTE "Random Messages",0
.code
main PROC
mov eax, blue + (white * 16)
mov ecx,4
L1:
call SetTextColor
mov edx,OFFSET str1
call WriteString
call Crlf
add eax,2
loop L1
call ReadChar ; pause before closing
exit
main ENDP
END main
In a working directory off the MASM32 directory (IOW in a subdirectory of the MASM32 directory) , along with these files:
Irvine32.inc
SmallWin.inc
Irvine32.lib
Then I can open the source in Qeditor, select Console Assemble & Link from the Project menu, and assemble and link the source into a working EXE.
Note that Qeditor will use ML and Link from the masm32\bin directory (this is automatic), kernel32.lib from the masm32\lib directory (as specified), and Irvine32.inc, SmallWin.inc, and Irvine32.lib from the working directory (which the system sees as the current directory, and the first place to look for a file when the file path is not specified).
For a source that uses any of the Irvine32 macros you will also need to include Macros.inc, and I think there may be several other include files needed, depending on what your source uses.
Edit:
Making the working directory a subdirectory of the MASM32 directory will make it somewhat easier to access from Qeditor, but actually the only requirement is that it be on the same drive as the MASM32 directory.