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


Groups > comp.lang.c > #96592 > unrolled thread

Write a C program that does NOT use time!

Started by"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
First post2016-11-15 19:16 +0800
Last post2016-11-18 10:32 +0100
Articles 20 on this page of 27 — 11 participants

Back to article view | Back to comp.lang.c


Contents

  Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-15 19:16 +0800
    Re: Write a C program that does NOT use time! Robert Spanjaard <spamtrap@arumes.com> - 2016-11-15 13:30 +0100
      Re: Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-15 21:11 +0800
        Re: Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-16 01:42 +0800
    Re: Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-15 21:44 +0800
      Re: Write a C program that does NOT use time! jameskuyper@verizon.net - 2016-11-16 06:52 -0800
      Re: Write a C program that does NOT use time! Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2016-11-17 11:26 -0500
        Re: Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-18 01:00 +0800
        Re: Write a C program that does NOT use time! Keith Thompson <kst-u@mib.org> - 2016-11-17 09:07 -0800
    Re: Write a C program that does NOT use time! "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-11-15 09:46 -0800
      Re: Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-16 11:46 +0800
        Re: Write a C program that does NOT use time! Mark Storkamp <mstorkamp@yahoo.com> - 2016-11-16 08:09 -0600
          Re: Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-16 22:15 +0800
            Re: Write a C program that does NOT use time! Mark Storkamp <mstorkamp@yahoo.com> - 2016-11-16 09:05 -0600
              Re: Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-17 22:13 +0800
          Re: Write a C program that does NOT use time! "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-11-17 06:21 -0800
            Re: Write a C program that does NOT use time! Mark Storkamp <mstorkamp@yahoo.com> - 2016-11-17 09:36 -0600
              Re: Write a C program that does NOT use time! "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-11-17 07:45 -0800
            Re: Write a C program that does NOT use time! Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-17 11:47 -0500
              Re: Write a C program that does NOT use time! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-18 00:57 +0800
                Re: Write a C program that does NOT use time! Robert Wessel <robertwessel2@yahoo.com> - 2016-11-17 20:11 -0600
                  Re: C on IBM mainframes "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-18 17:30 +0800
                    Re: C on IBM mainframes Robert Wessel <robertwessel2@yahoo.com> - 2016-11-21 03:19 -0600
                      Re: C on IBM mainframes "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-21 19:12 +0800
                      Re: C on IBM mainframes "J. Clarke" <j.clarke.873638@gmail.com> - 2016-12-04 07:40 -0500
                        Re: C on IBM mainframes "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-12-04 20:57 +0800
            Re: Write a C program that does NOT use time! David Brown <david.brown@hesbynett.no> - 2016-11-18 10:32 +0100

Page 1 of 2  [1] 2  Next page →


#96592 — Write a C program that does NOT use time!

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-15 19:16 +0800
SubjectWrite a C program that does NOT use time!
Message-ID<o0eqoq$t9u$1@dont-email.me>
Meow... :)

[toc] | [next] | [standalone]


#96599

FromRobert Spanjaard <spamtrap@arumes.com>
Date2016-11-15 13:30 +0100
Message-ID<o0ev4r$d47$1@gioia.aioe.org>
In reply to#96592
On 15-11-16 12:16, Mr. Man-wai Chang wrote:
>
> Meow... :)
>

Easy. Just write a program that records the time at the start, and sets the
computer clock back to that time at the end.

-- 
Robert Spanjaard

[toc] | [prev] | [next] | [standalone]


#96601

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-15 21:11 +0800
Message-ID<o0f1gg$kak$1@dont-email.me>
In reply to#96599
On 15/11/2016 8:30 PM, Robert Spanjaard wrote:
> On 15-11-16 12:16, Mr. Man-wai Chang wrote:
>>
>> Meow... :)
>>
>
> Easy. Just write a program that records the time at the start, and sets the
> computer clock back to that time at the end.

Smells like to a virus. :)

[toc] | [prev] | [next] | [standalone]


