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
35
votes
2 answers

Assembly - .data, .code, and registers...?

So this morning I posted a confused question about assembly and I received some great genuine help, which I really appreciate. And now I'm starting to get into assembly and am beginning to understand how it works. Things I feel I understand alright…
Cam
  • 14,930
  • 16
  • 77
  • 128
16
votes
1 answer

Multiple line comments in MASM assembly

Is there a way to comment multiple lines in assembly? I am using Masm32 v9.
nunos
  • 20,479
  • 50
  • 119
  • 154
12
votes
2 answers

error LNK2001: unresolved external symbol _MessageBox

I am trying to create a helloworld program using only masm and not masm32 libs. Here is the code snippet: .386 .model flat, stdcall option casemap :none extrn MessageBox : PROC extrn ExitProcess : PROC .data HelloWorld db "Hello There!",…
Jumbo
  • 533
  • 3
  • 8
  • 15
12
votes
1 answer

Confusing brackets in MASM32

I am trying to get to grips with MASM32 and am confused by the following: I thought that brackets were used for indirection so if I have the a pre-defined variable .data item dd 42 then mov ebx, item would put the contents of 'item', i.e.…
Penguino
  • 2,136
  • 1
  • 14
  • 21
10
votes
2 answers

Difference between `bx` and `bp`?

What is the difference between bx and bp in assembly? Example here: mov bx, 1h mov bp, 1h Do they reference to the same memory? Is it the same with ss and sp?
tina nyaa
  • 991
  • 4
  • 13
  • 25
10
votes
2 answers

Infected compiler, or malfunction?

I've encountered something very strange, and things just don't add up. First of all, I posted this here because I'm not sure if this has anything to do with computer virusses at all. And if it does, could you please direct me to a place to find…
Rick
  • 103
  • 4
10
votes
3 answers

Outputting Hello World in MASM using WIN32 Functions

Contents Intro Code Assembling and Running Miscellaneous Question 1. Intro This isn't a question per se (though there is one at the bottom) but a HelloWorld app for people on StackOverflow to experiment with. When I was first trying programing…
Zimm3r
  • 3,369
  • 5
  • 35
  • 53
8
votes
2 answers

bt assembly instruction

I have quesetion about bt assembly instruction. I have excerpted part of book to provide context. Please see last example, bt Testme, bx. Why does that copy TestMe+8? Shouldn't it copy TestMe+65? Very much thank you for help! 6.6.4.2 The Bit Test…
tina nyaa
  • 991
  • 4
  • 13
  • 25
8
votes
3 answers

Detecting architecture at compile time from MASM/MASM64

How can I detect at compile time from an ASM source file if the target architecture is I386 or AMD64? I am using masm(ml.exe)/masm64(ml64.exe) to assemble file32.asm and file64.asm. It would be nice to create a single file, file.asm, which should…
botismarius
  • 2,977
  • 2
  • 30
  • 29
7
votes
2 answers

Compile Assembly Output generated by VC++?

I have a simple hello world C program and compile it with /FA. As a consequence, the compiler also generates the corresponding assembly listing. Now I want to use masm/link to assemble an executable from the generated .asm listing. The following…
SDD
  • 1,421
  • 2
  • 20
  • 24
7
votes
2 answers

The END directive in assembly language

I am new to assembly language and wrote this code: main PROC mov eax,10000h ; Eax=10000h add eax,40000h ; Eax=50000h sub eax,20000h ; Eax=30000h call DumpRegs exit main ENDP END main I wanted to…
user3307068
  • 149
  • 1
  • 3
  • 9
6
votes
4 answers

Why is my masm32 program crashing whenever I try using interrupts?

Here's the code: .386 ;target for maximum compatibility .model small,stdcall ;model .code main: int 20h END main Result: http://img705.imageshack.us/img705/3738/resultom.png "test.exe has stopped working" - always right when it…
Cam
  • 14,930
  • 16
  • 77
  • 128
5
votes
1 answer

masm32 linker does not create executable

I installed masm32 on my Windows XP SP3 machine. I downloaded masm32 from here: http://www.masm32.com/masmdl.htm Installed it. I added the path, C:\masm32\bin to the PATH environment variable. Now, I am trying to assemble and link an example…
Neon Flash
  • 3,113
  • 12
  • 58
  • 96
5
votes
1 answer

FindWindow returns zero in MASM32 program even if the window exists

I'm trying to write a program in assembly and one of the first things that I need is the handle of the main window of a specific process. I've been trying to get it using FindWindow, but no luck so far; FindWindow apparently keeps returning zero.…
5
votes
2 answers

Accessing Segment Registers MASM

I'm trying to query the value located in the Process Enviornment Block, pointed to by the FS segment register. Attempting to compile code with the fs:[0] segment included results in an error (error A2108: use of register assumed to ERROR). How do…
James
1
2 3
39 40