News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Help to write a program on msam32 IDe

Started by Nabho, October 14, 2014, 12:11:35 PM

Previous topic - Next topic

Nabho

Search a program in an array and print whetehr it's positive or negative

hutch--

This sounds like homework, tell us what you are trying to do and what you have written.

Gunther

Hi  Nabho,

as Hutch already mentioned: The best way to get help is to post your code here and to describe your goals. We can look over your code, can give hints, tips and tricks, but we won't do your homework for you.

Gunther
You have to know the facts before you can distort them.

Nabho

I don't know anything about asm and the teachers asked me to do it without any help

Nabho

here's the code i used in MSAM32 ide

.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib

.data

a db 02h,02h,02h,02h,02h,02h,02h,02h,02h,02h

.code

start: mov ax,@data

mov ds,axa

mov cl,10

lea si,a

mov ax,0000h

again: add al,[si]

inc si

dec cl

jnz again

mov cl,0ah

div cl

mov ah,4ch

int 21h

end start

.end

whenever i click on assemble and link on ide i get error s

line 26:error A2155:cannot use 16-bit register with a 32-bit address
line 16:error A2004:symbol type conflict

herge

Hi:

mov ds, axa
should be mov ds, ax

Regrds herge
Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.