Edit: this problem is solved because of fasmg.

I am programming a game in assembly and I am wondering if there is a way to mix variable lengths on one line, in the way that you can define many variables of the same length in one line. Here's an example:

.Sprites:
db $0f,120,39,$D506E3
This example fails on the last number in that list since it is not one byte. But this:

.Sprites:
dl $0f,120,39,$D506E3
compiles and inserts empty space between the variables. The reason I want to be able to vary the size is because this will be a table with many sprites, and each one has the same format, so it would be better to leave each one's data on one line than to use two lines that could be confused:

.Sprites:
?? $0f,120,39,$D506E3
?? $0b,110,39,$D5001C
?? $01,120,36,$D509A1

I have already created a stack overflow post here, which says the same thing
https://stackoverflow.com/questions/66683471/assembly-organizing-long-segments-of-varied-data?noredirect=1#comment117878997_66683471
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement