Hi all,
I am new to assembly. I am a hobby programmer. VB.Net and FreeBasic are my languages. Now, want to wet my toe in MASM. But from here, i happen to know about masmBasic. So i installed it and tried to run the sample code that appears right after installation. But the output window shows this message.
*** Assemble using \masm32\bin\UAsm64 /c /coff /Zd /Zi /Zf tmp_file.asm ***
This version of C:\masm32\bin\uasm64.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
*** Assembly Error ***
My pc is WIndows 8 32 bit. So is there any UAsm32 ?
PS: I am interesting in making unicode supported programs. And i also learn assembly by making unicode programs. So please guide me to the right path in orger to achieve my goal.
go to the board homepage, on the upper right click on masm32 downloads.
this will download the 32 bit Masm32 SDK....
apparently you have a 64 bit uasm installed, not appropriate for your setup
UASM 2.46.10 (32bit) (http://www.terraspace.co.uk/uasm246_x86.zip) ;)
or click link in above post. lol
I only use the Masm32 SDK, I forget there are some (semi) masm compatible....
and I should have given you a big welcome to the forum, sorry 'bout that.
since you have experience in VB and FreeBasic, you may also be interested in MasmBasic by long time member jj2007.
he will probably stop by here shortly to give you more details...
Its basically his combining the low level of assembler with Basic Like syntax afaik, MB has a vast library, an jj is constantly making improvements to the MB platform and its GUI, RichMasm..
zedd.
Quote from: anta40 on April 09, 2018, 03:55:32 AM
UASM 2.46.10 (32bit) (http://www.terraspace.co.uk/uasm246_x86.zip) ;)
Hi kcvinu,
I assume you have installed the Masm32 SDK (instructions).
anta40 has given you the right answer. Click on his link, and extract UAasm32.exe to \Masm32\bin\
Afterwards, the templates
should work. If not, add this to your source:
; OPT_Assembler UAsm32
Let me know if it works.
Jochen
P.S. - for you control colour problem (pure Masm32):
include \masm32\include\masm32rt.inc
.data ; initialised data section
wcx WNDCLASSEX <WNDCLASSEX, 0, WndProc, 0, 0, 1, 2, 3, COLOR_BTNFACE+1, 0, txClass, 4>
txClass db "MbGUI", 0 ; class name, will be registered below
hBrushYellow dd ?
hBrushGreen dd ?
hCurrentBrush dd ?
.code
start proc
Local msg:MSG
wc equ [edi.WNDCLASSEX] ; we use an equate for better readability
mov edi, offset wcx
mov wc.hInstance, rv(GetModuleHandle, 0) ; rv ("return value") is a Masm32 macro
mov wc.hIcon, rv(LoadIcon, eax, IDI_APPLICATION) ; OPT_Icon Smiley ; see \Masm32\MasmBasic\icons
mov wc.hIconSm, eax ; the rv macro returns results in eax
mov wc.hCursor, rv(LoadCursor, NULL, IDC_ARROW) ; get a cursor
invoke RegisterClassEx, addr wc ; the window class needs to be registered
invoke CreateWindowEx, 0, wc.lpszClassName, chr$("Hello World"), ; set window title here
WS_OVERLAPPED or WS_VISIBLE,
600, 150, 530, 250, ; window position: x, y, width, height
NULL, NULL, wc.hInstance, NULL
lea edi, msg
.While 1
xor eax, eax
invoke GetMessage, edi, eax, eax, eax
inc eax
shr eax, 1
.Break .if Zero? ; 0 (OK) or -1 (error)
invoke TranslateMessage, edi
invoke DispatchMessage, edi
.Endw
start endp ; no ret here - fall through to Exit
exit ; cleanup & invoke ExitProcess
WndProc proc uses esi edi ebx hWnd, uMsg, wParam:WPARAM, lParam:LPARAM
Switch uMsg
Case WM_MOUSEMOVE
.if word ptr lParam<200
m2m hCurrentBrush, hBrushYellow
.else
m2m hCurrentBrush, hBrushGreen
.endif
invoke InvalidateRect, hWnd, 0, 0 ; force a repaint
Case WM_CTLCOLOREDIT
return hCurrentBrush
Case WM_CREATE
RGB 255, 255, 200
mov hBrushYellow, rv(CreateSolidBrush, eax)
RGB 200, 255, 200
mov hBrushGreen, rv(CreateSolidBrush, eax)
invoke CreateWindowEx, WS_EX_CLIENTEDGE,
chr$("edit"), chr$("move the mouse to the left and right"),
WS_CHILD or WS_VISIBLE or WS_BORDER or WS_VSCROLL or ES_MULTILINE,
9, 9, 500, 200, hWnd, 103, wcx.hInstance, NULL ; we have added an edit control
Case WM_DESTROY
invoke PostQuitMessage, NULL
Endsw
invoke DefWindowProc, hWnd, uMsg, wParam, lParam ; default processing
ret
WndProc endp
end start