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

Weird assembly language addition bug

I'm programming an implementation of the Fibonacci sequence in assembly language, and I'm getting a strange bug. It works at first, but when I reach 8+13 (that is, 8+D in hex) it gives me 15. I'm compiling/running this with the Visual Studio 10 /…
Nathan
  • 73,987
  • 14
  • 40
  • 69
0
votes
1 answer

Error in Assembly masm linker 'link: extra operand'

I installed masm for assembly programming but i have problem with link below code .586 .MODEL FLAT .STACK 4096 INCLUDE io.h .DATA prompt BYTE "shalgham", 0 .CODE _main PROC output prompt mov eax, 0 …
Mahdi-bagvand
  • 1,396
  • 19
  • 40
0
votes
1 answer

Setting text color and background color assembly language x86 (masm)

.data myname byte "Ngoche Penpa Gyaltsen",0 space byte ' ',0 .code main PROC mov esi,0 mov eax,0 mov ecx,lengthof myname mov edx,offset space L1: movzx eax,myname[esi] call writechar mov eax,16 mov eax,yellow +(blue*16) call…
ngoche
  • 65
  • 2
  • 8
0
votes
1 answer

.IF comparing strings MASM

How do I achieve something like this: abc db "abc",0 def db "def",0 textnotequal db "strings are not equal",0 textequal db "strings are equal",0 .if abc != def invoke MessageBox, NULL, addr textnotequal, addr textnotequal, MB_OK .elseif abc…
Marius Prollak
  • 368
  • 1
  • 7
  • 22
0
votes
1 answer

MASM InternetOpenUrl / InternetReadFile get Output

I'm sending some data from my application to a php file which may print 3 different things on the screen (if I would open it in my browser), I'm sending something to my URL like so: sendtourl PROC _loop: invoke lstrcpy,addr _urlTmp ,addr _url …
Marius Prollak
  • 368
  • 1
  • 7
  • 22
0
votes
1 answer

winapi with 64bit number in masm32

I need determind size of a logical volume and print it. GetDiskFreeSpaceEx is returning size as 64bit number(?). What can i do with it?
Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132
0
votes
0 answers

How to write .com program using masm32

can someone tell or suggest me the way to write a .com program using masm32 ? I have tried using Exe2Bin command used to convert .exe into .com program but din't get any luck. whenever I run this command use to see error: file cannot be…
dev
  • 191
  • 1
  • 4
  • 14
0
votes
1 answer

MASM32 qeditor linker error LNK1181

I have masm32 installed for quite a while now, and it always worked fine when I used the qeditor. An hour ago, however, I started getting a linker error: Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All…
Ruben
  • 524
  • 1
  • 6
  • 14
0
votes
1 answer

Reading Hex as String

im not good in coding in assembly, I just need this to write in assembly anyways here is what I am trying to do. (I'm using Masm32) .data Msg db 31h, 00h, 32h, 00h, 33h ;convert this to string which "123" .code start: …
user2671504
0
votes
1 answer

Manage keypress

I'm using MASM syntax , and I want to get a keyboard key press then store it to use it later in code , I've tried using : int 21h interrupt but it seems that it doesn't work under 32-bit. Is there any other way to achieve that ? thanks.
0
votes
2 answers

MASM32 What does 'default code distance mean'?

This symbol used in MASM32: @CodeSize Returns an integer representing the default code distance. I'm trying to understand what 'default code distance' means? Tony
Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
0
votes
1 answer

Error while linking 16-bit asm code

This is the program I am trying to assemble & link. But I get a linker error: Microsoft (R) Incremental Linker Version 5.12.8078 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. LINK : error : Segment reference in fixup…
dev
  • 191
  • 1
  • 4
  • 14
0
votes
1 answer

Arithmetic operations in ASM Language

I just need some help. I don't fully understand and I am fairly new to masm32 so if you could explain, that would be great! MOV AX, 200 ADD AX, 300 MOV RESULT, AX Will result be equal to 500? I tried adding 3 and 2 and using this to show…
0
votes
1 answer

Assembly multiplication and addition

I can't seem to output an integer in assembly greater than 128.. It works fine until I add/multiply numbers resulting to an integer > 128. It returns a garbage character. Help! How can I output those integers. Here is the complete…
0
votes
2 answers

"inc ecx" Instruction operands must be the same size?

I am trying to write a little program in MASM. On one line, when I try increasing ECX, I get this error... It doesn't seem to make any sense, since there is only one operand! Here is the relevant code: mov ecx, eax lea eax, DWORD PTR [ecx] lea ecx,…
Sean Heiss
  • 780
  • 2
  • 9
  • 25