I have a very long code line in ASM (a very long array declaration).
Is it posible to break it into multiple lines?

thanks!

Recommended Answers

Which version of ASM?
Do you have an example?

Jump to Post

Place another db at the beginning of the new line and another one at the beginning of the next line.

Jump to Post

All 5 Replies

Which version of ASM?
Do you have an example?

It's an 8086 assembly. I'm working with EMU8086 V4.07
I have a long array holding some bitmap of Icons. I'ts decleration looks like that:

Symbls db 0,0,0,0,0,0,0,0, 0,2,2,0,0,2,2,0, 0,0,2,2,2,2,0,0, 2,2,2,2,2,2,2,2, 0,0,2,2,2,2,0,0, 0,2,2,0,0,2,2,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0Fh,0Fh,0Fh,0Fh,0Fh,0Fh,0Fh,0, 0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0Fh,0Fh,0Fh,0Fh,0Fh,0Fh,0Fh,0, 0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0,0,0,0,0,0,0,0, 0,1,1,1,1,1,0,0, 1,1,0,0,0,1,1,0, 1,1,0,1,1,1,1,0, 1,1,0,1,1,1,1,0, 1,1,0,1,1,1,1,0, 1,1,0,0,0,0,0,0, 0,1,1,1,1,0,0,0, 0,0,0,0,0,0,0,0, 0,7,0,0,0,0,0,0, 7,7,7,0,0,0,0,0, 0,7,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,

Place another db at the beginning of the new line and another one at the beginning of the next line.

Some assemblers allow you to do that by terminating a line with a backslash, as in:

Symbls db 0,0,0,0,0,0,0,0, 0,2,2,0,0,2,2,0, 0,0,2,2,2,2,0,0, 2,2,2,2,2,2,2,2, \
0,0,2,2,2,2,0,0, 0,2,2,0,0,2,2,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, \
0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0Fh,0Fh,0Fh,0Fh,0Fh,0Fh,0Fh,0, \
0,0Fh,0Fh,0,0Fh,0Fh,0,0,

Place another db at the beginning of the new line and another one at the beginning of the next line.

Thank U both!
the db thing works well

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.