News:

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

help commenting code

Started by gammaman, June 05, 2009, 04:12:31 PM

Previous topic - Next topic

gammaman

Thanks, I will let you know how I make out tomorrow.

gammaman

Ok I fixed those errors and got the program to assemble.  Next I linked the program and got the .obj file.  However when I went to run the .exe I received 2 more errors.

CRLF - unresolved external
WRITEINT - unresolved external

dedndave

yah - those are in a library someplace ?
you need to link with that library or obj file

up near the top, you want to add....

        includelib fierro.lib

gammaman

actually, I opened a new dos window and tried running the program again.  This time I got no errors but received the black screen of death.

dedndave

see the previous post
the writeint is a routine that converts binary to base ten (i guess)
CRLF is a carraige return/line-feed
you can see they are declared as externals

gammaman

does the include go before the data, before the code, somewhere else at the top?

dedndave

yes - before the data
i would move the extrn's up there also

gammaman

Ok I think it is working now.  the output is

10 20 30 40 60 70 80 90.

The number 50 was removed from the list.

dedndave

if you use the includelib, you may not need the extrns
the difference is, with includelib, the assembler puts info in the OBJ file about where to find them
without includelib, you have to specify the obj when you link

link programname.obj+fierro.obj

something like that

dedndave

cool - lol
now - the prof is gonna want your fixed version for the next semesters class - lol

gammaman

LOL, funny you mentioned that.  Well actually as I mentioned eariler, this is only an undergraduate prerequisit for me becasue my undergrad was not computer science.  Next semester I am signed up for CSCI 641 which is graduate leve computer architecture.  The class I am taking now is a prerequist for that.  So it sounds to me like I will be visiting here often for some much needed guidance.

dedndave

well - your new prof will probably know assembler
that will help, but it will also mean he will want you to learn
if you google Iczelion's Tutorials - a good place to start
if i were you, i'd be a step ahead of the game and play with it a little before you get to 600 level class
also - learn 32-bit code
16-bit code is quickly becoming a thing of the past

gammaman

well I only have another two weeks of this class and that gives me the rest of the summer to work on it.

gammaman

you know what else is funny.  CSCI641, Graduate computer architecture is the only hardware class I am forced to take in my MS.  the rest of the courses are all software.

gammaman

Now back to that annoying logic diagram.