Use string to call variable

Reply

Join Date: Nov 2009
Posts: 1
Reputation: fitztho is an unknown quantity at this point 
Solved Threads: 0
fitztho fitztho is offline Offline
Newbie Poster

Use string to call variable

 
0
  #1
22 Days Ago
I am looking to use a string to call a variable in assembly

I have the following:

  1. msg_0 db "Random phrase",10,0
  2. msg_1 db "Another Random Phrase",10
  3. ...(more messages)
  4. msg_11 db "Final Random Message",10,0
  5. msgIndex db "msg_%d",0
then have the program push msgIndex and a random number to print one of the messages.

Is there a way that I can do this?
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC