3030%include "./asm/include/mbr.inc"
3131%include "./asm/include/sysvar.inc"
3232
33-
3433;;global print_bios ;; Export symbol so to use this print function in start16.asm.
3534
3635
37- BITS 16
36+ section .text
37+
38+
39+ ;;=============================================================================
40+ ;;
41+ ;;=============================================================================
3842
43+ BITS 16
3944
4045entryPoint:
4146 cli
@@ -115,7 +120,7 @@ load_start16_tsl_lo:
115120
116121
117122;;==============================================================================
118- ;; diskcpy | Copy n sectors from disk.
123+ ;; diskcpy | Copy n sectors from disk
119124;;==============================================================================
120125;; Arguments:
121126;; -- ax: cant of 512 mem sectors to copy.
@@ -132,7 +137,7 @@ diskcpy:
132137
133138
134139;;==============================================================================
135- ;; cpySec | Read a sector from a disk using extended read (2TB max disk size)
140+ ;; cpySec | read a sector from a disk using extended read (2TB max disk size)
136141;;==============================================================================
137142;; Arguments:
138143;; -- ebx: low word of 64 bit src sector (only 32 bits implementation).
@@ -196,7 +201,7 @@ cpySec:
196201
197202
198203;;==============================================================================
199- ;; extensionTest | Verifica soporte de extension bios.
204+ ;; extensionTest | verifica soporte de extension bios
200205;;==============================================================================
201206;; Registers CS, DS, ES, SS, BX, CX, DX are preserved unless
202207;; explicitly changed
@@ -227,7 +232,7 @@ extensionTest:
227232
228233
229234;;==============================================================================
230- ;; print_bios | Imprime a pantalla usando bootservice.
235+ ;; print_bios | imprime a pantalla usando bootservice
231236;;==============================================================================
232237;; Argumentos:
233238;; -- si: string addr 16 bits.
@@ -250,14 +255,12 @@ print_bios:
250255
251256
252257;;==============================================================================
253- ;; a20_line | Config a20 line
258+ ;; a20_line | config a20 line
254259;;==============================================================================
255260
256-
257-
258261a20_line:
259262 call a20_check
260- jnz start16_continue
263+ jnz .end
261264
262265.a20_set:
263266 in al , 0x64 ;; Status.
@@ -273,9 +276,12 @@ a20_line:
273276 mov al , 0xdf
274277 out 0x60 , al
275278
279+ .end:
280+ ret
281+
276282
277283;;==============================================================================
278- ;; a20_check | Check the status of a20 line
284+ ;; a20_check | check the status of a20 line
279285;;==============================================================================
280286;; Returns:
281287;; -- FLAGS[zero] = 1 (a20 disabled) | FLAGS[zero] = 0 (a20 enabled)
0 commit comments