代码
assume
cs:
code,
ds:
data
data segment
msg db " hello world "
data ends
code segment
start:
mov ax,data
mov ds,ax
mov bx,0b800h
mov es,bx
mov cx, 11
mov ah, 01000010b
mov si, 0
mov bx, 0
s: mov al, ds: [si]
mov es: [bx],al
mov es: [bx+ 1 ],ah
inc si
add bx, 2
loop s
mov ax,4c00h
int 21h
code ends
end start
data segment
msg db " hello world "
data ends
code segment
start:
mov ax,data
mov ds,ax
mov bx,0b800h
mov es,bx
mov cx, 11
mov ah, 01000010b
mov si, 0
mov bx, 0
s: mov al, ds: [si]
mov es: [bx],al
mov es: [bx+ 1 ],ah
inc si
add bx, 2
loop s
mov ax,4c00h
int 21h
code ends
end start
第一次写汇编代码。