My bootsector is meant to print something - it does, but wierd characters follow it? e.g the spades symbol

; Boot.Asm

; Tell the compiler that this is offset 0 - it isn't offset 0, but it will be after the jump.

[ORG 0]

jmp 07C0h:start ; Goto segment 07C0   

msg     db  'Simple Bootloader'  ; Declare the string that will be printed

    start:  ; Update the segment registers
            mov ax, cs
            mov ds, ax
            mov es, ax
	    cli ;Disable interrupts
            mov si, msg     ; Print msg

    print:
            lodsb           ; AL=memory contents at DS:SI
            cmp al, 0       ; If AL=0 then hang
            je hang
            mov ah, 0Eh     ; Print AL
            mov bx, 7
            int 10h
            jmp print       ; Print next character

    hang:                   ; Hang!
            jmp hang        ;Loop


    times 510-($-$$) db 0
    dw 0AA55h

What marks the end of the string?
IIRC, some of the really low level interrupt routines used '$' to mark the end of the string.

screenie of the VM

yay, thank you salem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.