Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #8440

Re: Compile Assembly and C files together

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From mm0fmf <none@invalid.com>
Newsgroups comp.lang.c, comp.sys.raspberry-pi, comp.programming
Subject Re: Compile Assembly and C files together
Date Fri, 09 Mar 2018 18:05:31 +0000
Organization A noiseless patient Spider
Lines 63
Message-ID <p7uidh$giq$1@dont-email.me> (permalink)
References <1b658afd-6921-4185-a680-d73f28a95d71@googlegroups.com> <p7ltie$8t5$3@toylet.eternal-september.org> <fg7rboFk7uiU6@mid.individual.net> <p7mebf$6gt$1@toylet.eternal-september.org> <p7pime$nip$1@dont-email.me> <p7r2ls$8j5$1@toylet.eternal-september.org> <p7raqi$96f$1@news.albasani.net> <p7rcte$1na$1@news.albasani.net> <p7re61$bng$1@dont-email.me> <p7rkof$el5$1@news.albasani.net> <p7rs5o$ijd$2@dont-email.me> <p7tiqm$hl5$2@dont-email.me> <p7ugv5$4i2$1@dont-email.me> <p7uhc8$7nf$2@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Fri, 9 Mar 2018 18:05:37 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="e40ed7ada4b4a521a3bc5d0e0d33919a"; logging-data="16986"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CbT2mLB0fh+MZfm/8qnv8"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
In-Reply-To <p7uhc8$7nf$2@dont-email.me>
Cancel-Lock sha1:eb9CZfeeYw+icsL9URt0lWhWOL4=
Xref csiph.com comp.lang.c:127567 comp.sys.raspberry-pi:16636 comp.programming:8440

Cross-posted to 3 groups.

Show key headers only | View raw


