Answer the question
In order to leave comments, you need to log in
Move truncated in place: R_386_16 at undefined symbol ".data"?
Good evening, colleagues. What is the essence of the error, there is a cycle on jmp, which must be executed 3 times, in the processes of which it first displays one frame (lines 16-20), then the array value, zero in the first circle, first in the second, etc. (22 - 28) and the second frame, after which it repeats.
section .text
global _start
_start:
mov edx, lenBT
mov ecx, borderTop
mov ebx, 1
mov eax, 4
int 0x80
mov cx, 0
jmp cellValues
cellValues:
push cx
mov edx, 2
mov ecx, borderMiddleA
mov ebx, 1
mov eax, 4
int 0x80
mov edx, 1
pop bx
mov ecx, [field + bx]
push bx
mov ebx, 1
mov eax, 4
int 0x80
mov edx, 3
mov ecx, borderMiddleB
mov ebx, 1
mov eax, 4
int 0x80
pop cx
inc cx
cmp cx, 3
jne cellValues
mov edx, lenBB
mov ecx, borderBottom
mov ebx, 1
mov eax, 4
int 0x80
mov eax, 1
int 0x80
section .data
field db 'X', 'A', 'V', 'A', 'V', 'A', 'V', 0xa
borderTop db '***** ***** *****', 0dh, 0ah, '* * * * * *', 0xa
lenBT equ $ - borderTop
borderMiddleA db '* '
borderMiddleB db ' * '
borderBottom db 0dh, 0ah, '* * * * * *', 0dh, 0ah, '***** ***** *****', 0xa
lenBB equ $ - borderBottom
main.o: в функции «cellValues»:
main.asm:(.text+0x3e): перемещение обрезано по месту: R_386_16 у неопределённого символа «.data»
mov ecx, [field + bx]
mov ecx, field
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question