USE16 ;default is USE16
org 0x7c00 ;run from 7c00:0000
;---------------------------------------------------------------------------
;bss segment
section .bss
;---------------------------------------------------------------------------
;data segment
section .data
msg db "Hi Cowfish!",0
;---------------------------------------------------------------------------
;code segment
section .text
global start
start:
xor ax,ax ;set ax=0
;mov ax,cs ;
mov ds,ax ;
mov ax,0xb800 ;set ax=0xb800,this address is display memory
mov es,ax ;set target segment address
xor si,si ;set di=0
xor di,di ;set di=0
cld
mov si,msg ;
movsb ;
mov al,0x07
stosb ;[es:di]=al
jmp $ ;
times 510-($-$$) db 0 ;
dw 0xaa55 ;record ID