News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Getting started

Started by roddym, February 28, 2010, 06:48:46 PM

Previous topic - Next topic

roddym

Hi I'm pretty new to assembly language ( though I've tried a few online tutorials( failed in all)) I'm on a compaq presario SR2050NX( added ram) can anyone help me? ( best I've done with any assembler is no codes like mov or include statement or anything like that(aka blank slate lol))

roddym

oh one other thing I'm on windows 7

ragdog

Hi

For learn if Izelion tutorials a good adress
http://win32assembly.online.fr/tutorials.html

best greets

roddym

no matter what code I've tried I get:

LINK : fatal error LNK1181: cannot open input file "C:\try1.obj"

roddym

 I stand corrected I tried:

.386
.model small
.data
.code
start:
end start


and got this:

Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Assembling: C:\try2.asm
C:\try2.asm(6) : warning A4023: with /coff switch, leading underscore required f
or start address : start
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : error LNK2001: unresolved external symbol _start
try2.exe : fatal error LNK1120: 1 unresolved externals
_
Link error
Press any key to continue . . .

ragdog

I have test it

here is my solution
.model small,STDCALL

this works

roddym

nope nothing works for me , even in a math program that can write to file I can't open a a file for writing(i/o disabled by virus ?(or my own idiocy?)) so that stops that

roddym

which is weird as my antivirus looks to be working

dedndave

the model directive will be different for 16-bit and 32-bit code - they also require different linkers
so, it depends on which type you are trying to write
give us some info
have you installed the masm32 package ?
maybe you could post some code
or - go to this link and d/l the attachment
there is a simple program of both types with batch files to assemble...

http://www.masm32.com/board/index.php?topic=12621.msg97236#msg97236

roddym

Quote from: dedndave on February 28, 2010, 10:32:28 PM
the model directive will be different for 16-bit and 32-bit code - they also require different linkers
so, it depends on which type you are trying to write
give us some info
have you installed the masm32 package ?
maybe you could post some code
or - go to this link and d/l the attachment
there is a simple program of both types with batch files to assemble...

http://www.masm32.com/board/index.php?topic=12621.msg97236#msg97236
dedndave the error I get is it can't open the .asm file but unless I've affected the i/o structure of my pc( or a virus) that shouldn't affect a math program totally unrelated to masm as for code I've posted all the code I've tried.

dedndave

QuoteLINK : fatal error LNK1181: cannot open input file "C:\try1.obj"

ok - it can't open the OBJ
first - the root directory isn't the best place - lol - but it should work
does that OBJ exist ?
is it the right kind of OBJ file ?
you might want to look at the d/l from that link
in the batch files are the appropriate assembly and link command line parameters
it sounds like you may not have a COFF OBJ file
i can't tell, as you are not providing us with sufficient information

also, make sure you have a 16-bit linker for 16-bit code or a 32-bit linker for 32-bit code

have you installed the masm32 package ?
we can't help you without info   :P

roddym

figured it out though I still think my i/o is broke lol. I have the basics working lol

roddym

now what's the easiest way to print hello world ? or write to file ( test for io)

roddym

okay I've got code working in masm but apparently it's not valid win 32

roddym

.386
.model small,STDCALL
.data
.code
start:
mov eax,32h
end start