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
-
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С группа)
Что то не помню в МКБ таких кодов
> читаю книги и пытаюсь по ним изучать.
Не читай их, я тебе выше дал ведь ссылку. Есчо конечно не плохо было бы по логике и алго что то почитать, для общего развития так скажем; архитектур всяких много но принципы одинаковы
Topic: MASM : fatal error A1000: cannot open file : C:masm32aaa.asm (Read 29604 times)
Hi. Ive just installed the MASM32 SDK and tried to assemble & link a simple program and Im always having this error message.
» Assembling: C:masm32aaa.asm
MASM : fatal error A1000: cannot open file : C:masm32aaa.asm «
And here is a screenshot.
Ive seen some people having the same error in this forum. And Ive tried the solutions but I couldn’t solve the problem. Besides they were installed the MASM32 in directories other than C:
What’s the wrong with this and how can I solve it ?
Im using windows 8.1 x64 and both windows and MASM32 are installed in C:
Thanks.
Logged
where is the aaa.asm file located ?
to save a step — show us the code
even though it isn’t at fault, it will save us some typing — lol
Logged
«can’t open» can mean «can’t find» or «I’m blocked by something». As Dave wrote, check if the file exists, and if yes, try to find a reason why it cannot be opened. For example, using Microsoft Word for looking at your source is not a good idea, as it locks files.
Logged
Not sure,but if you just up graded to 8.1(I just started using win7-64) you might be running into what I did at first…files blocked by the system. it took me a bit to figure out how to unset the block on files that came from outside(download) until I snooped a bit in the system.
as in «Files did not originate on this system» so blocked.
Logged
Hi,
You can open a command prompt session, then
CD
to get to the root directory, then
DIR aaa.asm /S /P
to see if your source is in C:MASM32 or someplace else.
HTH,
Steve
Logged
Содержание
- Masm fatal error a1000 cannot open file hello asm
- Answered by:
- Question
- Masm fatal error a1000 cannot open file hello asm
- Asked by:
- Question
- Masm fatal error a1000 cannot open file hello asm
- Answered by:
- Question
- Answers
- All replies
Masm fatal error a1000 cannot open file hello asm
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
Hello, I am new to programming and have very little knowledge of environment settings and paths. I am starting in an assembly language class.
I used VS2010 pro last semester for c++, but only for writing code, I did not use any of the tools that it has. We are using MASM and VS2010 for my class and a book by Kip R. Irvine. When I try to build my project I get this build report:
1>—— Build started: Project: Project, Configuration: Debug Win32 ——
1>Build started 1/25/2013 10:44:04 AM.
1> Touching «DebugProject.unsuccessfulbuild».
1>Skipping target «_MASM» because all output files are up-to-date with respect to the input files.
1> Assembling [Inputs].
1>MASM : fatal error A1000: cannot open file : ..Moves.asm
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0BuildCustomizationsmasm.targets(49,5): error MSB3721: The command «ml.exe /c /nologo /Zi /Fo»DebugMoves.obj» /Fl»Project.lst» /I «c:Irvine» /W3 /errorReport:prompt /Ta..Moves.asm» exited with code 1.
1>Time Elapsed 00:00:00.42
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have no idea what this realy means or how to go about fixing it. I am using windows 7 formy OS. Can someone please help me? I have spent most of the week trying to get this to work and am getting nowhere.
Источник
Masm fatal error a1000 cannot open file hello asm
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!
Источник
Masm fatal error a1000 cannot open file hello asm
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.
Источник





