Hi,
If I try to assemble the following code, I get a A2006 error ( error A2006: undefined symbol : StrCmp).
Here's my code:
.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
include \masm32\include\user32.inc
includeli...
I am new to MASM. So the questions may be quite basic.
When I am using the MASM assembler, there's an output file called "Link Map". Its content is composed of the starting offset and length of various segments, such as Data segment, Code segment and Stack segment. I am wondering that, where are these information describing? Are they ta...
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...
How can I operate on files in masm.
I mean using standard libraries included to microsoft (masm).
Or somethning available in windows without linkink libraries.
...
Hello, I am currently studying for an exam I'll have on x86 assembly.
I didn't have much luck googling for ":", too common of a punctuation mark :/
IDIV - Signed Integer Division
Usage: IDIV src
Modifies flags: (AF,CF,OF,PF,SF,ZF undefined)
Signed binary division of accumulator by source. If source is a
byte va...
How can I retrieve MAC of network card(s) and what can I retrieve to recognise specific computer and how ?
...
You are required to write a maximum of two instructions in assembly to do the following:
Clear bits 0 and 7 of register AL, i.e. make them 0
Set bits 3 and 4 of register AL, i.e. make them 1.
Complement bits 1 and 5 of register AL.
Keep all other bits in the register AL as is without changing their values.
...
Hello, I'm trying to convert some c code to assmebly, and I need some help.
char encode(char plain){
__asm{
mov eax, plain
add eax, 2
ret
}
//C code
/*
char code;
code = plain+2;
return code;*/
}
First problem is that visual studio complains that the register size doesn't matc...
What am I doing wrong?
This is the assmebly I've written:
char encode(char plain){
__asm{
mov al, plain
;check for y or z status
cmp al, 'y'
je YorZ
cmp al, 'z'
je YorZ
cmp al, 'Y'
je YorZ
cmp al, 'Z'
je YorZ
;check to make sure it is in the alphabet now
mov cl, al
sub cl, 'A'
...
I've googled and googled, and I've not found anything useful. How can I send output to the console, and accept user input from the console with assembly?
I'm using MASM32
...
Hello,
I'm trying to run my first ASM 8086 program on MASM on Windows Vista 64bit OS.
I put this program on my MASM editor:
.model small
.stack
.data
message db "Hello world, I'm learning Assembly !!!", "$"
.code
main proc
mov ax,seg message
mov ds,ax
mov ah,09
lea dx,message
int 21h
mov ax,4c00h
int 21h
main end...
Hi,
I'm working on a project in x86 assembly on Windows (MASM), and I need to somehow catch tab presses, but I'm not sure how to do that in assembly (I'm new to it).
I can get get user input with int 21h, but as far as I can tell that only works if the users types the data, then presses enter.
What I need is a way so that if the user ...
How can I convert a number contained in a string from any base to any other base?
Bases can be anything i.e.: 2, 16, 10, 4, 8, 9.
I'm expecting the user to enter the base number. The user will enter the output base (the base to be converted to). The user will enter the number he wants to convert.
Pre thoughts:
I will save the input b...
Hi everyone
I'm working on a project and I need to compute something based on the rows and columns of an image. It's easy to take the bits of the rows of the image. However, to take the bits of each column I need to transpose the image so the columns become rows.
I'm using a BMP picture as the input. How many rows X columns are in bmp...
Hi guys,
let's assume I've got the address of my array (passed as a pointer to the function) in esi register. How can I access a particular cell of the array? i.e:
my_array[a + b * c]
where c is constant.
Thank you for the fast reply!
Cheers
...
hi folks,
just did my first test with MASM and FASM with the same code (almos) and I falled in trouble. The only difference is that to produce just the 104 bytes I need to write to MBR in FASM I put org 7c00h and in MASM 0h.
The problem is on the
mov si, offset msg
that in the first case transletes it to 44 7C (7c44h) and with masm ...
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 ...
Isn't PTR redundant in this instruction CALL DWORD PTR [XXXXXXXX]. If the instruction was CALL DWORD [XXXXXXXX] This also says, Call the DWORD length value located at the address XXXXXXXX.
Why PTR then?
...
I am trying to store a value in the lParam of a LV_ITEM:
;...
mov eax, value
mov lvi.lParam, eax
invoke SendMessage, hList, LVM_INSERTITEM, 0 addr lvi
lvi is a (LOCAL) LV_ITEM, and hList is the handle of my ListView Control. If this item is now clicked, i try to read it's value:
invoke SendMessage,hList,LVM_GETNEXTITEM,-1,LVNI_FOCUSE...
Hello, I am having a hard time understanding this and hopefully someone can correct me on it. A BYTE is defined as 0 - 2^7 ? which would be 128, which is 8 bits, correct? But that cant be correct because I am now storing a value of 255 into a BYTE? Any kick in the right direction would be helpful
...