Subversion Repositories Kolibri OS

Rev

Rev 7586 | Rev 8091 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7586 Rev 8089
Line 9... Line 9...
9
;;  KolibriOS 16-bit loader,                                    ;;
9
;;  KolibriOS 16-bit loader,                                    ;;
10
;;                        based on bootcode for MenuetOS        ;;
10
;;                        based on bootcode for MenuetOS        ;;
11
;;                                                              ;;
11
;;                                                              ;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
$Revision: 7586 $
14
$Revision: 8089 $
15
 
15
 
16
 
16
 
Line 285... Line 285...
285
        mov     word [es:BOOT_LO.kernel_restart], kernel_restart_bootblock
285
        mov     word [es:BOOT_LO.kernel_restart], kernel_restart_bootblock
286
@@:
286
@@:
287
; \end{diamond}[02.12.2005]
287
; \end{diamond}[02.12.2005]
Line 288... Line 288...
288
 
288
 
289
; if bootloader sets cx = 'HA' and dx = 'RD', then bx contains identifier of source disk
289
; if bootloader sets cx = 'HA' and dx = 'RD', then bx contains identifier of source disk
290
; (see comment to BOOT_LO.bx_from_load and loader_doc.txt)
290
; (see comment to BOOT_LO.sys_disk and loader_doc.txt)
291
        mov     word [es:BOOT_LO.bx_from_load], 'r1'  ; default value: /rd/1
291
        mov     word [es:BOOT_LO.sys_disk], 'r1'  ; default value: /rd/1
292
        cmp     cx, 'HA'
292
        cmp     cx, 'HA'
293
        jnz     no_hd_load
293
        jnz     no_hd_load
294
        cmp     dx, 'RD'
294
        cmp     dx, 'RD'
295
        jnz     no_hd_load
295
        jnz     no_hd_load
296
        mov     [es:BOOT_LO.bx_from_load], bx
296
        mov     [es:BOOT_LO.sys_disk], bx
Line 297... Line 297...
297
no_hd_load:
297
no_hd_load:
298
 
298
 
299
; set up stack
299
; set up stack
Line 969... Line 969...
969
 
969
 
Line 970... Line 970...
970
; BOOT DEVICE
970
; BOOT DEVICE
971
 
971
 
972
        mov     al, [preboot_device]
972
        mov     al, [preboot_device]
Line 973... Line 973...
973
        dec     al
973
        dec     al
974
        mov     [es:BOOT_LO.dev], al
974
        mov     [es:BOOT_LO.rd_load_from], al
Line 975... Line 975...
975
 
975
 
Line 976... Line 976...
976
; GET MEMORY MAP
976
; GET MEMORY MAP
977
include '../detect/biosmem.inc'
977
include '../detect/biosmem.inc'
978
 
978
 
979
; READ DISKETTE TO MEMORY
979
; READ DISKETTE TO MEMORY
980
 
980
 
981
        cmp     byte [es:BOOT_LO.dev], 0
981
        cmp     byte [es:BOOT_LO.rd_load_from], RD_LOAD_FROM_FLOPPY
Line 1303... Line 1303...
1303
        mov     dx, 0x3f2       ; floppy motor off
1303
        mov     dx, 0x3f2       ; floppy motor off
1304
        mov     al, 0
1304
        mov     al, 0
1305
        out     dx, al
1305
        out     dx, al
Line 1306... Line 1306...
1306
 
1306
 
1307
if defined extended_primary_loader
1307
if defined extended_primary_loader
1308
        cmp     [es:BOOT_LO.dev], 1
1308
        cmp     [es:BOOT_LO.rd_load_from], RD_LOAD_FROM_HD
1309
        jne     no_sys_from_primary
1309
        jne     no_sys_from_primary
1310
; load kolibri.img using callback from primary loader
1310
; load kolibri.img using callback from primary loader
1311
        and     word [movedesc + 24 + 2], 0
1311
        and     word [movedesc + 24 + 2], 0
1312
        mov     byte [movedesc + 24 + 4], 10h
1312
        mov     byte [movedesc + 24 + 4], 10h