mousecfg: load COM-mouse driver option

piano: upload to SVN
minimp3: reupload to SVN and add it to ISO



git-svn-id: svn://kolibrios.org@7646 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2019-05-06 08:47:59 +00:00
parent dbf745a885
commit 8a0107ea33
6 changed files with 1018 additions and 22 deletions

View File

@ -239,6 +239,7 @@ extra_files = {
{"kolibrios/lib/i915_dri.drv", "common/lib/i915_dri.drv"}, {"kolibrios/lib/i915_dri.drv", "common/lib/i915_dri.drv"},
{"kolibrios/media/fplay", "common/media/fplay"}, {"kolibrios/media/fplay", "common/media/fplay"},
{"kolibrios/media/fplay_run", "common/media/fplay_run"}, {"kolibrios/media/fplay_run", "common/media/fplay_run"},
{"kolibrios/media/minimp3", "common/media/minimp3"},
{"kolibrios/media/updf", "common/media/updf"}, {"kolibrios/media/updf", "common/media/updf"},
{"kolibrios/media/vttf", "common/media/vttf"}, {"kolibrios/media/vttf", "common/media/vttf"},
{"kolibrios/media/zsea/zsea.ini", PROGS .. "/media/zsea/zSea.ini"}, {"kolibrios/media/zsea/zsea.ini", PROGS .. "/media/zsea/zSea.ini"},

BIN
data/common/media/minimp3 Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
// Mouse Configuration Utility ver 1.61 // Mouse Configuration Utility ver 1.62
#ifndef AUTOBUILD #ifndef AUTOBUILD
#include "lang.h--" #include "lang.h--"
@ -25,6 +25,9 @@
?define DOUBLE_CLICK_TEXT "‡ ¤¥à¦ª  ¤¢®©­®£® ª«¨ª  ¬ëèìî" ?define DOUBLE_CLICK_TEXT "‡ ¤¥à¦ª  ¤¢®©­®£® ª«¨ª  ¬ëèìî"
?define MOUSE_EMULATION "“¯à ¢«¥­¨¥ 㪠§ â¥«¥¬ ¬ëè¨ ç¥à¥§ ª« ¢¨ âãàã" ?define MOUSE_EMULATION "“¯à ¢«¥­¨¥ 㪠§ â¥«¥¬ ¬ëè¨ ç¥à¥§ ª« ¢¨ âãàã"
?define MADMOUSE "‘ª¢®§­ë¥ ¤«ï ªãàá®à  áâ®à®­ë íªà ­ " ?define MADMOUSE "‘ª¢®§­ë¥ ¤«ï ªãàá®à  áâ®à®­ë íªà ­ "
?define COMMOUSE "‡ £à㧨âì ¤à ©¢¥à ¬ëè¨ ¤«ï COM-¯®àâ  (F10)"
?define COMMOUSE_LOADED "'„à ©¢¥à ¤«ï COM ¬ëè¨ ¡ë« § £à㦥­' -O"
?define COMMOUSE_CAN_NOT_UNLOAD "'Žáâ ­®¢ª  ¤à ©¢¥à  ­¥¢®§¬®¦­ ' -W"
#else #else
?define WINDOW_TITLE "Mouse testing and configuration" ?define WINDOW_TITLE "Mouse testing and configuration"
?define CHECK_MOUSE_1 "Click on this area to" ?define CHECK_MOUSE_1 "Click on this area to"
@ -34,16 +37,22 @@
?define DOUBLE_CLICK_TEXT "Mouse double click delay" ?define DOUBLE_CLICK_TEXT "Mouse double click delay"
?define MOUSE_EMULATION "Enable mouse emulation using keyboard NumPad" ?define MOUSE_EMULATION "Enable mouse emulation using keyboard NumPad"
?define MADMOUSE "Through screen sides for pointer" ?define MADMOUSE "Through screen sides for pointer"
?define COMMOUSE "Load mouse driver for COM-port (F10)"
?define COMMOUSE_LOADED "'Driver for COM mouse loaded' -O"
?define COMMOUSE_CAN_NOT_UNLOAD "'Driver stop is impossible' -W"
#endif #endif
:block mouse_frame = { 18, 18, NULL, 130 }; #define FRAME_X 18
#define FRAME_Y 18
:block mouse_frame = { FRAME_X, FRAME_Y, NULL, 130 };
:more_less_box pointer_speed = { NULL, 0, 64, POINTER_SPEED }; :more_less_box pointer_speed = { NULL, 0, 64, POINTER_SPEED };
:more_less_box acceleration = { NULL, 0, 64, ACCELERATION_TEXT }; :more_less_box acceleration = { NULL, 0, 64, ACCELERATION_TEXT };
:more_less_box double_click_delay = { NULL, 0, 999, DOUBLE_CLICK_TEXT, 8 }; :more_less_box double_click_delay = { NULL, 0, 999, DOUBLE_CLICK_TEXT, 8 };
:checkbox emulation = { MOUSE_EMULATION, NULL }; :checkbox emulation = { MOUSE_EMULATION, NULL };
:checkbox madmouse = { MADMOUSE, NULL }; :checkbox madmouse = { MADMOUSE, NULL };
:checkbox com_mouse = { COMMOUSE, NULL };
_ini ini = { "/sys/settings/system.ini", "mouse" }; _ini ini = { "/sys/settings/system.ini", "loaded drivers" };
void main() { void main() {
proc_info Form; proc_info Form;
@ -70,33 +79,37 @@ void main() {
else IF (pointer_speed.click(id)) ApplyCfg(); else IF (pointer_speed.click(id)) ApplyCfg();
else IF (acceleration.click(id)) ApplyCfg(); else IF (acceleration.click(id)) ApplyCfg();
else IF (double_click_delay.click(id)) ApplyCfg(); else IF (double_click_delay.click(id)) ApplyCfg();
ELSE IF (emulation.click(id)) { else IF (emulation.click(id)) {
IF (emulation.checked == true) RunProgram("/sys/mousemul", 0); IF (emulation.checked == true) RunProgram("/sys/mousemul", 0);
ELSE KillProcessByName("mousemul", SINGLE); ELSE KillProcessByName("mousemul", SINGLE);
break; break;
} }
ELSE IF (madmouse.click(id)) { else IF (madmouse.click(id)) {
IF (madmouse.checked == true) RunProgram("/sys/madmouse", 0); IF (madmouse.checked == true) RunProgram("/sys/madmouse", 0);
ELSE KillProcessByName("madmouse", SINGLE); ELSE KillProcessByName("madmouse", SINGLE);
break; break;
} }
else IF (id == com_mouse.id) {
EventClickComMouse();
}
break; break;
case evKey: case evKey:
GetKeys(); GetKeys();
IF (key_scancode == SCAN_CODE_ESC) ExitApp(); IF (key_scancode == SCAN_CODE_ESC) ExitApp();
IF (key_scancode == SCAN_CODE_F10) EventClickComMouse();
break; break;
case evReDraw: case evReDraw:
system.color.get(); system.color.get();
DefineAndDrawWindow(430, 150, 424, 313+skin_height,0x34,system.color.work,WINDOW_TITLE,0); DefineAndDrawWindow(430, 150, 424, 343+skin_height,0x34,system.color.work,WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
mouse_frame.w = - mouse_frame.x * 2 + Form.cwidth; mouse_frame.w = - FRAME_X * 2 + Form.cwidth;
DefineButton(mouse_frame.x, mouse_frame.y, mouse_frame.w, DefineButton(FRAME_X, FRAME_Y, mouse_frame.w,
mouse_frame.h, 99+BT_NOFRAME, 0xF0F2F3); //needed to handle mouse_up and refresh mouse image mouse_frame.h, 99+BT_NOFRAME, 0xF0F2F3); //needed to handle mouse_up and refresh mouse image
WriteText(mouse_frame.x + 110, mouse_frame.y + 25, 0x90, 0x2C343C, CHECK_MOUSE_1); WriteText(FRAME_X + 110, FRAME_Y + 25, 0x90, 0x2C343C, CHECK_MOUSE_1);
WriteText(mouse_frame.x + 110, mouse_frame.y + 45, 0x90, 0x2C343C, CHECK_MOUSE_2); WriteText(FRAME_X + 110, FRAME_Y + 45, 0x90, 0x2C343C, CHECK_MOUSE_2);
DrawMouseImage(0,0,0,0); DrawMouseImage(0,0,0,0);
DrawControls(); DrawControls();
} }
@ -132,26 +145,26 @@ void DrawMouseImage(dword l,r,m,v) {
void DrawControls() { void DrawControls() {
incn y; incn y;
y.n = mouse_frame.y+115; y.n = FRAME_Y+115;
pointer_speed.draw(mouse_frame.x, y.inc(30)); pointer_speed.draw(FRAME_X, y.inc(30));
acceleration.draw(mouse_frame.x, y.inc(30)); acceleration.draw(FRAME_X, y.inc(30));
double_click_delay.draw(mouse_frame.x, y.inc(30)); double_click_delay.draw(FRAME_X, y.inc(30));
emulation.draw(mouse_frame.x, y.inc(33)); emulation.draw(FRAME_X, y.inc(33));
madmouse.draw(mouse_frame.x, y.inc(27)); madmouse.draw(FRAME_X, y.inc(27));
com_mouse.draw(FRAME_X, y.inc(27));
} }
void LoadCfg() { void LoadCfg() {
acceleration.value = ini.GetInt("acceleration", GetMouseAcceleration()); acceleration.value = GetMouseAcceleration();
pointer_speed.value = ini.GetInt("speed", GetMouseSpeed()); pointer_speed.value = GetMouseSpeed();
double_click_delay.value = ini.GetInt("double_click_delay", GetMouseDoubleClickDelay()); double_click_delay.value = GetMouseDoubleClickDelay();
com_mouse.checked = ini.GetInt("com_mouse", 0);
madmouse.checked = CheckProcessExists("MADMOUSE"); madmouse.checked = CheckProcessExists("MADMOUSE");
emulation.checked = CheckProcessExists("MOUSEMUL"); emulation.checked = CheckProcessExists("MOUSEMUL");
} }
void ExitApp() { void ExitApp() {
ini.SetInt("acceleration", acceleration.value); ini.SetInt("com_mouse", com_mouse.checked);
ini.SetInt("speed", pointer_speed.value);
ini.SetInt("double_click_delay", double_click_delay.value);
ExitProcess(); ExitProcess();
} }
@ -161,4 +174,22 @@ void ApplyCfg() {
SetMouseDoubleClickDelay(double_click_delay.value); SetMouseDoubleClickDelay(double_click_delay.value);
} }
void EventClickComMouse()
{
if (!com_mouse.checked)
{
if (RunProgram("/sys/loaddrv", "COMMOUSE")>=0) {
notify(COMMOUSE_LOADED);
com_mouse.click(com_mouse.id);
}
else {
notify("'Error running LOADDRV' -E");
}
}
else
{
notify(COMMOUSE_CAN_NOT_UNLOAD);
}
}
stop: stop:

View File

@ -0,0 +1,2 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("piano.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "piano")

View File

@ -0,0 +1,3 @@
@fasm.exe piano.asm piano
pause

View File

@ -0,0 +1,959 @@
; <20>à®á⮩ ¯à¨¬¥à ¯à®£à ¬¬ë ¤«ï KolibriOS
; ®§¢ã稢 ¥â ª®¤ ­ ¦ â®© ª« ¢¨è¨
;
; Š®¬¯¨«¨à®¢ âì FASM'®¬
; Œ®¦­® ®âªàëâì example.asm ç¥à¥§ ¯à®£à ¬¬ã FASM (¥ñ ïà«ëª ¥áâì
; ­  à ¡®ç¥¬ á⮫¥)
; € ¬®¦­® ¯à®áâ® ­ ¦ âì F9 ¢ Tinypad'¥. ‹®£ ª®¬¯¨«ï樨
; ®â®¡à ¦ ¥âáï ­  ¤®áª¥ ®â« ¤ª¨ (¯à®£à ¬¬  BOARD)
;
; —â® ¢ ¦­® §­ âì ¯à¨ ¯à®£à ¬¬¨à®¢ ­¨¨ ¯®¤ Š®«¨¡à¨:
; <20>®¬¥à ä㭪樨 ¯®¬¥é ¥âáï ¢ ॣ¨áâà eax.
; ‚맮¢ á¨á⥬­®© ä㭪樨 ®áãé¥á⢫ï¥âáï ª®¬ ­¤®© "int 0x40".
; ‚ᥠॣ¨áâàë, ªà®¬¥ ® 㪠§ ­­ëå ¢ ¢®§¢à é ¥¬®¬ §­ ç¥­¨¨,
; ¢ª«îç ï ॣ¨áâà ä« £®¢ eflags, á®åà ­ïîâáï.
;
; <20>ਬ¥à:
; mov eax, 1 ;”ã­ªæ¨ï 1 - ¯®áâ ¢¨âì â®çªã ¢ ®ª­¥
; ;ᯨ᮪ á¨áä㭪権 á¬. ¢ DOCPACK - sysfuncr.txt
; mov ebx, 10 ; ª®®à¤¨­ â  x=10
; mov ecx, 20 ; ª®®à¤¨­ â  y=10
; mov edx, 0xFFFfff ;梥â â®çª¨
; int 0x40 ;¢ë§¢ âì äã­ªæ¨î
;
; ’®¦¥ á ¬®¥ á ¨á¯®«ì§®¢ ­¨¥¬ ¬ ªà®á :
; mcall 1, 10, 20, 0xFFFfff
;---------------------------------------------------------------------
use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
org 0 ;  ¤à¥á æ¨ï á ­ã«ï
db 'MENUET01' ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
dd 1 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
dd START ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
dd I_END ; à §¬¥à ¯à®£à ¬¬ë
dd MEM ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd STACKTOP ;  ¤à¥á ¢¥à設ë áâíª 
dd 0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢
dd 0 ; § à¥§¥à¢¨à®¢ ­®
include "../../macros.inc" ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢!
;---------------------------------------------------------------------
;--- <20>€—€Ž <20><>Žƒ<C5BD>€ŒŒ ----------------------------------------------
;---------------------------------------------------------------------
START:
red: ; ¯¥à¥à¨á®¢ âì ®ª­®
call draw_window ; ¢ë§ë¢ ¥¬ ¯à®æ¥¤ãàã ®âà¨á®¢ª¨ ®ª­ 
;---------------------------------------------------------------------
;--- –ˆŠ‹ Ž<><C5BD><EFBFBD>ŽŠˆ Ž<E28098>ˆ‰ ----------------------------------------
;---------------------------------------------------------------------
still:
;mcall 10 ; äã­ªæ¨ï 10 - ¦¤ âì ᮡëâ¨ï
mov eax, 10
int 0x40
cmp eax,2 ; ­ ¦ â  ª« ¢¨è  ?
je key ; ¥á«¨ ¤  - ­  key
cmp eax,3 ; ­ ¦ â  ª­®¯ª  ?
je button ; ¥á«¨ ¤  - ­  button
cmp eax,1 ; ¯¥à¥à¨á®¢ âì ®ª­® ?
je red ; ¥á«¨ ¤  - ­  ¬¥âªã red
jmp still ; ¥á«¨ ¤à㣮¥ ᮡë⨥ - ¢ ­ ç «® 横« 
;---------------------------------------------------------------------
key: ; ­ ¦ â  ª« ¢¨è  ­  ª« ¢¨ âãà¥
mcall 2 ; äã­ªæ¨ï 2 - áç¨â âì ª®¤ ᨬ¢®«  (¢ ah)
cmp ah, 0x41 ; A - if Caps Lock ON
jnz @f
jmp _07
@@:
cmp ah, 0x5a ; Z
jnz @f
jmp _08
@@:
cmp ah, 0x53 ; S
jnz @f
jmp _09
@@:
cmp ah, 0x58 ; X
jnz @f
jmp _0a
@@:
cmp ah, 0x44 ; D
jnz @f
jmp _0b
@@:
cmp ah, 0x43 ; C
jnz @f
jmp _0c
@@:
cmp ah, 0x56 ; V
jnz @f
_01:
mov ah, 0x01
jmp p
@@:
cmp ah, 0x47 ; G
jnz @f
_02:
mov ah, 0x02
jmp p
@@:
cmp ah, 0x42 ; B
jnz @f
_03:
mov ah, 0x03
jmp p
@@:
cmp ah, 0x48 ; H
jnz @f
_04:
mov ah, 0x04
jmp p
@@:
cmp ah, 0x4e ; N
jnz @f
_05:
mov ah, 0x05
jmp p
@@:
cmp ah, 0x4d ; M
jnz @f
_06:
mov ah, 0x06
jmp p
@@:
cmp ah, 0x4b ; K
jnz @f
_07:
mov ah, 0x07
jmp p
@@:
cmp ah, 0x3c ; <
jnz @f
_08:
mov ah, 0x08
jmp p
@@:
cmp ah, 0x4c ; L
jnz @f
_09:
mov ah, 0x09
jmp p
@@:
cmp ah, 0x3e ; >
jnz @f
_0a:
mov ah, 0x0a
jmp p
@@:
cmp ah, 0x3a ; :
jnz @f
_0b:
mov ah, 0x0b
jmp p
@@:
cmp ah, 0x3f ; ?
jnz @f
_0c:
mov ah, 0x0c
jmp p
@@:
cmp ah, 0x22 ; "
jnz @f
jmp _11
@@:
cmp ah, 0x21 ; key !-------
jnz @f
jmp _0c
@@:
cmp ah, 0x51 ; key Q
jnz @f
_11:
mov ah, 0x11
jmp p
@@:
cmp ah, 0x40 ; key @
jnz @f
_12:
mov ah, 0x12
jmp p
@@:
cmp ah, 0x57 ; key W
jnz @f
_13:
mov ah, 0x13
jmp p
@@:
cmp ah, 0x23 ; key #
jnz @f
_14:
mov ah, 0x14
jmp p
@@:
cmp ah, 0x45 ; key E
jnz @f
_15:
mov ah, 0x15
jmp p
@@:
cmp ah, 0x52 ; key R
jnz @f
_16:
mov ah, 0x16
jmp p
@@:
cmp ah, 0x25 ; key %
jnz @f
jmp _17
@@:
cmp ah, 0x54 ; key T
jnz @f
jmp _18
@@:
cmp ah, 0x5e ; key ^
jnz @f
jmp _19
@@:
cmp ah, 0x59 ; key Y
jnz @f
jmp _1a
@@:
cmp ah, 0x26 ; key &
jnz @f
jmp _1b
@@:
cmp ah, 0x55 ; key U
jnz @f
jmp _1c
@@:
cmp ah, 0x49 ; key I
jnz @f
jmp _21
@@:
cmp ah, 0x28 ; key (
jnz @f
jmp _22
@@:
cmp ah, 0x4f ; key O
jnz @f
jmp _23
@@:
cmp ah, 0x29 ; key )
jnz @f
jmp _24
@@:
cmp ah, 0x50 ; key P
jnz @f
jmp _25
@@:
cmp ah, 0x7b ; key {
jnz @f
jmp _26
@@:
cmp ah, 0x2b ; key +
jnz @f
jmp _27
@@:
cmp ah, 0x7d ; key }
jnz @f
jmp _28
@@:
cmp ah, 0x7c ; key |
jnz @f
jmp _29
@@:
cmp ah, 0x61 ; a - if Caps Lock OFF
jnz @f
_17:
mov ah, 0x17
jmp p
@@:
cmp ah, 0x7a ; z
jnz @f
_18:
mov ah, 0x18
jmp p
@@:
cmp ah, 0x73 ; s
jnz @f
_19:
mov ah, 0x19
jmp p
@@:
cmp ah, 0x78 ; x
jnz @f
_1a:
mov ah, 0x1a
jmp p
@@:
cmp ah, 0x64 ; d
jnz @f
_1b:
mov ah, 0x1b
jmp p
@@:
cmp ah, 0x63 ; c
jnz @f
_1c:
mov ah, 0x1c
jmp p
@@:
cmp ah, 0x76 ; v
jnz @f
_21:
mov ah, 0x21
jmp p
@@:
cmp ah, 0x67 ; g
jnz @f
_22:
mov ah, 0x22
jmp p
@@:
cmp ah, 0x62 ; b
jnz @f
_23:
mov ah, 0x23
jmp p
@@:
cmp ah, 0x68 ; h
jnz @f
_24:
mov ah, 0x24
jmp p
@@:
cmp ah, 0x6e ; n
jnz @f
_25:
mov ah, 0x25
jmp p
@@:
cmp ah, 0x6d ; m
jnz @f
_26:
mov ah, 0x26
jmp p
@@:
cmp ah, 0x6b ; k
jnz @f
_27:
mov ah, 0x27
jmp p
@@:
cmp ah, 0x2c ; ,
jnz @f
_28:
mov ah, 0x28
jmp p
@@:
cmp ah, 0x6c ; l
jnz @f
_29:
mov ah, 0x29
jmp p
@@:
cmp ah, 0x2e ; .
jnz @f
_2a:
mov ah, 0x2a
jmp p
@@:
cmp ah, 0x3b ; ;
jnz @f
_2b:
mov ah, 0x2b
jmp p
@@:
cmp ah, 0x2f ; /
jnz @f
_2c:
mov ah, 0x2c
jmp p
@@:
cmp ah, 0x27 ; '
jnz @f
_31:
mov ah, 0x31
jmp p
@@:
cmp ah, 0x60 ; key `
jnz @f
jmp _2c
@@:
cmp ah, 0x09 ; key tab
jnz @f
jmp _31
@@:
cmp ah, 0x31 ; key 1
jnz @f
_32:
mov ah, 0x32
jmp p
@@:
cmp ah, 0x71 ; key q
jnz @f
_33:
mov ah, 0x33
jmp p
@@:
cmp ah, 0x32 ; key 2
jnz @f
_34:
mov ah, 0x34
jmp p
@@:
cmp ah, 0x77 ; key w
jnz @f
_35:
mov ah, 0x35
jmp p
@@:
cmp ah, 0x65 ; key e
jnz @f
_36:
mov ah, 0x36
jmp p
@@:
cmp ah, 0x34 ; key 4
jnz @f
_37:
mov ah, 0x37
jmp p
@@:
cmp ah, 0x72 ; key r
jnz @f
_38:
mov ah, 0x38
jmp p
@@:
cmp ah, 0x35 ; key 5
jnz @f
_39:
mov ah, 0x39
jmp p
@@:
cmp ah, 0x74 ; key t
jnz @f
_3a:
mov ah, 0x3a
jmp p
@@:
cmp ah, 0x36 ; key 6
jnz @f
_3b:
mov ah, 0x3b
jmp p
@@:
cmp ah, 0x79 ; key y
jnz @f
_3c:
mov ah, 0x3c
jmp p
@@:
cmp ah, 0x75 ; key u
jnz @f
_41:
mov ah, 0x41
jmp p
@@:
cmp ah, 0x38 ; key 8
jnz @f
mov ah, 0x42
jmp p
@@:
cmp ah, 0x69 ; key i
jnz @f
mov ah, 0x43
jmp p
@@:
cmp ah, 0x39 ; key 9
jnz @f
mov ah, 0x44
jmp p
@@:
cmp ah, 0x6f ; key o
jnz @f
mov ah, 0x45
jmp p
@@:
cmp ah, 0x70 ; key p
jnz @f
mov ah, 0x46
jmp p
@@:
cmp ah, 0x2d ; key -
jnz @f
mov ah, 0x47
jmp p
@@:
cmp ah, 0x5b ; key [
jnz @f
mov ah, 0x48
jmp p
@@:
cmp ah, 0x3d ; key =
jnz @f
mov ah, 0x49
jmp p
@@:
cmp ah, 0x5d ; key ]
jnz @f
mov ah, 0x4a
jmp p
@@:
cmp ah, 0x5c ; key \
jnz @f
mov ah, 0x4b
jmp p
@@:
cmp ah, 0x08 ; key backspace
jnz @f
mov ah, 0x4c
jmp p
@@:
cmp ah, 0x0d ; key enter
jnz @f
mov ah, 0x51
jmp p
@@:
cmp ah, 0x66 ; key f
jnz @f
mov ah, 0x01
jmp p
@@:
cmp ah, 0x6a ; key j
jnz @f
mov ah, 0x05
jmp p
@@:
cmp ah, 0x33 ; key 3
jnz @f
mov ah, 0x08
jmp p
@@:
cmp ah, 0x37 ; key 7
jnz @f
jmp _11
@@:
cmp ah, 0x30 ; key 0
jnz @f
jmp _15
@@:
cmp ah, 0xb4 ; key home
jnz @f
mov ah, 0x10
jmp p
@@:
cmp ah, 0xb5 ; key end
jnz @f
_70:
mov ah, 0xfc
jmp p
@@:
cmp ah, 0xb8 ; key Page Up
jnz @f
mov ah, 0x20
jmp p
@@:
cmp ah, 0xb7 ; key Page Down
jnz @f
jmp _70
@@:
cmp ah, 0xff ; key F12
jnz @f
mov ah, 0x00
jmp p
@@:
cmp ah, 0xb6 ; key Del
jnz @f
jmp _70
@@:
p:
mov [M+1], ah ; § ¯¨á âì ª®¤ ᨬ¢®«  ª ª ª®¤ ­®âë
; äã­ªæ¨ï 55-55: á¨á⥬­ë© ¤¨­ ¬¨ª ("PlayNote")
; esi -  ¤à¥á ¬¥«®¤¨¨
mov eax,55
mov ebx,eax
mov esi,M
int 0x40
; ¨«¨ ª®à®âª®:
;mcall 55, , , , Music
jmp still ; ¢¥à­ãâìáï ª ­ ç «ã 横« 
;---------------------------------------------------------------------
button:
mcall 17 ; 17 - ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
cmp ah, 0xa1 ; button 1
jnz @f
jmp _01
@@:
cmp ah, 0x02 ; button 2
jnz @f
jmp _02
@@:
cmp ah, 0x03 ; button 3
jnz @f
jmp _03
@@:
cmp ah, 0x04
jnz @f
jmp _04
@@:
cmp ah, 0x05
jnz @f
jmp _05
@@:
cmp ah, 0x06
jnz @f
jmp _06
@@:
cmp ah, 0x07
jnz @f
jmp _07
@@:
cmp ah, 0x08 ; button 8
jnz @f
jmp _08
@@:
cmp ah, 0x09
jnz @f
jmp _09
@@:
cmp ah, 0x0a ; button 10
jnz @f
jmp _0a
@@:
cmp ah, 0x0b
jnz @f
jmp _0b
@@:
cmp ah, 0x0c ; button 12
jnz @f
jmp _0c
@@:
cmp ah, 0x11
jnz @f
jmp _11
@@:
cmp ah, 0x12
jnz @f
jmp _12
@@:
cmp ah, 0x13
jnz @f
jmp _13
@@:
cmp ah, 0x14
jnz @f
jmp _14
@@:
cmp ah, 0x15
jnz @f
jmp _15
@@:
cmp ah, 0x16
jnz @f
jmp _16
@@:
cmp ah, 0x17
jnz @f
jmp _17
@@:
cmp ah, 0x18
jnz @f
jmp _18
@@:
cmp ah, 0x19
jnz @f
jmp _19
@@:
cmp ah, 0x1a
jnz @f
jmp _1a
@@:
cmp ah, 0x1b
jnz @f
jmp _1b
@@:
cmp ah, 0x1c
jnz @f
jmp _1c
@@:
cmp ah, 0x21 ; button 1
jnz @f
jmp _21
@@:
cmp ah, 0x22
jnz @f
jmp _22
@@:
cmp ah, 0x23 ; button 3
jnz @f
jmp _23
@@:
cmp ah, 0x24
jnz @f
jmp _24
@@:
cmp ah, 0x25 ; button 5
jnz @f
jmp _25
@@:
cmp ah, 0x26
jnz @f
jmp _26
@@:
cmp ah, 0x27 ; button 7
jnz @f
jmp _27
@@:
cmp ah, 0x28
jnz @f
jmp _28
@@:
cmp ah, 0x29 ; button 9
jnz @f
jmp _29
@@:
cmp ah, 0x2a
jnz @f
jmp _2a
@@:
cmp ah, 0x2b ; button 11
jnz @f
jmp _2b
@@:
cmp ah, 0x2c
jnz @f
jmp _2c
@@:
cmp ah, 0x31
jnz @f
jmp _31
@@:
cmp ah, 0x32
jnz @f
jmp _32
@@:
cmp ah, 0x33
jnz @f
jmp _33
@@:
cmp ah, 0x34
jnz @f
jmp _34
@@:
cmp ah, 0x35
jnz @f
jmp _35
@@:
cmp ah, 0x36
jnz @f
jmp _36
@@:
cmp ah, 0x37
jnz @f
jmp _37
@@:
cmp ah, 0x38
jnz @f
jmp _38
@@:
cmp ah, 0x39
jnz @f
jmp _39
@@:
cmp ah, 0x3a
jnz @f
jmp _3a
@@:
cmp ah, 0x3b
jnz @f
jmp _3b
@@:
cmp ah, 0x3c
jnz @f
jmp _3c
@@:
cmp ah, 0x41
jnz @f
jmp _41
@@:
cmp ah, 1 ; ¥á«¨ <20>… ­ ¦ â  ª­®¯ª  á ­®¬¥à®¬ 1,
jne still ; ¢¥à­ãâìáï
.exit:
mcall -1 ; ¨­ ç¥ ª®­¥æ ¯à®£à ¬¬ë
;---------------------------------------------------------------------
;--- Ž<><C5BD>…„…<E280B9>ˆˆ Ž<C5BD>ˆŽŠ€ ŽŠ<C5BD>€ ----------------------------------
;---------------------------------------------------------------------
draw_window:
mcall 12, 1 ; äã­ªæ¨ï 12: á®®¡é¨âì Ž‘ ® ­ ç «¥ ®âà¨á®¢ª¨
mcall 48, 3, sc,sizeof.system_colors
; ¤ «¥¥: á­ ç «  ¤«¨­­ë© ¢ à¨ ­â (§ ª®¬¬¥­â¨à®¢ ­­ë©)
; § â¥¬ ª®à®âª¨©  ­ «®£ á ¨á¯®«ì§®¢ ­¨¥¬ ¬ ªà®á®¢
; mov eax,0 ; äã­ªæ¨ï 0: ®¯à¥¤¥«¨âì ®ª­®
; mov ebx,200*65536+300 ; [x áâ àâ] *65536 + [x à §¬¥à]
; mov ecx,200*65536+150 ; [y áâ àâ] *65536 + [y à §¬¥à]
; mov edx, [sc.work] ; 梥â ä®­ 
; or edx, 0x33000000 ; ¨ ⨯ ®ª­  3
; mov edi,header ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ<C5BD>
; int 0x40
mov edx, [sc.work] ; 梥â ä®­ 
or edx, 0x33000000 ; ¨ ⨯ ®ª­  3
mcall 0, <0,760>, <200,250>, , ,title
mcall 8, <0,50>, <0,100>, 0x21, 0xff7a74
mcall 8, <50,50>, <0,100>, 0x23, 0x907040
mcall 8, <100,50>, <0,100>, 0x25, 0xa08050
mcall 8, <150,50>, <0,100>, 0x26, 0xb09060
mcall 8, <200,50>, <00,100>, 0x28, 0xc0a070
mcall 8, <250,50>, <00,100>, 0x2a, 0xd0b080
mcall 8, <300,50>, <0,100>, 0x2c, 0xe0c090
mcall 8, <350,50>, <0,100>, 0x31, 0xffa97c
mcall 8, <400,50>, <0,100>, 0x33, 0xaf8d8d
mcall 8, <450,50>, <0,100>, 0x35, 0xbf9d9d
mcall 8, <500,50>, <0,100>, 0x36, 0xcfadad
mcall 8, <550,50>, <00,100>, 0x38, 0xdfbdbd
mcall 8, <600,50>, <00,100>, 0x3a, 0xefcdcd
mcall 8, <650,50>, <0,100>, 0x3c, 0xffdddd
mcall 8, <700,50>, <0,100>, 0x41, 0xffe558
mcall 8, <35,30>, <0,50>, 0x22, 0x221100
mcall 8, <85,30>, <0,50>, 0x24, 0x221100
mcall 8, <185,30>, <0,50>, 0x27, 0x221100
mcall 8, <235,30>, <0,50>, 0x29, 0x221100
mcall 8, <285,30>, <0,50>, 0x2b, 0x221100
mcall 8, <385,30>, <0,50>, 0x32, 0x221100
mcall 8, <435,30>, <0,50>, 0x34, 0x221100
mcall 8, <535,30>, <0,50>, 0x37, 0x221100
mcall 8, <585,30>, <0,50>, 0x39, 0x221100
mcall 8, <635,30>, <0,50>, 0x3b, 0x221100
mcall 8, <0,50>, <100,100>, 0xa1, 0x702050
mcall 8, <50,50>, <100,100>, 0x03, 0x683638
mcall 8, <100,50>, <100,100>, 0x05, 0x784648
mcall 8, <150,50>, <100,100>, 0x06, 0x885658
mcall 8, <200,50>, <100,100>, 0x08, 0x986668
mcall 8, <250,50>, <100,100>, 0x0a, 0xa87678
mcall 8, <300,50>, <100,100>, 0x0c, 0xb88688
mcall 8, <350,50>, <100,100>, 0x11, 0x880040
mcall 8, <400,50>, <100,100>, 0x13, 0x90622b
mcall 8, <450,50>, <100,100>, 0x15, 0xa0723b
mcall 8, <500,50>, <100,100>, 0x16, 0xb0824b
mcall 8, <550,50>, <100,100>, 0x18, 0xc0925b
mcall 8, <600,50>, <100,100>, 0x1a, 0xd0a26b
mcall 8, <650,50>, <100,100>, 0x1c, 0xe0b27b
mcall 8, <700,50>, <100,100>, 0x21, 0xff7a74
mcall 8, <35,30>, <100,50>, 0x02, 0x221100
mcall 8, <85,30>, <100,50>, 0x04, 0x221100
mcall 8, <185,30>, <100,50>, 0x07, 0x221100
mcall 8, <235,30>, <100,50>, 0x09, 0x221100
mcall 8, <285,30>, <100,50>, 0x0b, 0x221100
mcall 8, <385,30>, <100,50>, 0x12, 0x221100
mcall 8, <435,30>, <100,50>, 0x14, 0x221100
mcall 8, <535,30>, <100,50>, 0x17, 0x221100
mcall 8, <585,30>, <100,50>, 0x19, 0x221100
mcall 8, <635,30>, <100,50>, 0x1b, 0x221100
; ¢ë¢®¤ ⥪á⮢®© áâப¨
mov ecx, [sc.work_text] ; 梥â ä®­ 
or ecx, 0x90000000 ; ¨ ⨯ áâப¨
mcall 4, <50, 205>, , message
mcall 4, <10, 235>, , message1
mcall 4, <10, 260>, , message2
mcall 4, <10, 285>, , message3
mcall 4, <10, 310>, , message4
mcall 4, <15, 185>, , message5
mcall 4, <65, 185>, , message6
mcall 4, <115, 185>, , message7
mcall 4, <165, 185>, , message8
mcall 4, <210, 185>, , message9
mcall 4, <265, 185>, , message10
mcall 4, <315, 185>, , message11
mcall 4, <365, 185>, , message5
mcall 12, 2 ; äã­ªæ¨ï 12.2, § ª®­ç¨«¨ à¨á®¢ âì
ret ; ¢ë室¨¬ ¨§ ¯à®æ¥¤ãàë
;---------------------------------------------------------------------
;--- „€<E2809E><E282AC><20><>Žƒ<C5BD>€ŒŒ ----------------------------------------------
;---------------------------------------------------------------------
; ‚â®à®© ¡ ©â ¢ M (Music) ¨§¬¥­ï¥âáï ­ ¦ â¨¥¬ ª« ¢¨è¨
M:
db 0x90, 0x30, 0
sc system_colors
message db '‘¯à ¢ª : éñ«ª­¨â¥ 2 à §  ­  § £®«®¢ª¥.',0
message1 db '<27> ¦¬¨â¥ «î¡ãî ª« ¢¨èã ¢  ­£«¨©áª®© à áª« ¤ª¥ - ',0
message2 db '¤®«¦¥­ §¢ãç âì ¤¨­ ¬¨ª ª®¬¯ìîâ¥à .',0
message3 db '<27>®â  "„®" - ª« ¢¨è¨ V,Tab,U,Enter, ¯à¨ ¢ª«î祭¨¨',0
message4 db 'Caps Lock - ª« ¢¨è¨ V,Q,I.',0
message5 db '„Ž',0
message6 db '<27>…',0
message7 db 'Œˆ',0
message8 db '”€',0
message9 db '‘Ž‹œ',0
message10 db '‹Ÿ',0
message11 db 'ˆ',0
title db '„¥â᪮¥ ¯¨ ­¨­®',0
;---------------------------------------------------------------------
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë
rb 4096 ; ¯ ¬ïâì ¤«ï á⥪ 
align 16
STACKTOP: ; ¬¥âª  ¢¥à設ë á⥪  (¯à¨ § ¯®«­¥­¨¨ á⥪
; à áâ¥â ¢ áâ®à®­ã 㬥­ì襭¨ï  ¤à¥á®¢, ¯®â®¬ã
; ¯ ¬ïâì ¤«ï ­¥£® ¢ ª®¤¥ ¯à®£à ¬¬ë ¢áâà¥ç ¥âáï
; à ­ìè¥ ç¥¬ ¥£® ¢¥à設 )
MEM: ; ¬¥âª  㪠§ë¢ îé ï ­  ª®­¥æ ¯à®£à ¬¬ë ¯«îá
; à §¬¥à ¨á¯®«ì§ã¥¬®© ¥î ®¯¥à â¨¢­®© ¯ ¬ïâ¨
; €¤à¥á ¬¥âª¨ MEM ¢á¥£¤  ¤®«¦¥­ ¡ëâì ¡®«ìè¥ ç¥¬  ¤à¥á ¬¥âª¨ I_END.
; Œ¥âª  STACKTOP ¤®«¦­  à á¯®« £ ¥âáï ¯®á«¥ ¬¥âª¨ I_END ¨ ¯¥à¥¤ ¬¥âª®©
; MEM. STACKTOP ¬®¦¥â ­ å®¤¨âáï ¨ ¯¥à¥¤ I_END, ­® íâ® ­¥ ¯à ¢¨«ì­®.
; ˆ¬¥­  ¬¥â®ª ¬®£ãâ ¡ëâì á «î¡ë¬¨ ­ §¢ ­¨ï¬¨, £« ¢­®¥ ᮡ«î¤ âì
; ¯à ¢¨«ì­ë© ¯®à冷ª ¨å à á¯®«®¦¥­¨ï.