Loading ...
Sorry, an error occurred while loading the content.

Re: printf problems

Expand Messages
  • Gordon Couger
    You can reduce the size of you code and increase the speed and reliability of the code by writing print-int(int i, char trailing); print-float f, char
    Message 1 of 2 , Jan 1, 2003
    • 0 Attachment
      You can reduce the size of you code and increase the speed and reliability
      of the code by writing print-int(int i, char trailing); print-float f, char
      trailing) for all the types your use. It makes the code you right a little
      longer but the functions only take half a page and don't allocate memory.

      The char trailing can be a space. character pr command character.

      Good luck

      Gordon Couger
      Stillwater, OK
      www.couger.com/gcouger
      ----- Original Message -----
      From: "Allen Wayne" <wayne.allen@...>
      To: <gnu-m68hc11@yahoogroups.com>
      Sent: Wednesday, December 11, 2002 3:00 AM
      Subject: printf problems


      : Help... does anyone have any ideas as to what is happening????
      :
      : Heres the test program maze.c
      :
      : #include <stdio.h>
      : #include <sys/sio.h>
      :
      : int main ()
      : {
      : unsigned x;
      : x= 1;
      :
      : printf("%d\n",x);
      :
      : return 0;
      : }
      :
      : compiled with a slightly modified makefile (modified to change the
      : source
      : and obj name)
      : when 'run' I get the following result.....
      :
      : wayne@remus:~/m68hc11-examples-1.2/maze> m6811-elf-run maze.elf
      : 65536
      : wayne@remus:~/m68hc11-examples-1.2/maze>
      :
      : Any help or pointers would be most appreciated.
      :
      : Wayne
      :
      : To Post a message, send it to: gnu-m68hc11@...
      :
      : To Unsubscribe, send a blank message to:
      gnu-m68hc11-unsubscribe@...
      :
      : Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      :
      :
    Your message has been successfully submitted and would be delivered to recipients shortly.