Code and data size

This is a discussion on Code and data size within the C Programming forums, part of the General Programming Boards category; I have a file generated by build process of Borland 4.0 that is similar to map file.. Project is built ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    175

    Code and data size

    I have a file generated by build process of Borland 4.0 that is similar to map file.. Project is built using small memory model and output binary file is programmed in EPROM.
    And here is the snap shot of the file

    Code:
    Length     Segment                Class               
    006E2H   _DATA                  DATA            
    00002H   _CVTSEG                DATA            
    00006H   _SCNSEG                DATA            
    0D998H   _BSS                   BSS             
    00002H   _BSSEND                BSSEND          
    00C00H   _STACK                 STACK           
    00010H   _FARHEAP               FARHEAP         
    06581H   _TEXT                  CODE            
    00012H   _INIT_                 INITDATA        
    00000H   _INITEND_              INITDATA        
    00000H   _EXIT_                 EXITDATA        
    00010H   _EXITEND_              EXITDATA        
    00000H   _RD                    ROMDATA         
    006E2H   _DATA                  ROMDATA         
    00002H   _CVTSEG                ROMDATA         
    00006H   _SCNSEG                ROMDATA         
    00010H   _ERD                   ENDROMDATA      
    00005H    ??BOOT                 (ABSOLUTE)
    As per my understanding, segments whose name is from _DATA to _FARHEAP falls in RAM and remaining in code segment that lies in ROM.

    Please help me to find the size of code and data.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,701
    You should refer to the documentation but here's what it looks like to me.

    Everything except STACK and CODE are data. CODE is the code. Just a guess though.
    BSS is uninitialized global data, so it's definately data.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. xor linked list
    By adramalech in forum C Programming
    Replies: 23
    Last Post: 10-14-2008, 11:13 AM
  2. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 04:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21