From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31425 invoked by alias); 26 Apr 2019 21:04:33 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 31417 invoked by uid 89); 26 Apr 2019 21:04:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:6158, relate, acknowledge, H*c:alternative X-HELO: mail-io1-f44.google.com Received: from mail-io1-f44.google.com (HELO mail-io1-f44.google.com) (209.85.166.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Apr 2019 21:04:30 +0000 Received: by mail-io1-f44.google.com with SMTP id d19so4078630ioc.3 for ; Fri, 26 Apr 2019 14:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=SG8e+XWQ117onM+Z/flwbiee/Hm+4xkbNDBydoLbEJU=; b=ukrJc5DRJwtmaZThWx73UD8Eam8+PEUGuiFRrKMLZStOj5/4t2HyZ69yCf91ONpAY1 AHVg6zoEXMhyalGzM7753iwo+33jDqbtco+ZWBmAYHP6TPMS4JxmXNaGffQ148PurPRI OCZvoM9ONY6oPcA0Z7yxSZx7daWfKGpdePIg3cLqsyECldDElel1V5u6ZJ0O2/ui5WkK HwjJDpkKQyE3UUYL+SAzSFhE6kbrrP1CUPBFg0IeykMeaUOQhLldGXQoOSaLD5BuAyny Tf4CaGfQ8TuRWsNul+vzchHSRIKtbdH1YdEQR7MgmYIvvQTimh33dbk2QjjeT55SCu5T i85A== MIME-Version: 1.0 References: In-Reply-To: From: Jesse Thompson Date: Fri, 26 Apr 2019 21:04:00 -0000 Message-ID: Subject: Re: Request for an example x68 assembler portable Hello World script To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-04/txt/msg00200.txt.bz2 > From: Eliot Moss > To: cygwin@cygwin.com > Date: Fri, 26 Apr 2019 07:16:38 -0400 > Subject: Re: Request for an example x68 assembler portable Hello World script > > Der Jesse -- Someone else may be able to speak to the specifics, but > register use and calling conventions, and to some extent stack layout, > very from platform to platform. Roughly, platform = processor + OS. > So (to me anyway) it would not be at all surprising if you have to > write code different for each of Windows, Cygwin, and Linux. Cygwin > tries to offer library level compatibility for program designed to > run under Posix (there are some seams here and there, where Windows > differences are hard to hide). But the programs have to be recompiled > to the Cygwin ABI. > > Another thing you may be encountering is the difference between the > 32-bit and 64-bit worlds. Recent x86 processor support the x86_64 > version as well. Cygwin offers both 32 and 64 bit versions, but they > are distinct, and a program needs to be compiled to the one under > which you wish to run it. (I have both 32 and 64 bit Cygwin on my > computer, and the programs can invoke one another, but the installations > need to be in separate file hierarchies.) The same would tend to hold > under Linux and Windows, though the OS can determine automatically > for a given program whether it is 32 or 64 bit from details of the > first bytes of the executable file. > > Regards - EM Hello Elliot, thank you for your reply. On one point, yes I do appreciate the difference between 32-bit and 64-bit installations of Cygwin. However for many years now I have been blessed by being able to use only the 64 bit version, just as I only run 64 bit versions of Windows and Linux/BSD operating systems on 64 bit processors. To this end, I wish to be able to entirely leave behind any bonds to the 32 bit architectures. My software won't have to support them, and ideally won't even have to acknowledge their existences. ;) My software also won't have to support non-POSIX Windows libraries, and should only need to relate to windows through the Cygwin POSIX libraries. So while I can appreciate that C (and other higher level language) compilers might hide some of the implementational details of moving from one platform or calling convention to another, and that Cygwin's libraries exist to help spackle over some of those other potential differences so that at least a majority of C code written for Unix OSen can compile and run in a windows environment, aren't there some pieces of Unix software that include assembly? What process do developers have to go through to port *those* bits of software that stray from the safety of higher level compilers? Ultimately what I am trying to research is how to begin building a simple compilation system of my own, so how do the *makers* of compilers deal with these differences in calling convention? Thank you for your insight, I hope you are all having a great day and enjoying this lovely spring weather. :) > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple