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

Table in Assembly

Hi,

How to generate a table in assembly ?

CHACK

Parents
  • What you need to use is the DB, DW or DD directives in the appropriate segment.

      xtable:   DB   7,22,83,67,88  ; byte entries
    
      ytable:   DW   67fh,784h,0cfdh ; word entries
    
      ztable:   DD   12345678h,87654321h ; double word entries
    

    This will place byte, word and double word tables in whatever segment is active. Tables can be in code, data, idata, xdata, etc. For more info, see the A51/A251 user guide, Chapter 4.


Reply
  • What you need to use is the DB, DW or DD directives in the appropriate segment.

      xtable:   DB   7,22,83,67,88  ; byte entries
    
      ytable:   DW   67fh,784h,0cfdh ; word entries
    
      ztable:   DD   12345678h,87654321h ; double word entries
    

    This will place byte, word and double word tables in whatever segment is active. Tables can be in code, data, idata, xdata, etc. For more info, see the A51/A251 user guide, Chapter 4.


Children
No data