Lets say I learn 32 bit Win programming with the Assembly language, is it a difficult task to learn Linux programing using ASM later on?

With powerful languages like C/C++ that are pretty much the same on both Windows and Linux, it seems a bit useless to learn ASM if I have to learn everything twice to support two OS...

Comments?

Sincerely,
Psionicist
Posted on 2002-03-04 14:30:25 by Psionicist
The langauge doesn't change - x86 assembly is x86 assembly. Doesn't matter if it's an embedded processor, or a quad Xeon server. It's the environment you interface that changes - which is no different that a HLL.
Posted on 2002-03-04 14:42:10 by bitRAKE
So there are no practical difference in learning say C for Win32 and C for Linux, as it is to learn ASM for Win32 and ASM for Linux?

Too my knowledge, ASM for Win are heavily depending on the Win API. In C you CAN create programs without interfering with the win API (in the code, that is), so you don't have to learn so many special OS things...

Anyhow, my point is, is it more difficult to learn multiplatform programming using ASM than say C++? I want to learn one language, not two, if you know what I mean.
Posted on 2002-03-04 14:51:47 by Psionicist
hi,

C is relatively cross-platform because people wrote it's standart functions libraries for each platform. e.g. only the function name and library name is the same in different platforms they're implemented in different libraries.
asm would be the same but you would need to learn linux apis in order to talk to it's kernel and system functions, as asm doesn't have standart libraries and talks directly to processor and OS.

by the way, linux asssemblers have a funny syntax where you must precede each register with %.
Posted on 2002-03-04 15:03:20 by ramzez
Posted on 2002-03-04 16:16:02 by Asm_Freak
The nod seems to be if you want to write x86 assembler in linux is NASM. This is what I get from old friends who have a background in linux assembler.

The instructions are the same and they go together with the same logic so if you get the swing of the instructions, they will be the same across both operating systems.

Anything platform specific will not transfer so keep this in mind when using either linux C library functions or windows API functions, apart from this they do much the same thing if they use the same processor family.

You can garrantee that it will not work on linux if its on different hardware.

Regards,

hutch@movsd.com
Posted on 2002-03-04 17:00:06 by hutch--

It's the environment you interface that changes - which is no different that a HLL.

Hummm... if you write java, it's java, and the same on all platforms (unless you
use extensions). If you stick to libc, properly written C code will run on most
platforms with just a recompile (same with asm of course, but then you'll be using
libc which many people don't like ;).


So there are no practical difference in learning say C for Win32 and C for Linux,
as it is to learn ASM for Win32 and ASM for Linux?

Depends on what you do. If you learn "win32asm", you'll have a lot of reading to
do when going to linux. If you learn "ansi C", going to linux will be easy.

Anyway... when you don't need OS functions (as in, say, data processing algorithms,
whether you're dealing with sound or text or graphics), there's not really any
difference from linux and windows asm code. Except that you of course only have
masm on windows, where you'll have to use nasm or gas or something else under linux.
Posted on 2002-03-04 18:58:49 by f0dder