; Program illustrating 'textgoto(x,y)' interrupts.
assume cs:code
org 100h
code segment
program:
jmp start
; data area here !
string db 'Hello, World !',0
start:
; set up data
mov ax,cs
mov ds,ax
mov es,ax
; clear screen
mov ah,00h ; function no.
mov al,03h ; video mode
int 10h ; BIOS int.
; write string at row 5, col 5 in red.
mov ah,13h ; function no.
mov al,00h ; write mode
mov bh,00h ; page no.
mov bl,04h ; attribute (color?)
mov dh,05h ; row
mov dl,05h ; col
mov cx,0eh ; size of string
lea bp,string ; address of string
int 10h ; BIOS int.
; goto text location
mov ah,02h ; function no.
mov bh,00h ; current page no.
mov dh,09h ; row (from top)
mov dl,09h ; col (from left)
int 10h ; BIOS int.
; put char @ current text location
mov ah,0eh ; function no.
mov al,01h ; character
mov bh,00h ; page no.
int 10h ; BIOS int.
; wait for key press
mov ax,00h ; function no.
int 16h ; BIOS int.
; terminate
mov ax,4c00h ; function no.
int 21h ; DOS int.
code ends
end program