ok guys. Im new here so please dont squash me like a bug. Im new to assembly as well. I even bought an assembly book recently ive been studying. My question is... Is it possible to write assembly that doesnt depend on api's, etc. Of other operating systems. Everything ive read so far usually ask the question... Do you want to write for windows or linux? My answer is neither. I want to write assembly that could be run on any x86 machine. Why would i want to do this? For pure self satisfaction. Assembly is nothing more than a hobby for me. To be more specific im interested in developing a gui or browser from scratch that will work regardless of OS. Could someone please shed some light on this for me?

This might help:
http://serghei.net/docs/programming/autobook-1.1/unix2fwindows20portability.html

It is much easier to make different versions of the same program for each OS, but to make a single version appears to be possible, but I haven't never done it and wouldn't try. windows and unix are very different, and make a program to run for either is very inefficient for your time and for the computer to process when running, but have fun trying...

thanks for the response. So i am assuming if i actually want to develope my own style gui it may be worthwhile in eventually learning OS development and developing my own mini OS for the gui ? Am i corrrect?

Start small, if you are a windows guy, create say a simple calculator with the Windows API... Now try converting that to use the *NIX GUI stuff... XServer, GTK, widgets etc... of course you have to use a cross platform assembler to make life eaiser.. NASM and FASM are cross platform. Even DOS interrupts are different than *NIX system calls I think.

Or if your a *NIX guy do that the other way around...

To answer your question... technically yes you can run a windows app on *NIX and the other way around...

directly? No... you can't assemble a program for windows and copy it to *nix and have it work... both OS's have different formats for executables, different API's diff kernel functions etc...

cool. I really appreciate you guys in helping me to understand.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.