Search code examples
assemblyturbo-pascal

using assembly in Turbo pascal: line too long


I have this line of code:

asm
...

    jmp @jmp_data
        @s1: dw $1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120,$4420,$0020,$0020,$0020;
        @jmp_data:
...
end:

But turbo Pacal gives error 11: Line too long.

so i tried to do this:

jmp @jmp_data
@s1: dw $1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120,$4420,$0020,
$0020,$0020,$1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120,$4420,$0020,$0020,$0020;
@jmp_data:

But gives Syntax error.

I searched in Google about this, but i found nothing.

So, how can write this code in Turbo pascal? It's have to be some way.

Thank...


Solution

  • Use several dw directives:

        @s1: dw $1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120
             dw $1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120
             dw $1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120
             dw $4420,$0020,$0020,$0020