bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

macro defining 16-bit address offset from and offset


From: Skacore Systems
Subject: macro defining 16-bit address offset from and offset
Date: Fri, 25 Feb 2011 15:16:08 +0100

Hello !

I'm trying to get working following simple macro for hours, but still no success. I just want to define two bytes, 
one containing length of the data and the other one an address - but in words, and therefore divided / 2 ( or >> 1)
Is there any chances to get it working ? Please add me into CC i'm not subscribed.

.macro link_data astart, aend
    .byte \aend - \astart
    .byte \astart / 2
.endm

.globl eeprom_start
eeprom_start:
link_data Manufacturer_ID_String,  Manufacturer_ID_String_end
Manufacturer_ID_String:
.ascii  "Skacore Systems.\0"
Manufacturer_ID_String_end:

.globl eeprom_end
eeprom_end:

gas output:

as test.S -o test.o
test.S: Assembler messages:
test.S:26: Error: invalid sections for operation on `Manufacturer_ID_String' and `L0'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]