-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2 int10_13.asm
54 lines (41 loc) · 1.21 KB
/
2 int10_13.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
; this is an example of bios function: int 10h / ah=13h.
; refer to short list of dos interrupts for more info:
; c:\emu8086\documentation\
name "int10h"
org 100h
; set es (just in case):
push cs
pop es
mov bh, 0 ; page.
lea bp, msg ; offset.
mov bl, 0f3h ; default attribute.
mov cx, 12 ; char number.
mov dl, 2 ; col.
mov dh, 1 ; row.
mov ah, 13h ; function.
mov al, 1 ; sub-function.
int 10h
; show current cursor position:
mov al, '<'
mov ah, 0eh
int 10h
mov bh, 0 ; page.
lea bp, cmsg ; offset of string with attributes.
mov bl, 0f3h ; default attribute (not used when al=3).
mov cx, 12 ; char number.
mov dl, 2 ; col.
mov dh, 3 ; row.
mov ah, 13h ; function.
mov al, 3 ; sub-function.
int 10h
; show current cursor position:
mov al, '<'
mov ah, 0eh
int 10h
; wait for any key press....
mov ah, 0
int 16h
ret ; return control to the operating system.
msg db 'hello world!'
cmsg db 'h', 0cfh, 'e', 8bh, 'l', 0f0h, 'l', 5fh, 'o', 3ch, ' ', 0e0h
db 'w', 0b3h, 'o', 2eh, 'r', 0cah, 'l', 1ah, 'd', 0ach, '!', 2fh