HELP - need basic info on GNU assembler

HELP - need basic info on GNU assembler

Post by Derek Buckl » Sat, 17 Feb 1996 04:00:00



I'm doing a project to develop a "user manual" for my university to use to
teach assembly programming on the PC.

They currently use a DOS assembler, but want to migrate to Linux.  The plan
is to use "as" and "gdb", and I need to assemble information.

Any thoughts, suggestions, recommendations, etc. would be greatly
appreciated.  Reply here or e-mail.

THANKS!!!

-Derek



 
 
 

HELP - need basic info on GNU assembler

Post by Andrew Veliat » Sun, 18 Feb 1996 04:00:00



> They currently use a DOS assembler, but want to migrate to Linux.  The plan
> is to use "as" and "gdb", and I need to assemble information.

You should check out if you haven't already the info page on gas.  If
you are using Slackware for some reason you probably have it in your
/usr/info/as* but there isn't a directory entry for it.

Edit your /usr/info/dir file and add the as line if it is not there
already:

* GDB: (gdb).           The GNU De*
* As: (as).             The GNU Assembler            <-

...read it with info or emacs, as there are some important differences
in syntax.

--

http://www.veryComputer.com/~veliaa
Finger for PGP Key

 
 
 

1. GNU assembler to Solaris assembler

I would like to covert one inline assembly function included in SPARC
Linux to Solaris assembler syntax. The function is written in GNU
assembler syntax.
Two syntax errors are reported due to pseudo operators when I compile
using gcc on Solaris.

inline void spin_lock(unsigned char *lock)
{
  __asm__ __volatile__("
1:  ldstub  [%0], %%g2
  orcc  %%g2, 0x0, %%g0
  bne,a 2f
   ldub [%0], %%g2
  .text 2                         <==
2:  orcc  %%g2, 0x0, %%g0
  bne,a 2b
   ldub [%0], %%g2
  b,a 1b
        .previous                       <==
" :
  : "r" (lock)
  : "g2", "memory", "cc");

/usr/ccs/bin/as: "/var/tmp/cc030Gpt.s", line 18: error: quoted-string operand required
/usr/ccs/bin/as: "/var/tmp/cc030Gpt.s", line 23: error: unknown opcode ".previous"
/usr/ccs/bin/as: "/var/tmp/cc030Gpt.s", line 23: error: statement syntax

How can I convert the function to Solaris assembler syntax? In
particular I cannot find '.previous' pseudo operator in GNU assembler
info manual.
I have confirmed that gcc + GNU assembler can compile this function on
Solaris.

    <--------->    Computational Science Laboratory
                   The Institute of Physics and Chemistry(RIKEN)
    >---------<    Susukita Ryutaro

2. IPTables not working with new Kernel build

3. How do I turn the sound down?

4. help with as , the GNU assembler !

5. zork shell=adven. shell?

6. HELP: GNU Assembler

7. Q: Looking for Solaris 2.4 X86 (student Edition)

8. HELP, I need intel assembler and UNIX C porting help - I'm STUCK! ):

9. Basic Info needed