Menu

Table question

Help
MBB
2023-01-08
2023-01-09
  • MBB

    MBB - 2023-01-08

    I'm using an 18F4550 with version (0.99.01 2022-01-27 (Windows 64 bit) : Build 1073).

    The chip (TMF8820) I'm using has an image file that needs to be loaded. This image file has 2476 elements in it.

    In the Table the first 192 of 2476 element are shown below:

    Table Image_File as word
    0, 128, 32, 0, 157, 0, 32, 0, 213, 32, 16, 0
    215, 32, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    9, 18, 86, 52, 172, 9, 0, 0, 217, 32, 16, 0
    0, 0, 0, 0, 0, 0, 0, 0, 219, 32, 16, 0
    221, 32, 16, 0, 223, 32, 16, 0, 173, 34, 16, 0
    97, 35, 16, 0, 223, 32, 16, 0, 133, 34, 16, 0
    153, 34, 16, 0, 223, 32, 16, 0, 223, 32, 16, 0
    223, 32, 16, 0, 81, 35, 16, 0, 225, 32, 16, 0
    225, 32, 16, 0, 5, 36, 16, 0, 45, 36, 16, 0
    77, 36, 16, 0, 223, 32, 16, 0, 223, 32, 16, 0
    83, 41, 205, 104, 3, 72, 133, 70, 0, 240, 22, 248
    0, 72, 0, 71, 225, 0, 32, 0, 0, 128, 32, 0
    5, 72, 128, 71, 5, 72, 0, 71, 254, 231, 254, 231
    254, 231, 254, 231, 112, 71, 254, 231, 112, 71, 0, 0
    237, 109, 16, 0, 137, 0, 32, 0, 6, 76, 1, 37 . . . .
    End Table

    When I look at the beginning of the .asm file I see:

    db  168,0,128,32,0,157,0,32,0,213,32,16,0,215,32,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    db  0,0,0,0,0,9,18,86,52,172,9,0,0,217,32,16,0,0,0,0,0,0,0,0,0,219,32,16,0,221,32,16
    db  0,223,32,16,0,173,34,16,0,97,35,16,0,223,32,16,0,133,34,16,0,153,34,16,0,223,32,16
    db  0,223,32,16,0,223,32,16,0,81,35,16,0,225,32,16,0,225,32,16,0,5,36,16,0,45,36,16
    db  0,77,36,16,0,223,32,16,0,223,32,16,0,83,41,205,104,3,72,133,70,0,240,22,248,0
    db  72,0,71,225,0,32,0,0,128,32,0,5,72,128,71,5,72,0,71,254,231,254,231,254,231,254
    

    The Table starts with:
    0, 128, 32, 0, 157 . . . . . .
    The .asm file starts with:
    168,0,128,32,0,157 . . . . .

    I assume the 168 in the .asm file is supposed to be the Table size.

    If that is correct, why isn't it 2476?

     
    • Anobium

      Anobium - 2023-01-08

      Because, you are looking the low byte of the table. See TABLEIMAGE_FILE_H table for the additional information for the high byte.

      The compiler handles the return value(s) automatically.

       
  • MBB

    MBB - 2023-01-09

    Thanks!

     

Log in to post a comment.