#96617

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-16 01:42 +0800
Message-ID<o0fhcb$hd6$1@dont-email.me>
In reply to#96601
On 15/11/2016 9:11 PM, Mr. Man-wai Chang wrote:
> On 15/11/2016 8:30 PM, Robert Spanjaard wrote:
>> On 15-11-16 12:16, Mr. Man-wai Chang wrote:
>>>
>>> Meow... :)
>>>
>>
>> Easy. Just write a program that records the time at the start, and
>> sets the
>> computer clock back to that time at the end.
>
> Smells like to a virus. :)

Or a broken operating system that allowed a non-privileged user process 
to alter the system clock?

[toc] | [prev] | [next] | [standalone]


#96603

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-15 21:44 +0800
Message-ID<o0f3e7$qfp$2@dont-email.me>
In reply to#96592
I will submit my RFC now:)

Step One:

#include <studio.h>
void main() {
   exit(0);
}

Is this the simplest C program?

How much time will this program run after being compiled by various C 
compilers in and out of the market?

[toc] | [prev] | [next] | [standalone]


#96687

Fromjameskuyper@verizon.net
Date2016-11-16 06:52 -0800
Message-ID<94bbc745-d67f-41b5-8185-f0647035df1a@googlegroups.com>
In reply to#96603
On Tuesday, November 15, 2016 at 8:44:15 AM UTC-5, Mr. Man-wai Chang wrote:
> I will submit my RFC now:)
> 
> Step One:
> 
> #include <studio.h>
> void main() {
>    exit(0);
> }
> 
> Is this the simplest C program?

No. This is: "int main(void) {}"

> How much time will this program run after being compiled by various C 
> compilers in and out of the market?

You're the one who cares - try it out and see for yourself. It will be very little time, probably too small to measure, but it won't take zero time.

[toc] | [prev] | [next] | [standalone]


#96743

FromLew Pitcher <lew.pitcher@digitalfreehold.ca>
Date2016-11-17 11:26 -0500
Message-ID<o0kllu$n53$1@dont-email.me>
In reply to#96603
On Tuesday November 15 2016 08:44, in comp.lang.c, "Mr. Man-wai Chang"
<toylet.toylet@gmail.com> wrote:

> I will submit my RFC now:)
> 
> Step One:
> 
> #include <studio.h>

1) Non-standard header <studio.h>
2) Missing required header <stdlib.h> (for exit() function)

> void main() {

3) int main(void) {

>    exit(0);

4) if main() function is defined as void main(), then
     exit(0);
   is (IMHO) superfluous

> }

5) if main() function is defined as void main(), then
     exit(0);
   is superfluous
> 
> Is this the simplest C program?

No.

> How much time will this program run after being compiled by various C
> compilers in and out of the market?

Mu.


I know of two "null" programs, neither written in C

Under IBM's MVS mainframe operating system, the "null" program is called
IEFBR14. When originally written, this program consisted of a single machine
instruction:
  BR 14
which immediatly terminated the program, returning control to the runtime that
launched it.

The program became more complex when the runtime was changed to include
operations to test whether programs had terminated successfully (with a
return code of 0) or with some conditional or error termination (a non-zero
return code). Since the runtime expected this return value to be stored in
register 15, which was /not/ initialized prior to invoking the launched
program, programs were now expected to explicitly set R15 to an appropriate
value before terminating. This doubled the instruction count in IEFBR14, 
changing it to:
  XOR 15,15
  BR  14


The other "null" program was the Unix true(1) program. While most Unix systems
now code true(1) something like
  int main(void) { return 0; }
