assembly in future C standard HCF Gerry Wheeler


    Sponsored Links


  • 1. how to redirect my output in a new terminal
    Hi all, After "dtterm" how do I redirect my output to the new terminal instead of the old one?
  • 2. application of pointers to functions
    Hi! can anyone please tell me the use (application) of pointers to functions? e.g. void *func() { _ _ __ _____ }
  • 3. dlls containing functions with same names problems
    Hi, I have created an C based application in linux that uses a number of dlls. Within the dlls themselves, the code calls sub functions e.g dll_1 (Main dll function is called Return_Answer. The code within the Return_Answer function called another function called Timer which is in dll_1) dll2 (Main dll function is called Calculate_Best_Result. The code within the Calculate_Best_Result function called another function called Timer which is in dll_2) The Timer functions in each dll are completely different. However, when I debug dll_1 in gdb, and am stepping through the code, I see that it jumps to the dll_2 Timer function instead of it's own. Anyone got any ideas. I have the same code working fine in MSVC. Never had a problem with it. The commands, I use to compile and link to the main executable are... gcc -ggdb -c -fPIC dll_1.c gcc -ggdb -shared -o dll_1.o gcc -ggdb -c -fPIC dll_2.c gcc -ggdb -shared -o dll_2.o The main code file is called test.c gcc -ggdb -c test.c gcc -o test -lm test.o -L. -ldll_1 -ldll_2 -ldl Everything compiles and links fine, so I am at a loss. Any help is much appreciated. Regards Bob
  • 4. program resource usege
    Hello! Is there a way in standard C to get information on resource program is using? What I would like to know given program A, can A get how much memory it have allocated, how much of CPU it using, how many instructions have been fetched. Or this is strictly platform depended? If so what design approach is best to implement multiplatform? working through #DEFINE and just insert code depending on platform? Thank you in advance! Have a nice day :)
  • 5. about structures memory allocation
    how much memory is allocated for following structure struct bharath { int b; char c; float d; } and how?

Re: assembly in future C standard HCF Gerry Wheeler

Postby Walter Banks » Sat, 04 Nov 2006 22:35:39 GMT

As this thread wanders off topic this industry was introduced to a new
mnemonic in Byte article about decoding the undocumented
Motorola 6800 instructions. The HCF (Halt Catch Fire) opcode $DD
or $D9. HFC locked up the processor and cycled the address bus
The author of that article was Gerry Wheeler.

Gerry Wheeler, 54, died October 15, 2006, advanced non-Hodgkins
lymphoma cancer. Gerry made significant contributions to the technology
of the embedded systems world and was a key part of the development
of many household name products.

Programmer, Ham KG4NBB, author, father, husband, active commuity
participant Gerry will be missed by all.


Similar Threads:

1.assembly in future C standard

Peter Nilsson < XXXX@XXXXX.COM > wrote:

(Crossposted to comp.std.c, with followups directed there, hopefully
 appropriately.  The original post discussed the possibility of whether
 __asm or something similar to it would be added to the C standard.)

> Contrary to Richard Heathfield's categorical statement, it is not an
> absolute given that there will never be an asm keyword in C. But it
> is unlikely because it's already clear that the asm keyword in C++ has
> not served to truly standardise the syntax of inline assembly.

One idea that was not mentioned in the original thread (I imagine for
good reason, because it's a half-baked and probably stupid idea that
occurred to me reading your post) would be to allow for some kind of
conditional assembly, just perhaps something like

#pragma assemble
#pragma X86 /* Inner pragma's implementation-defined */
  /* Inline assembly, which the implementation can ignore or not */
#pragma no-assemble
  /* Stock C code for implementations that can't or won't accept the
   * assemble pragma: */
  for( i=1; i < 10; i++ ) {
    /* ... */
#pragma end-assemble

The end result would be something like "If the implementation attempts
to inline the assembly code contained within a #pragma assemble
directive, the behavior is implementation-defined.  Otherwise the
assembly code shall be ignored and the C code contained within any
corresponding #pragma no-assemble directive shall be compiled as
though no directives were present."  It would require adding some
duties to the #pragma directive, but it would allow implementors to
take a reasonable shot at using targetted assembly instructions when
appropriate and available, and reverting to ordinary C otherwise.

I'm sure there are reasons why this is stupid and/or impossible, or it
would have been done already :-)

> At the end of the day, the committee could probably spend many man
> weeks deciding issues on an __asm keyword, but for what? Most
> implementations will keep their existing syntax, and most programmers
> who use inline assembly will no doubt continue to prefer the localised
> syntax because it's less cumbersome than any standard syntax.

Indeed, but it's an interesting thought experiment to consider how the
committee *might* add assembly to C if they chose to do so.  (Well,
interesting to me, at least.)

C. Benson Manica           | I *should* know what I'm talking about - if I
cbmanica(at)      | don't, I need to know.  Flames welcome.

Return to c


Who is online

Users browsing this forum: No registered users and 72 guest