Compare commits
1 Commits
main
...
rewrite_id
Author | SHA1 | Date | |
---|---|---|---|
1aa272b2e9 |
@ -12,13 +12,6 @@
|
||||
; Source code author - Kulakov Vladimir Gennadievich.
|
||||
; Adaptation and improvement - Mario79.
|
||||
|
||||
give_back_application_data_1:
|
||||
mov esi, FDD_BUFF;FDD_DataBuffer ;0x40000
|
||||
mov ecx, 128
|
||||
cld
|
||||
rep movsd
|
||||
ret
|
||||
|
||||
take_data_from_application_1:
|
||||
mov edi, FDD_BUFF;FDD_DataBuffer ;0x40000
|
||||
mov ecx, 128
|
||||
@ -717,18 +710,38 @@ endg
|
||||
; This function is called in boot process.
|
||||
; It creates filesystems /fd and/or /fd2, if the system has one/two floppy drives.
|
||||
proc floppy_init
|
||||
; search for FDDs and add them to the list of disks
|
||||
; author - Mario79
|
||||
mov al, 0x10
|
||||
out 0x70, al
|
||||
mov cx, 0xff
|
||||
.wait_cmos:
|
||||
dec cx
|
||||
test cx, cx
|
||||
jnz .wait_cmos
|
||||
in al, 0x71
|
||||
test al, al
|
||||
jz .no_fdd
|
||||
|
||||
push eax ; b[esp]=al [esp+1..3]- ??
|
||||
|
||||
stdcall attach_int_handler, 6, FDCInterrupt, 0
|
||||
DEBUGF 1, "K : Set Floppy IRQ6 return code %x\n", eax
|
||||
|
||||
mov ecx, floppy_mutex
|
||||
call mutex_init
|
||||
; First floppy is present if [DRIVE_DATA] and 0xF0 is nonzero.
|
||||
test byte [DRIVE_DATA], 0xF0
|
||||
; First floppy is present if [esp] and 0xF0 is nonzero.
|
||||
test byte [esp], 0xF0
|
||||
jz .no1
|
||||
stdcall disk_add, floppy_functions, floppy1_name, 1, DISK_NO_INSERT_NOTIFICATION
|
||||
.no1:
|
||||
; Second floppy is present if [DRIVE_DATA] and 0x0F is nonzero.
|
||||
test byte [DRIVE_DATA], 0x0F
|
||||
; Second floppy is present if [esp] and 0x0F is nonzero.
|
||||
test byte [esp], 0x0F
|
||||
jz .no2
|
||||
stdcall disk_add, floppy_functions, floppy2_name, 2, DISK_NO_INSERT_NOTIFICATION
|
||||
.no2:
|
||||
add esp, 4
|
||||
.no_fdd:
|
||||
ret
|
||||
endp
|
||||
|
||||
|
@ -12,7 +12,7 @@ goto :eof
|
||||
|
||||
:Target_kernel
|
||||
rem valid languages: en ru ge et sp
|
||||
set lang=en
|
||||
set lang=en_US
|
||||
|
||||
echo *** building kernel with language '%lang%' ...
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
;***************************************************
|
||||
; clear the DRIVE_DATA table,
|
||||
; search for FDDs and add them into the table
|
||||
; author - Mario79
|
||||
;***************************************************
|
||||
xor eax, eax
|
||||
mov edi, DRIVE_DATA
|
||||
mov ecx, DRIVE_DATA_SIZE/4
|
||||
cld
|
||||
rep stosd
|
||||
|
||||
mov al, 0x10
|
||||
out 0x70, al
|
||||
mov cx, 0xff
|
||||
wait_cmos:
|
||||
dec cx
|
||||
test cx, cx
|
||||
jnz wait_cmos
|
||||
in al, 0x71
|
||||
mov [DRIVE_DATA], al
|
||||
test al, al
|
||||
jz @f
|
||||
|
||||
stdcall attach_int_handler, 6, FDCInterrupt, 0
|
||||
DEBUGF 1, "K : Set IDE IRQ6 return code %x\n", eax
|
||||
call floppy_init
|
||||
@@:
|
||||
|
@ -1,13 +0,0 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
include 'dev_fd.inc'
|
||||
include 'dev_hdcd.inc'
|
||||
include 'getcache.inc'
|
||||
include 'sear_par.inc'
|
||||
|
@ -6,6 +6,13 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
; clear the DRIVE_DATA table
|
||||
; author - Mario79
|
||||
xor eax, eax
|
||||
mov edi, DRIVE_DATA
|
||||
mov ecx, DRIVE_DATA_SIZE/4
|
||||
cld
|
||||
rep stosd
|
||||
;-----------------------------------------------------------------------------
|
||||
; find the IDE controller in the device list
|
||||
;-----------------------------------------------------------------------------
|
||||
@ -46,7 +53,6 @@ align 4
|
||||
pop eax
|
||||
@@:
|
||||
DEBUGF 1, 'K : BAR0 IDE base addr %x\n', dx
|
||||
mov [StandardATABases], dx
|
||||
mov [ecx+IDE_DATA.BAR0_val], dx
|
||||
;--------------------------------------
|
||||
mov dx, 0x3F4
|
||||
@ -73,7 +79,6 @@ align 4
|
||||
pop eax
|
||||
@@:
|
||||
DEBUGF 1, 'K : BAR2 IDE base addr %x\n', dx
|
||||
mov [StandardATABases+2], dx
|
||||
mov [ecx+IDE_DATA.BAR2_val], dx
|
||||
;--------------------------------------
|
||||
mov dx, 0x374
|
||||
|
@ -729,7 +729,7 @@ end if
|
||||
;-----------------------------------------------------------------------------
|
||||
mov esi, boot_detectfloppy
|
||||
call boot_log
|
||||
include 'detect/dev_fd.inc'
|
||||
call floppy_init
|
||||
;-----------------------------------------------------------------------------
|
||||
; create pci-devices list
|
||||
;-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user