From: Jacques M. <jac...@gm...> - 2005-11-13 18:43:56
|
I'd like to retrieve a section size (in fact, multiple sections size) from another section (which relocated the other sections). Is section.<secname>.start supposed to be the solution? Should we, instead, do this: section mysection mysectionsize: dd $ - section.mysection.start And later user [mysectionsize] ? Will I be able to access it from another section without some weird %define calculations? On 11/13/05, anonymous coward <nas...@ya...> wrote: > Frank, > > > section mysection > > > mysectionsize equ $ - section.mysection.start > > > > > > This will tell me section.mysection.start wasn't defined prior to its= use... > > > > > > What's wrong? > > > > Dunno. I can confirm that it happens. I *think* you're doing everything > > right. If I add the "-O" switch, the error message changes to "invalid > > operand type". I suspect a bug. I'll pass this on to the developer's > > list, and see if anyone has any ideas... > > The section.<name>.start label is defined by bin_define_section_labels() > in outbin.c. However, that function isn't called until after the second > pass has been completed -- see line 1227. > > As a result, with the traditional two passes, EQU can't find the label > during the first pass. And since EQU's operand is a critical expression > you get the "symbol `<name>` not defined before use" error. > > With additional passes you get the "invalid operand type" warning; it > happens to be the first of the two in parser.c, in line 690. > > > > __________________________________ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Downl= oad > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Nasm-users mailing list > Nas...@li... > https://lists.sourceforge.net/lists/listinfo/nasm-users > -- Jacques Mony Programmeur-Analyste Les services conseils Syst=E9matix inc. |