(I'm told that) early versions of Unix used a program with no instructions at
all. The loader would treat "fail to load because there's nothing there"
as "success" with a return value of 0.

-- 
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request

[toc] | [prev] | [next] | [standalone]


#96749

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-18 01:00 +0800
Message-ID<o0knms$u7l$4@dont-email.me>
In reply to#96743
On 18/11/2016 12:26 AM, Lew Pitcher wrote:
> The other "null" program was the Unix true(1) program. While most Unix systems
> now code true(1) something like
>   int main(void) { return 0; }
> (I'm told that) early versions of Unix used a program with no instructions at
> all. The loader would treat "fail to load because there's nothing there"
> as "success" with a return value of 0.

I forgot about this one. The usually one is hello.c!

Did you time this "null" program in various compilers? How short, if not 
real-time, is the execution time?

[toc] | [prev] | [next] | [standalone]


#96753

FromKeith Thompson <kst-u@mib.org>
Date2016-11-17 09:07 -0800
Message-ID<lnfumqghly.fsf@kst-u.example.com>
In reply to#96743
Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
> On Tuesday November 15 2016 08:44, in comp.lang.c, "Mr. Man-wai Chang"
> <toylet.toylet@gmail.com> wrote:
[...]
>> void main() {
>
> 3) int main(void) {
>
>>    exit(0);
>
> 4) if main() function is defined as void main(), then
>      exit(0);
>    is (IMHO) superfluous
[...]

For hosted implementations, there is of course no good reason to use
void main() or void main(void).  But implementations are permitted
to permit it.

If the main function is properly defined as `int main(void)`, then
`exit(0)` is superfluous; reaching the closing `}` does an implicit
`return 0;`.  This rule was added in C99, so either `exit(0);` or
`return 0;` might be needed if your code might be compiled with
a pre-C99 or otherwise non-conforming compiler (or if the exit or
return appears other than at the very end of main()).

"If the return type is not compatible with int, the termination
status returned to the host environment is unspecified." (N1570
5.1.2.2.3), so if you use `void main()` *and* the implementation
permits it, `exit(0)` might be required (and `return 0;` would
be invalid).

Another very real possibility is that an implementation could permit
(fail to diagnose) `void main(void)`, but not document its behavior.
In that case, the behavior is undefined.

For freestanding implementations, the name and type of the entry point
are implementation-defined.  If the implementation says you have to use
`void mane(void)`, that's what you have to use.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#96618

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-11-15 09:46 -0800
Message-ID<fc2d27ca-75b6-440f-9d7c-9bfe6ff421bf@googlegroups.com>
In reply to#96592
On Tuesday, November 15, 2016 at 6:16:22 AM UTC-5, Mr. Man-wai Chang wrote:
> "Write a C program that does NOT use time!"

It is self-evident:  A non-temporal application is not possible.

And you have the audacity to write, "I just don't understand the
extended chat here, as it goes *PHILOSOPHICAL*! :)"  How much more
philosophical can you get requesting that a software program be
written that does NOT use time?  The question brings in every
possible aspect and angle of philosophy to address its needs.

Wow.  Just wow, Mr. Man-wai Chang.

I think I will stop replying to you now.  Good day.

Best regards,
Rick C. Hodgin

[toc] | [prev] | [next] | [standalone]


#96672

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-16 11:46 +0800
Message-ID<o0gkpn$73d$1@dont-email.me>
In reply to#96618
On 16/11/2016 1:46 AM, Rick C. Hodgin wrote:
>
> It is self-evident:  A non-temporal application is not possible.

Not possible? I just want you to write a C program. It does NOT have to 
be a "non-temporal" application.

Does C the programming language have temporal meanings if not semantics? 
Aren't the *binding* and *linking* delayed? :)

> Wow.  Just wow, Mr. Man-wai Chang.
> I think I will stop replying to you now.  Good day.

What emo(tion)-icon should I use, to say goodbye to you, Master? :)

[toc] | [prev] | [next] | [standalone]


#96685

FromMark Storkamp <mstorkamp@yahoo.com>
Date2016-11-16 08:09 -0600
Message-ID<mstorkamp-259D43.08091816112016@88-209-239-213.giganet.hu>
In reply to#96672
In article <o0gkpn$73d$1@dont-email.me>,
 "Mr. Man-wai Chang" <toylet.toylet@gmail.com> wrote:

> On 16/11/2016 1:46 AM, Rick C. Hodgin wrote:
> >
> > It is self-evident:  A non-temporal application is not possible.
> 
> Not possible? I just want you to write a C program. It does NOT have to 
> be a "non-temporal" application.
> 
> Does C the programming language have temporal meanings if not semantics? 
> Aren't the *binding* and *linking* delayed? :)
> 
> > Wow.  Just wow, Mr. Man-wai Chang.
> > I think I will stop replying to you now.  Good day.
> 
> What emo(tion)-icon should I use, to say goodbye to you, Master? :)

