File tree Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 9
9
mov ax , 07C0h ; Set data segment to where we're loaded
10
10
mov ds , ax
11
11
12
+ mov ax , 0xb800
13
+ mov gs , ax
14
+
15
+ ; clean screen
16
+ mov ax , 0600h
17
+ mov bx , 0700h
18
+ mov cx , 0
19
+ mov dx , 184fh
20
+
21
+ int 10h
22
+
12
23
13
24
mov si , text_string ; Put string position into SI
14
25
call print_string ; Call our string-printing routine
@@ -24,23 +35,21 @@ print_string: ; Routine: output string in SI to screen
24
35
mov bh , 0
25
36
int 0x10
26
37
27
- .repe at :
38
+ mov bx , 0
39
+ mov bl , dh
28
40
29
- lodsb ; Get character from string
30
41
42
+ .repe at :
31
43
32
- mov ah , 09h ;
33
- mov bl , 02h ; green text
34
- mov bh , 0
35
- mov cx , 1h
44
+ lodsb ; Get character from string
36
45
37
46
cmp al , 0
38
47
je .done ; If char is zero, end of string
39
- int 10h ; Otherwise, print it
40
48
41
- add dl , 1
42
- mov ah , 02h
43
- int 10h
49
+ mov byte [ gs : bx ], al
50
+ add bx , 1
51
+ mov byte [ gs : bx ], 0xA4
52
+ add bx , 1
44
53
45
54
jmp .repe at
46
55
You can’t perform that action at this time.
0 commit comments