Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emu8086 complains about "Unterminated string" with a long string in a DB

I'm new in 8086 Assembly programming and I have a question.

I have a string which size is about 1400 characters. When I'm trying to define it like:

.data
mystring DB '(string with 1400 characters)'

I'm getting an error

"Unterminated string".

I'm using emu8086 emulator. I think my string doesn't fit in DB. Is there any way to keep huge string in byte?

like image 918
onurcanak Avatar asked Jan 28 '23 13:01

onurcanak


1 Answers

I've checked it manually and it looks like the max length is 1010.

Also on one of the links about emu8086 this can be found:

The expansion of DUP operand should not be over 1020 characters! (the expansion of last example is 13 chars), if you need to declare huge array divide declaration it in two lines (you will get a single huge array in the memory). - source

But as it was suggested in the comments you can put two, or more lines adjacent to each other and in the memory they will be consecutive, with the same layout as if you'd used one large line.

mystring      DB '<1010>*A'
mystring_cont DB 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
like image 198
Paweł Łukasik Avatar answered Feb 05 '23 17:02

Paweł Łukasik