int main(void)
{
  ASM { HLT; };
}

[toc] | [prev] | [next] | [standalone]


#96686

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-16 22:15 +0800
Message-ID<o0hpkn$n4c$1@dont-email.me>
In reply to#96685
On 16/11/2016 10:09 PM, Mark Storkamp wrote:
>
> int main(void)
> {
>   ASM { HLT; };
> }

Not pure, simple, naive C? :)

BUT, so there is no C syntax to do the same without using "ASM"? Why?

[toc] | [prev] | [next] | [standalone]


#96689

FromMark Storkamp <mstorkamp@yahoo.com>
Date2016-11-16 09:05 -0600
Message-ID<mstorkamp-C3ECF9.09050716112016@88-209-239-213.giganet.hu>
In reply to#96686
In article <o0hpkn$n4c$1@dont-email.me>,
 "Mr. Man-wai Chang" <toylet.toylet@gmail.com> wrote:

> On 16/11/2016 10:09 PM, Mark Storkamp wrote:
> >
> > int main(void)
> > {
> >   ASM { HLT; };
> > }
> 
> Not pure, simple, naive C? :)
> 
> BUT, so there is no C syntax to do the same without using "ASM"? Why?

Your original specification for the program was:

" Meow... :) "

and now you wish to add caveats and addenda?

[toc] | [prev] | [next] | [standalone]


#96732

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-17 22:13 +0800
Message-ID<o0kdtp$pv3$3@dont-email.me>
In reply to#96689
On 16/11/2016 11:05 PM, Mark Storkamp wrote:
> In article <o0hpkn$n4c$1@dont-email.me>,
>  "Mr. Man-wai Chang" <toylet.toylet@gmail.com> wrote:
>
>> On 16/11/2016 10:09 PM, Mark Storkamp wrote:
>>>
>>> int main(void)
>>> {
>>>   ASM { HLT; };
>>> }
>>
>> Not pure, simple, naive C? :)
>>
>> BUT, so there is no C syntax to do the same without using "ASM"? Why?
>
> Your original specification for the program was:
>
> " Meow... :) "
>
> and now you wish to add caveats and addenda?

Talking about the assembly instruction HLT! It's assembly language...

[toc] | [prev] | [next] | [standalone]


#96736

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-11-17 06:21 -0800
Message-ID<3490fbbc-64ef-4946-8f98-ce144b14117f@googlegroups.com>
In reply to#96685
On Wednesday, November 16, 2016 at 9:09:26 AM UTC-5, Mark Storkamp wrote:
> In article <o0gkpn$73d$1@dont-email.me>,
>  "Mr. Man-wai Chang" <toylet.toylet@gmail.com> wrote:
> 
> > On 16/11/2016 1:46 AM, Rick C. Hodgin wrote:
> > >
> > > It is self-evident:  A non-temporal application is not possible.
> > 
> > Not possible? I just want you to write a C program. It does NOT have to 
> > be a "non-temporal" application.
> > 
> > Does C the programming language have temporal meanings if not semantics? 
> > Aren't the *binding* and *linking* delayed? :)
> > 
> > > Wow.  Just wow, Mr. Man-wai Chang.
> > > I think I will stop replying to you now.  Good day.
> > 
> > What emo(tion)-icon should I use, to say goodbye to you, Master? :)
> 
> int main(void)
> {
>   ASM { HLT; };
> }

I'm not sure this program would do what you might be expecting.  The
HLT instruction only halts until the next interrupt occurs, then it
continues.

This one would be interesting though:

    int main(void)
    {
        ASM ( HCF; };
    }

Due to a design flaw, some opcode sequences could lock their CPU,
putting it into an internal loop where it heats up destroying itself,
and in some cases actually catching fire.

    https://en.wikipedia.org/wiki/Halt_and_Catch_Fire

Best regards,
Rick C. Hodgin

[toc] | [prev] | [next] | [standalone]


