*Remove unneeded ps2mouse.inc and m_ps2.inc

*Remove 18.1 and 18.9.1 functions (sinse 465 revision they doesn't work), so CPU now use END application for reboot
NOTE: file ROSE.TXT don't used in kernel now and can be deleted from image

*New END application form Leency & Veliant

git-svn-id: svn://kolibrios.org@748 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron 2008-02-19 05:28:11 +00:00
parent e97775cadc
commit b9b45d733a
14 changed files with 62 additions and 596 deletions

View File

@ -71,13 +71,11 @@ temp_3456:
nbw: nbw:
in al,0x60 in al,0x60
call pause_key
cmp al,6 cmp al,6
jae nbw jae nbw
mov bl,al mov bl,al
nbw2: nbw2:
in al,0x60 in al,0x60
call pause_key
cmp al,bl cmp al,bl
je nbw2 je nbw2
cmp al,240 ;ax,240 cmp al,240 ;ax,240
@ -93,13 +91,7 @@ nbw31:
nbw32: nbw32:
dec ax ; 1 = write floppy dec ax
js nbw
jnz no_floppy_write
call floppy_write
jmp temp_3456 ;nbw
no_floppy_write:
dec ax ; 2 = power off dec ax ; 2 = power off
jnz no_apm_off jnz no_apm_off
call APM_PowerOff call APM_PowerOff
@ -113,74 +105,10 @@ no_apm_off:
mov word[0x0072],0x1234 mov word[0x0072],0x1234
jmp 0xF000:0xFFF0 jmp 0xF000:0xFFF0
pause_key:
mov cx,100
pause_key_1:
loop pause_key_1
ret
rdelay: rdelay:
ret 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: APM_PowerOff:
mov ax, 5304h mov ax, 5304h
xor bx, bx xor bx, bx
@ -220,7 +148,6 @@ APM_PowerOff:
mov cx,3 mov cx,3
int 0x15 int 0x15
;!!!!!!!!!!!!!!!!!!!!!!!! ;!!!!!!!!!!!!!!!!!!!!!!!!
fwwritedone:
ret ret
restart_kernel: restart_kernel:

View File

@ -1,141 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision$
MouseSearch_PS2:
jmp MouseSearch_PS2_begin
mouse_error equ MouseSearch_PS2_begin.error
kb_cmd_c:
call kb_cmd
jmp check_kbd
kb_write_c:
call kb_write
jmp check_kbd
kb_read_c:
call kb_read
;jmp check_kbd
check_kbd:
cmp ah, 1
je mouse_error
ret
uglobal
mouse_cmd_byte db 0
mouse_nr_tries db 0
mouse_nr_resends db 0
mouse_error_esp dd 0
endg
mouse_cmd:
mov [mouse_cmd_byte], al
mov [mouse_nr_resends], 5
.resend:
mov bl, 0xd4
call kb_cmd_c
mov al, [mouse_cmd_byte]
call kb_write_c
call mouse_read
cmp al, 0xFA ; ack
jne .noack
ret
.noack:
cmp al, 0xFE ; resend
jne .noresend
dec [mouse_nr_resends]
jnz .resend
.noresend:
jmp mouse_error
mouse_read:
mov [mouse_nr_tries], 100
.repeat:
call kb_read
cmp ah, 1
jne .fin
mov esi, 10
call delay_ms
dec [mouse_nr_tries]
jnz .repeat
jmp mouse_error
.fin:
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MouseSearch_PS2_begin:
pushad
mov [mouse_error_esp], esp
mov bl, 0xAD ; disable keyboard interface
call kb_cmd_c
mov bl, 0xA8 ; enable mouse interface
call kb_cmd_c
mov al, 0xFF ; reset
call mouse_cmd
; now the mouse is in Reset Mode
; get the Basic Assurance Test completion code
call mouse_read
cmp al, 0xAA
jne .error ; dead mouse
; get device ID
call mouse_read
cmp al, 0x00
jne .error ; unknown device
; reset completed successfully
; enable mouse interrupt - IRQ12
mov bl, 0x20 ; read command byte
call kb_cmd_c
call kb_read_c
or al, 10b
push eax
mov bl, 0x60 ; write command byte
call kb_cmd_c
pop eax
call kb_write_c
mov al, 0xF4 ; enable data reporting
call mouse_cmd
mov [ps2_mouse_detected], 1
mov bl, 0xAE ; enable keyboard interface
call kb_cmd
mov esi, boot_setmouse_type
call boot_log
jmp .finish
.error:
mov esp, [mouse_error_esp] ; clear stack frame
mov [ps2_mouse_detected], 0
mov bl, 0xA7 ; disable mouse interface
call kb_cmd
mov bl, 0xAE ; enable keyboard interface
call kb_cmd
.finish:
popad

View File

@ -631,20 +631,6 @@
* <20>ਠ¢ë§®¢¥ í⮩ ä㭪樨 ¯à¨«®¦¥­¨¥¬ á ­¥ ªâ¨¢­ë¬ ®ª­®¬ * <20>ਠ¢ë§®¢¥ í⮩ ä㭪樨 ¯à¨«®¦¥­¨¥¬ á ­¥ ªâ¨¢­ë¬ ®ª­®¬
¢®§¢à é ¥âáï ®â¢¥â "¡ãä¥à ¯ãáâ". ¢®§¢à é ¥âáï ®â¢¥â "¡ãä¥à ¯ãáâ".
======================================================================
======== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 1 - § ¢¥àè¨âì à ¡®âã á¨á⥬ë. ========
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 18 - ­®¬¥à ä㭪樨
* ebx = 1 - ­®¬¥à ¯®¤ä㭪樨
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* ¢á¥£¤  ¢®§¢à é ¥âáï eax = 0 ª ª ¯à¨§­ ª ãᯥå 
‡ ¬¥ç ­¨ï:
* <20>  ¯®á«¥¤­¥¬ è £¥ ¯®ï¢«ï¥âáï ¬¥­î ¢ë室  ¨§ á¨á⥬ë, ®¦¨¤ î饥
ॠªæ¨¨ ¯®«ì§®¢ â¥«ï.
* ‘¬®âਠ⠪¦¥ ¯®¤äã­ªæ¨î 9, § ¢¥à襭¨¥ à ¡®âë á¨á⥬ë á ¯ à ¬¥â஬,
ç⮡ë ä®àá¨à®¢ âì ¢ë¡®à ¢ ¬¥­î ¢ë室 .
====================================================================== ======================================================================
==== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 2 - § ¢¥àè¨âì ¯à®æ¥áá/¯®â®ª ¯® á«®âã. ==== ==== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 2 - § ¢¥àè¨âì ¯à®æ¥áá/¯®â®ª ¯® á«®âã. ====
====================================================================== ======================================================================
@ -748,15 +734,12 @@
* äã­ªæ¨ï ­¥ ¢®§¢à é ¥â §­ ç¥­¨ï * äã­ªæ¨ï ­¥ ¢®§¢à é ¥â §­ ç¥­¨ï
====================================================================== ======================================================================
= ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 9 - § ¢¥à襭¨¥ à ¡®âë á¨á⥬ë á ¯ à ¬¥â஬. = ======= ”γ­<CEB3>ζ¨ο 18, ―®¤δγ­<CEB3>ζ¨ο 9 - § Ά¥ΰθ¥­¨¥ ΰ ΅®βλ α¨α⥬λ ========
====================================================================== ======================================================================
<EFBFBD> à ¬¥âàë: <EFBFBD> à ¬¥âàë:
* eax = 18 - ­®¬¥à ä㭪樨 * eax = 18 - ­®¬¥à ä㭪樨
* ebx = 9 - ­®¬¥à ¯®¤ä㭪樨 * ebx = 9 - ­®¬¥à ¯®¤ä㭪樨
* ecx = ¯ à ¬¥âà: * ecx = ¯ à ¬¥âà:
* 1 = ­  ¯®á«¥¤­¥¬ è £¥ § ¢¥à襭¨ï à ¡®âë á®åà ­¨âì à ¬¤¨áª ­ 
¤¨áª¥âã, ¯®á«¥ 祣® ¢ë¢¥á⨠¬¥­î ¢ë室  ¨ § ¯à®á¨âì ã
¯®«ì§®¢ â¥«ï ¤ «ì­¥©è¨¥ ¤¥©á⢨ï
* 2 = ¢ëª«îç¨âì ª®¬¯ìîâ¥à * 2 = ¢ëª«îç¨âì ª®¬¯ìîâ¥à
* 3 = ¯¥à¥§ £à㧨âì ª®¬¯ìîâ¥à * 3 = ¯¥à¥§ £à㧨âì ª®¬¯ìîâ¥à
* 4 = ¯¥à¥§ ¯ãáâ¨âì ï¤à® ¨§ ä ©«  kernel.mnt ­  à ¬¤¨áª¥ * 4 = ¯¥à¥§ ¯ãáâ¨âì ï¤à® ¨§ ä ©«  kernel.mnt ­  à ¬¤¨áª¥
@ -768,12 +751,6 @@
¢ë§®¢¥, ®­® ¬®¦¥â ¨§¬¥­¨âìáï ¢ ¯®á«¥¤ãîé¨å ¢¥àá¨ïå ï¤à . ¢ë§®¢¥, ®­® ¬®¦¥â ¨§¬¥­¨âìáï ¢ ¯®á«¥¤ãîé¨å ¢¥àá¨ïå ï¤à .
* Œ®¦­® ¨á¯®«ì§®¢ âì ¯®¤äã­ªæ¨î 1, çâ®¡ë ­  ¯®á«¥¤­¥¬ è £¥ * Œ®¦­® ¨á¯®«ì§®¢ âì ¯®¤äã­ªæ¨î 1, çâ®¡ë ­  ¯®á«¥¤­¥¬ è £¥
§ ¢¥à襭¨ï à ¡®âë ¯®«ì§®¢ â¥«ì á ¬ à¥è «, çâ® ¥¬ã ­ã¦­®. § ¢¥à襭¨ï à ¡®âë ¯®«ì§®¢ â¥«ì á ¬ à¥è «, çâ® ¥¬ã ­ã¦­®.
* <20>¥ ४®¬¥­¤ã¥âáï ¨á¯®«ì§®¢ âì §­ ç¥­¨¥ ecx=1 (çâ®¡ë ­¥ à §¤à ¦ âì
¯®«ì§®¢ â¥«ï ¨§«¨è­¨¬¨ ¢®¯à®á ¬¨); á®åà ­¨âì à ¬¤¨áª ­  ¤¨áª¥âã
¬®¦­® ä㭪樥© 16 (ª®â®à ï ¤®¯ã᪠¥â ãâ®ç­¥­¨¥, ­  ª ªãî ¨¬¥­­®
¤¨áª¥âã ¯¨á âì),   § ¢¥àè¨âì à ¡®âã á ¬¥­î ¢ë室  ¬®¦­® 㦥
㯮¬ï­ã⮩ ¯®¤ä㭪樥© 1.
====================================================================== ======================================================================
======== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 10 - ᢥà­ãâì ®ª­® ¯à¨«®¦¥­¨ï. ======= ======== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 10 - ᢥà­ãâì ®ª­® ¯à¨«®¦¥­¨ï. =======
====================================================================== ======================================================================

View File

@ -623,20 +623,6 @@ Remarks:
* The call of this function by an application with inactive window * The call of this function by an application with inactive window
will return answer "buffer is empty". 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. = = Function 18, subfunction 2 - terminate process/thread by the slot. =
====================================================================== ======================================================================
@ -744,15 +730,12 @@ Returned value:
* function does not return value * function does not return value
====================================================================== ======================================================================
== Function 18, subfunction 9 - system shutdown with the parameter. == ============ Function 18, subfunction 9 - system shutdown. ===========
====================================================================== ======================================================================
Parameters: Parameters:
* eax = 18 - function number * eax = 18 - function number
* ebx = 9 - subfunction number * ebx = 9 - subfunction number
* ecx = parameter: * 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 * 2 = turn off computer
* 3 = reboot computer * 3 = reboot computer
* 4 = restart the kernel from the file 'kernel.mnt' on ramdisk * 4 = restart the kernel from the file 'kernel.mnt' on ramdisk
@ -765,12 +748,6 @@ Remarks:
changed in future versions of the kernel. changed in future versions of the kernel.
* It is possible to use subfunction 1, that on the last step * It is possible to use subfunction 1, that on the last step
the user makes choice himself. 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. ===== ===== Function 18, subfunction 10 - minimize application window. =====
====================================================================== ======================================================================

View File

@ -1,176 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision$
; Номер принимаемого от мыши байта
MouseByteNumber_2 DB 0
; Трехбайтовая структура данных, передаваемая мышью
FirstByte_2 DB 0
SecondByte_2 DB 0
ThirdByte_2 DB 0
timer_ticks_ps2 dd 0
;**************************************
;* ОБРАБОТЧИК ПРЕРЫВАНИЯ ОТ МЫШИ PS/2 *
;**************************************
check_mouse_data_ps2:
cmp [ps2_mouse_detected],0
je @@EndMouseInterrupt_2
call Wait8042BufferEmpty ;очистка буфера
in AL,0x60 ;получить скэн-код
; Выбирать порядковый номер принимаемого байта
cmp [MouseByteNumber_2],0
je @@SaveFirstByte
cmp [MouseByteNumber_2],1
je @@SaveSecondByte
cmp [MouseByteNumber_2],2
je @@SaveThirdByte
jmp @@Error_2
; Записать первый байт посылки
@@SaveFirstByte:
test AL,1000b ;первый байт посылки?
jz @@Error_2 ;сбой синхронизации
mov [FirstByte_2],AL
inc [MouseByteNumber_2]
jmp @@EndMouseInterrupt_2
; Записать второй байт посылки
@@SaveSecondByte:
mov [SecondByte_2],AL
inc [MouseByteNumber_2]
jmp @@EndMouseInterrupt_2
; Записать третий байт посылки
@@SaveThirdByte:
mov [ThirdByte_2],AL
mov [MouseByteNumber_2],0
; (пакет данных от мыши принят полностью)
; Записать новое значение байта состояния кнопок
mov al,[FirstByte_2] ;[0xfb01]
and eax,3
mov [BTN_DOWN],al
mov [mouse_active],1
; Вычислить новую X-координату курсора
; Занести в AX перемещение по X
mov AH,0 ;дублируем знак во все разряды AH
mov AL,[FirstByte_2]
test AL,10000b
jz @@M0
mov AH,0FFh
; Занести в AL младший байт
@@M0:
mov AL,[SecondByte_2]
call mouse_acceleration_ps2
; Вычислить новое значение координаты
; курсора по X
add AX,[MOUSE_X] ;[XCoordinate]
jns @@M1
xor eax, eax
jmp @@M2
@@M1:
cmp AX,[ScreenWidth] ;ScreenLength
jl @@M2
mov AX,[ScreenWidth] ;ScreenLength-1
@@M2:
mov [MOUSE_X],AX ;[XCoordinate]
; Вычисляем новую Y-координату курсора
; Занести в AX перемещение по Y
mov AH,0 ;дублируем знак во все разряды AH
mov AL,[FirstByte_2]
test AL,100000b
jz @@M3
mov AH,0FFh
; Занести в AL младший байт
@@M3:
mov AL,[ThirdByte_2]
call mouse_acceleration_ps2
; Вычислить новое значение координаты курсора
; по Y (Y-координата мыши PS/2 направлена
; противоположно экранной)
neg AX
add AX,[MOUSE_Y] ;[YCoordinate]
jns @@M4
xor eax, eax
jmp @@M5
@@M4:
cmp AX,[ScreenHeight] ;ScreenHeigth
jl @@M5
mov AX,[ScreenHeight] ;ScreenHeigth-1
@@M5:
mov [MOUSE_Y],AX ;[YCoordinate]
; Показать курсор в новой позиции
mov eax,[timer_ticks]
mov [timer_ticks_ps2],eax
jmp @@EndMouseInterrupt_2
; Обнаружен сбой в порядке передачи информации от мыши
@@Error_2:
mov [MouseByteNumber_2],0
; Нормальное завершение прерывани
@@EndMouseInterrupt_2:
call ready_for_next_irq_1
ret
mouse_acceleration_ps2:
push eax
mov eax,[timer_ticks]
sub eax,[timer_ticks_ps2]
cmp eax,[mouse_delay]
pop eax
ja @f
imul ax,[mouse_speed_factor]
@@:
ret
;***********************************************
;* ОЖИДАНИЕ ОЧИСТКИ ВХОДНОГО БУФЕРА I8042 *
;* При выходе из процедуры: *
;* флаг ZF установлен - нормальное завершение, *
;* флаг ZF сброшен - ошибка тайм-аута. *
;***********************************************
Wait8042BufferEmpty:
; push CX
; mov CX,0FFFFh ;задать число циклов ожидани
;@@kb:
; in AL,64h ;получить статус
; test AL,10b ;буфер i8042 свободен?
; loopnz @@kb ;если нет, то цикл
; pop CX
push ecx
xor ecx,ecx
@@:
in al,64h
test al,00000010b
loopnz @b
pop ecx
;Если при выходе из подпрограммы сброшен
;флаг ZF - ошибка
ret ;возврат в подпрограмму
;***************************************
;* ОЖИДАНИЕ ПОСТУПЛЕНИЯ ДАННЫХ ОТ МЫШИ *
;***************************************
WaitMouseData:
; push CX
; mov CX,0FFFFh ;задать число циклов ожидани
;@@mouse:
; in AL,64h ;опросить регистр статуса
; test AL,100000b ;данные поступили?
; loopz @@mouse ;если нет, то цикл
; pop CX
push ecx
mov ECX,0FFFFh
@@:
in al,64h
test al,100000b
loopz @b
pop ecx
;Если при выходе из подпрограммы установлен
;флаг ZF - ошибка
ret

View File

@ -2026,7 +2026,7 @@ sys_end:
iglobal iglobal
align 4 align 4
sys_system_table: sys_system_table:
dd sysfn_shutdown ; 1 = system shutdown dd 0 ; 1 = system shutdown
dd sysfn_terminate ; 2 = terminate thread dd sysfn_terminate ; 2 = terminate thread
dd sysfn_activate ; 3 = activate window dd sysfn_activate ; 3 = activate window
dd sysfn_getidletime ; 4 = get idle time dd sysfn_getidletime ; 4 = get idle time
@ -2034,7 +2034,7 @@ sys_system_table:
dd sysfn_saveramdisk ; 6 = save ramdisk dd sysfn_saveramdisk ; 6 = save ramdisk
dd sysfn_getactive ; 7 = get active window dd sysfn_getactive ; 7 = get active window
dd sysfn_sound_flag ; 8 = get/set sound_flag 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_minimize ; 10 = minimize window
dd sysfn_getdiskinfo ; 11 = get disk subsystem info dd sysfn_getdiskinfo ; 11 = get disk subsystem info
dd sysfn_lastkey ; 12 = get last pressed key dd sysfn_lastkey ; 12 = get last pressed key
@ -2060,14 +2060,19 @@ sys_system:
@@: @@:
ret ret
sysfn_shutdown: ; 18.1 = BOOT
mov [BOOT_VAR+0x9030],byte 0 sysfn_shutdown: ; 18.9 = system shutdown
for_shutdown_parameter: cmp ecx,1
jl exit_for_anyone
cmp ecx,4
jg exit_for_anyone
mov [BOOT_VAR+0x9030],cl
mov eax,[TASK_COUNT] mov eax,[TASK_COUNT]
mov [SYS_SHUTDOWN],al mov [SYS_SHUTDOWN],al
mov [shutdown_processes],eax mov [shutdown_processes],eax
and dword [esp+32], 0 and dword [esp+32], 0
exit_for_anyone:
ret ret
uglobal uglobal
shutdown_processes: dd 0x0 shutdown_processes: dd 0x0
@ -2179,17 +2184,8 @@ sysfn_sound_flag: ; 18.8 = get/set sound_flag
nosoundflag: nosoundflag:
ret 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 sysfn_minimize: ; 18.10 = minimize window
mov [window_minimize],1 mov [window_minimize],1
exit_for_anyone:
ret ret
sysfn_getdiskinfo: ; 18.11 = get disk info table sysfn_getdiskinfo: ; 18.11 = get disk info table

View File

@ -120,8 +120,8 @@ still_end:
jmp still_end jmp still_end
reboot: reboot:
mov eax,18 mov eax,70
mov ebx,1 mov ebx,sys_reboot
int 0x40 int 0x40
;close program if we going to reboot ;close program if we going to reboot
@ -582,6 +582,14 @@ file_start: dd 7
start_application: db '/sys/LAUNCHER',0 start_application: db '/sys/LAUNCHER',0
times 60 db 32 times 60 db 32
sys_reboot:
dd 7
dd 0
dd 0
dd 0
dd 0
db '/sys/end',0
if lang eq de if lang eq de
text: text:
db ' NAME/BEENDEN PID CPU-LAST % ' db ' NAME/BEENDEN PID CPU-LAST % '

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
@fasm end.asm end
@kpack end
@pause

View File

@ -1,5 +0,0 @@
@erase lang.inc
@echo lang fix en >lang.inc
@fasm end.asm end
@erase lang.inc
@pause

View File

@ -1,5 +0,0 @@
@erase lang.inc
@echo lang fix et >lang.inc
@fasm end.asm end
@erase lang.inc
@pause

View File

@ -1,5 +0,0 @@
@erase lang.inc
@echo lang fix ge >lang.inc
@fasm end.asm end
@erase lang.inc
@pause

View File

@ -1,5 +0,0 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm end.asm end
@erase lang.inc
@pause

View File

@ -4,95 +4,56 @@
; <diamond> note that 'mov al,xx' is shorter than 'mov eax,xx' ; <diamond> note that 'mov al,xx' is shorter than 'mov eax,xx'
; and if we know that high 24 bits of eax are zero, we can use 1st form ; and if we know that high 24 bits of eax are zero, we can use 1st form
; the same about ebx,ecx,edx ; the same about ebx,ecx,edx
;
; 15.02.2007 merge old END with new one (fron Veliant & Leency) by Heavyiron
include "lang.inc"
include "..\..\..\macros.inc" include "..\..\..\macros.inc"
meos_app_start meos_app_start
code code
do_draw: draw:
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
mov al,12 ; eax=12 - tell os about redraw start mov al,12 ; eax=12 - tell os about redraw start
mov bl,1 mov ebx,1
mcall mcall
mov al,14 ; eax=14 - get screen max x & max y mov al,14 ; eax=14 - get screen max x & max y
mcall mcall
movzx ecx,ax movzx ecx, ax
shr eax, 16
shr eax,17 shr ecx, 1
shl eax,16 shr eax, 1
lea ebx,[eax-110*10000h+220] sub eax, 157
sub ecx, 100
shr ecx,1 mov ebx, eax
shl ecx,16 shl ebx, 16
sub ecx,50*10000h - 120 add ebx, 253
shl ecx, 16
add ecx, 154
xor eax,eax ; define and draw window xor eax,eax ; define and draw window
mov edx,[sc.work] mov edx,0x41ffffff
mov esi,edx
mov edi,edx
mcall mcall
mov edx,0x444444 mov al, 7
mov al,13 mov ebx, background
mcall ,18 shl 16+90,29 shl 16+27 mov ecx, 254 shl 16 + 155
push ebx xor edx, edx
mcall ,121 shl 16+90
xchg ebx,[esp]
mcall ,,63 shl 16+27
pop ebx
mcall mcall
mcall ,179 shl 16+30,99 shl 16+15
xor edx,edx
mov al,8 mov al,8
mcall ,58 shl 16 + 32,59 shl 16 + 34, 1 shl 30 + 1
inc edx inc edx
mcall ,15 shl 16+87,26 shl 16+24,,0xbb0055 mcall ,110 shl 16 + 32,54 shl 16 + 32
inc edx inc edx
mcall ,118 shl 16+87,,,0xaaaa ;cccc mcall ,161 shl 16 + 32,59 shl 16 + 34
inc edx inc edx
mcall ,15 shl 16+87,60 shl 16+24,,0x9900 mcall ,193 shl 16 + 43,125 shl 16 + 16,
inc edx inc edx
mcall ,118 shl 16+87,,,0xaaaaaa ;cccccc mcall ,144 shl 16 + 43
inc edx
mcall ,175 shl 16+30,95 shl 16+15,,[sc.work_button]
mov al,4 ; 0x00000004 = write text
mov ebx,75*65536+10
mov ecx,[sc.work_text] ; 8b window nro - RR GG BB color
or ecx,0x90000000
mov edx,label1 ; pointer to text beginning
mcall
mov ebx,15*65536+101
mov edx,label4
mcall
mov ecx,0x90eeeeee ; 8b window nro - RR GG BB color
mov ebx,25*65536+30
mov edx,label2 ; pointer to text beginning
mcall
mov ebx,20*65536+64
mov edx,label3
mcall
mov ebx,45*65536+41
mov edx,label5
mcall
mov ebx,40*65536+75
mov edx,label6
mcall
mov al,12 ;end of redraw mov al,12 ;end of redraw
mov ebx,2 mov ebx,2
@ -104,7 +65,7 @@ still:
mcall mcall
dec eax dec eax
jz do_draw jz draw
dec eax dec eax
jnz button jnz button
key: key:
@ -126,10 +87,10 @@ still:
mcall mcall
xchg al,ah xchg al,ah
dec eax dec eax
jz power_off
dec eax
jz restart_kernel jz restart_kernel
dec eax dec eax
jz power_off
dec eax
jz restart jz restart
dec eax dec eax
jnz run_rdsave jnz run_rdsave
@ -162,53 +123,7 @@ run_rdsave:
jmp still jmp still
data data
background file 'back.raw'
if lang eq ru
label1:
db '‚ è ¢ë¡®à:',0
label2:
db '‚몫îç¨âì Ÿ¤à®',0
label3:
db '<27>¥à¥§ ¯ã᪠Žâ¬¥­ ',0
label4:
db '‘®åà ­¨âì ­ áâனª¨',0
else if lang eq en
label1:
db ' SELECT:',0
label2:
db 'POWER OFF KERNEL',0
label3:
db ' RESTART CANCEL',0
label4:
db 'Save settings',0
else if lang eq et
label1:
db ' VALI:',0
label2:
db 'LÜLITA VÄLJA KERNEL',0
label3:
db ' RESTART TÜHISTA',0
label4:
db 'Save settings',0
else
label1:
db 'WAEHLEN:',0
label2:
db ' BEENDEN KERNEL',0
label3:
db ' NEUSTART ABBRECHEN',0
label4:
db 'Save settings',0
end if
label5:
db '(End) (Home)',0
label6:
db '(Enter) (Esc)',0
rdsave: rdsave:
dd 7 dd 7
dd 0 dd 0
@ -217,6 +132,5 @@ rdsave:
dd 0 dd 0
db '/sys/rdsave',0 db '/sys/rdsave',0
udata udata
sc system_colors
meos_app_end meos_app_end