Re: asm noob needs help compiling tutorial samples!?
- From: Paul Carter <spamtrap@xxxxxxxxxx>
- Date: Sun, 23 Mar 2008 13:40:43 -0400
Frank Kotler wrote:
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
cl is the Microsoft C/C++ command line compiler. You can download the free Visual Studio C++ 2008 Express program from MS to get.
http://www.microsoft.com/express/product/
You will need to open a Visual Studio Command Prompt to create a Command window that has it's environment set up to use cl. (An entry for this prompt is added to the Visual Studio Express start menu and to the program's menu too.)
My tutorial assumes you are familiar with C so it doesn't cover how to use your C compiler.
HTH
Paul Carter
.
- Follow-Ups:
- References:
- asm noob needs help compiling tutorial samples!?
- From: giddy
- Re: asm noob needs help compiling tutorial samples!?
- From: Frank Kotler
- asm noob needs help compiling tutorial samples!?
- Prev by Date: Re: int 0x13 utility
- Next by Date: Re: Is it possible to address more than 1MB in real-mode
- Previous by thread: Re: asm noob needs help compiling tutorial samples!?
- Next by thread: Re: asm noob needs help compiling tutorial samples!?
- Index(es):
Relevant Pages
|