#96740

FromMark Storkamp <mstorkamp@yahoo.com>
Date2016-11-17 09:36 -0600
Message-ID<mstorkamp-350FCD.09365417112016@88-209-239-213.giganet.hu>
In reply to#96736
In article <3490fbbc-64ef-4946-8f98-ce144b14117f@googlegroups.com>,
 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> wrote:

> On Wednesday, November 16, 2016 at 9:09:26 AM UTC-5, Mark Storkamp wrote:
> > In article <o0gkpn$73d$1@dont-email.me>,
> >  "Mr. Man-wai Chang" <toylet.toylet@gmail.com> wrote:
> > 
> > > On 16/11/2016 1:46 AM, Rick C. Hodgin wrote:
> > > >
> > > > It is self-evident:  A non-temporal application is not possible.
> > > 
> > > Not possible? I just want you to write a C program. It does NOT have to 
> > > be a "non-temporal" application.
> > > 
> > > Does C the programming language have temporal meanings if not semantics? 
> > > Aren't the *binding* and *linking* delayed? :)
> > > 
> > > > Wow.  Just wow, Mr. Man-wai Chang.
> > > > I think I will stop replying to you now.  Good day.
> > > 
> > > What emo(tion)-icon should I use, to say goodbye to you, Master? :)
> > 
> > int main(void)
> > {
> >   ASM { HLT; };
> > }
> 
> I'm not sure this program would do what you might be expecting.  The
> HLT instruction only halts until the next interrupt occurs, then it
> continues.
> 
> This one would be interesting though:
> 
>     int main(void)
>     {
>         ASM ( HCF; };
>     }
> 
> Due to a design flaw, some opcode sequences could lock their CPU,
> putting it into an internal loop where it heats up destroying itself,
> and in some cases actually catching fire.
> 
>     https://en.wikipedia.org/wiki/Halt_and_Catch_Fire
> 
> Best regards,
> Rick C. Hodgin

I was thinking more along the lines of the Mad Magazine book Silly 
Answers to Stupid Questions. 

Now as to what HLT does, IIRC in DOS it did force you to reboot. But 
that could also be because back then I new what port to write to to mask 
NMI. It might work on something like a PIC processor. I believe it's a 
good thing that modern OS make this all but impossible to do.

[toc] | [prev] | [next] | [standalone]


#96741

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-11-17 07:45 -0800
Message-ID<7dbde0e8-0bfd-4c0e-9ddd-7aad4fedd78b@googlegroups.com>
In reply to#96740
On Thursday, November 17, 2016 at 10:37:04 AM UTC-5, Mark Storkamp wrote:
> In article <3490fbbc-64ef-4946-8f98-ce144b14117f@googlegroups.com>,
>  "Rick C. Hodgin" <rick.c.hodgin@gmail.com> wrote:
> 
> > On Wednesday, November 16, 2016 at 9:09:26 AM UTC-5, Mark Storkamp wrote:
> > > In article <o0gkpn$73d$1@dont-email.me>,
> > >  "Mr. Man-wai Chang" <toylet.toylet@gmail.com> wrote:
> > > 
> > > > On 16/11/2016 1:46 AM, Rick C. Hodgin wrote:
> > > > >
> > > > > It is self-evident:  A non-temporal application is not possible.
> > > > 
> > > > Not possible? I just want you to write a C program. It does NOT have to 
> > > > be a "non-temporal" application.
> > > > 
> > > > Does C the programming language have temporal meanings if not semantics? 
> > > > Aren't the *binding* and *linking* delayed? :)
> > > > 
> > > > > Wow.  Just wow, Mr. Man-wai Chang.
> > > > > I think I will stop replying to you now.  Good day.
> > > > 
> > > > What emo(tion)-icon should I use, to say goodbye to you, Master? :)
> > > 
> > > int main(void)
> > > {
> > >   ASM { HLT; };
> > > }
> > 
> > I'm not sure this program would do what you might be expecting.  The
> > HLT instruction only halts until the next interrupt occurs, then it
> > continues.
> > 
> > This one would be interesting though:
> > 
> >     int main(void)
> >     {
> >         ASM ( HCF; };
> >     }
> > 
> > Due to a design flaw, some opcode sequences could lock their CPU,
> > putting it into an internal loop where it heats up destroying itself,
> > and in some cases actually catching fire.
> > 
> >     https://en.wikipedia.org/wiki/Halt_and_Catch_Fire
> > 
> > Best regards,
> > Rick C. Hodgin
> 
> I was thinking more along the lines of the Mad Magazine book Silly 
> Answers to Stupid Questions. 

