Re: asm noob needs help compiling tutorial samples!?



giddy wrote:
hi,

I'm an experienced C# programmer i also know quite a couple of other
things.

I tried to learn x86 asm before and got turned off/stuck with the
complex compiling and the never ending types of compilers
(TASM,MASM,DASM??) ....

I finally found a nice tutorial but i can't seem to compile the source
code!?
http://drpaulcarter.com/pcasm/

I downloaded the Microsoft Source code on the bottom, but im having
some problems compiling it.
http://drpaulcarter.com/pcasm/ms-ex.zip

I've got nasm.... ....
In the source file itself is says:
; Using MS C/C++
; nasm -f win32 first.asm <-----------This works fine, i get
first.obj outputted.
; cl first.obj driver.c asm_io.obj <---------- Were do i get cl from?
It didn't come with NASM??(I have the other files)

I'm guessing cl is a linker right? How do i get it?

Should be some part of "MS C/C++"... It's looking for a compiler - which invokes the linker... which links first.obj, driver.obj, and asm_io.obj into "first.exe". "driver.c", as you've probably seen, contains "main", and just calls "asm_main"... which is declared (as "global") in your "first.asm". "asm_io.obj" can be assembled with Nasm from "asm_io.asm", if you haven't got it... or it turns out not to be the right format.

The idea of Dr. Carter's tut using C for all the I/O (that's what "asm_io.asm" does) is that it'll work cross platform. Works slick on Linux... where everybody uses gcc, pretty much. Under Windows, there's more choice. If "cl" isn't what you type to compile a C program, try whatever you *do* use. Same thing, just some of the object files are made from asm, not C.

If for some reason the compiler you're using isn't liking Dr. Carter's tut, post the error messages, and we can probably fix it.

Best,
Frank

.



Relevant Pages

  • Re: C or C++ for FOSS/linux?
    ... Why integrate it in a GUI? ... when writing a C programmer what do you ... Compiling a basic kernel with a lot of drivers and functionality takes ...
    (comp.os.linux.development.apps)
  • WinCupl Problem(s)
    ... programmable in-circuit without the added cost of a programmer. ... their WinCupl program to make sure it can do the sorts of things I ... compiling, ... giving any errors there that I wasn't seeing in the GUI. ...
    (comp.arch.fpga)
  • Compiling Visual Basic - every time different?
    ... I''m not a programmer and don''t have much knowledge of Basic. ... have a question about compiling Visual Basic code. ... On different computers but even on the same computer. ... Thanks for your help info ...
    (comp.lang.basic.visual.misc)
  • Re: Is interpret/compile the wrong distinction?
    ... I *think* that what I normally want as a programmer ... Your word SYNTAX is, IMO, indistinguishable from IMMEDIATE. ... In the late 70's a lot of people who were just starting with FORTH really liked the idea of "STATE-smart" words, that did different things depending on whether you were compiling or interpreting. ... But after a few years' use, most of them came around to the understanding that, except in a few specific circumstances, STATE-smart words made things *harder* for the programmer, not easier. ...
    (comp.lang.forth)
  • Re: Which develop tool do you use for linux?
    ... > develop tool to help the programmer finish tasks quickly by integrate all ... > the functions include editing, compiling and debugging together. ...
    (comp.os.linux.development.apps)