Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 747 → Rev 748

/kernel/trunk/boot/shutdown.inc
71,13 → 71,11
 
nbw:
in al,0x60
call pause_key
cmp al,6
jae nbw
mov bl,al
nbw2:
in al,0x60
call pause_key
cmp al,bl
je nbw2
cmp al,240 ;ax,240
93,13 → 91,7
 
nbw32:
 
dec ax ; 1 = write floppy
js nbw
jnz no_floppy_write
call floppy_write
jmp temp_3456 ;nbw
no_floppy_write:
 
dec ax
dec ax ; 2 = power off
jnz no_apm_off
call APM_PowerOff
113,74 → 105,10
mov word[0x0072],0x1234
jmp 0xF000:0xFFF0
 
pause_key:
mov cx,100
pause_key_1:
loop pause_key_1
ret
 
rdelay:
ret
 
floppy_write: ; write diskette image to physical floppy
 
cmp [flm],byte 1
je fwwritedone
mov [flm],byte 1
 
xor ax, ax ; reset drive
xor dx, dx
int 0x13
 
mov cx,0x0001 ; startcyl,startsector
xor dx, dx ; starthead,drive
mov ax, 80*2 ; read no of sect
 
fwwrites:
push ax
 
; move 1mb+ -> 0:a000
 
pusha
mov si, fwmovedesc
mov cx,256*18
mov ah,0x87
push ds
pop es
int 0x15
add dword [fwmovedesc+0x12], 512*18
popa
 
xor si,si
mov es,si
fwnewwrite:
mov bx,0xa000 ; es:bx -> data area
mov ax,0x0300+18 ; read, no of sectors to read
int 0x13
 
test ah, ah
jz fwgoodwrite
 
inc si
cmp si,10
jnz fwnewwrite
 
; can't access diskette - return
pop ax
ret
 
fwgoodwrite:
inc dh
cmp dh,2
jnz fwbb2
mov dh,0
inc ch
fwbb2:
pop ax
dec ax
jnz fwwrites
ret
 
APM_PowerOff:
mov ax, 5304h
xor bx, bx
220,7 → 148,6
mov cx,3
int 0x15
;!!!!!!!!!!!!!!!!!!!!!!!!
fwwritedone:
ret
 
restart_kernel:
/kernel/trunk/detect/ps2mouse.inc
File deleted
Property changes:
Deleted: svn:keywords
-Rev
\ No newline at end of property
/kernel/trunk/docs/sysfuncr.txt
632,20 → 632,6
¢®§¢à é ¥âáï ®â¢¥â "¡ãä¥à ¯ãáâ".
 
======================================================================
======== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 1 - § ¢¥àè¨âì à ¡®âã á¨á⥬ë. ========
======================================================================
 à ¬¥âàë:
* eax = 18 - ­®¬¥à ä㭪樨
* ebx = 1 - ­®¬¥à ¯®¤ä㭪樨
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* ¢á¥£¤  ¢®§¢à é ¥âáï eax = 0 ª ª ¯à¨§­ ª ãᯥå 
‡ ¬¥ç ­¨ï:
*   ¯®á«¥¤­¥¬ è £¥ ¯®ï¢«ï¥âáï ¬¥­î ¢ë室  ¨§ á¨á⥬ë, ®¦¨¤ î饥
ॠªæ¨¨ ¯®«ì§®¢ â¥«ï.
* ‘¬®âਠ⠪¦¥ ¯®¤äã­ªæ¨î 9, § ¢¥à襭¨¥ à ¡®âë á¨á⥬ë á ¯ à ¬¥â஬,
ç⮡ë ä®àá¨à®¢ âì ¢ë¡®à ¢ ¬¥­î ¢ë室 .
 
======================================================================
==== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 2 - § ¢¥àè¨âì ¯à®æ¥áá/¯®â®ª ¯® á«®âã. ====
======================================================================
 à ¬¥âàë:
748,15 → 734,12
* äã­ªæ¨ï ­¥ ¢®§¢à é ¥â §­ ç¥­¨ï
 
======================================================================
= ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 9 - § ¢¥à襭¨¥ à ¡®âë á¨á⥬ë á ¯ à ¬¥â஬. =
======= ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 9 - § ¢¥à襭¨¥ à ¡®âë á¨á⥬ë ========
======================================================================
 à ¬¥âàë:
