I am attempting to read from main memory using masm32 assembly and in order to do this I created (as previously recommended in an answer to another of my questions here) an array that will contain the greatly separated memory locations (in order to avoid reading from cache).
I have managed to create the array and have it being read, how...
Hello! 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 you query the segment registers?!
Thanks
...
Dear All,
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
...
.386
.model small,C
.data
.code
AdjustedSum proc uses ebx ecx esi edi numbers:ptr, used:dword ;int AdjustedSum(int numbers[], int used);{
mov ebx, numbers ;move base address of array in ebx
mov eax,0 ...
Hi!
I need determind size of a logical volume and print it. GetDiskFreeSpaceEx is returning size as 64bit number(?). What can i do with it?
...
Is there a way to comment multiple lines in assembly?
I am using Masm32 v9.
Thanks.
...
I am having some trouble understanding how to retrieve the result of a calculation done using the Intel's x86 coprocessor.
Please consider the following data segment.
.data
res real4 ?
x real4 5.0
k real4 3.4
and the following code segments, version 1:
.code
main:
fld x ; 5.0
fadd k1 ; 5.0 + 3.4
fistp res ; store as inte...
When including files into MASM32, it cannot find it's own files. After including masm32rt.inc, the assembler cannot find \masm32\include\windows.inc
Apparently most MASM system include files begin with \ instead of specyfing a relative or absolute path.
I tried specifying the directory in %PATH%, setting the /I compile switch, and sett...
Hi everyone,
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 include the stack, interrupts, binary/hex, and in general what most of the...
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 reaches the interrupt.
This is the interrupt I'm trying to use. It should simply exit the ...
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 include either file32.asm, or file64.asm, depending on the architecture. Ideally, I would l...
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 command line yields 3 linker errors:
\masm32\bin\ml /I"C:\Program Files (x86)\Microsoft Vis...
main proc
finit
.while ang < 91
invoke func, ang
fstp res
print real8$(ang), 13, 10
print real8$(res), 13, 10
fld ang
fld1
fadd
fstp ang
.endw
ret
main endp
What's wrong with this piece of MASM code?
I get an error on .endw. I have ran some tests to ensure myself of that. Assembler tells me invalid ...
I just downloaded Embarcadero Delphi 2010 (the trial version).
tasm32 and the related stuffs (ilink32, implib, impdef, etc) are still available in it.
Still they lack header files and import libs, but fortunately that can be solved by win2inc, implib, etc.
The final result can be called TASM32 SDK (in a similar way like MASM32 SDK do).
...
Hi,
I have a problem with the MASM32 assembler
The following code is a Hello World example that I copied from the MASM32 tutorial:
.model small
.stack
.data
message db "Hello world!", "$"
.code
_main proc
mov ax,seg message
mov ds,ax
mov ah,09
lea dx,message
int 21h
mov ax,4c00h
int ...
Hello everybody,
I'm currently coding an irc bot in asm
I have already done this once in C++, so I know how to solve most problems I encounter, but I need a substr()[*] function like the one seen in C++. I need the substr fucntion to receive the server name from a PING request so I can respond with the corresponding PONG response
But I ...
.386
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\masm32.inc
include \masm32\include\kernel32.inc
include \masm32\include\comdlg32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \mas...
Hey guys,
I'm building a Windows Assembly program without any macro. So I downloaded a program that was using macros, and I'm converting this into "pure" assembly code.
However I'm facing one issue here. There's a label @@: that I don't understand, and also a jump jne @F that I didn't get it. What are these 2 symbols?
MyWndProc:
...
I know that strings surrounded by single quotes can contain double quotes and vice versa, but can a string contain both? For example, the string:
How do you say, "Where's the bathroom?" in Spanish?
...
I have a problem because all though I can see the procedures inside the .inc files most of the actual code as been processed into .lib files. I have tried doing searches inside msdn and the masm hlp files. The win32 api has some of the information neccessary to make correct procedure calls but only for some of the procedures.
What I n...