Load/eject CD/DVD device tray moved from sysfn 70 to sysfn 24 (see sysfunc*),

because these actions do not involve file system.

git-svn-id: svn://kolibrios.org@588 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond)
2007-07-26 12:25:17 +00:00
parent 8df29f7be6
commit 379dd4d36d
6 changed files with 109 additions and 202 deletions

View File

@@ -4957,10 +4957,48 @@ align 4
syscall_cdaudio: ; CD
cmp eax, 4
jb .audio
jz .eject
cmp eax, 5
jnz .ret
.load:
call .reserve
call LoadMedium
call .free
ret
.eject:
call .reserve
call clear_CD_cache
call allow_medium_removal
call EjectMedium
call .free
ret
.audio:
call sys_cd_audio
mov [esp+36],eax
.ret:
ret
.reserve:
call reserve_cd
mov eax, ebx
shr eax, 1
and eax, 1
inc eax
mov [ChannelNumber], eax
mov eax, ebx
and eax, 1
mov [DiskNumber], eax
call reserve_cd_channel
inc ebx
mov [cdpos], ebx
ret
.free:
call free_cd_channel
and [cd_status], 0
ret
align 4
syscall_delramdiskfile: ; DelRamdiskFile