This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: problem with gas
- To: Ian Lance Taylor <ian at zembu dot com>
- Subject: Re: problem with gas
- From: Sudhanshu_Tewari at 3com dot com
- Date: Thu, 20 Apr 2000 16:12:07 -0600
- cc: binutils at sourceware dot cygnus dot com
Hi,
Sorry about that !!
I am giving a small example here.
FOR LINE: >
.section ".BootUp", 2, c
ASSEMBLER IS GENERATIN ERROR
Warning: Bad .section directive - character following name is not #
FOR LINE: >
.section ".WatchDog", 2, c
ASSEMBLER IS GENERATIN ERROR
Error:rest of the line ignored . First ignored character is ' 2'
FOR EXAMPLE THE FILE: >
.include "hdm_leds.h" # Defines LED Mem Map, Colors Etc.
.file "hdm_leds.s"
.title "HTM_LEDS.S"
#---------------------------------------------------------------------
#--------------------------- BEGIN CODE ------------------------------
#---------------------------------------------------------------------
.text
.align 2
#---------------------------------------------------------------------
# _HDM_LED1 - Set Modems 1..16 LEDs as specified. Any modem LED
# unspecified will be shut off. This function does not control the
# status LED. LED arguments should be passed into R3
#
# BRF 3/96
#---------------------------------------------------------------------
.align 2
.globl _HDM_LED1
_HDM_LED1:
# addis R4, R0, %hi(LED1REG) # Load Addr of LED1 Reg in R4
# ori R4, R0, %lo(LED1REG)
# stw R3, 0(R4) # Write it out to the LEDREG
blr
#---------------------------------------------------------------------
# _HDM_LED2 - Set Status LED# GREEN, RED, YELLOW, OFF
# Status LED arguments should be passed into R3. Does not control
# the modem LEDs.
#
# BRF 3/96
#---------------------------------------------------------------------
.align 2
.globl _HDM_LED2
_HDM_LED2:
#
# addis R4, R0, %hi(LED2REG) # Load Addr of LED1 Reg in R4
# ori R4, R0, %lo(LED2REG)
# stw R3, 0(R4) # Write it out to the LEDREG
blr
#---------------------------------------------------------------------
# _HDM_BootStatus - This function takes a 16 bit number passed in R3
# and displays (Using Green LEDs) the hex code on modem leds 1..16.
# Modem LED 1 = DB0 Modem LED 16 = DB15.
#
# BRF 3/96
#---------------------------------------------------------------------
# !! NOT COMPLETE YET !!!
.align 2
.globl _HDM_BootStatus
_HDM_BootStatus:
# andi R4, R0, 0x00000000 # Zero R4
# andi R5, R0, 0x00000000 # Zero R5
addis R4, R0, %hi(LED1REG)
ori R4, R0, %lo(LED1REG)
.end
#---------------------------------------------------------------------
#---------------------------- finis ----------------------------------
#---------------------------------------------------------------------
IS COMMING OUT WITH ERRORS :>
xx.s: Assembler messages
xx.s:72: Error: Bad expression
xx.s:72 Error: syntax error: found 'h' but expected ' , '
xx.s:72 Error: Junk at the end of the line: 'hi(LED1REG)
xx.s:73 Error: Bad expression
xx.s:73 Error: syntax error: found 'l' but expected ' , '
xx.s:73 Error: Junk at the end of the line: 'lo(LED1REG)
Thanks
Sudhanshu
Ian Lance Taylor <ian@zembu.com> on 04/20/2000 03:33:37 PM
Sent by: Ian Lance Taylor <ian@zembu.com>
To: Sudhanshu Tewari/US/3Com
cc: binutils@sourceware.cygnus.com
Subject: Re: problem with gas
From: Sudhanshu_Tewari@3com.com
Date: Thu, 20 Apr 2000 15:33:03 -0600
I recently downloaded the bin utils version
binutils-2.9.1
I configures it for the i686-pc-cygwin host and powerpc-ibm-eabi target
the building was smooth.
Now if i try to assemble with this assembler i am getting lots of errors.
it is not recognising may opcodes.
The code i am assembling is working code and the other assembler is
assembling
it properly.
Is there some configuration i am missing.
You have to tell us precisely what you did, precisely what input files
you are using, and precisely what the assembler says. Otherwise, we
can't help you. See gas/README.
Ian