hello. i've been trying to compile a tutorial program in masm32, and it doesn't like the line

mov ax, seg message


it gives error, "symbol type conflict"

is this something to do with that being a line one would use in a 16-bit rather than a 32-bit program?

thanks.
Posted on 2007-07-27 17:53:44 by Aradesh
Aradesh, the whole example you are using is 16bit code. if you wish to compile it you will need a 16bit linker.

anyways if you are coding for windows you should have a look at iczelions tutorials.
Posted on 2007-07-27 19:28:23 by paradox
i could work through those tutorials, i suppose. however i was hoping to try and work on console programs to get the hang of the basics more. like... i find iczelion's tutorials a little advanced when i want to learn about the nuts and bolts first. but i guess i'll just take what i can find that i can make work for now  :p
Posted on 2007-07-27 22:22:17 by Aradesh

i could work through those tutorials, i suppose. however i was hoping to try and work on console programs to get the hang of the basics more. like... i find iczelion's tutorials a little advanced when i want to learn about the nuts and bolts first. but i guess i'll just take what i can find that i can make work for now  :p


Don't confuse the Win32 API with the Windows GUI. In the end, a console program in Windows is just a difference in how it is linked into a PE (by one byte actually) and some of the functions it calls.

If you want an example of Command Line programs in assembly, check out demo examples 11 (MSVCRT/LibC) and 12 (Pure Command Line) in the NASM32 Project. If you are coming from a MASM background, ignore the syntactical differences and concentrate on the functions that are called. Look those functions up in the MSDN database, learn all about them and apply that knowledge to your efforts.

HtH :)
Posted on 2007-07-27 23:18:00 by SpooK
Aradesh: iczelion's tutorials don't teach assembly, they teach programming with the win32 API in assembly... so you should indeed first get some assembly knowledge before reading those tutorials. I can recommend http://madwizard.org/view.php?page=tutorials.contents , to get the very basics covered.
Posted on 2007-07-28 07:11:49 by f0dder
If you wanna use 16 bit programs, you will have to specify .8086 at the beginning. Something like below...but the following program corrupts the object file. The linker cannot link it, but it assembles :-)

.8086
.model small

.data
msg db "hello",0
.code
_start:
mov ax,offset msg
ret
end _start

:) :) :)
Posted on 2007-08-06 22:29:06 by pAniket
.386
.model tiny

you don't have to limit yourself to 8086 instructions.
Posted on 2007-08-08 04:07:10 by Homer