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

Re: newbie problem

Expand Messages
  • fabio_xco
    My problem is almost fixed... ... All stuff which i m using are in www.ic.unicamp.br/~ra015988/hc11, including sources and makefile. Using the -lc option, i
    Message 1 of 5 , May 1, 2004
      My problem is almost fixed...
      When I posted the other message, i was getting two errors messages:
      > e2.o: undefined reference to `_impure_ptr'
      > e2.o: undefined reference to `__swbuf'
      All stuff which i'm using are in www.ic.unicamp.br/~ra015988/hc11,
      including sources and makefile.

      Using the -lc option, i still getting the swbuf message...
      Somebody can/may help me? Please?

      Fabio

      --- In gnu-m68hc11@yahoogroups.com, "fabio_xco" <fdias@f...> wrote:
      > Hi everyone,
      > I'm currently using a HC11, and i've just installed the gcc-m68...
      > But, if i try to compile a file which use putchar, the compiler
      returns:
      > >make
      > m6811-elf-gcc -O -m68hc11 -fomit-frame-pointer -mauto-incdec -mshort
      > -fshort-double -mlong-calls -c -o e2.o e2.c
      > m6811-elf-gcc -Wl,-m,m68hc11elfb,-static -m68hc11 -mshort
      > -fshort-double e2.o -o e2
      > e2.o: undefined reference to `_impure_ptr'
      >
      > What is _impure_ptr, and how can I solve this?
      > (if i could not solve, i will have to use ICC11, so please, help-
      me! :-) )
      >
      > Thanks
      > Fabio
    • fabio_xco
      Now, i m not using the libraries, and i m trying to make my own putchar and getchar... For that, I m using the asm command, but i didn t found in anywhere
      Message 2 of 5 , May 1, 2004
        Now, i'm not using the libraries, and i'm trying to make my own
        putchar and getchar...
        For that, I'm using the "asm" command, but i didn't found in anywhere
        how may I use a variable inside the asm...
        I tried
        int n;
        asm volatile("ldaa %n");

        But it returns:
        ---------- HC11 gcc ----------
        C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\cc4waaaa.s: Assembler messages:
        C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\cc4waaaa.s:65: Error: bad
        expression
        C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\cc4waaaa.s:65: Error: Garbage at
        end of instruction: `n'.

        Its almost solved.... i think its a simple thing, but i really don't
        know how do it..

        Thanks in advance
        Fabio

        --- In gnu-m68hc11@yahoogroups.com, "fabio_xco" <fdias@f...> wrote:
        > My problem is almost fixed...
        > When I posted the other message, i was getting two errors messages:
        > > e2.o: undefined reference to `_impure_ptr'
        > > e2.o: undefined reference to `__swbuf'
        > All stuff which i'm using are in www.ic.unicamp.br/~ra015988/hc11,
        > including sources and makefile.
        >
        > Using the -lc option, i still getting the swbuf message...
        > Somebody can/may help me? Please?
        >
        > Fabio
        >
        > --- In gnu-m68hc11@yahoogroups.com, "fabio_xco" <fdias@f...> wrote:
        > > Hi everyone,
        > > I'm currently using a HC11, and i've just installed the gcc-m68...
        > > But, if i try to compile a file which use putchar, the compiler
        > returns:
        > > >make
        > > m6811-elf-gcc -O -m68hc11 -fomit-frame-pointer -mauto-incdec -
        mshort
        > > -fshort-double -mlong-calls -c -o e2.o e2.c
        > > m6811-elf-gcc -Wl,-m,m68hc11elfb,-static -m68hc11 -mshort
        > > -fshort-double e2.o -o e2
        > > e2.o: undefined reference to `_impure_ptr'
        > >
        > > What is _impure_ptr, and how can I solve this?
        > > (if i could not solve, i will have to use ICC11, so please, help-
        > me! :-) )
        > >
        > > Thanks
        > > Fabio
      • Remko Galama
        try this: //start of main.c int n; int main(void) { asm( ldaa n ); return 0; } //end of main.c Regards, Remko P.S. make sure the int is an 8 bits integer
        Message 3 of 5 , May 2, 2004
          try this:

          //start of main.c

          int n;

          int main(void)
          {
          asm("ldaa n");

          return 0;
          }
          //end of main.c

          Regards, Remko

          P.S. make sure the int is an 8 bits integer

          >>> fdias@... 05/02/04 6:59 AM >>>
        • fabio_xco
          Works VERY fine! Thanks!!! Fabio
          Message 4 of 5 , May 2, 2004
            Works VERY fine!
            Thanks!!!
            Fabio

            --- In gnu-m68hc11@yahoogroups.com, "Remko Galama" <remko@g...> wrote:
            > try this:
            >
            > //start of main.c
            >
            > int n;
            >
            > int main(void)
            > {
            > asm("ldaa n");
            >
            > return 0;
            > }
            > //end of main.c
            >
            > Regards, Remko
            >
            > P.S. make sure the int is an 8 bits integer
            >
            > >>> fdias@f... 05/02/04 6:59 AM >>>
          Your message has been successfully submitted and would be delivered to recipients shortly.