File tree 2 files changed +20
-20
lines changed
2 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ _start:
23
23
mov sp , 0x7c00
24
24
25
25
lea si , boot_start_str
26
- call println
26
+ call real_mode_println
27
27
28
28
enable_a20:
29
29
# enable A20 - Line via IO - Port 92 , might not work on all motherboards
@@ -107,38 +107,38 @@ spin:
107
107
# esi : points at zero - terminated String
108
108
# CLOBBER
109
109
# ax
110
- println :
111
- call print
110
+ real_mode_println :
111
+ call real_mode_print
112
112
mov al , 13 # \r
113
- call print_char
113
+ call real_mode_print_char
114
114
mov al , 10 # \n
115
- jmp print_char
115
+ jmp real_mode_print_char
116
116
117
117
# print a string
118
118
# IN
119
119
# esi : points at zero - terminated String
120
120
# CLOBBER
121
121
# ax
122
- print :
122
+ real_mode_print :
123
123
cld
124
- print_loop :
124
+ real_mode_print_loop :
125
125
# note: if direction flag is set (via std )
126
126
# this will DECREMENT the ptr , effectively
127
127
# reading/printing in reverse.
128
128
lodsb al , BYTE PTR [ esi ]
129
129
test al , al
130
- jz print_done
131
- call print_char
132
- jmp print_loop
133
- print_done :
130
+ jz real_mode_print_done
131
+ call real_mode_print_char
132
+ jmp real_mode_print_loop
133
+ real_mode_print_done :
134
134
ret
135
135
136
136
# print a character
137
137
# IN
138
138
# al : character to print
139
139
# CLOBBER
140
140
# ah
141
- print_char :
141
+ real_mode_print_char :
142
142
mov ah , 0x0e
143
143
int 0x10
144
144
ret
@@ -148,7 +148,7 @@ print_char:
148
148
# bx : the number
149
149
# CLOBBER
150
150
# al , cx
151
- print_hex :
151
+ real_mode_print_hex :
152
152
mov cx , 4
153
153
.lp:
154
154
mov al , bh
@@ -161,24 +161,24 @@ print_hex:
161
161
.below_0xA:
162
162
add al , '0'
163
163
164
- call print_char
164
+ call real_mode_print_char
165
165
166
166
shl bx , 4
167
167
loop .lp
168
168
169
169
ret
170
170
171
- error :
172
- call println
171
+ real_mode_error :
172
+ call real_mode_println
173
173
jmp spin
174
174
175
175
no_int13h_extensions:
176
176
lea si , no_int13h_extensions_str
177
- jmp error
177
+ jmp real_mode_error
178
178
179
179
rest_of_bootloader_load_failed:
180
180
lea si , rest_of_bootloader_load_failed_str
181
- jmp error
181
+ jmp real_mode_error
182
182
183
183
boot_start_str: .asciz "Booting (first stage)..."
184
184
error_str: .asciz "Error: "
Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ kernel_load_failed_str: .asciz "Failed to load kernel from disk"
11
11
12
12
kernel_load_failed:
13
13
lea si , [ kernel_load_failed_str ]
14
- call println
14
+ call real_mode_println
15
15
kernel_load_failed_spin:
16
16
jmp kernel_load_failed_spin
17
17
18
18
stage_2:
19
19
lea si , [ second_stage_start_str ]
20
- call println
20
+ call real_mode_println
21
21
22
22
set_target_operating_mode:
23
23
# Some BIOSs assume the processor will only operate in Legacy Mode. We change the Target
You can’t perform that action at this time.
0 commit comments