GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #14343

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Adriaan van Os
Subject: pascal strings in the gnu assembler
Date: 5 May 2008, 13:31:07

steven.borley wrote:
> Hope this is not considered too off-topic as it about the gnu assemble 
> (gnu-as).  I beg forgiveness on grounds that's its Pascal related.
> 
> In my assembly code I'm trying to place string constants in memory 
> (length byte followed by ASCII string with no trailing zero byte)
> 
> The following is failing with "Error: illegal relocation size: 1"
> 
> FOO:    .byte    ((BAR - . - 2) & 0x7F)    ; calculate length
>         .ascii    "foo"
> BAR:    .word    0x1234                ; dummy for this example
> 
> 
> I could just hard code the length, except I eventually want this as 
> macro as I have several hundred strings.  And unfortunately this part of 
> the code has to be in assembler, for various reasons.

This makes me curious to know those various reasons.

Regards,

Adriaan van Os


Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


In reply to

Author Subject Date
steven.borley pascal strings in the gnu assembler 5 May 2008, 11:31:59

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).