[LLVMdev] Hello World assembly without clib "puts"?

Sameer Sahasrabuddhe sameer.sahasrabuddhe at amd.com
Sun Sep 30 21:25:01 PDT 2012


On Sun, 30 Sep 2012 13:30:01 -0400
Andrew Pennebaker <andrew.pennebaker at gmail.com> wrote:


> As weird as it sounds, I'm looking for multiplatform assembly
> languages. I want to learn assembly, but I want my knowledge and code
> to carry over no matter which operating system I'm using. I regularly
> use Windows, Mac, and Linux, and I don't want to have to rewrite my
> codebase every time I boot into another operating system.

Looks to me like you are describing the C language. From the wikipedia
article:

http://en.wikipedia.org/wiki/C_%28programming_language%29

	[C] was designed to be compiled using a relatively
	straightforward compiler, to provide low-level access to
	memory, to provide language constructs that map efficiently to
	machine instructions, and to require minimal run-time support.
	C was therefore useful for many applications that had formerly
	been coded in assembly language, such as in system programming.

	Despite its low-level capabilities, the language was designed to
	encourage cross-platform programming. A standards-compliant and
	portably written C program can be compiled for a very wide
	variety of computer platforms and operating systems with few
	changes to its source code. 

> I can do this by writing assembly code that calls C functions, but I
> get the distinct feeling: *Why am I doing it this way? Why not just
> write in C?

Exactly.

Sameer.




More information about the llvm-dev mailing list