Home > other >  Windows 64 assembly language programming A1010 A2034, A2013, MSB3721
Windows 64 assembly language programming A1010 A2034, A2013, MSB3721

Time:01-06

Severity code shows the project file line prohibits display status
Error MSB3721 command "ml. Exe/c/nologo/Zi/Fo" Debug \ cool22 obj "/W3/errorReport: prompt/TaD:, Irvine, Irvine, Irvine \ examples \ Lib64 \ cool22 asm" have quit, return code is 1, dog c: \ Program Files \ Microsoft (x86) Visual Studio 2019 \ Professional \ MSBuild \ Microsoft \ \ VC \ v160 \ BuildCustomizations \ masm targets 70
Error A1010 unmatched block nesting: main dog: D, Irvine, Irvine, Irvine \ examples \ Lib64 \ cool22 asm 63
,,,,,,,,
Error A2034 must be a segment block: main dog: D, Irvine, Irvine, Irvine \ examples \ Lib64 \ cool22 asm 35
Severity code shows the project file line prohibits display status
Error A2013. MODEL must precede this directive dog: D, Irvine, Irvine, Irvine \ examples \ Lib64 \ cool22 asm 8
GetConsoleScreenBufferInfo Proto
The GetStdHandle Proto
WriteConsoleOutputCharacter proto
SetConsoleCursorPosition proto
ExitProcess proto
WriteString proto
Max=100; The biggest single bytes
.data
Kong byte Max dup (' ')
ConsoleInHandle qword?
ConsoleOutHandle qword?
Nb qword?
STD_OUTPUT_HANDLE equ - 11
COORD STRUCT
X WORD?
Y WORD?
COORD ENDS
SMALL_RECT STRUCT
Left word?
Top word?
Right word?
Bottom of word?
SMALL_RECT ends
CONSOLE_SCREEN_BUFFER_INFO STRUCT
Dwsize COORD<>
DwCursorPosition COORD<>
WAttributes word?
SrWindow SMALL_RECT & lt;>
DwMaximumWindowSize COORD & lt;>
CONSOLE_SCREEN_BUFFER_INFO ENDS

The code
The main proc
Sub RSP, 8
Sub RSP, 40
Mov RCX, STD_OUTPUT_HANDLE
Call GetStdHandle
Mov consoleOutHandle, rax
Mov RCX, consoleOutHandle
Mov RDX, offset CONSOLE_SCREEN_BUFFER_INFO
CALL GetConsoleScreenBufferInfo
MOV RDI, OFFSET CONSOLE_SCREEN_BUFFER_INFO. DwCursorPosition
MOV RCX, QWORD PTR (COORD PTR (RDI)). The Y
L2:
Mov RCX, consoleOutHandle
Mov RDX, offset kong
Mov r8, qword PTR (COORD (rdi) within PTR) X
Mov (COORD PTR (rdi)) X, 0
Mov r9, rdi
Mov qword PTR [RSP + 4 * sizeof qword], nb
Call WriteConsoleOutputCharacter
Dec (COORD PTR (RDI).) Y
Loop L2
Mov COORD. Y, 0
Mov RCX, consoleOutHandle
Mov RDX, offset COORD
Call SetConsoleCursorPosition
Mov ecx, 0
Call ExitProcess
The add RSP, 40
The main endp
end

CodePudding user response:

If invited to come,
I didn't do it masm64 class, no 2019 in hand, so could not empirical,
As third error, before 8. There should be a MODEL statement, the previous two errors may be so, 32-bit is explained in the beginning of the source code to be like this, you can also see whether have sample source code, the basic source program framework,
 
586
.The MODEL flat, stdcall

Option casemap: none

CodePudding user response:

reference 1/f, zara's reply:
are invited,
I didn't do it masm64 class, no 2019 in hand, so could not empirical,
As third error, before 8. There should be a MODEL statement, the previous two errors may be so, 32-bit is explained in the beginning of the source code to be like this, you can also see whether have sample source code, the basic source program framework,
 
586
.The MODEL flat, stdcall

Option casemap: none

My question is the 64 assembly without these formats

CodePudding user response:

64 of these formats? The tip should have clear requirements, that is you use the wrong compiler tools, or set the wrong engineering model type? Look at the command line prompt is, indeed, in a 32-bit Program Files (x86) directory, I've never used vs, don't know the specific steps, however, can have a try under the command window in the Program Files directory for ml. Exe which directory, compiled by hand to see,
  • Related