* eax = 18 - ­®¬¥à ä㭪樨
* ebx = 9 - ­®¬¥à ¯®¤ä㭪樨
* ecx = ¯ à ¬¥âà:
* 1 = ­  ¯®á«¥¤­¥¬ è £¥ § ¢¥à襭¨ï à ¡®âë á®åà ­¨âì à ¬¤¨áª ­ 
¤¨áª¥âã, ¯®á«¥ 祣® ¢ë¢¥á⨠¬¥­î ¢ë室  ¨ § ¯à®á¨âì ã
¯®«ì§®¢ â¥«ï ¤ «ì­¥©è¨¥ ¤¥©á⢨ï
* 2 = ¢ëª«îç¨âì ª®¬¯ìîâ¥à
* 3 = ¯¥à¥§ £à㧨âì ª®¬¯ìîâ¥à
* 4 = ¯¥à¥§ ¯ãáâ¨âì ï¤à® ¨§ ä ©«  kernel.mnt ­  à ¬¤¨áª¥
768,12 → 751,6
¢ë§®¢¥, ®­® ¬®¦¥â ¨§¬¥­¨âìáï ¢ ¯®á«¥¤ãîé¨å ¢¥àá¨ïå ï¤à .
* Œ®¦­® ¨á¯®«ì§®¢ âì ¯®¤äã­ªæ¨î 1, çâ®¡ë ­  ¯®á«¥¤­¥¬ è £¥
§ ¢¥à襭¨ï à ¡®âë ¯®«ì§®¢ â¥«ì á ¬ à¥è «, çâ® ¥¬ã ­ã¦­®.
* ¥ ४®¬¥­¤ã¥âáï ¨á¯®«ì§®¢ âì §­ ç¥­¨¥ ecx=1 (çâ®¡ë ­¥ à §¤à ¦ âì
¯®«ì§®¢ â¥«ï ¨§«¨è­¨¬¨ ¢®¯à®á ¬¨); á®åà ­¨âì à ¬¤¨áª ­  ¤¨áª¥âã
¬®¦­® ä㭪樥© 16 (ª®â®à ï ¤®¯ã᪠¥â ãâ®ç­¥­¨¥, ­  ª ªãî ¨¬¥­­®
¤¨áª¥âã ¯¨á âì),   § ¢¥àè¨âì à ¡®âã á ¬¥­î ¢ë室  ¬®¦­® 㦥
㯮¬ï­ã⮩ ¯®¤ä㭪樥© 1.
 
======================================================================
======== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 10 - ᢥà­ãâì ®ª­® ¯à¨«®¦¥­¨ï. =======
======================================================================
/kernel/trunk/docs/sysfuncs.txt
624,20 → 624,6
will return answer "buffer is empty".
 
======================================================================
============ Function 18, subfunction 1 - system shutdown. ===========
======================================================================
Parameters:
* eax = 18 - function number
* ebx = 1 - subfunction number
Returned value:
* function always return eax = 0 as tag of success
Remarks:
* On the last step menu of exit from the system appears and waits
response of the user.
* See also subfunction 9, system shutdown with
the parameter to force the choice in the exit menu.
 
======================================================================
= Function 18, subfunction 2 - terminate process/thread by the slot. =
======================================================================
Parameters:
744,15 → 730,12
* function does not return value
 
======================================================================
== Function 18, subfunction 9 - system shutdown with the parameter. ==
============ Function 18, subfunction 9 - system shutdown. ===========
======================================================================
Parameters:
* eax = 18 - function number
* ebx = 9 - subfunction number
* ecx = parameter:
* 1 = on the last step of shutdown save ramdisk on a floppy and
then show the exit menu and request further operations
from the user
* 2 = turn off computer
* 3 = reboot computer
* 4 = restart the kernel from the file 'kernel.mnt' on ramdisk
765,12 → 748,6
changed in future versions of the kernel.
* It is possible to use subfunction 1, that on the last step
the user makes choice himself.
* It is not recommended to use value ecx=1 (to not irritate the user
with excessive questions); to save ramdisk on a floppy use
function 16 (which admits specification, on which floppy to
write), and to shutdown with the exit menu use already mentioned
subfunction 1.
 
======================================================================
===== Function 18, subfunction 10 - minimize application window. =====
======================================================================
/kernel/trunk/hid/m_ps2.inc
File deleted
Property changes:
Deleted: svn:keywords
-Rev
\ No newline at end of property
/kernel/trunk/kernel.asm
2026,7 → 2026,7
iglobal
align 4
sys_system_table:
dd sysfn_shutdown ; 1 = system shutdown
dd 0 ; 1 = system shutdown
dd sysfn_terminate ; 2 = terminate thread
dd sysfn_activate ; 3 = activate window
dd sysfn_getidletime ; 4 = get idle time
2034,7 → 2034,7
dd sysfn_saveramdisk ; 6 = save ramdisk
dd sysfn_getactive ; 7 = get active window
dd sysfn_sound_flag ; 8 = get/set sound_flag
dd sysfn_shutdown_param ; 9 = shutdown with parameter
dd sysfn_shutdown ; 9 = shutdown with parameter
dd sysfn_minimize ; 10 = minimize window
dd sysfn_getdiskinfo ; 11 = get disk subsystem info
dd sysfn_lastkey ; 12 = get last pressed key
2060,14 → 2060,19
@@:
ret
 
sysfn_shutdown: ; 18.1 = BOOT
mov [BOOT_VAR+0x9030],byte 0
for_shutdown_parameter:
 
sysfn_shutdown: ; 18.9 = system shutdown
cmp ecx,1
jl exit_for_anyone
cmp ecx,4
jg exit_for_anyone
mov [BOOT_VAR+0x9030],cl
 
mov eax,[TASK_COUNT]
mov [SYS_SHUTDOWN],al
mov [shutdown_processes],eax
and dword [esp+32], 0
exit_for_anyone:
ret
uglobal
shutdown_processes: dd 0x0
2179,17 → 2184,8
nosoundflag:
ret
 
sysfn_shutdown_param: ; 18.9 = system shutdown with param
cmp ecx,1
jl exit_for_anyone
cmp ecx,4
jg exit_for_anyone
mov [BOOT_VAR+0x9030],cl
jmp for_shutdown_parameter
 
sysfn_minimize: ; 18.10 = minimize window
mov [window_minimize],1
exit_for_anyone:
ret
 
sysfn_getdiskinfo: ; 18.11 = get disk info table