hello. i've been trying to compile a tutorial program in masm32, and it doesn't like the line
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.
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.
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.
anyways if you are coding for windows you should have a look at iczelions tutorials.
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
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 :)
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.
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
:) :) :)
.8086
.model small
.data
msg db "hello",0
.code
_start:
mov ax,offset msg
ret
end _start
:) :) :)
.386
.model tiny
you don't have to limit yourself to 8086 instructions.
.model tiny
you don't have to limit yourself to 8086 instructions.