error: instruction has conflicting segment overrides
Posted: Sat Aug 07, 2010 10:29 am
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
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