Then you nailed it.  I thought it was an appropriately humorous reply.
:-)

> Now as to what HLT does, IIRC in DOS it did force you to reboot. But 
> that could also be because back then I new what port to write to to mask 
> NMI. It might work on something like a PIC processor. I believe it's a 
> good thing that modern OS make this all but impossible to do.

Yes, the timer is always firing.  Keystrokes.  Mouse movements.  Incoming
serial port or parallel port signals, etc.  Hard disk and floppy disk
read/writes/seeks.  Sound cards.  Anything that needed an IRQ to be set,
and a driver to be installed.  These all signal an interrupt which must
be handled, and all of them will resume the HLT-suspended program.

Best regards,
Rick C. Hodgin

[toc] | [prev] | [next] | [standalone]


#96746

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-11-17 11:47 -0500
Message-ID<o0kmt2$sbj$1@jstuckle.eternal-september.org>
In reply to#96736
On 11/17/2016 9:21 AM, Rick C. Hodgin wrote:
> On Wednesday, November 16, 2016 at 9:09:26 AM UTC-5, Mark Storkamp wrote:
>> In article <o0gkpn$73d$1@dont-email.me>,
>>  "Mr. Man-wai Chang" <toylet.toylet@gmail.com> wrote:
>>
>>> On 16/11/2016 1:46 AM, Rick C. Hodgin wrote:
>>>>
>>>> It is self-evident:  A non-temporal application is not possible.
>>>
>>> Not possible? I just want you to write a C program. It does NOT have to 
>>> be a "non-temporal" application.
>>>
>>> Does C the programming language have temporal meanings if not semantics? 
>>> Aren't the *binding* and *linking* delayed? :)
>>>
>>>> Wow.  Just wow, Mr. Man-wai Chang.
>>>> I think I will stop replying to you now.  Good day.
>>>
>>> What emo(tion)-icon should I use, to say goodbye to you, Master? :)
>>
>> int main(void)
>> {
>>   ASM { HLT; };
>> }
> 
> I'm not sure this program would do what you might be expecting.  The
> HLT instruction only halts until the next interrupt occurs, then it
> continues.
> 
> This one would be interesting though:
> 
>     int main(void)
>     {
>         ASM ( HCF; };
>     }
> 
> Due to a design flaw, some opcode sequences could lock their CPU,
> putting it into an internal loop where it heats up destroying itself,
> and in some cases actually catching fire.
> 
>     https://en.wikipedia.org/wiki/Halt_and_Catch_Fire
> 
> Best regards,
> Rick C. Hodgin
> 

Ah, yes, memories from the past - around 45 years ago or so.

This was part of the proposed Assembler for the IBM 360 model 69
computer.  I wish I could find a copy of the original; it was relatively
short and sweet (mainly because those computers had a maximum of 256 op
codes).  People have added to it over the years, but in doing so I think
they lost the elegance of the original.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#96747

From"Mr. Man-wai Chang" <toylet.toylet@gmail.com>
Date2016-11-18 00:57 +0800
Message-ID<o0kngp$u7l$2@dont-email.me>
In reply to#96746
On 18/11/2016 12:47 AM, Jerry Stuckle wrote:
> Ah, yes, memories from the past - around 45 years ago or so.
>
> This was part of the proposed Assembler for the IBM 360 model 69
> computer.  I wish I could find a copy of the original; it was relatively
> short and sweet (mainly because those computers had a maximum of 256 op
> codes).  People have added to it over the years, but in doing so I think
> they lost the elegance of the original.

Does S/390 have a c compiler?

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.c


csiph-web