Thanks, Sandeep,
 
I had thought of this; but the point is, 
 
1. Why is the error  generated in the assembly code?  What do the error messages mean? It is perfectly valid code.
 
2. Even after using the --data-loc=0x22 option, can I still define an absolute variable at, say, 30h, without   overlap? Can I make the compiler skip this loc'n when assigning relative addresses?
 
Thanks again,
Royce.
 
----- Original Message -----
From: Sandeep Dutta
To: 'Royce & Sharal Pereira'
Sent: Tuesday, July 24, 2001 6:12 AM
Subject: RE: [Sdcc-user] How to define absolute addresses?

Use the 'data at 0x20 unsigned flags;'
then use the compiler option --data-loc=0x22 this will ensure data segment starts @ 0x22 and
will not overlap with your absolute symbol.
Sandeep
-----Original Message-----
From: sdcc-user-admin@lists.sourceforge.net [mailto:sdcc-user-admin@lists.sourceforge.net]On Behalf Of Royce & Sharal Pereira
Sent: Monday, July 23, 2001 3:07 AM
To: sdcc-user@lists.sourceforge.net
Subject: [Sdcc-user] How to define absolute addresses?

I need to define a variable 'flags' at internal ram loc.20h.
 
If I say
    'data at 0x20 unsigned flags;'
It converts to an equate in the assembly file, so it does nor reserve any space, & may be overwritten by other non-absolute variables.
 
So specified      'extern unsigned flags;' 
& made another file resv.asm :
 
                .area    DSEG    (DATA)
 
                .org     20h
 
_flags        .ds      2
 
                .globl    _flags
 
                .end
 
But I get the following when I try to assemble it, I get :
 
in line2
.org in REL area or directive/mnenomic error
missing or improper delimiters operators terminators or delimiters
 
in line 6
.org in REL area or directive /mnemonic error.
 
Whats wrong? I'm using the default small model.
 
Thanks,
    Royce.