Why can't run same binary on different OS2019 Community Moderator ElectionHow to mount a windows/samba windows share under Linux?Why do two Ubuntu systems in the same network behave differently in DNS resolution?Why does linux-based laptops have weak wifi signal in comparison to windows-based laptop?Lower cpu performance in LinuxWhy do files created via Samba get different ACL (mask) permissions depending on the client OS?In Linux I have different color for the same thing than in WindowsWhy is 64bit Ubuntu running Slower?Executing a program gives No such file or folder errorWhen user and group permissions are set identically why is functionality different?Identical SSH configuration failing

Offered money to buy a house, seller is asking for more to cover gap between their listing and mortgage owed

Loading commands from file

Drawing ramified coverings with tikz

Why does the Sun have different day lengths, but not the gas giants?

How to implement a feedback to keep the DC gain at zero for this conceptual passive filter?

Freedom of speech and where it applies

Multiplicative persistence

I am looking for the correct translation of love for the phrase "in this sign love"

Delivering sarcasm

How can "mimic phobia" be cured or prevented?

Which one is correct as adjective “protruding” or “protruded”?

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

Travelling outside the UK without a passport

Why do we read the Megillah by night and by day?

Does a 'pending' US visa application constitute a denial?

A social experiment. What is the worst that can happen?

Where does the bonus feat in the cleric starting package come from?

Creature in Shazam mid-credits scene?

Approximating irrational number to rational number

Why do compilers behave differently when static_cast(ing) a function to void*?

How do I color the graph in datavisualization?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Are the IPv6 address space and IPv4 address space completely disjoint?

How much character growth crosses the line into breaking the character



Why can't run same binary on different OS



2019 Community Moderator ElectionHow to mount a windows/samba windows share under Linux?Why do two Ubuntu systems in the same network behave differently in DNS resolution?Why does linux-based laptops have weak wifi signal in comparison to windows-based laptop?Lower cpu performance in LinuxWhy do files created via Samba get different ACL (mask) permissions depending on the client OS?In Linux I have different color for the same thing than in WindowsWhy is 64bit Ubuntu running Slower?Executing a program gives No such file or folder errorWhen user and group permissions are set identically why is functionality different?Identical SSH configuration failing










-1















If I have 2 identical computers with the same cpu but different OS, for example Windows and Ubuntu (or some other linux stuff).
Why can't I execute the same executable? Shouldn't the instruction set be the same?
If I write a simple assembly with the simplest instruction, like mov something somewhere why shouldn't this work on both OS?










share|improve this question









New contributor




rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2





    You should check out this post on superuser.

    – kemotep
    yesterday











  • Already readed... but what kind of API is needed for doing the simplest: mov r1, r2

    – rgergergerg
    yesterday











  • The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...

    – kemotep
    yesterday











  • Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?

    – rgergergerg
    yesterday











  • a simple mov will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and call movl $1, %rax; syscall on linux x86-64 (or the equivalent with int $80 on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).

    – mosvy
    yesterday















-1















If I have 2 identical computers with the same cpu but different OS, for example Windows and Ubuntu (or some other linux stuff).
Why can't I execute the same executable? Shouldn't the instruction set be the same?
If I write a simple assembly with the simplest instruction, like mov something somewhere why shouldn't this work on both OS?










share|improve this question









New contributor




rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2





    You should check out this post on superuser.

    – kemotep
    yesterday











  • Already readed... but what kind of API is needed for doing the simplest: mov r1, r2

    – rgergergerg
    yesterday











  • The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...

    – kemotep
    yesterday











  • Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?

    – rgergergerg
    yesterday











  • a simple mov will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and call movl $1, %rax; syscall on linux x86-64 (or the equivalent with int $80 on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).

    – mosvy
    yesterday













-1












-1








-1








If I have 2 identical computers with the same cpu but different OS, for example Windows and Ubuntu (or some other linux stuff).
Why can't I execute the same executable? Shouldn't the instruction set be the same?
If I write a simple assembly with the simplest instruction, like mov something somewhere why shouldn't this work on both OS?










share|improve this question









New contributor




rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












If I have 2 identical computers with the same cpu but different OS, for example Windows and Ubuntu (or some other linux stuff).
Why can't I execute the same executable? Shouldn't the instruction set be the same?
If I write a simple assembly with the simplest instruction, like mov something somewhere why shouldn't this work on both OS?







linux windows cpu x86






share|improve this question









New contributor




rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Rui F Ribeiro

41.6k1483141




41.6k1483141






New contributor




rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









rgergergergrgergergerg

12




12




New contributor




rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






rgergergerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 2





    You should check out this post on superuser.

    – kemotep
    yesterday











  • Already readed... but what kind of API is needed for doing the simplest: mov r1, r2

    – rgergergerg
    yesterday











  • The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...

    – kemotep
    yesterday











  • Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?

    – rgergergerg
    yesterday











  • a simple mov will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and call movl $1, %rax; syscall on linux x86-64 (or the equivalent with int $80 on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).

    – mosvy
    yesterday












  • 2





    You should check out this post on superuser.

    – kemotep
    yesterday











  • Already readed... but what kind of API is needed for doing the simplest: mov r1, r2

    – rgergergerg
    yesterday











  • The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...

    – kemotep
    yesterday











  • Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?

    – rgergergerg
    yesterday











  • a simple mov will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and call movl $1, %rax; syscall on linux x86-64 (or the equivalent with int $80 on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).

    – mosvy
    yesterday







2




2





You should check out this post on superuser.

– kemotep
yesterday





You should check out this post on superuser.

– kemotep
yesterday













Already readed... but what kind of API is needed for doing the simplest: mov r1, r2

– rgergergerg
yesterday





Already readed... but what kind of API is needed for doing the simplest: mov r1, r2

– rgergergerg
yesterday













The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...

– kemotep
yesterday





The post I linked to briefly touches on that. They use completely different API's and in some cases it is not going to be a 1 to 1 translation. There could be entire books written about this topic...

– kemotep
yesterday













Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?

– rgergergerg
yesterday





Is exactly that I do not understood, why should there be the apis in first place if it's machine code who tells cpus how to behave? is't the api supposed to call other functions?

– rgergergerg
yesterday













a simple mov will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and call movl $1, %rax; syscall on linux x86-64 (or the equivalent with int $80 on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).

– mosvy
yesterday





a simple mov will work file on both OSs, and so will do some complex number crunching code; the problem is when you're trying to write to a file and call movl $1, %rax; syscall on linux x86-64 (or the equivalent with int $80 on i386) -- that will not work in windows (unless you have installed some compatibility layer like WSL).

– mosvy
yesterday










0






active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508031%2fwhy-cant-run-same-binary-on-different-os%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.












rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.











rgergergerg is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508031%2fwhy-cant-run-same-binary-on-different-os%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.