masm Questions

5

I have spent a few years coding in C and Java. I enjoy how I can make a program display a message box or perform some file operations and it works on every (I think?) CPU without any dramas. Althou...
Tuyere asked 18/6, 2018 at 11:35

4

Solved

How can I write a far absolute JMP or CALL instruction using MASM? Specifically how do I get it to emit these instruction using the EA and CA opcodes, without manually emitting them using DB or oth...
Laconic asked 22/9, 2015 at 1:6

6

Solved

In our system's programming classes, we're being taught assembly language. In most of the sample programs our prof. has shown in classes; he's using: XOR CX, CX instead of MOV CX, 0 or OR AX...
Ladin asked 12/8, 2013 at 17:9

5

Solved

I'm learning Assembly at my university, and we were given a CD with MASM 615 on it, and we're using the Irvine32 include library. Everything works fine with it on the school computer, but when I tr...
Lapse asked 12/9, 2012 at 0:38

1

Solved

.data num1 word 0FEEDh .code main PROC mov ecx, 0E4C7FFFDh ;ecx = 0E4C7FFFD hex sub ecx, num1 ;;;;; error on this line I want to be able to subtract the variable num1 from the register ecx, bu...
Rattray asked 30/1, 2022 at 1:30

1

I am writing some code in x64 assembly and using SIMD. I have 9 bytes packed in the xmm15 register. For simplicity, let's look at the following code: .data Masks BYTE 0, -1, 0, -1, 5, -1, 0, -1, 0 ...
Edan asked 15/12, 2021 at 21:20

2

Solved

With Z2 dword ?, mov eax, Z2 works fine but movzx eax, Z2 gives "invalid instruction operands" error. I am a little confused here: even though Z2 is of same size as eax, why couldn't asse...
Derisible asked 11/6, 2021 at 8:14

3

Solved

I know that MSVC compiler in x64 mode does not support inline assembly snippets of code, and in order to use assembly code you have to define your function in some external my_asm_funcs.asm file li...
Lavoisier asked 18/12, 2016 at 11:57

2

Solved

What are the syntax differences between the NASM and MASM assemblers?
Purdy asked 10/1, 2010 at 1:43

7

Is there a way that I use MASM under Linux. Even tough NASM is quite popular under Linux, it still differs for some instruction style on code.
Cheerio asked 20/11, 2008 at 7:27

3

ar db "Defference $" What's the difference between mov dx,offset ar and lea dx,ar I think both are doing same work, but what is the difference between these two
Gil asked 9/5, 2010 at 11:7

2

Solved

I'm currently studying assembly language. In Microsoft visual studio 2017, I wanted to check the current status of the register flags. I wanted to know what each register flag abbreviation stan...
Gooch asked 23/8, 2017 at 6:32

3

Solved

Let's say I want to define a initialized variable string before running my assembly program (in section .data). The variable I chose to create is called Digits and it is a string that contains all ...
Pentstemon asked 9/8, 2016 at 20:49

4

Solved

MOV is probably the first instruction everyone learns while learning ASM. Just now I encountered a book Assembly Language Programming in GNU/Linux for IA32 Architectures By Rajat Moona which says:...
Spanner asked 7/3, 2010 at 19:10

2

Solved

In assembly language if we use mov eax, dword ptr[ebx] then it means copy the value pointed by ebx (ebx contains the address value, not the actual value, this instruction copies the actual value...
Hysterectomize asked 27/3, 2009 at 7:14

2

Solved

I have been working on an assembly language project for a class and though I have finally been able to work through all problems in this code ( I believe ), I now can't seem to get the Register con...
Selection asked 24/9, 2017 at 20:45

1

When debugging x86 assembly code in VS2013, I needed to check the contents of the FLAGS register. However, when I've enabled "Flags" in Register Window, I got: OV = 0 UP = 0 EI = 1 PL = 1 ZR = 0 A...
Scheming asked 8/11, 2019 at 6:41

4

Solved

I decided to learn an assembly programming language. I am using this 8086 tutorial. At the bottom the exercise is to find an error in some instructions and one of them is mov cx, ch I fo...
Modernize asked 18/4, 2015 at 11:38

2

Solved

I have learned about compilers and assembly language, so I'd like to write my own assembler as an exercise. But there I have some questions; How can I compute the address for segments such as @DAT...

2

Solved

I have a memory location that contains a character that I want to compare with another character (and it's not at the top of the stack so I can't just pop it). How do I reference the contents of a ...
Shy asked 3/12, 2015 at 4:50

2

Solved

I want to know if using the MOV instruction to copy a string into a register causes the string to be stored in reverse order. I learned that when MASM stores a string into a variable defined as a w...
Humoresque asked 9/8, 2019 at 10:12

1

Solved

Using 32 bit MASM assembly with the MASM version 11 SDK, I discovered an error during compiling. The error pointed to the line where I declared a variable with a double-word (dd) size. The message ...
Respecting asked 1/8, 2019 at 10:48

6

Solved

I'm coding a simple primality tester program for Windows in x86 assembly language (MASM32), which involves calculating a square root of a (64-bit) integer. My question is: Is there any simple way f...
Airscrew asked 10/1, 2012 at 19:2

1

I want to calculate a sequence of exponents of base 2. for example if given 3 the program would calculate (2^3 + 2^2 + 2^1 + 2^0). The problem is I cant calculate the exponent to being with. I hav...
Validate asked 8/6, 2019 at 20:33

2

Unhandled exception at 0x777745BA (ntdll.dll) in MASM1.exe: 0xC0000005: Access violation writing location 0x00000014. I'm using x86 assembly in visual studios 2017 and it keeps returning this error...
Nmr asked 12/5, 2019 at 15:23

© 2022 - 2024 — McMap. All rights reserved.