assembly in future C standard HCF Gerry Wheeler

c

    Sponsored Links

    Next

  • 1. why char *p =
    With: char *p = "something", You declare pointer that points to string "something", and many compilers will place string in const section, so changing this data is not good. Some compilers just put string in data section (I think all Borland compilers, but not for sure) and changin this data is OK. But, this source will not be portable. With: char p[] = "something", You declare array, not pointer to string. Becuase p is array it is logical that You can change value of array. P.S. Even MinGW does not issue any warning about this, but code will not work.
  • 2. Functions as function parameter
    Hi, I want to pass a C-function as a function parameter but I don't know how to that correctly. In the example below how would I have to declare the function argument in the my_sort function definition? Thank you in advance for any help. Regards Rolf int comp_func1(double * a1, double * a2) { ... } void my_qsort(double * a, int n, (* comp_func)) { ??????? ... comp_func(&a[i], &a[j]); ... } int main() { ... my_qsort(a,n,comp_func1); }
  • 3. OT: Cheney's heart acting up-TO MUSTAPHA
    On Sun, 14 Nov 2004 19:17:13 -0800, "Big Mikey" < XXXX@XXXXX.COM > wrote: First we start: >Can you ever argue politics at all without personal attacks Then we have: >God, you liberals make me puke sometimes... Another reason that Big Mikey is the brain trust of wherever he lives in California. >Big Mikey > >"Mustapha Mond" < XXXX@XXXXX.COM > wrote in message >news: XXXX@XXXXX.COM ... >> He could if he became a naturalized citizen and they pass the "Ahnold" >> Amendment, being proposed by Utah's idiotic senator Hatch. >> >> XXXX@XXXXX.COM (M5B) wrote in >> news: XXXX@XXXXX.COM : >> >> > Sadaam Hussein is currently unemployed and available, and he has >> > administrative experience running a government that suppresses >> > dissent, sort of like Bush does. Could he be a candidate? >> > >> > With Hussein as our VP, if Bush were to die in office then at least we >> > know that Hussein, as our new president, would attack Iraq again, to >> > take it over, so our Iraqi policy would not need to change. >> > >> >
  • 4. Could someone swing by the Lakes?
    On Mon, 15 Nov 2004 03:26:49 GMT, "CyrHoG << XXXX@XXXXX.COM >> wrote: >> >>"Big Mikey"<< XXXX@XXXXX.COM >> wrote in message >>news: XXXX@XXXXX.COM ... >>> I'll give Burt the benefit of the doubt. >>> >>> There must be a joke there somewhere... >>> >>> Big Mikey >>> >> >>Yes there is. I agree.
  • 5. Just need a few questions answered...
    Code: #include <stdio.h> int main(void) { int in; printf("Please enter an ascii number to convert:\n"); scanf("%d \n", &in); printf("You entered %d, the regular value is %c", in, in); getchar(); getchar(); getchar(); getchar(); return 0; } This program is supposed to convert an ascii number value to its regular equivalent. Example: entering 90 will give you a Z. Why then do I need to type in 90 twice? Also, why do I need to have so many "getchar()"'s at the end of the code to prevent the window from closing right away? Thanks! -=Allen=-

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.

w..


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++ ) {
    foo();
    /* ... */
  }
#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)gmail.com      | don't, I need to know.  Flames welcome.



Return to c

 

Who is online

Users browsing this forum: No registered users and 71 guest