On 09/03/2018 17:47, The Natural Philosopher wrote:
> On 09/03/18 17:40, mm0fmf wrote:
>> On 09/03/2018 09:06, The Natural Philosopher wrote:
>>> On 08/03/18 17:33, mm0fmf wrote:
>>>> On 08/03/2018 15:27, Martin Gregorie wrote:
>>>>> On Thu, 08 Mar 2018 13:34:57 +0000, The Natural Philosopher wrote:
>>>>>
>>>>>> On 08/03/18 13:13, Martin Gregorie wrote:
>>>>>>> On Thu, 08 Mar 2018 12:37:38 +0000, Martin Gregorie wrote:
>>>>>>>
>>>>>>> CORRECTION for stupid typo:
>>>>>>>
>>>>>>> /* Prototype, put in a header file, myfunction.h  */
>>>>>>>    int myfunction(int, char*);
>>>>>>>
>>>>>>> /* empty function as the only contents of a source file,
>>>>>>> myfunction.c
>>>>>>> */
>>>>>>>     int myfunction(int bufflth, char* buff)
>>>>>>>     {
>>>>>>>       return 0;
>>>>>>>     }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> I would at least put in a bit more
>>>>>>
>>>>>> int myfunction(int bufflth, char* buff)
>>>>>>      {
>>>>>>         return (int)buff[bufflth-1];
>>>>>>      }
>>>>>>
>>>>>> So you know where on the stack buff and bufflth are...
>>>>>
>>>>> Why would you want to know that? All the assembler operations using
>>>>> the
>>>>> arguments will be inside myfunction() and, unless the code is
>>>>> calculating
>>>>> a result to be returned and used elsewhere, the returned value is
>>>>> probably to report success or failure.
>>>>>
>>>>>
>>>> If it returns success or failure, why return 1 of 4 billion possible
>>>> values?
>>>>
>>>>
>>> Another personm who has never coded assmebler for C..
>>>
>>> It not what you are rurining, its how to access (bufflth, char* buff)
>>> which are LOCAL stack based variables.
>>>
>>>
>>
>> As the last count, over 260 million phones were using my C and ARM
>> assembler code.
>>
> Oh? Is that why they are so much shit then ;-)
>
>
>
You would do well to read the question relating to the return type however.

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Compile Assembly and C files together "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-03-06 19:20 +0800
  Re: Compile Assembly and C files together druck <news@druck.org.uk> - 2018-03-06 13:53 +0000
    Re: Compile Assembly and C files together Rob Morley <nospam@ntlworld.com> - 2018-03-06 14:59 +0000
      Re: Compile Assembly and C files together David Brown <david.brown@hesbynett.no> - 2018-03-06 16:35 +0100
    Re: Compile Assembly and C files together "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-03-06 23:01 +0800
  Re: Compile Assembly and C files together ray carter <ray@zianet.com> - 2018-03-06 15:44 +0000
    Re: Compile Assembly and C files together "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-03-07 00:07 +0800
      Re: Compile Assembly and C files together Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-03-07 22:39 +0200
        Re: Compile Assembly and C files together "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-03-08 18:18 +0800
          Re: Compile Assembly and C files together Martin Gregorie <martin@mydomain.invalid> - 2018-03-08 12:37 +0000
            Re: Compile Assembly and C files together Martin Gregorie <martin@mydomain.invalid> - 2018-03-08 13:13 +0000
              Re: Compile Assembly and C files together The Natural Philosopher <tnp@invalid.invalid> - 2018-03-08 13:34 +0000
                Re: Compile Assembly and C files together Martin Gregorie <martin@mydomain.invalid> - 2018-03-08 15:27 +0000
                Re: Compile Assembly and C files together mm0fmf <none@invalid.com> - 2018-03-08 17:33 +0000
                Re: Compile Assembly and C files together The Natural Philosopher <tnp@invalid.invalid> - 2018-03-09 09:06 +0000
                Re: Compile Assembly and C files together Richard Kettlewell <invalid@invalid.invalid> - 2018-03-09 09:17 +0000
                Re: Compile Assembly and C files together The Natural Philosopher <tnp@invalid.invalid> - 2018-03-09 09:30 +0000
                Re: Compile Assembly and C files together Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-03-09 15:56 +0200
                Re: Compile Assembly and C files together bartc <bc@freeuk.com> - 2018-03-09 14:13 +0000
                Re: Compile Assembly and C files together Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2018-03-09 11:14 -0500
                Re: Compile Assembly and C files together The Natural Philosopher <tnp@invalid.invalid> - 2018-03-09 17:44 +0000
                Re: Compile Assembly and C files together David Brown <david.brown@hesbynett.no> - 2018-03-09 17:16 +0100
                Re: Compile Assembly and C files together Robert Wessel <robertwessel2@yahoo.com> - 2018-03-09 11:19 -0600
                Re: Compile Assembly and C files together bartc <bc@freeuk.com> - 2018-03-09 18:11 +0000
                Re: Compile Assembly and C files together Robert Wessel <robertwessel2@yahoo.com> - 2018-03-09 13:41 -0600
                Re: Compile Assembly and C files together David Brown <david.brown@hesbynett.no> - 2018-03-09 19:20 +0100
                Re: Compile Assembly and C files together Robert Wessel <robertwessel2@yahoo.com> - 2018-03-09 13:48 -0600
                Re: Compile Assembly and C files together Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2018-03-09 13:16 -0500
                Re: Compile Assembly and C files together scott@slp53.sl.home (Scott Lurndal) - 2018-03-09 18:29 +0000
                Re: Compile Assembly and C files together Jack Fearnley <jack@alcor.concordia.ca> - 2018-03-09 19:07 +0000
                Re: Compile Assembly and C files together scott@slp53.sl.home (Scott Lurndal) - 2018-03-09 19:13 +0000
                Re: Compile Assembly and C files together Michael J. Mahon <mjmahon@aol.com> - 2018-03-10 13:16 -0600
                Re: Compile Assembly and C files together Martin Gregorie <martin@mydomain.invalid> - 2018-03-11 19:39 +0000
                Re: Compile Assembly and C files together Michael J. Mahon <mjmahon@aol.com> - 2018-03-12 01:16 -0500
                Re: Compile Assembly and C files together David Taylor <david-taylor@blueyonder.co.uk.invalid> - 2018-03-12 06:39 +0000
                Re: Compile Assembly and C files together Martin Gregorie <martin@mydomain.invalid> - 2018-03-12 20:49 +0000
                Re: Compile Assembly and C files together scott@slp53.sl.home (Scott Lurndal) - 2018-03-12 16:11 +0000
                Re: Compile Assembly and C files together Michael J. Mahon <mjmahon@aol.com> - 2018-03-12 14:58 -0500
                Re: Compile Assembly and C files together scott@slp53.sl.home (Scott Lurndal) - 2018-03-12 20:38 +0000
                Re: Compile Assembly and C files together scott@slp53.sl.home (Scott Lurndal) - 2018-03-12 16:06 +0000
                Re: Compile Assembly and C files together Michael J. Mahon <mjmahon@aol.com> - 2018-03-12 14:58 -0500
                Re: Compile Assembly and C files together Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-03-09 21:27 +0200
                Re: Compile Assembly and C files together The Natural Philosopher <tnp@invalid.invalid> - 2018-03-09 17:40 +0000
                Re: Compile Assembly and C files together Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-03-09 21:30 +0200
                Re: Compile Assembly and C files together Richard Damon <Richard@Damon-Family.org> - 2018-03-09 13:16 -0500
                Re: Compile Assembly and C files together Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-03-09 21:33 +0200
                Re: Compile Assembly and C files together mm0fmf <none@invalid.com> - 2018-03-09 17:40 +0000
                Re: Compile Assembly and C files together The Natural Philosopher <tnp@invalid.invalid> - 2018-03-09 17:47 +0000
                Re: Compile Assembly and C files together mm0fmf <none@invalid.com> - 2018-03-09 18:05 +0000
                Re: Compile Assembly and C files together The Natural Philosopher <tnp@invalid.invalid> - 2018-03-09 09:05 +0000
                Re: Compile Assembly and C files together Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-03-09 16:01 +0200
          Re: Compile Assembly and C files together Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-03-08 17:25 +0200
  Re: Compile Assembly and C files together The Natural Philosopher <tnp@invalid.invalid> - 2018-03-07 07:36 +0000

csiph-web