2011-02-15 12:55:49 +01:00
|
|
|
|
; --------------------------------------------------------
|
2011-08-19 12:52:19 +02:00
|
|
|
|
; KJ|ABuIIIA - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>७<EFBFBD><E0A5AD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>樮<EFBFBD><E6A8AE><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
; version: 0.95
|
|
|
|
|
; last update: 19/08/2011
|
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
; changes: 1) Checking for "rolled up" window
|
|
|
|
|
; 2) Code optimization
|
|
|
|
|
; 3) Clearing source
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
; version: 0.90
|
|
|
|
|
; last update: 24/07/2010
|
|
|
|
|
; changed by: <20><><EFBFBD>३ <20><>堩<EFBFBD><E5A0A9><EFBFBD><EFBFBD><EFBFBD> (Dron2004)
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;
|
|
|
|
|
; <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>室<EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD>: 24.07.2010 21:15 GMT+6
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
use32
|
|
|
|
|
org 0x0
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
db 'MENUET01'
|
|
|
|
|
dd 0x01
|
|
|
|
|
dd START
|
|
|
|
|
dd IM_END
|
|
|
|
|
dd I_END
|
|
|
|
|
dd stacktop
|
|
|
|
|
dd params
|
|
|
|
|
dd 0x0
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
include 'lang.inc'
|
|
|
|
|
include '../../../macros.inc'
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;<3B><><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|
|
|
|
|
START:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;<3B><><EFBFBD>樠<EFBFBD><E6A8A0><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD>
|
|
|
|
|
mcall 68,11
|
|
|
|
|
; call get_screen_params
|
|
|
|
|
; mov eax,0x0000001C
|
|
|
|
|
; cmp eax,0x0
|
|
|
|
|
; je start_with_internal_text ; <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
; <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>! <20><>⠥<EFBFBD><E2A0A5><EFBFBD> <20>⨬ <20><>ᯮ<EFBFBD>짮<EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <20><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4><EFBFBD> <20><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> ࠧ<><E0A0A7><EFBFBD> 䠩<><E4A0A9>... <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!!
|
|
|
|
|
mov eax,5
|
|
|
|
|
mov [arg1],eax
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov [arg2],eax
|
|
|
|
|
mov [arg3],eax
|
|
|
|
|
mov [arg4],eax
|
|
|
|
|
mov eax,filedatastruct
|
|
|
|
|
mov [arg5],eax
|
|
|
|
|
mov eax,[0x0000001C]
|
|
|
|
|
mov [arg7],eax
|
|
|
|
|
mcall 70,filestruct
|
|
|
|
|
test eax,eax
|
|
|
|
|
jne start_with_internal_text ;<3B>訡<EFBFBD><E8A8A1>
|
|
|
|
|
mov eax, dword [size]
|
|
|
|
|
mov [filesize], eax ;⥯<><E2A5AF><EFBFBD> ࠧ<><E0A0A7><EFBFBD> 䠩<><E4A0A9> <20> <20><><EFBFBD> <20> filesize
|
|
|
|
|
;<3B>뤥<EFBFBD>塞 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> 䠩<>
|
|
|
|
|
mov ecx, [filesize]
|
|
|
|
|
inc ecx ;<3B>뤥<EFBFBD><EBA4A5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫쭮 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> ⮣<>, <20>⮡<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0xFF
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> "<22><><EFBFBD><EFBFBD><EFBFBD>" KLA-䠩<><E4A0A9><EFBFBD>
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall 68,12
|
|
|
|
|
mov [datastart], eax ;<3B> <20><>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><>⠑<EFBFBD><E2A091><EFBFBD><EFBFBD> ⥯<><E2A5AF><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD>
|
|
|
|
|
add eax, [filesize]
|
|
|
|
|
mov bh, 0xFF
|
|
|
|
|
mov [eax], bh
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD>⢥<EFBFBD><E2A2A5><EFBFBD>, <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 䠩<> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov [arg1],eax ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樨
|
|
|
|
|
mov [arg2],eax ;<3B><><EFBFBD>饭<EFBFBD><E9A5AD> <20> 䠩<><E4A0A9>
|
|
|
|
|
mov [arg3],eax ;<3B><><EFBFBD><EFBFBD>訩 dword ᬥ饭<E1ACA5><E9A5AD>
|
|
|
|
|
mov eax,[filesize]
|
|
|
|
|
mov [arg4],eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9>
|
|
|
|
|
mov eax,[datastart]
|
|
|
|
|
mov [arg5],eax ;<3B><><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax,par
|
|
|
|
|
mov [arg7],eax ;<3B><><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <20><> ASCIIZ-<2D><>ப<EFBFBD>
|
|
|
|
|
mcall 70,filestruct
|
|
|
|
|
test eax,eax
|
|
|
|
|
je initialize_variables
|
2011-02-15 12:55:49 +01:00
|
|
|
|
start_with_internal_text:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mov edx, string
|
|
|
|
|
mov [datastart], edx
|
|
|
|
|
; mov edx, string ; <20>ᯮ<EFBFBD><E1AFAE><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><E0AEA5><EFBFBD><EFBFBD> ⥪<><E2A5AA>
|
2011-02-15 12:55:49 +01:00
|
|
|
|
initialize_variables:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mov edx,[datastart]
|
|
|
|
|
mov [currentsymb],edx ; <20><>砫쭠<E7A0AB> <20><><EFBFBD>樠<EFBFBD><E6A8A0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [startline],edx
|
|
|
|
|
mov [lastsymb],edx
|
|
|
|
|
mov [lessonstart],edx
|
|
|
|
|
xor eax,eax
|
|
|
|
|
inc eax
|
|
|
|
|
mov [currentline], eax
|
|
|
|
|
call count_lines
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
redraw:
|
|
|
|
|
call draw_window
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;<3B>᭮<EFBFBD><E1ADAE><EFBFBD><EFBFBD> 横<>
|
|
|
|
|
event_wait:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall 10
|
|
|
|
|
cmp eax, 1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD> <20>㦭<EFBFBD>
|
|
|
|
|
je redraw
|
|
|
|
|
cmp eax, 2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
je key
|
|
|
|
|
cmp eax, 3 ;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>㫨
|
|
|
|
|
je button
|
|
|
|
|
jmp event_wait
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
key:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall 2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ah
|
|
|
|
|
push eax
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD>᪠<EFBFBD><E1AAA0> <20><><EFBFBD><EFBFBD>稪 <20>६<EFBFBD><E0A5AC><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1ABA5><EFBFBD>饣<EFBFBD>
|
|
|
|
|
; <20><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><E1AAAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax, [currentsymb]
|
|
|
|
|
cmp eax, [lessonstart]
|
|
|
|
|
jne not_first_symbol
|
|
|
|
|
mov eax,[mistakes]
|
|
|
|
|
test eax,eax
|
|
|
|
|
jne not_first_symbol
|
|
|
|
|
mcall 26,9
|
|
|
|
|
mov [typestarttime], eax
|
2011-02-15 12:55:49 +01:00
|
|
|
|
not_first_symbol:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
pop eax
|
|
|
|
|
;<3B><EFBFBD><E0AEA2>塞, <20><> <20><><EFBFBD><EFBFBD><EFBFBD>稫<EFBFBD><E7A8AB> <20><> ⥪<><E2A5AA>
|
|
|
|
|
mov esi, [currentsymb]
|
|
|
|
|
mov al, byte [esi]
|
|
|
|
|
cmp al, 0xFF
|
|
|
|
|
je text_end
|
|
|
|
|
cmp al, 0xFE
|
|
|
|
|
je text_end
|
|
|
|
|
push ebx
|
|
|
|
|
mov ebx, [currentsymb]
|
|
|
|
|
mov al, byte [ebx]
|
|
|
|
|
pop ebx
|
|
|
|
|
test al,al
|
|
|
|
|
jne not_new_line
|
|
|
|
|
cmp ah, 0x0D
|
|
|
|
|
je correct_key_nl
|
|
|
|
|
cmp ah, 0x20
|
|
|
|
|
je correct_key_nl
|
|
|
|
|
jmp not_this_key
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
correct_key_nl:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mov eax, [currentsymb]
|
|
|
|
|
inc eax
|
|
|
|
|
mov [startline], eax
|
|
|
|
|
mov eax, [currentsymb]
|
|
|
|
|
inc eax
|
|
|
|
|
mov [currentsymb], eax
|
|
|
|
|
mov [lastsymb], eax
|
|
|
|
|
mov eax, [currentline]
|
|
|
|
|
inc eax
|
|
|
|
|
mov [currentline], eax
|
|
|
|
|
mov eax, [symbtyped] ;<3B><><EFBFBD><EFBFBD><EFBFBD>稬 <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20><> 1
|
|
|
|
|
inc eax
|
|
|
|
|
mov [symbtyped], eax
|
|
|
|
|
call count_speed
|
|
|
|
|
; call draw_speed
|
|
|
|
|
jmp redraw
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
not_new_line:
|
|
|
|
|
cmp ah, al
|
|
|
|
|
jne not_this_key
|
2011-02-15 12:55:49 +01:00
|
|
|
|
correct_key:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mov eax, [currentsymb]
|
|
|
|
|
inc eax
|
|
|
|
|
mov [currentsymb], eax
|
|
|
|
|
mov [lastsymb], eax
|
|
|
|
|
mov eax, [symbtyped] ;<3B><><EFBFBD><EFBFBD><EFBFBD>稬 <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20><> 1
|
|
|
|
|
inc eax
|
|
|
|
|
mov [symbtyped], eax
|
|
|
|
|
call count_speed
|
|
|
|
|
; call draw_speed
|
|
|
|
|
call redraw_2_symbols
|
|
|
|
|
jmp event_wait
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
not_this_key:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mov esi, [mistakes]
|
|
|
|
|
inc esi
|
|
|
|
|
mov [mistakes], esi
|
|
|
|
|
call redraw_mistakes
|
|
|
|
|
jmp event_wait
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
text_end:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
; /// <20>९<EFBFBD><E0A5AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>砭<EFBFBD><E7A0AD> <20>ப<EFBFBD>
|
|
|
|
|
; <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⨨ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov esi, [startline]
|
|
|
|
|
cmp esi, lessoncomplete
|
|
|
|
|
je text_end_already_shown
|
2011-02-15 12:55:49 +01:00
|
|
|
|
; ///////////////////////////
|
2011-08-19 12:52:19 +02:00
|
|
|
|
call speed_to_string
|
|
|
|
|
mov esi, lessoncomplete
|
|
|
|
|
mov [startline], esi
|
|
|
|
|
mov esi, lessoncompleteend
|
|
|
|
|
dec esi
|
|
|
|
|
mov [currentsymb], esi
|
|
|
|
|
call draw_window
|
2011-02-15 12:55:49 +01:00
|
|
|
|
text_end_already_shown:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
jmp event_wait
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
button:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall 17 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䨪<EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ah
|
|
|
|
|
cmp ah, 1 ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jne no_close
|
|
|
|
|
mcall -1
|
2011-02-15 12:55:49 +01:00
|
|
|
|
no_close:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;<3B><EFBFBD><E0AEA2>塞 <20><>⠫<EFBFBD><E2A0AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cmp ah, 0x02
|
|
|
|
|
jne no_button_2
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
xor eax, eax
|
|
|
|
|
mov [mistakes], 0x0
|
|
|
|
|
mov esi, [lastsymb]
|
|
|
|
|
mov al, [esi]
|
|
|
|
|
;<3B>㦭<EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><> ᨬ<><E1A8AC><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD>. <20> 0xFF -
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>稫<EFBFBD><E7A8AB>, <20>㦭<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ᭠砫<E1ADA0>
|
|
|
|
|
cmp al, 0xFF
|
|
|
|
|
je start_1st_lesson
|
|
|
|
|
cmp al, 0xFE ; <20><> <20><><EFBFBD>諨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ப?
|
|
|
|
|
jne not_completed_previous
|
2011-02-15 12:55:49 +01:00
|
|
|
|
init_level_after_fe:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><> <20><EFBFBD>ਬ, <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>砩<EFBFBD><E7A0A9> <><E1ABA5><EFBFBD>騬 ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> 0xFF
|
|
|
|
|
inc esi
|
|
|
|
|
mov al, [esi]
|
|
|
|
|
cmp al, 0xFF
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> - <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <><E1ABA5><EFBFBD>騩 <20>ப
|
|
|
|
|
jne set_lesson_start_from_esi
|
2011-02-15 12:55:49 +01:00
|
|
|
|
start_1st_lesson:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mov esi, [datastart]
|
2011-02-15 12:55:49 +01:00
|
|
|
|
set_lesson_start_from_esi:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mov [startline], esi
|
|
|
|
|
mov [currentsymb], esi
|
|
|
|
|
mov [lastsymb], esi
|
|
|
|
|
mov [lessonstart], esi
|
|
|
|
|
xor eax,eax
|
|
|
|
|
jmp no_button_3.2
|
|
|
|
|
; inc eax
|
|
|
|
|
; mov [currentline], eax
|
|
|
|
|
; call count_lines
|
|
|
|
|
; call reset_speed_counters
|
|
|
|
|
; jmp redraw
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
not_completed_previous:
|
|
|
|
|
inc esi
|
|
|
|
|
mov al, [esi]
|
|
|
|
|
cmp al, 0xFF
|
|
|
|
|
je start_1st_lesson
|
|
|
|
|
cmp al, 0xFE
|
|
|
|
|
je init_level_after_fe
|
|
|
|
|
jmp not_completed_previous
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
no_button_2:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
cmp ah,0x03
|
|
|
|
|
jne no_button_3
|
|
|
|
|
;<3B><>१<EFBFBD><E0A5A7><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2>
|
|
|
|
|
mov edx,[lessonstart]
|
|
|
|
|
jmp no_button_3.1
|
|
|
|
|
; mov [currentsymb],edx
|
|
|
|
|
; mov [startline],edx
|
|
|
|
|
; mov [lastsymb],edx
|
|
|
|
|
; xor eax,eax
|
|
|
|
|
; mov [mistakes],eax
|
|
|
|
|
; inc eax
|
|
|
|
|
; mov [currentline],eax
|
|
|
|
|
; call reset_speed_counters
|
|
|
|
|
; call count_lines
|
|
|
|
|
; jmp redraw
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
no_button_3:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
cmp ah,0x04
|
|
|
|
|
jne event_wait
|
|
|
|
|
;<3B><>१<EFBFBD><E0A5A7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov edx,[datastart]
|
|
|
|
|
mov [lessonstart],edx
|
|
|
|
|
.1:
|
|
|
|
|
mov [currentsymb],edx
|
|
|
|
|
mov [startline],edx
|
|
|
|
|
mov [lastsymb],edx
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov [mistakes],eax
|
|
|
|
|
.2:
|
|
|
|
|
inc eax
|
|
|
|
|
mov [currentline],eax
|
|
|
|
|
call reset_speed_counters
|
|
|
|
|
call count_lines
|
|
|
|
|
jmp redraw
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD>稬 ⥪<>騥 <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
get_window_param:
|
|
|
|
|
mcall 9,procinfo,-1
|
|
|
|
|
ret
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" <20>ணࠬ<E0AEA3><E0A0AC> - <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD> <20><>⠫쭮<E2A0AB> - <20>㫮<EFBFBD><E3ABAE><EFBFBD><EFBFBD> <20>-)) )
|
|
|
|
|
draw_window:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall 12,1
|
|
|
|
|
mov ax,[areawidth] ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>맮<EFBFBD> draw_window?
|
|
|
|
|
test ax,ax
|
|
|
|
|
jne .dw_not_first_call
|
|
|
|
|
call get_screen_params ;<3B><><EFBFBD><EFBFBD>砥<EFBFBD> <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20><>࠭<EFBFBD> - <20><>ਭ<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.dw_not_first_call:
|
|
|
|
|
;<3B> ebx - X <20> <20><>ਭ<EFBFBD>
|
|
|
|
|
mov bx,[windowx]
|
|
|
|
|
shl ebx,16
|
|
|
|
|
mov bx,780
|
|
|
|
|
; mov ebx,10*65536+780
|
|
|
|
|
;<3B> ecx - Y <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov cx, [windowy]
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,580
|
|
|
|
|
; mov ecx,10*65536+580
|
|
|
|
|
xor esi,esi
|
|
|
|
|
;<3B><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20> <20>뢥<EFBFBD><EBA2A5><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
mcall 0,,,0x33CCCCCC,,text
|
|
|
|
|
call get_window_param
|
|
|
|
|
mov eax,[procinfo+70] ;status of window
|
|
|
|
|
test eax,100b
|
|
|
|
|
jne .end
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> ⥪<><E2A5AA> <20><> <20><><EFBFBD>
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall 8,<295,145>,<8,18>,2,0x0099CC99
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall ,<450,145>,,3,0x00CC9999
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall ,<605,145>,,4,0x00DD7777
|
|
|
|
|
;<3B>뢮<EFBFBD><EBA2AE><EFBFBD> ⥪<><E2A5AA> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mcall 4,<310,14>,0x80000000,buttontext
|
|
|
|
|
mcall ,<465,14>,,retrybuttontext
|
|
|
|
|
mcall ,<626,14>,,restartbuttontext
|
2011-02-15 12:55:49 +01:00
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD>⨯
|
2011-08-19 12:52:19 +02:00
|
|
|
|
xor ebp,ebp
|
|
|
|
|
mcall 65,logo,<32,12>,<12,12>,1,green_text
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD>稬 ⥪<>騥 <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2011-08-19 12:52:19 +02:00
|
|
|
|
call get_window_param
|
|
|
|
|
add ebx,0x2A
|
|
|
|
|
mov eax,[ebx]
|
|
|
|
|
mov [windowwidth], eax
|
|
|
|
|
mov ebx,procinfo
|
|
|
|
|
add ebx,0x2E
|
|
|
|
|
mov eax,[ebx]
|
|
|
|
|
mov [windowheight], eax
|
|
|
|
|
;draw_error_count:
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
mcall 4,<60,15>,0x80AA0000,mistakestext
|
|
|
|
|
; <20>뢥<EFBFBD><EBA2A5><EFBFBD> <20><> <20>訡<EFBFBD><E8A8A1>
|
|
|
|
|
mcall 47,0x80040000,[mistakes],<105,15>,0x00AA0000
|
|
|
|
|
;draw_line_number:
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><>ப<EFBFBD> <20><>"
|
|
|
|
|
mcall 4,<140,15>,0x8000AA00,lineistext
|
|
|
|
|
;<3B>뢥<EFBFBD><EBA2A5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ⥪<>饩 <20><>ப<EFBFBD>
|
|
|
|
|
mcall 47,80040000,[currentline],<195,15>,0x0000AA00
|
|
|
|
|
;<3B>뢥<EFBFBD><EBA2A5><EFBFBD> ⥪<><E2A5AA><EFBFBD><EFBFBD> <20><>ப<EFBFBD>
|
|
|
|
|
mcall ,,[linecount],<252,15>,
|
|
|
|
|
;<3B>뢥<EFBFBD><EBA2A5><EFBFBD> ࠡ<>稩 ⥪<><E2A5AA>
|
|
|
|
|
call draw_text
|
|
|
|
|
.end:
|
|
|
|
|
mcall 12,2
|
|
|
|
|
ret
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
draw_text:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD>⮢<EFBFBD><E2AEA2> <20> <20>뢮<EFBFBD><EBA2AE> ⥪<><E2A5AA><EFBFBD>
|
|
|
|
|
mov edx,40 ;<3B><>砫쭮<E7A0AB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>뢮<EFBFBD><EBA2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<><E2A5AA><EFBFBD> <20><> <20><><EFBFBD>⨪<EFBFBD><E2A8AA><EFBFBD>
|
|
|
|
|
mov esi,[startline]
|
|
|
|
|
dec esi ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><>. *1 <20><><EFBFBD><EFBFBD>)!
|
|
|
|
|
mov ebx,esi ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> edx - <20><>砫<EFBFBD> <20>뢮<EFBFBD><EBA2AE><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>
|
|
|
|
|
.start:
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD>騢<EFBFBD><E9A8A2><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> <20><> ⥪<>騩 ᨬ<><E1A8AC><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
inc ebx ;(*1)
|
|
|
|
|
.draw_text_without_inc:
|
|
|
|
|
;<3B><>ᬮ<EFBFBD>ਬ,<2C><> <20><>室<EFBFBD><E5AEA4> <20><> ⥪<><E2A5AA> <20><> <20>࠭<EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
mov esi,[windowheight] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> esi ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax,edx
|
|
|
|
|
and eax,0x0000FFFF
|
|
|
|
|
add eax,64
|
|
|
|
|
cmp eax,esi
|
|
|
|
|
ja end_draw_text ;<3B><> <20><>室<EFBFBD><E5AEA4> <20><> <20>।<EFBFBD><E0A5A4><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD>.
|
|
|
|
|
;<3B><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>ਧ<EFBFBD><E0A8A7>⠫<EFBFBD> (+18 <20> ⥪<>饩 <20><><EFBFBD><EFBFBD>樨)
|
|
|
|
|
mov esi,18*65536
|
|
|
|
|
add edx,esi
|
|
|
|
|
; <20><>ᬮ<EFBFBD>ਬ, <20><> <20><>襫 <20><> ⥪<><E2A5AA> <20><> <20>࠭<EFBFBD><E0A0AD><EFBFBD> <20><> <20><>ਧ<EFBFBD><E0A8A7>⠫<EFBFBD>
|
|
|
|
|
; <20> <20><>襫 - <20><> <20><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD> <20><>᮪
|
|
|
|
|
mov esi,[windowwidth] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> esi ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
shl esi,16
|
|
|
|
|
mov eax,edx
|
|
|
|
|
and eax,0xFFFF0000
|
|
|
|
|
add eax,40*65536
|
|
|
|
|
cmp eax,esi
|
|
|
|
|
jna .horizontal_check_ok ;<3B> eax>est, <20><> <20><> <20><>室<EFBFBD><E5AEA4> <20><> <20>।<EFBFBD><E0A5A4><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
.skip_line_end_step:
|
|
|
|
|
mov ah,byte [ebx]
|
|
|
|
|
cmp ah,0x00
|
|
|
|
|
je .end_line_to_next_line
|
|
|
|
|
cmp ah,0xFE
|
|
|
|
|
je end_draw_text
|
|
|
|
|
cmp ah,0xFF
|
|
|
|
|
je end_draw_text
|
|
|
|
|
inc ebx
|
|
|
|
|
jmp .skip_line_end_step
|
|
|
|
|
;-------------------------------------------
|
|
|
|
|
.end_line_to_next_line:
|
|
|
|
|
and edx,0x0000FFFF
|
|
|
|
|
jmp .draw_text_without_inc
|
|
|
|
|
;-------------------------------------------
|
|
|
|
|
.horizontal_check_ok:
|
|
|
|
|
;<3B><EFBFBD>ਬ, <20><> <20><><EFBFBD><EFBFBD><EFBFBD>稫<EFBFBD><E7A8AB> <20><> <20>ப
|
|
|
|
|
mov esi, [startline]
|
|
|
|
|
cmp esi, lessoncomplete
|
|
|
|
|
jne .in_process
|
|
|
|
|
;<3B> <20><><EFBFBD><EFBFBD><EFBFBD>稫<EFBFBD><E7A8AB>, ⥪<><E2A5AA> <20>뢮<EFBFBD><EBA2AE><EFBFBD><EFBFBD> <20>㦭<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov edi, green_text
|
|
|
|
|
jmp .color_set_sucessful
|
|
|
|
|
;--------------------------------------------
|
|
|
|
|
.in_process:
|
|
|
|
|
cmp ebx, [currentsymb] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<>騩 <20><><EFBFBD><EFBFBD>ࠥ<EFBFBD><E0A0A5><EFBFBD> ᨬ<><E1A8AC><EFBFBD>?
|
|
|
|
|
je .red ; <20><><EFBFBD> <20><>筮!
|
|
|
|
|
ja .black ; <20><><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD> <20><> <20><><EFBFBD> <20><> <20><><EFBFBD>ࠫ<EFBFBD>
|
|
|
|
|
mov edi, gray_text ; <20><><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD> <20><> 㦥 <20><><EFBFBD>ࠫ<EFBFBD>
|
|
|
|
|
jmp .color_set_sucessful
|
|
|
|
|
;--------------------------------------------
|
|
|
|
|
.red:
|
|
|
|
|
mov edi, red_text
|
|
|
|
|
jmp .color_set_sucessful
|
|
|
|
|
;---------------------------------------------
|
|
|
|
|
.black:
|
|
|
|
|
mov edi, black_text ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20> 梥<>
|
|
|
|
|
.color_set_sucessful:
|
|
|
|
|
xor esi,esi
|
|
|
|
|
movzx si, byte [ebx]
|
|
|
|
|
cmp si, 0x0000
|
|
|
|
|
jne .continue_drawing
|
|
|
|
|
; call increase_y;
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD>稬 <20><><EFBFBD>⨪<EFBFBD><E2A8AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20>뢮<EFBFBD><EBA2AE> <20>㪢,
|
|
|
|
|
; <20> <20><><EFBFBD>稫<EFBFBD><E7A8AB><EFBFBD> <20><>ப<EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD>⨫<EFBFBD><E2A8AB> <20><><EFBFBD><EFBFBD> 0x00)
|
|
|
|
|
and edx,0x0000FFFF
|
|
|
|
|
add edx, 33
|
|
|
|
|
jmp .continue_text_proc
|
|
|
|
|
;----------------------------------------------
|
|
|
|
|
.continue_drawing:
|
|
|
|
|
cmp si, 0x00FF
|
|
|
|
|
je end_draw_text
|
|
|
|
|
cmp si, 0x00FE
|
|
|
|
|
je end_draw_text
|
|
|
|
|
;<3B><><EFBFBD>㥬 <20>㪢<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
push ebx
|
|
|
|
|
push edx
|
|
|
|
|
movzx eax, byte [ebx]
|
|
|
|
|
shl eax,6
|
|
|
|
|
add eax, big_font
|
|
|
|
|
mov ebx, eax
|
|
|
|
|
pop edx
|
|
|
|
|
mov ecx, 16*65536+32
|
|
|
|
|
; <20> edx <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD>
|
|
|
|
|
mov esi, 1
|
|
|
|
|
; <20> edi <20><><EFBFBD><EFBFBD><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
xor ebp,ebp
|
|
|
|
|
mcall 65
|
|
|
|
|
pop ebx
|
|
|
|
|
;<3B><> <20>⮬ <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20>㪢<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>襭<EFBFBD>
|
|
|
|
|
.continue_text_proc:
|
|
|
|
|
; inc edi
|
|
|
|
|
jmp .start
|
2011-02-15 12:55:49 +01:00
|
|
|
|
end_draw_text:
|
|
|
|
|
ret
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
redraw_2_symbols:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;<3B><EFBFBD>ਬ, <20><> <20>멤<EFBFBD><EBA9A4> <20><> <20><> <20><><EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD><EFBFBD> <20><> <20>࠭<EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⨬<EFBFBD><E2A8AC>
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20> <20>멤<EFBFBD><EBA9A4> - <20><><EFBFBD><E0AEAB><EFBFBD> <20><>ப<EFBFBD> <20><> <20><>ਧ<EFBFBD><E0A8A7>⠫<EFBFBD>
|
|
|
|
|
mov esi, [windowwidth] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> esi ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax, [currentsymb]
|
|
|
|
|
sub eax, [startline]
|
|
|
|
|
mov ecx, 18
|
|
|
|
|
mul ecx
|
|
|
|
|
add eax, 20
|
|
|
|
|
add eax, 20
|
|
|
|
|
add eax, 40
|
|
|
|
|
cmp eax, esi
|
|
|
|
|
jna r2s_horizontal_check_ok ;<3B> eax>est, <20><> <20><> <20><>室<EFBFBD><E5AEA4> <20><> <20>।<EFBFBD><E0A5A4><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
;<3B>⠪, <20><> <20><>室<EFBFBD><E5AEA4> <20><> <20>࠭<EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD>... <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>...
|
|
|
|
|
;<3B><>ப<EFBFBD> <20>ਤ<EFBFBD><E0A8A4><EFBFBD><EFBFBD> <20><><EFBFBD><E0AEAB><EFBFBD><EFBFBD>...
|
|
|
|
|
mov eax, [currentsymb]
|
|
|
|
|
dec eax
|
|
|
|
|
mov [startline], eax
|
|
|
|
|
call draw_window
|
|
|
|
|
jmp return_from_redraw_2_symbols
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
r2s_horizontal_check_ok:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>㪢<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx, [currentsymb]
|
|
|
|
|
dec ebx
|
|
|
|
|
movzx eax, byte [ebx]
|
|
|
|
|
shl eax,6
|
|
|
|
|
add eax, big_font
|
|
|
|
|
mov ebx, eax
|
|
|
|
|
mov ecx, 16*65536+32
|
|
|
|
|
mov eax, [currentsymb]
|
|
|
|
|
sub eax, [startline]
|
|
|
|
|
dec eax
|
|
|
|
|
imul eax,18
|
|
|
|
|
add eax, 18
|
|
|
|
|
shl eax,16
|
|
|
|
|
add eax, 40
|
|
|
|
|
mov edx, eax
|
|
|
|
|
xor ebp,ebp
|
|
|
|
|
mcall 65,,,,1,gray_text
|
|
|
|
|
;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx, [currentsymb]
|
|
|
|
|
movzx eax, byte [ebx]
|
|
|
|
|
shl eax,6
|
|
|
|
|
add eax, big_font
|
|
|
|
|
mov ebx, eax
|
|
|
|
|
mov ecx, 16*65536+32
|
|
|
|
|
mov eax, [currentsymb]
|
|
|
|
|
sub eax, [startline]
|
|
|
|
|
imul eax,18
|
|
|
|
|
add eax, 18
|
|
|
|
|
shl eax,16
|
|
|
|
|
add eax, 40
|
|
|
|
|
mov edx, eax
|
|
|
|
|
mcall 65,,,,1,red_text
|
2011-02-15 12:55:49 +01:00
|
|
|
|
return_from_redraw_2_symbols:
|
|
|
|
|
ret
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
redraw_mistakes:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD>ᨬ <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|
|
|
|
mcall 13,<59,75>,<14,10>,0x00CCCCCC
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
mcall 4,<60,15>,0x80AA0000,mistakestext
|
|
|
|
|
; <20>뢥<EFBFBD><EBA2A5><EFBFBD> <20><> <20>訡<EFBFBD><E8A8A1>
|
|
|
|
|
mcall 47,0x80040000,[mistakes],<105,15>,0x00AA0000
|
2011-02-15 12:55:49 +01:00
|
|
|
|
ret
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
count_lines:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
xor ecx, ecx ; <20> ecx - <20><><EFBFBD><EFBFBD>稪 <20><>ப
|
|
|
|
|
inc ecx ; <20> <20><><EFBFBD> 1 <20><>ப<EFBFBD>
|
|
|
|
|
; <20><>稭<EFBFBD><E7A8AD><EFBFBD> ࠧ<><E0A0A7><EFBFBD>...
|
|
|
|
|
mov eax, [startline]
|
|
|
|
|
dec eax
|
2011-02-15 12:55:49 +01:00
|
|
|
|
cl_next_step:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
inc eax
|
|
|
|
|
mov bh, [eax]
|
|
|
|
|
cmp bh, 0x00
|
|
|
|
|
jne cl_not_new_line
|
|
|
|
|
inc ecx
|
|
|
|
|
jmp cl_next_step
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
cl_not_new_line:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
cmp bh, 0xFE
|
|
|
|
|
je cl_end
|
|
|
|
|
cmp bh, 0xFF
|
|
|
|
|
je cl_end
|
|
|
|
|
jmp cl_next_step
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
cl_end:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mov [linecount],ecx
|
2011-02-15 12:55:49 +01:00
|
|
|
|
ret
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
reset_speed_counters:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
xor eax,eax
|
|
|
|
|
mov [symbtyped],eax
|
|
|
|
|
mov [typestarttime],eax
|
|
|
|
|
mov [currenttime],eax
|
|
|
|
|
mov [typingspeed],eax
|
2011-02-15 12:55:49 +01:00
|
|
|
|
ret
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
count_speed:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall 26,9
|
|
|
|
|
mov [currenttime], eax
|
|
|
|
|
mov ebx, [typestarttime]
|
|
|
|
|
sub eax, ebx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> eax - <20><> <20><><EFBFBD>襤<EFBFBD><E8A5A4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ᥪ㭤
|
|
|
|
|
mov ecx, [symbtyped]
|
|
|
|
|
cmp ecx, 0x00
|
|
|
|
|
jne cs_all_ok
|
|
|
|
|
inc ecx
|
2011-02-15 12:55:49 +01:00
|
|
|
|
cs_all_ok:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
xor edx, edx;
|
|
|
|
|
div ecx ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> eax - <20>।<EFBFBD><E0A5A4><EFBFBD> <20><>㧠 <20><><EFBFBD><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ecx, eax
|
|
|
|
|
cmp ecx, 0x00
|
|
|
|
|
jne cs_all_ok_2
|
|
|
|
|
inc ecx
|
2011-02-15 12:55:49 +01:00
|
|
|
|
cs_all_ok_2:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
xor edx, edx
|
|
|
|
|
mov eax, 6000
|
|
|
|
|
div ecx
|
|
|
|
|
mov [typingspeed], eax ;<3B><><EFBFBD> <20> <20><><EFBFBD>. <20> [typingspeed] - <20>।<EFBFBD><E0A5A4><EFBFBD> <><E1AAAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2011-02-15 12:55:49 +01:00
|
|
|
|
ret
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
speed_to_string:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
; <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD> <20><> <20> <20><>ப<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> <20><> <20><>६<EFBFBD> <20><>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> speedbytes <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
xor edx, edx
|
|
|
|
|
mov eax, [typingspeed]
|
|
|
|
|
mov ecx, 10
|
|
|
|
|
div ecx
|
|
|
|
|
add dl, 30h
|
|
|
|
|
mov [speedbytes + 3], dl
|
|
|
|
|
xor edx, edx
|
|
|
|
|
div ecx
|
|
|
|
|
add dl, 30h
|
|
|
|
|
mov [speedbytes + 2], dl
|
|
|
|
|
xor edx, edx
|
|
|
|
|
div ecx
|
|
|
|
|
add dl, 30h
|
|
|
|
|
mov [speedbytes + 1], dl
|
|
|
|
|
xor edx, edx
|
|
|
|
|
div ecx
|
|
|
|
|
cmp dl, 0x00
|
|
|
|
|
je sts_move_space
|
|
|
|
|
add dl, 30h
|
|
|
|
|
mov [speedbytes], dl
|
|
|
|
|
jmp sts_end
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
sts_move_space:
|
|
|
|
|
mov [speedbytes], 0x20
|
|
|
|
|
sts_end:
|
2011-02-15 12:55:49 +01:00
|
|
|
|
ret
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
get_screen_params:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
mcall 14
|
|
|
|
|
mov [areaheight], ax
|
|
|
|
|
push ax
|
|
|
|
|
shr eax, 16
|
|
|
|
|
mov [areawidth],ax
|
|
|
|
|
;<3B> ax <20><> <20>०<EFBFBD><E0A5A6><EFBFBD><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD><EFBFBD> <20><>ਭ<EFBFBD> <20><><EFBFBD><EFBFBD>. <20><>ᯮ<EFBFBD><E1AFAE><EFBFBD>㥬<EFBFBD><E3A5AC> <20>⨬
|
|
|
|
|
sub ax, 780 ;<3B><><EFBFBD>⥬ <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
shr ax, 1
|
|
|
|
|
mov [windowx], ax
|
|
|
|
|
; <20><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
xor ax, ax
|
|
|
|
|
pop ax ; <20><>⮫<EFBFBD><E2AEAB><EFBFBD><EFBFBD> <20><> <20>⥪<EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
sub ax, 580
|
|
|
|
|
shr ax, 1
|
|
|
|
|
mov [windowy], ax
|
2011-02-15 12:55:49 +01:00
|
|
|
|
ret
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
;draw_speed:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD>ᨬ <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|
|
|
|
; mcall 13,<59,340>,<29,10>,0x00CCCCCC
|
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>):"
|
|
|
|
|
; mcall 4,<60,30>,0x80008800,speedtext
|
|
|
|
|
; <20>뢥<EFBFBD><EBA2A5><EFBFBD> <20><>
|
|
|
|
|
; mcall 47,0x80040000,[typingspeed],<305,30>,0x00008800
|
|
|
|
|
; ret
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
include 'data.inc'
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
IM_END:
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
par:
|
2011-08-19 12:52:19 +02:00
|
|
|
|
params:
|
|
|
|
|
rb 1024
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
procinfo:
|
|
|
|
|
rb 1024
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
rb 1024
|
|
|
|
|
stacktop:
|
|
|
|
|
;---------------------------------------------------------------------
|
2011-02-15 12:55:49 +01:00
|
|
|
|
I_END:
|