News:

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

Main Menu

Help with a program on mask32 IDE

Started by Nabho, October 15, 2014, 06:57:00 AM

Previous topic - Next topic

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

As you can see the preamble is 32 and 16 bit

i want to use the code but i need to change the preamble
any help will be appreciated

hutch--

One warning, don't double post in here, your original post was moved to the 16 bit forum, this is just a duplicate of your first post. It still looks like homework and you are asking members to convert 16 bit code to 32 bit code.