From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2000-06-23 22:47:14
On Fri, Jun 23, 2000 at 11:03:47AM -0500, David Lloyd wrote: > Hmmm, well, the idea is I'm generating a ROM image, and the user of the > software would receive the source, not the image. They would then be able > to choose what capabilities they want included in the ROM image. The > problem is, to include all the capabilities would make a ROM image larger > than the target ROM device! So the idea is to let the user pick and > choose, and at the same time tell them how much space each option uses and > how much is remaining. If you run the assembler with the -v (verbose) switch given at least twice, it will output the sizes of the segments together with a dump of the fragments (= little pieces of code and expressions) in this segment. Here is a sample for a short piece of code: New segment: CODE Literal: A9 00 A6 Expression (1): zpimp imp $0003 + * Literal: 8D Expression (2): imp Literal: 00 End PC = $0008 New segment: RODATA End PC = $0000 New segment: BSS End PC = $0000 New segment: DATA End PC = $0000 New segment: ZEROPAGE End PC = $0000 New segment: NULL End PC = $0000 The value listed under "End PC" is the size of a section (= part of a segment that comes from one object file). The other stuff is the data in the segment (expression trees are dumped in RPN). Maybe this information can be used for your purposes. The disadvantage of this method is that the fragment dump will create quite a lot of output. Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de
This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:36 CET