I try to use interrupt 0x10 to show a string on the screen, but it fails. I don't know WHY. Can anybody help me?
Compiler: NASM
;===START=======================================
[bits 16]
segment code
start:
;===============================================
; sets up DS to point to the
; data segment, and initialises
; SS and SP to point to the top
; of the provided stack.
;===============================================
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,stacktop
;===============================================
; print the string
;===============================================
;mov dx,hello
;mov ah,09h
;int 21h
mov ax,seg hello
mov es,ax
mov ax,0e01h
mov bx,0007h
mov cx,lmsg
mov dx,0000h
mov bp,hello
int 10h
;===============================================
; terminates the program
;===============================================
mov ax,4c00h
int 21h
segment data
hello db 'hello, world'
lmsg equ $-hello
segment stack stack
resb 64
stacktop:
;===END=========================================
Compiler: NASM
;===START=======================================
[bits 16]
segment code
start:
;===============================================
; sets up DS to point to the
; data segment, and initialises
; SS and SP to point to the top
; of the provided stack.
;===============================================
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,stacktop
;===============================================
; print the string
;===============================================
;mov dx,hello
;mov ah,09h
;int 21h
mov ax,seg hello
mov es,ax
mov ax,0e01h
mov bx,0007h
mov cx,lmsg
mov dx,0000h
mov bp,hello
int 10h
;===============================================
; terminates the program
;===============================================
mov ax,4c00h
int 21h
segment data
hello db 'hello, world'
lmsg equ $-hello
segment stack stack
resb 64
stacktop:
;===END=========================================