80 questions
-2
votes
1
answer
87
views
How did `masm32` get to be hosted on a separate website? [closed]
Here is the masm website https://www.microsoft.com/downloads/en/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
and here is that for masm32 : http://masm32.com/index.htm
When I run both ...
4
votes
0
answers
86
views
Constant value too large for OR but not for MOV on x64 [duplicate]
I am building assembly x64 functions, compiler microsoft ml64 which comes with VisualStudio. It comes that I can't do bitwise operation on 64 bit registers when I specify a value larger than 32 bit, ...
0
votes
1
answer
73
views
Using MASM64, I can't get the correct mouse coordinates using ReadConsoleInputW
I use MASM64 with the latest Visual Studio 2022 Preview on the latest Windows 11. No 3rd party assembly libraries are used. Only pure WinAPI.
I want to get the mouse cursor position, when the left ...
3
votes
2
answers
135
views
Incorrect return from assembler function
I am getting an unwanted answer from the above assembler call.
Expected answer: -33
Actual answer: 65503
I am using MASM and Visual Studio 2019 Community Edition.
; assembler code
Tester2 proc
mov ...
0
votes
0
answers
47
views
Visual Studio 2022 is not building and running the file I want it to run
I'm working on masm64 and I had another file before this one so Visual Studio thinks that I'm trying to run the old one and that one is deleted so it doesn't work. This is the code
.CODE
; &...
0
votes
1
answer
55
views
Why isn't the word "falling" down the screen?
So this is the continuation of my typing word game. I have most it finished but changed a decent part of the code from before. I have almost everything done except for some reason the words print at ...
0
votes
0
answers
41
views
How to multiply structures among themselves
I need to multiply the structures among themselves and write the result into a separate one. The problem is that after multiplication it is impossible to transmit the result. If I transfer the result ...
0
votes
2
answers
217
views
linking .s files in windows x86_64 C++
I'm able to link my aes-x86_64.s in linux using gcc perfectly fine but not able to in windows using cl, or ld or gcc from TDM.
The assembly file has functions like AES_cbc_encrypt for encryption/...
2
votes
0
answers
141
views
Printf Access Violation when called from process entry point
I'm a beginner assembly programmer. I'm trying to create a Hello World on Windows with Visual Studio 2022. Whatever I try, I keep having the same error. I looked around on the web but my code seems ...
0
votes
0
answers
33
views
MASM Frame not in module the current stack frame was not found in a loaded module [duplicate]
I'm currently learning MASM x64 and using Visual Studio 2022. To facilitate my learning process, I've attempted to create a simple WriteLine procedure that I can call from the main function to write a ...
1
vote
1
answer
314
views
How to create an INT 1 interrupt handler when the Trap Flag is enabled?
The MASM program below enables the Trap Flag (TF) but it causes the program to exit prematurely
pushf ; Push FLAGS onto the stack
pop ax ; Pop FLAGS into AX register
...
1
vote
0
answers
91
views
Error Code:A2206 missing operator in expression visual studio 2022 masm64
hello how can i fix error A2206 missing operator in expression every line have rel
Severity Code Description Project File Line Suppression State
Error A2206 missing operator in ...
0
votes
1
answer
769
views
Win32 CALL to CreateFileW always returns ERROR_INVALID_PARAMETER in MASM x64. Why?
I'm currently trying to learn MASM x64, and so far I seem to be getting the hang of things pretty well. Everything was going well right up until I tried to call CreateFileW to read the contents of a ....
0
votes
1
answer
300
views
How to compute the sum of the odd numbers from the Fibonacci numbers between zero to 1x10^6
I am having trouble creating a x64 masm program that computes the result of the sum of the odd values. The answer is in RAX as 109E82h (1089154d). I am having difficulty trying to figure out how masm ...
0
votes
0
answers
71
views
SSE loop over array gets the wrong value (dot product of two arrays of doubles)
I have problem with my assembly code: I need to multiply two arrays, then add up the result and get a square root out of it. I've did the code and looks like it works fine, but I need to receive 9.16, ...
1
vote
1
answer
394
views
Algorithm to convert binary big integer to scientific notation with truncation to a 1-digit mantissa
I have a very big unsigned binary big integer in the scale of 6*10^120.
Assume the big integer is stored in a struct of many QWORD (8 bytes) unsigned integers or several YMM registers.
I want to ...
1
vote
0
answers
131
views
Why does the MASM symbol RAX return true for both IFDEF and IFNDEF?
Recently was working on a project to include 64-bit code when assembled under ML64.exe. However, this code actually included the 32-bit MASM directives, so the build failed.
IFNDEF RAX
.686P
.MODEL ...
2
votes
1
answer
453
views
x64 fastcall caller stack management
MSDN says
Integer valued arguments in the leftmost four positions are passed in left-to-right order in RCX, RDX, R8, and R9, respectively.
Space is allocated on the call stack as a shadow store for ...
1
vote
1
answer
215
views
Define procs whose name is from a macro parameter using MASM 64
Is it possible to define procs where the name is derived from the inputs in a macro, using MASM 64? (ml64.exe)
Eg, something similar to below, where @(value) just places the 'value' in to the source.
...
0
votes
1
answer
526
views
MASM not assembling all files
I have a C++ project in Visual Studio 2022, which creates a .dll which calls a function created by the MASM assembler. The assembler - ml64 - however does not consider a single .inc file, and so fails ...
2
votes
1
answer
235
views
Would like to view Intel opcodes from assembly code [duplicate]
Would there be any other method on how to go about doing this without having to use the Intel manuals? Would it be possible to simply compile small and short ASM program using MASM64 and then using a ...
3
votes
2
answers
407
views
How do you differentiate "MOV r/m64, imm32" vs "MOV r/m32, imm32" in MASM64?
The Intel manual says mov has two variants involving both memory and 32-bit immediate operands:
MOV r/m32, imm32
MOV r/m64, imm32
The first one copies four bytes, the second copies eight, taking the ...
-3
votes
1
answer
3k
views
X64 assembler with visual studio 2022 integration [closed]
I am learning Intel X64 assembly language under Windows 11.
Currently I'm using the latest Visual Studio 2022 preview with its built-in MASM64.
I have looked everywhere for a good assembler and/or a ...
0
votes
1
answer
287
views
How to import a Unsigned Long (ULONG64) into x64 ASM File in Visual Studio 2019
OK so I'm using Visual Studio Community 2019 with MASM enabled and I'm trying to declare a variable in my ASM file that is defined outside of the .ASM file but in the same project. How can I do this ?
...
1
vote
1
answer
43
views
Tabulate function Y=3.3\*log(2)(x^2+1)
Can't log2 to masm64. How exactly do I apply fyl2x in my code? I can't figure out where to apply this piece of code. Basically, the program crashes, or incorrect data. Here is my code:
\`include ...