i intended to write a simple boot code to boot from flash disk drive.
but i get this error message continuously. i couldn't find the reason.
What can be the problem with this code?
""
org 0
;-----------------------------------------------------
address equ 0x400
;-----------------------------------------------------
jmp start
section .data vstart= 0x100 ; data section at offset 0x100, after text
message db "MERHABA TANZER",0 ; string to copy
section .text
start:
xor ax, ax
mov ax, cs
mov ds, ax ; ds = cs
xor si, si
mov si, message ; si = data offset (vstart = 100)
set_target:
xor di, di ; target offset 0
mov bx, address ; target segment address
mov es, bx ; set es segment to address
mov cx, 14 ; set counter
CLD ; clear direction flag
movdata: rep movsb [es:di], [ds: si] ***error is here (error: instruction has conflicting segment
overrides )
TIMES 510-($-$$) DB 0
DW 0xAA55
**-----------------------------------------------------------------------
nasm -f bin boot1.asm
error: instruction has conflicting segment overrides
error: instruction has conflicting segment overrides
error: instruction has conflicting segment overrides
Thanks to all;
Re: error: instruction has conflicting segment overrides
i should read carefully...THANK YOU BERKUS
intel manual on movsb:
At the assembly-code level, two forms of this instruction are allowed: the “explicit operands”
form and the “no-operands” form. The explicit-operands form (specified
with the MOVS mnemonic) allows the source and destination operands to be specified
explicitly. Here, the source and destination operands should be symbols that
indicate the size and location of the source value and the destination, respectively.
This explicit-operands form is provided to allow documentation; however, note that
the documentation provided by this form can be misleading. That is, the source and
destination operand symbols must specify the correct type (size) of the operands
(bytes, words, or doublewords), but they do not have to specify the correct location.
The locations of the source and destination operands are always specified by the
DS:(E)SI and ES:(E)DI registers, which must be loaded correctly before the move
string instruction is executed.
intel manual on movsb:
At the assembly-code level, two forms of this instruction are allowed: the “explicit operands”
form and the “no-operands” form. The explicit-operands form (specified
with the MOVS mnemonic) allows the source and destination operands to be specified
explicitly. Here, the source and destination operands should be symbols that
indicate the size and location of the source value and the destination, respectively.
This explicit-operands form is provided to allow documentation; however, note that
the documentation provided by this form can be misleading. That is, the source and
destination operand symbols must specify the correct type (size) of the operands
(bytes, words, or doublewords), but they do not have to specify the correct location.
The locations of the source and destination operands are always specified by the
DS:(E)SI and ES:(E)DI registers, which must be loaded correctly before the move
string instruction is executed.
Thanks to all;