Содержание
- Fatal error a1000 cannot open file irvine32 inc
- Asked by:
- Question
- Fatal error a1000 cannot open file irvine32 inc
- Answered by:
- Question
- Answers
- All replies
Fatal error a1000 cannot open file irvine32 inc
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Asked by:
Question
I have a Visual Studio 2017 project, where I’m trying to interface a C++ and Assembly program. So I have a header («indexof.h») that has the Prototypes for the assembly procedures in an `extern «C»` block, and a main.cpp, which includes `indexof.h` and uses the procedures made available in it, and then an `IndexOf.asm` file that contains my assembly code (which also has prototypes for its procedures, before the .code section). Unfortunately, when I attempt to run it, I get this error:
1>Assembling IndexOf.asm.
1>MASM : fatal error A1000: cannot open file : IndexOf.asm
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargetsBuildCustomizationsmasm.targets(50,5): error MSB3721: The command «ml.exe /c / nologo /Zf /Zi /Fo»DebugIndexOf.obj» /W3 /errorReport:prompt / TaIndexOf . asm » exited with code 1.
1>Done building project «IndexOf_asm. vcxproj » — FAILED.
I desperately need help (It’s due tomorrow), this was a project setup provided by my class, I’m just trying to run it, and I haven’t even gotten to the actual thing I need to do yet. Thank you!
Источник
Fatal error a1000 cannot open file irvine32 inc
Answered by:
Question
Assembly code will not compile correctly in VC++ Express 2010
I get this error every time:
I want to learn assembly and I am setting up my IDE
Help would be appreciated
Answers
If you are sure that you did that then I would have to come to the conclusion that your install of VC Express is corrupt somehow.
Here, when I enable the build customization, it immediately allows asm files to be built using masm.
The reason why I took so long this time was because I was testing it out properly. I was using VS to do this, so I was being sure that there was no differences between the VS IDE and the VC Express IDE. Those two screenshots were taken using VC Express though, so the relationship does still hold, if masm is enabled in build customizations then the compile option gets enabled, if masm isn’t enabled then compile doesn’t occur and things start falling apart.
So at this point I would suggest trying it out on another computer if possible to rule out VC Express being the problem. Also, as a bit of a thought, did you install service pack 1? I am using fully updated versions of VS so there could be a bug that was fixed getting in the way.
This is a signature
Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
Well, that shows something wrong with your project configuration. It attempted to run ml but the command line it used couldn’t locate the assembly file.
How did you set up VC Express to try to assemble asm files?
This is a signature
Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
Visit my (not very good) blog at
http://ccprogramming.wordpress.com/
I thought I had this thread set to notify me upon someone posting a reply so that’s why I just noticed yours now.
Hmm, the guide uses build customisations so it is going through the correct process.
Could you delete the asm file from the solution and add a new one and try again? The only way I have managed to get the error that you have so far is if the project is saying the file is somewhere, but it doesn’t actually exist there on the file system.
This is a signature
Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
I tried that and it still returned the same error. I also looked in the folder where the file should be and it is there
Here is the code for the .asm file, I doubt the issue is code specific because I tried a completely different .asm program and it returned that same error
All of the files included using the include directive exist too? This is a signature
Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
Now that you mention it, I can’t seem to find any of the MASM stuff in the VC++ install directory at least
Where are the MASM files on your drive? I might be looking in the wrong place
They are not part of VC, they were part of MASM32 which was a lot of stuff based on an old version of the Windows SDK. So unless you had MASM32 on your system then this would be failing.
Well, I guess that article is to blame because it doesn’t point out that it has a dependency on MASM32.
This is a signature
Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
What would you recommend I do at this point to be able to compile .asm files in VC++?
OK, try the following.
Does this assemble, link and run correctly? If it does then your whole issue is down to relying on the MASM32 files. (Please note, this works as is because kernel32.lib is automatically linked so you don’t need to bother linking it).
If it does then you will need to choose, you can find the MASM32 stuff yourself and rely on it, or you can use what you found here to enable MASM in VC and find another guide to learn assembly. The problem is that there isn’t much MASM related documentation available these days so it can be a bit of a problem. The MSDN has a reference to it, but that is less than satisfactory.
This is a signature
Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
That didn’t work either. My end goals with assembly are to augment my c++ game programming ability, and to write an operating system that runs on a machine with no other programs. I don’t know any assembly, so I’m not closely attached to MASM yet
Based on that, which assembler would you recommend I use?
Doesn’t C/C++ have inline assembly? Would that work for you? I believe you use an __asm__ function (a macro actually) and program the semi-assembly inside the code block. I did a tutorial with some hardware video calls and DOS/DPMI calls and it works, the difference is that I used the DJGCC compilor set and not MS VC.
MS VC has inline assemble too, but I have not used it. You would need to do a little research on it because it may have been phased out or changed in some other way.
GNU GCC also has inline assembley an some online documention on sytanx for the asm function. Can you do command line compilations?
You can still do assembly, but you will need to do some more research or find older tools to do it.
In this case I’ll ask, why didn’t that work. Can you give me the error message given to you this time? Since there was no include directives then it can’t be A1000 again, so it would be helpful if you gave information on why it failed. My guess would be a linker error. Oh, and to point out one thing, the stuff that you are doing relies on you changing the defaults for a couple of things, but you really need to be comfortable with the tool chain (compiler, assembler, linker etc) to start using this effectively.
As far as which assembler, I’ve had very few issues with MASM. If you want portability then you would be better off looking at YASM or NASM.
VC doesn’t have inline assembly for x64 and it isn’t recommended in the x86 builds.
This is a signature
Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
I’ve even run the ml.exe from Windows cmd.exe and it returns that same error. And I’ve also tried to compile with my AV disabled, which didn’t change the outcome
Ok, ignore all of those tutorials for now and do the following. I’m going to do it the more conventional way of having a .cpp file call into an assembly file for now. Minimal amount of reconfiguration and stuff, reduces the possibility of errors.
Start a new solution. So that is File->New Project. Make sure you choose Win32 Console Application. Name it whatever you want (making sure the path that you are creating the project in has full write access, preferably the Visual Studio 2010 default location). When the Win32 application wizard appears, select next and then select the Empty project check box.
Go to Solution Explorer, right click on your project and then select Build Customizations. Select masm and then click OK. Up until now it should be familiar.
Now right click on the project name then select Add->New Item and select C++ File(.cpp). Name it main.cpp, leave the location alone and then click Add. Do that again but name this file test.asm. It is ok, even if you select C++ File, changing the extension will name it test.asm not test.asm.cpp so you don’t have to worry about anything.
Ok then, in main.cpp put the following code.
Now try to build it. If you have followed my recommendation of placing it in your profile (default of C:Users DocumentsVisual Studio 2010Projects on Vista or newer or C:Documents and Settings My DocumentsVisual Studio 2010Projects on XP) then you will have full write access, so that will rule out one of the problems. Since both of the files are created by VS and placed in their default locations then that will rule out the other problem. So hopefully this will build.
If it doesn’t, could you post the errors that it generates.
This is a signature
Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
Источник
0 / 0 / 0
Регистрация: 05.04.2018
Сообщений: 10
1
12.09.2018, 12:44. Показов 12623. Ответов 2
| Assembler | ||
|
| Assembler | ||
|
Внимание! В ходе построения обнаружены ошибки:
Assembling: C:UsersbogdanAppDataLocalTempSASMprogram.as m
C:UsersbogdanAppDataLocalTempSASMprogram.as m(3) : fatal error A1000: cannot open file : /masm32/include/windows.inc
LINK : fatal error LNK1181: cannot open input file «C:UsersbogdanAppDataLocalTempSASMprogram.o »
__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь
0
Topic: Quick MASM Prompt Setup Question (Read 21118 times)
Undefined_Behavior
Hello Masm forum posters, I have a little question:
I’m learning from a book called «Assembly Language for x86 Processors, 6th edition». My problem is that I want to setup MASM manually by compiling from prompt with makefiles and such rather than importing an «existing file» in Visual Studio.
Currently learning to navigate the command line and have learned c++ basically from the g++ compiler. For some reason even with experience using third party libs I’m still not able to get my setup correct.
Could someone please guide me through each step or give me advice for setting this up?
Basically this is what I’ve done so far:
Downloaded MASM.
Set MASM’s bin folder to my path as C:masm32bin;
Downloaded the Irvine zip for visual studio 2010 under this link: http://asmirvine.com/ and extracted it to the folder C:Irvine.
From here is where the problems began. First the source:
TITLE MASM Template (main.asm)
; Description:
;
; Revision date:
INCLUDE Irvine32.inc
.data
myMessage BYTE "MASM program example",0dh,0ah,0
.code
main PROC
call Clrscr
mov edx,offset myMessage
call WriteString
exit
main ENDP
END main
And now here is what I’ve tried:
First I tried to just compile away without setting the include or lib folders. This consisted of the simple command:
ml main.asm
and of course this failed as:
main.asm(7) : fatal error A1000: cannot open file : Irvine32.inc
so I set the include and lib variables to C:Irvine. Recompile…
ml main.asm
main.asm(7) : fatal error A1000: cannot open file : Irvine32.inc
so I thought naturally I might need to include the lib and try some sort of link command so I added Irvine32.lib….
ml main.asm /link Irvine32.lib
main.asm(7) : fatal error A1000: cannot open file : Irvine32.inc
ml main.asm Irvine32.lib
main.asm(7) : fatal error A1000: cannot open file : Irvine32.inc
So yea…the problem is obvious what I don’t find obvious is the reason/solution. Any help would be greatly appreciated.
« Last Edit: September 12, 2013, 05:28:14 PM by Undefined_Behavior »
Logged
Undefined_Behavior
Really dumb mistake…
I included C:Irvine in the include and lib environment variables as C:Irvine instead of C:Irvine.
Unfortunately this is not the end of my troubles as now I’m having a linking problem:
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: main.asm
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/z2
«main.obj»
«main.exe»
NUL
LINK : warning LNK4044: unrecognized option «z2»; ignored
main.obj : warning LNK4033: converting object format from OMF to COFF
LINK : fatal error LNK1181: cannot open input file «main.exe»
Logged
try this
INCLUDE C:IrvineIrvine32.inc
INCLUDELIB C:Irvinekernel32.lib
INCLUDELIB C:Irvineuser32.lib
;#######################################################################
.DATA
szTest db 'Test',0
;#######################################################################
.CODE
;***********************************************************************
_main PROC
INVOKE MessageBox,NULL,offset szTest,offset szTest,MB_OK
exit
_main ENDP
;#######################################################################
END _main
you may have to adjust the INCLUDE and INCLUDELIB paths
this is a windows program, so…..
masm32binml /c /coff MyFile.asm
masm32binLink /SUBSYSTEM:WINDOWS /OPT:NOREF MyFile.obj
Logged
Undefined_Behavior
That ran successfully but only once I used:
C:masm32binLink /SUBSYSTEM:WINDOWS /OPT:NOREF main.obj instead of:
masm32binmllink /SUBSYSTEM:WINDOWS /OPT:NOREF main.obj EDIT: Just realized I read your post wrong and you never had ml
your path yielded: The system cannot find the path specified.
which would make sense since I have no masm32binml folder.
From here how would I get my own program to run, preferably without adding include directives? (directives? right? sorry kinda new to this).
« Last Edit: September 12, 2013, 04:18:02 PM by Undefined_Behavior »
Logged
The Masm32 package is more powerful than the Irvine library, but you can use them in parallel. Here is a simple example which uses one extra include file from the MasmBasic library, Irvine32Mb.inc
Note there is no need for any environment variables. It runs out of the box with Masm32qeditor.exe’s «Console Build All».
include masm32includemasm32rt.inc
include masm32MasmBasicIrvineMbIrvine32Mb.inc ; needed to build Irvine's (many but not all) 32-bit examples
.code
start:
mov eax, 11111111h ; in Masm32qeditor.exe, use "Project/Console build all", then "Project/Run Program"
mov ebx, 22222222h ; in Masm32RichMasmRichMasm.exe, just hit F6 (detects console mode automatically)
mov ecx, 33333333h
mov edx, 44444444h ; load regs with hex values
call DumpRegs ; DumpRegs displays the regs in hexadecimal format
call DumpRegs ; call again to show that DumpRegs did not change any register
inkey "ok?"
exit
end start
EDIT: New attachment — the lib and macro files were missing.
« Last Edit: September 12, 2013, 10:41:30 PM by jj2007 »
Logged
Undefined_Behavior
Although I know I can use the QEditor (or Visual Studio as my class is doing) I’d prefer to run it from the prompt as I’m trying to rope in all my programming languages under one working environment (sublime text 2 and command prompt). My question still stands as how do I get the program (written by Irvine posted above) to work; bypassing the error stated (and perhaps understanding why and how to correct it).
Thought I should note also that when I tried to run your program from the prompt with ml main.asm I got the following error:
main.asm(2) : fatal error A1000: cannot open file : masm32MasmBasicIrvineMbIrvine32Mb.inc
I’m assuming this is because masm32 does not by default come with MasmBasic (I’m assuming that’s a third party library? sorry still a beginner just getting started with masm).
Logged
cannot open file : masm32MasmBasicIrvineMbIrvine32Mb.inc
There is an attachment to my above post. Unzip to C: with «use folder names».
Logged
Undefined_Behavior
One fatal error after the next. Here is what I got this time:
masm32MasmBasicIrvineMbIrvine32Mb.inc(5) : fatal error A1000: cannot open file : masm32MasmBasicIrvineMbIrvineSmallWinMb.inc
Unfortunately, even if I solve this problem I fail to see how it is related with a:
LINK : warning LNK4044: unrecognized option «z2»; ignored
main.obj : warning LNK4033: converting object format from OMF to COFF
LINK : fatal error LNK1181: cannot open input file «main.exe»
error.
Logged
You need the right commandlines. Here they are:
masm32binml /c /coff main.asm
masm32binlink main.obj
ttt is a good lecture, too.
Welcome to the Forum — why do you want to learn assembler? Few people do this nowadays…
Logged
it would seem that you have a path conflict
because your environment is set up for C, it may be that the build is becoming a little confused
as you can see, we have not applied a z2 option, anywhere 
and, we use the /coff switch on the ML command line to create COFF object modules, not OMF
when you build from the QEditor program using the menu commands,
the batch files that are in the masm32bin folder are used to perform the different build types
you can use the same batch files from the command prompt to save some typing
also, you can examine those batch files to see the command lines used
either way, you want the LINK switches to match an ASM build, not a C build
Jochen has shown you that the masm32 libraries may be used, rather than Kip Irvine’s libraries
as he mentioned, the masm32 libraries are much more comprehensive
and — most forum members are not too familiar with Kip’s libraries
however, that does not help you with what you are trying to achieve — lol
i haven’t played with Kip’s libraries much, lately
it would help us if we knew what folders the following files are in:
Irvine32.inc
SmallWin.inc
Macros.inc
GraphWin.inc
VirtualKeys.inc
kernel32.lib
User32.lib
Irvine32.lib
there are also Irvine16.inc and Irvine16.lib files, for building 16-bit programs
the Irvine32.inc file has include directives for SmallWin.inc and VirtualKeys.inc
but, i don’t find the includelib directives in Irvine32 or SmallWin to include the import libraries mentioned above
you may have a newer version of Kip’s libraries, that take care of that
so, you have to be aware of what files are already included
at the end of the day, the import libraries are needed to build programs
so — it may be that Kip’s book tells you to set certain environment variables
they may conflict with the environment variables for VS
(the masm32 package is set up to not use environment paths)
and — you can set the variables in the build batch file to overcome this
that way, the environment variables are only changed for the life of the console window
these variables can set up the default folders for include files and import libraries
Logged
My question still stands as how do I get the program (written by Irvine posted above) to work
you can specify the libraries also on the command line either as full path, or relative to the current LIBPATH.
In the attachment 3 build files, which shows some variations (extract the archive to a folder on the same drive as the MASM32 and Irvine installation).
Logged
MREAL macros — when you need floating point arithmetic while assembling!
also…..
while the Irvine libraries may be used with the masm32 libraries, that is just going to confuse things for you
i believe Kip’s package includes ML v6.15 and a linker
so — try to get set up to build using those
forget about masm32, for now
if you look at Kip’s package, he may have provided batch files that take care of all this :t
when you get to the end of the semester, you will probably be expected to write a program using Irvine32
Kip’s functions do not always follow the ABI, at least not the way the forum members are used to
Logged
ok….
i went to Kip’s site and downloaded the package for VS 2010
i don’t have VS 2010, nor do i have Kip’s book to read
but, at least i know the paths for the files — lol
i am guessing that the book tells you how to get set up to use the ML and LINK programs in VS 2010
most forum members are not going to have good answers for what you want :redface:
if you want to get set up to build from the command line — not VS,
you may want to write a couple batch files
the ones qWord has provided may be very helpful
Logged
Undefined_Behavior
Just like to say thank you to everyone and especially a huge thanks to qWord. It worked after running build1.bat. I then trimmed it down since I had my lib and include environment variables set to C:Irvine to:
ml /c /coff main.asm
link /SUBSYSTEM:CONSOLE Irvine32.lib Kernel32.lib User32.lib
I appreciate the example that jj2007 was trying to set by showing that we can (and I know should) try to program natively from masm libraries (and should for performance) but unfortunately as dedndave said that won’t help me for my class. Despite this I’ve taken it upon myself to learn to compile and link it manually through prompt.
I have a couple more question(s) for clarification if I haven’t driven everyone insane yet. What does the default ml file.asm command with no switches actually do? What are OMF and COFF object modules? Why does ml invoke a /z2 switch that is unrecognized and try to convert from OMF to COFF when used as ml file.asm?
Lastly I understand that Irvine32.lib Kernel32.lib User32.lib are libraries for the program but don’t understand why or what the /SUBSYSTEM:CONSOLE switch is/does.
I know this is an overload but I would appreciate any information on the following questions. Thank you.
Logged
Win32 uses COFF object modules and PE exe’s
16-bit DOS used the OMF object format and MZ exe’s
there were a couple others, like NE for windows 3.1, etc
if you want to build MZ exe’s you still can, by using a 16-bit linker
the /z2 switch is probably a linker switch that applies to OMF/MZ files
when we use ML to create COFF files, we typically use the /c switch also
this tells ML not to link
without /c, it is probably set up to build MZ exe’s as the default
i think you have to do it as 2 steps for COFF files
/SUBSYSTEM:CONSOLE tells the linker to set a bit in the exe header
when the OS loads a PE exe, it uses this bit to see if a console window should be allocated
/SUBSYSTEM:WINDOWS — no console window allocated
for many programs (GUI apps, or those using MessageBox only), no console is needed
we can call AllocConsole if we want a console window
that’s all the OS does if the console bit is set 
for most of the programs you are likely to build for class, i think /SUBSYSTEM:CONSOLE is what you want
Logged
-
Randomris
New Member
- Публикаций:
-
0
- Регистрация:
- 8 янв 2020
- Сообщения:
- 5
Здравствуйте форумчане! компилятор масм не открывает windows.inc
Все перепробовал путь указывал и т.д.
выдает
fatal error A1000: cannot open file : masm32includewindows.inc -
Indy_
Well-Known Member
- Публикаций:
-
4
- Регистрация:
- 29 апр 2011
- Сообщения:
- 4.780
-
Mikl___
Супермодератор
Команда форума- Публикаций:
-
14
- Регистрация:
- 25 июн 2008
- Сообщения:
- 3.468
Randomris,
а у тебя точно есть папка include в каталоге masm32? Если сборка 64-разрядная, тогда в masm32 папки include нет, а есть папка include64 -
Randomris
New Member
- Публикаций:
-
0
- Регистрация:
- 8 янв 2020
- Сообщения:
- 5
У меня есть эта папка и в ней есть нужный файл
Программа установлена в первоначальном виде, ничего не изменено (ASM Visual)Вложения:
-
Mikl___
Супермодератор
Команда форума- Публикаций:
-
14
- Регистрация:
- 25 июн 2008
- Сообщения:
- 3.468
-
Randomris
New Member
- Публикаций:
-
0
- Регистрация:
- 8 янв 2020
- Сообщения:
- 5
Я задавал полный путь к нужному файлу, но все равно он выдает ошибку
-
Mikl___
Супермодератор
Команда форума- Публикаций:
-
14
- Регистрация:
- 25 июн 2008
- Сообщения:
- 3.468
Randomris,
а почему я должен верить на слово? То что папка называлась не include, а includes уже выяснили… Какую ошибку у тебя сейчас выдает? Желательно картинкой и текст asm-файла также нужно прикрепить -
Randomris
New Member
- Публикаций:
-
0
- Регистрация:
- 8 янв 2020
- Сообщения:
- 5
Код программы
-
includelib C:ProgrammsASM Visualmasm32includeskernel32.lib
-
includelib C:ProgrammsASM Visualmasm32includesuser32.lib
-
include C:ProgrammsASM Visualmasm32includeswindows.inc
-
include C:ProgrammsASM Visualmasm32includeskernel32.inc
-
include C:ProgrammsASM Visualmasm32includesuser32.inc
-
szTitleName db ‘Window Application’,0
-
szClassName db ‘ASMCLASS32’,0
-
msg MONMSGSTRUCT <?> ; структура сообщения
-
wc WNDCLASS <?> ; структура класса
-
Invoke GetModuleHandle,0 ; получаем hInstanse
-
Mov [wc.style], CS_HREDRAW+CS_VREDRAW+CS_GLOBALCLASS
-
; устанавливаем стиль окна
-
Mov [wc.lpfnWndProc], offset WndProc ;
-
Invoke LoadIcon,0,IDI_APPLICATION ; получаем значок приложения по
-
Invoke LoadCursorA,0,IDC_ARROW ; получаем курсор по умолчанию
-
Mov [wc.hbrBackground], COLOR_BACKGROUND+1
-
Mov dword ptr [wc.lpszMenuName], 0
-
Mov dword ptr [wc.lpszClassName], offset szClassName ; задаём имя класса
-
Invoke RegisterClassA,offset wc ; регистрируем класс окна
-
Push [hInst] ; дескриптор
-
Push CW_USEDEFAULT ; высота
-
Push CW_USEDEFAULT ; ширина
-
Push WS_OVERLAPPEDWINDOW ; стиль
-
Push offset szTitleName ; заголовок окна
-
Push offset szClassName ; имя класса
-
Push 0 ; дополнительный стиль
-
Call CreateWindowEx ; создаём окно
-
mov [newhwnd], eax ; сохраняем его дескриптор
-
invoke ShowWindow,[newhwnd],SW_SHOWNORMAL; показываем окно
-
invoke UpdateWindow, [newhwnd]; обновляем его
-
msg_loop: ; запускаем цикл обработки сообщений
-
invoke GetMessage,offset msg, 0,0,0
-
invoke TranslateMessage, offset msg
-
invoke DispatchMessage, offset msg
-
WndProc proc uses ebx edi esi, hwnd:DWORD, wmsg:DWORD, wparam:DWORD, lparam:DWORD
-
Invoke DefWindowProcA,[hwnd],[wmsg],[wparam],[lparam]
-
; вызываем стандартный обработчик сообщений
-
je wmdestroy; если нажата клавиша Escape то выход
-
invoke PostQuitMessage, 0
-
invoke ExitProcess, 0 ; выход
Все начало работать после переустановки программы и чистки всего реестра. Но появилась новая ошибка
LINK : fatal error LNK1104: cannot open file «C:ProgrammsASM.lib»Последнее редактирование модератором: 20 янв 2020
-
Mikl___
Супермодератор
Команда форума- Публикаций:
-
14
- Регистрация:
- 25 июн 2008
- Сообщения:
- 3.468
Randomris,
так найди в своем IDE файл, который содержит строку «C:ProgrammsASM.lib» и исправь ее на «C:ProgrammsASM Visualmasm32lib» -
Indy_
Well-Known Member
- Публикаций:
-
4
- Регистрация:
- 29 апр 2011
- Сообщения:
- 4.780
Mikl___,
Потом только выяснилось что у него ошибка в имени каталога, масм работает с относительными путями, если запихал в каталоги нужно указать прямой путь, иначе будет ошибка.
А если билдер выдал cannot open file «C:ProgrammsASM.lib» это не с проста. Тем более что какой то левый IDE, параметры переданные линкеру не известны.
С таким подходом вообще незачем браться за асм, будут косяки и трудности непрерывно. В примитивном мягко говоря выше коде коментов больше чем кода. Так не пишется, масм так и назван потому что это макро язык.
— Сообщение объединено, 20 янв 2020 —
> cmp ax, 0
Какой дебил такое написал.. а куда делась старшая часть регистра, те его половина. А про инструкцию test авторы этого высера не слышали получается. Тогда как всегда:
Intel® 64 and IA-32 architectures software developer’s manual combined volumes: 1, 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4
https://software.intel.com/en-us/do…bined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4
Изучать нужно с первого, а не как евреи с конца.
-
Randomris
New Member
- Публикаций:
-
0
- Регистрация:
- 8 янв 2020
- Сообщения:
- 5
Я только студент (1С группа), и сам занимаюсь асмом. По этому код взял с сайта (уже не помню откуда) и занимаюсь разбором кода.
читаю книги и пытаюсь по ним изучать. -
Mikl___
Супермодератор
Команда форума- Публикаций:
-
14
- Регистрация:
- 25 июн 2008
- Сообщения:
- 3.468
Randomris,
вспоминай, ищи сайт, откуда скачал IDE, там же найдешь инструкцию об установке, прочитай ее несколько раз, разберись и установи ASM Visual по инструкции, никакой самодеятельности… -
M0rg0t
Well-Known Member
- Публикаций:
-
0
- Регистрация:
- 18 окт 2010
- Сообщения:
- 1.551
А лучше скачать оригинальный 32 битный масм32, и поставить в корень диска, а не в папку с пробелами. Т.к. все это весьма костыльно и может выдавать неожиданные глюки.
-
Mikl___
Супермодератор
Команда форума- Публикаций:
-
14
- Регистрация:
- 25 июн 2008
- Сообщения:
- 3.468
Randomris,
https://gri-software.com/ru/asmvisual/help/- Начало
- Системные требования
- Загрузка и установка
- Обратная связь
- ASM Visual
- Интерфейс
- Работа с проектами
- Работа с кодом
- Сборка программ
- Отладка
- Настройка среды
- Метрики
- Горячие клавиши
-
Indy_
Well-Known Member
- Публикаций:
-
4
- Регистрация:
- 29 апр 2011
- Сообщения:
- 4.780
Randomris,
> Я только студент (1С группа)
Что то не помню в МКБ таких кодов
> читаю книги и пытаюсь по ним изучать.
Не читай их, я тебе выше дал ведь ссылку. Есчо конечно не плохо было бы по логике и алго что то почитать, для общего развития так скажем; архитектур всяких много но принципы одинаковы





