This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

About _DATA_GROUP_ segment

Help! How can I break _DATA_GROUP_ segment into two parts?
Thanks!

  • in assembler: Please read the manual
    in C split DATA variables into two files

    Erik

    PS, just curious why?

  • Whats Please read the manual?

  • Thanks Erik
    "PS, just curious why?"
    Because _DATA_GROUP_ segment too large to be locate
    behind bit segment, but there is "GAP" afore it.

    in C split DATA variables into two files
    not work.

  • in C split DATA variables into two files
    not work.

    I think I misstated, I just looked (did it a year or do ago and eveidently forgot I did it in assembler like this:

    ;;////////////////////////////////////////////////////////////////////
    ;;
    ;;  FILE:     SZDATA.A51
    ;;
    ;;  Copyright
    ;;
    ;;  Overcome the Keil inability to save DATA parts in gropus lexx than "hole"
    
    
    $NOMOD51
    
               PUBLIC GCDXdestListBeg
               PUBLIC GCDXdestListEnd
               PUBLIC GCDXprmsListBeg
               PUBLIC GCDXprmsListEnd
               PUBLIC GCDXcurrListBeg
               PUBLIC GCDXcurrListEnd
               PUBLIC GCDXothListBeg
               PUBLIC GCDXothListEnd
    
    ?DT?zdataf SEGMENT DATA
    
               RSEG ?DT?zdataf
    
    
    GCDXdestListBeg: ds 2
    GCDXdestListEnd: ds 2
    GCDXprmsListBeg: ds 2
    GCDXprmsListEnd: ds 2
    GCDXcurrListBeg: ds 2
    GCDXcurrListEnd: ds 2
    GCDXothListBeg:  ds 2
    GCDXothListEnd:  ds 2
    
               end
    

    combined with this in the c

    >extern U8DX GCDXdestListBeg;      // first used field destinations list
    extern U8DX GCDXdestListEnd; // first unused field destinations list
    extern U8DX GCDXprmsListBeg; // first used field pr messages list
    extern U8DX GCDXprmsListEnd; // first unused field pr messages list
    extern U8DX GCDXcurrListBeg; // first used field current messages list
    extern U8DX GCDXcurrListEnd; // first unused field current messages list
    extern U8DX GCDXothListBeg; // first used field current messages list
    extern U8DX GCDXothListEnd; // first unused field current messages list
    // parts of the 'normal' data segment
    UCDX GCDXdispList_p; // bitmap generator pointer
    UCDX GCDXdispListWas_p; // bitmap generator pointer

    Erik

  • *** ERROR L107: ADDRESS SPACE OVERFLOW
        SPACE:   DATA
        SEGMENT: _DATA_GROUP_
        LENGTH:  000056H
    
    * * * * *   D A T A   M E M O R Y   * *  * * * * * *
    000000H   000007H   000008H   ---    AT..     DATA           "REG BANK 0"
    000008H   000010H   000009H   BYTE   UNIT     DATA           ?DT?MAIN
    000011H   000013H   000003H   BYTE   UNIT     DATA           ?DT?KEYBOARD
    000014H   00001CH   000009H   BYTE   UNIT     IDATA          _IDATA_GROUP_
    00001DH   00001FH   000003H   ---    ---      **GAP**
    000020H   000027H   000008H   BYTE   BITADDR  DATA           ?BA?MAIN
    000028H   000028H   000001H   BYTE   BITADDR  DATA           ?BA?BIOCAN
    000029H.0 00002AH.0 000001H.1 BIT    UNIT     BIT            ?BI?CONTROL
    00002AH.1 00002AH.7 000000H.7 BIT    UNIT     BIT            ?BI?MAIN
    00002BH.0 00002BH.2 000000H.3 BIT    UNIT     BIT            _BIT_GROUP_
    00002BH.3 00002BH.4 000000H.2 BIT    UNIT     BIT            ?BI?KEYBOARD
    00002BH.5 00002BH   000000H.3 ---    ---      **GAP**
    00002CH   00002CH   000001H   BYTE   UNIT     IDATA          ?STACK
    

    Because 00002CH + 000056H > 00007FH, it is overflow. if 000056H is split into 000003H and 000053H, then 000003H fill the "GAP" (00001DH to 00001FH) and 00002CH + 000053H = 00007FH, it will be OK. How can I do that? Be careful: it is _DATA_GROUP_

  • How can I do that?
    EXACTLY as i did show you above.

    Be careful: it is _DATA_GROUP_
    so what, you need two DIFFRENTLY NAMED sgements holding the dats, it is STILL "DATA"

    if you can not figute out how to 'adjust' the example to 3 bytes, you should not be playing with this.

    here is the proof

                REG     0000H     0008H     ABSOLUTE     "REG BANK 0"
                REG     0008H     0008H     ABSOLUTE     "REG BANK 1"
                DATA    0010H     0010H     UNIT         ?DT?ZDATAF
                BIT     0020H.0   0002H.3   UNIT         ?BI?SLVMAIN
                BIT     0022H.3   0001H.4   UNIT         _BIT_GROUP_
                        0023H.7   0000H.1                *** GAP ***
                DATA    0024H     0020H     UNIT         _DATA_GROUP_
                DATA    0044H     0015H     UNIT         ?DT?SLVMAIN
                DATA    0059H     0006H     UNIT         ?DT?_CRC8?SLV1WIRE
                DATA    005FH     0001H     UNIT         ?DT?SLVIIC
                DATA    0060H     0001H     UNIT         ?DT?_MOMMARTY?SLV485
                IDATA   0061H     000BH     UNIT         ?ID?SLVMAIN
                IDATA   006CH     0001H     UNIT         ?STACK
    

    Erik