forked from KolibriOS/kolibrios
140 lines
4.5 KiB
NASM
140 lines
4.5 KiB
NASM
|
;
|
|||
|
; Mad Mouse
|
|||
|
; <20><><EFBFBD><EFBFBD><EFBFBD> <20>⮣<EFBFBD> 㦠᭮ <20><>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>: Sourcerer, 23.04.2010
|
|||
|
; popovpa (29.05.2012)
|
|||
|
; 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠡ<><E0A0A1><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>.
|
|||
|
; 2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD>᪠<EFBFBD><E1AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ᢥ<><E1A2A5><EFBFBD> <20> <20><><EFBFBD><EFBFBD> :)
|
|||
|
; 3. <20><>⨬<EFBFBD><E2A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
;
|
|||
|
|
|||
|
use32 ; <20>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD>騩 32-<2D> ࠧ<>來<EFBFBD><EFA4AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
org 0x0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20>ᥣ<EFBFBD><E1A5A3> 0x0
|
|||
|
|
|||
|
db 'MENUET01' ; 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䨪<EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC><EFBFBD> 䠩<><E4A0A9> (8 <20><><EFBFBD><EFBFBD>)
|
|||
|
dd 0x01 ; 2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ଠ<EFBFBD><E0ACA0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC><EFBFBD> 䠩<><E4A0A9>
|
|||
|
dd START ; 3. <20><><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD> <20><>।<EFBFBD><E0A5A4><EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; <20><> <20><><EFBFBD><EFBFBD>㧪<EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
dd I_END ; 4. ࠧ<><E0A0A7><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
dd 0x100000 ; 5. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 0x0
|
|||
|
; <20><> <20><><EFBFBD>祭<EFBFBD><E7A5AD>, <20><>।<EFBFBD><E0A5A4><EFBFBD><F1ADADAE> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
dd 0x100000 ; 6. <20><><EFBFBD>設<EFBFBD> <20>⥪<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 㪠<><E3AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
dd 0x0 ; 7. 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>ப<EFBFBD> <20> <20><>ࠬ<EFBFBD><E0A0AC>ࠬ<EFBFBD>.
|
|||
|
; <20> <20><> <20><><EFBFBD><EFBFBD>᪠ <20><>ࠢ<EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD>, <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>뫮
|
|||
|
; <20><><EFBFBD><EFBFBD>饭<EFBFBD> <20> <20><>ࠬ<EFBFBD><E0A0AC>ࠬ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>
|
|||
|
dd 0x0 ; 8. 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>ப<EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ᠭ <20><><EFBFBD><EFBFBD>,
|
|||
|
; <20><><EFBFBD>㤠 <20><><EFBFBD><EFBFBD>饭<EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
;---------------------------------------------------------------------
|
|||
|
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------------
|
|||
|
;---------------------------------------------------------------------
|
|||
|
|
|||
|
START: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><>砫<EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|
|||
|
|
|||
|
mov eax,14 ;<3B>㭪<EFBFBD><E3ADAA><EFBFBD> 14 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<><E0A0A7><EFBFBD> <20><>࠭<EFBFBD>
|
|||
|
int 0x40
|
|||
|
|
|||
|
mov ebx,eax
|
|||
|
shl ebx,16
|
|||
|
shr ebx,16
|
|||
|
mov edi,ebx ;<3B><><EFBFBD>࠭<EFBFBD><E0A0AD> <20>
|
|||
|
shr eax,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> eax <20><>ࠢ<EFBFBD> <20><> 16 - <20><><EFBFBD><EFBFBD>砥<EFBFBD> x
|
|||
|
mov esi,eax ;<3B><><EFBFBD>࠭<EFBFBD><E0A0AD> x
|
|||
|
|
|||
|
;---------------------------------------------------------------------
|
|||
|
;--- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------
|
|||
|
;---------------------------------------------------------------------
|
|||
|
|
|||
|
still:
|
|||
|
;<3B>࣠<EFBFBD><E0A3A0><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD> <20> 100 <20><>
|
|||
|
mov eax,5 ;<3B>㭪<EFBFBD><E3ADAA><EFBFBD> 5 - <20><>㧠, <20> ebx <20>६<EFBFBD> <20> <20><>
|
|||
|
mov ebx,1 ;<3B><><EFBFBD><EFBFBD>প<EFBFBD> 100 <20><>
|
|||
|
int 0x40
|
|||
|
;<3B><><EFBFBD><EFBFBD>砥<EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov eax,37 ;<3B>㭪<EFBFBD><E3ADAA><EFBFBD> 37 - ࠡ<><E0A0A1><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
xor ebx,ebx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0 - <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
;<3B>⭮<EFBFBD><E2ADAE>⥫쭮 <20><>࠭<EFBFBD>
|
|||
|
int 0x40
|
|||
|
|
|||
|
mov ebx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD>
|
|||
|
shr eax,16 ;⥯<><E2A5AF><EFBFBD> <20> <20><><EFBFBD> ⮫쪮 x. <20>㦥<EFBFBD> <20> y
|
|||
|
mov ecx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> x
|
|||
|
shl ebx,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> 16
|
|||
|
shr ebx,16 ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20>ࠢ<EFBFBD> <20><> 16, <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>
|
|||
|
|
|||
|
;------------------------------------------------------------------------------
|
|||
|
;<3B> esi <20> edi <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> ࠧ<><E0A0A7><EFBFBD><EFBFBD> <20><>࠭<EFBFBD> X <20> Y ᮮ⢥<E1AEAE>ᢥ<EFBFBD><E1A2A5><EFBFBD>
|
|||
|
;<3B> ecx <20> ebx <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> X <20> Y ᮮ⢥⢥<E2A2A5><E2A2A5><EFBFBD>
|
|||
|
;------------------------------------------------------------------------------
|
|||
|
|
|||
|
;<3B>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD> x
|
|||
|
test ecx,ecx ;ࠢ<><E0A0A2> 0?
|
|||
|
jz left_border ;<3B><><EFBFBD><EFBFBD>室 <20> <20><>ࠡ<EFBFBD>⪥ <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
cmp ecx,esi ;ࠢ<><E0A0A2> <20><>ਭ<EFBFBD> <20><>࠭<EFBFBD>?
|
|||
|
jz right_border ;<3B><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4> <20> <20><>ࠡ<EFBFBD>⪥ <20> <20>ࠢ<EFBFBD><E0A0A2><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
;<3B>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD> y
|
|||
|
test ebx,ebx ;ࠢ<><E0A0A2> 0?
|
|||
|
jz top_border ;<3B> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
cmp ebx,edi ;ࠢ<><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>࠭<EFBFBD>?
|
|||
|
jz bottom_border ;<3B><><EFBFBD><EFBFBD>室 <20> <20><>ࠡ<EFBFBD>⪥ <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
jmp still ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><>祣<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>㦭<EFBFBD>
|
|||
|
|
|||
|
left_border:
|
|||
|
mov edx,esi ;<3B> edx <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ਭ<EFBFBD> <20><>࠭<EFBFBD>
|
|||
|
dec edx ;㬥<><E3ACA5>訬 <20><> 1
|
|||
|
shl edx,16 ;⥯<><E2A5AF><EFBFBD> edx=(x-1)*65536
|
|||
|
add edx,ebx ;<3B> ⥯<><E2A5AF><EFBFBD> edx=(x-1)*65536+y
|
|||
|
|
|||
|
mov eax,18 ;<3B>㭪<EFBFBD><E3ADAA><EFBFBD> 18: <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,19 ;<3B><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 19
|
|||
|
mov ecx,4 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 4: <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int 0x40
|
|||
|
jmp still ;<3B><><EFBFBD><EFBFBD>堥<EFBFBD>
|
|||
|
|
|||
|
right_border: ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>ࠢ<EFBFBD><E0A0A2><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
xor edx,edx
|
|||
|
inc edx ;edx=1
|
|||
|
shl edx,16 ;edx = 1*65536
|
|||
|
add edx,ebx ;edx=1*65536+y
|
|||
|
|
|||
|
mov eax,18 ;<3B>㭪<EFBFBD><E3ADAA><EFBFBD> 18: <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,19 ;<3B><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 19
|
|||
|
mov ecx,4 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 4: <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int 0x40
|
|||
|
jmp still ;<3B><><EFBFBD><EFBFBD>堥<EFBFBD>
|
|||
|
|
|||
|
top_border: ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>孥<EFBFBD><E5ADA5> <20><><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mov edx,ecx ;<3B> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
shl edx,16 ;⥯<><E2A5AF><EFBFBD> edx=(x)*65536
|
|||
|
add edx,edi ;<3B> ⥯<><E2A5AF><EFBFBD> edx=(x)*65536+y
|
|||
|
dec edx ;<3B> ⥯<><E2A5AF><EFBFBD> edx=(x)*65536+(<28>-1)
|
|||
|
|
|||
|
mov eax,18 ;<3B>㭪<EFBFBD><E3ADAA><EFBFBD> 18: <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,19 ;<3B><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 19
|
|||
|
mov ecx,4 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 4: <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int 0x40
|
|||
|
jmp still ;<3B> <20><><EFBFBD><EFBFBD>堥<EFBFBD>
|
|||
|
|
|||
|
bottom_border: ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mov edx,ecx ;edx=ecx x <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
shl edx,16 ;edx = <20>*65536
|
|||
|
;<3B> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> ࠢ<><E0A0A2> 0
|
|||
|
mov eax,18 ;<3B>㭪<EFBFBD><E3ADAA><EFBFBD> 18: <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,19 ;<3B><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 19
|
|||
|
mov ecx,4 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 4: <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int 0x40
|
|||
|
jmp still ;<3B> <20><><EFBFBD><EFBFBD>堥<EFBFBD>
|
|||
|
|
|||
|
|
|||
|
I_END: ; <20><>⪠ <20><><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|