gnupic: gputils linker/assembler integration in higher level language
Subject:
gputils linker/assembler integration in higher level language
From:
####@####.####
Date:
20 Sep 2004 18:11:07 +0100
Message-Id: <12897.1095700240@www21.gmx.net>
I want the follow pseudo ASM opcodes for the linker.
How it's possible to implement this ? any idea ?
GLOBAL _foo
SIGNAT _foo,23423423 // 32 bit signature value
if two or more signature exists for the same procedure,
the linker should exit with a error: signature mismatch.
FNADDR _foo // _foo has it's address taken
FNARG _foo,_bar // evalutation of _foo requires a call to _bar
FNBREAK _bar,_foo // breakes call graph for function _bar not rooting
in _
foo
FNCALL _foo,_bar // _foo calls _bar;
FNCONF psect,auto,args // linker should place the follow variables int
psect:
// all automatic variables prepending auto
// all arg variables prepending arg
FNINDIF _foo,23423423 // function performes indirect call using signature
...
FNSIZE _foo,local,args // function foo has <n>local variables and <n> bytes
arg
s
FNROOT _main // informs the linker, that the function is a root
graph
If signat is found, all function must have a signat.
a signature of zero is illegal.
if a FNROOT is found, the FN... is activated and it's the linker
responsability
to allocate the variables. Depending on the call flow analisys and
temporary variable space needed, the linker should issue as many overlay
memory base as possible.
--
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++