Questions tagged [masm32]

MASM32 is a software development environment (SDK) for programmers using Microsoft's Assembler (MASM) to target 32-bit Windows.

MASM32 is freely available at http://www.masm32.com/.

597 questions
0
votes
1 answer

assembly getting input - invalid instruction operands with StdIn

I'm making a program to practice getting input and arithmetic, and when storing the user's input in a buffer and then doing arithmetic with them, I get error A2070 - invalid instruction operands. Here is my code: include…
Progrmr
  • 1,575
  • 4
  • 26
  • 44
0
votes
2 answers

x86 assembly (masm32) output multiplied number produces junk characters

I'm coming back to assembly for the sake of it after a few months and I'm having trouble getting two numbers to multiply and output the result. Here's my code: .386 .model flat, stdcall option casemap :none include \masm32\include\windows.inc…
Progrmr
  • 1,575
  • 4
  • 26
  • 44
0
votes
1 answer

string arrays in x86 assembly: get a line at a time

I am reading in a file of 3 books with title, author, and date. What I want to do is process each line into a new array. I am having a problem only grabbing a line of data and adding it to a temp array. I cant point to the beginning of the line and…
user249375
0
votes
2 answers

assembly - accessing array elements

I have an array that I am attempting to print. I would like to print it out so I can see if it is correct. It is currently printing the number 1 and stopping. Or, if I mess with the ECX differently it prints out a bunch of zeros and crashes. Here…
user249375
0
votes
1 answer

Assembly language - masm32 - multiplying

I am multiplying 3 numbers which works good even with a carry. I want to add a 4th number to multiply just for learning purposes. After i multiply 3 numbers i shift into EDX and print. Works great. After i add a 4th number i think i am multiplying…
user249375
0
votes
1 answer

MASM routine to read dword from 32 bit address

So one of our projects has hit a snag with some assembly code that needs to be written. We have an old, old (compiled with Borland 1992) memory tester C program that occasionally needs to drop to assembly to read values from certain areas of memory.…
Zach H
  • 469
  • 5
  • 18
0
votes
1 answer

x86 assembly - masm32: Issues with waiting for response

I have created this program that takes two inputs and prints them out (simple, yes, but it's for practise). It compiles, and runs fine, but it doesn't do what I intended. Here is my code: .386 .model flat, stdcall option casemap :none include…
Progrmr
  • 1,575
  • 4
  • 26
  • 44
0
votes
1 answer

x86 assembly - masm32: How to create an empty string variable to transfer input to and print

I want to create a program that takes in input and prints out the result, but I can't create an empty variable that can take a string input. Here is what I mean: .data emptyvar db ???? ; I don't know what to do here .data? buffer…
Progrmr
  • 1,575
  • 4
  • 26
  • 44
0
votes
2 answers

x86 assembly (masm32) - how to split multi-digit data into individual characters

I am still getting my head around x86 assembly, and so I have made this little program that multiplies 6 and 7, moves the data to EAX and then prints the result. It compiles fine, and runs fine, but instead of printing 42, it prints the…
Progrmr
  • 1,575
  • 4
  • 26
  • 44
0
votes
3 answers

x86 assembly- Simple arithmetic program not working, MASM32 on xp

I have a simple program that adds 1+1 until it reaches a million, and then it prints "Done!" to the console. But when it runs, it does nothing. Here is the code: .386 .model flat, stdcall option casemap :none include…
Progrmr
  • 1,575
  • 4
  • 26
  • 44
0
votes
1 answer

x86 assembly - how to show the integer 2, not the second ASCII character

I have this code: .386 .model flat, stdcall option casemap :none include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\masm32.inc includelib \masm32\lib\kernel32.lib includelib…
Progrmr
  • 1,575
  • 4
  • 26
  • 44
-1
votes
1 answer

Dll injection code

i am trying to create a dll injection code the test process is notepad and the process id is hardcoded the code is: .386 .model flat, stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc…
mohamed essam
  • 37
  • 2
  • 5
-1
votes
1 answer

array or what is this?

I met a line of code like "LOCAL Path[1000]:BYTE". As far as I understand, it allocates space on the stack for a local variable, but I cannot understand why there are square brackets here. Is it an array or what?
Jekgley
  • 9
  • 3
-1
votes
1 answer

Sort the characters of a string in ascending order using masm32 programming language

I am trying to make a program that accepts user input and sorts the characters of a string input in ascending order.
How
  • 1
  • 4
-1
votes
1 answer

MASM32 Assembly does not work in Visual Studio

I wanted to start learn Assembly but it did not run any way. First I tried with py il with python but it did not work. Now I have a Visual Studio 2022 and I installed the MASM32. The problem is Visual Studio give a A1000 error so it does not find…