forked from KolibriOS/kolibrios
646 lines
31 KiB
NASM
646 lines
31 KiB
NASM
|
;#___________________________________________________________________________________________________
|
|||
|
;****************************************************************************************************|
|
|||
|
; Program Palitra (c) Sergei Steshin (Akyltist) |
|
|||
|
;----------------------------------------------------------------------------------------------------|
|
|||
|
;; compiler: FASM 1.69.31 |
|
|||
|
;; version: 0.2.0 |
|
|||
|
;; last update: 15/09/2012 |
|
|||
|
;; e-mail: dr.steshin@gmail.com |
|
|||
|
;.....................................................................................................
|
|||
|
;; History: |
|
|||
|
;; 0.1.0 - <20><>ࢠ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> |
|
|||
|
;; 0.2.0 - <20><><EFBFBD>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>訩 <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᥫ<EFBFBD>. |
|
|||
|
;; - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㭪<EFBFBD>, <20><><EFBFBD> ॣ㫨<E3ABA8><E0AEA2><EFBFBD><EFBFBD> rgb <20><><EFBFBD>⠢<EFBFBD><E2A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<><E6A2A5> <20> <20>뢮<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>⠢<EFBFBD><E2A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. |
|
|||
|
;; - <20><>࠭ <20>뢮<EFBFBD> 梥<><E6A2A5> <20> <20><><EFBFBD><EFBFBD>୮<EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><> <20><><EFBFBD>㠫쭮<E3A0AB><ECADAE><EFBFBD><EFBFBD>). |
|
|||
|
;; - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ᬥ⨪<E1ACA5>. |
|
|||
|
;.....................................................................................................
|
|||
|
;; All rights reserved. |
|
|||
|
;; |
|
|||
|
;; Redistribution and use in source and binary forms, with or without modification, are permitted |
|
|||
|
;; provided that the following conditions are met: |
|
|||
|
;; * Redistributions of source code must retain the above copyright notice, this list of |
|
|||
|
;; conditions and the following disclaimer. |
|
|||
|
;; * Redistributions in binary form must reproduce the above copyright notice, this list of |
|
|||
|
;; conditions and the following disclaimer in the documentation and/or other materials |
|
|||
|
;; provided with the distribution. |
|
|||
|
;; * Neither the name of the <organization> nor the names of its contributors may be used to |
|
|||
|
;; endorse or promote products derived from this software without specific prior written |
|
|||
|
;; permission. |
|
|||
|
;; |
|
|||
|
;; THIS SOFTWARE IS PROVIDED BY Sergei Steshin ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, |
|
|||
|
;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
|
|||
|
;; PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY DIRECT, |
|
|||
|
;; INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
|
|||
|
;; TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|
|||
|
;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|
|||
|
;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
|
|||
|
;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|||
|
;....................................................................................................|
|
|||
|
|
|||
|
|
|||
|
;#___________________________________________________________________________________________________
|
|||
|
;****************************************************************************************************|
|
|||
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> |
|
|||
|
;----------------------------------------------------------------------------------------------------/
|
|||
|
use32
|
|||
|
org 0x0
|
|||
|
|
|||
|
db 'MENUET01'
|
|||
|
dd 0x01
|
|||
|
dd START
|
|||
|
dd I_END
|
|||
|
dd 0x1000
|
|||
|
dd 0x1000
|
|||
|
dd 0x0
|
|||
|
dd 0x0
|
|||
|
|
|||
|
include 'macros.inc'
|
|||
|
|
|||
|
START:
|
|||
|
;#___________________________________________________________________________________________________
|
|||
|
;****************************************************************************************************|
|
|||
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
|
|||
|
;----------------------------------------------------------------------------------------------------/
|
|||
|
red:
|
|||
|
call draw_window ; <20><><EFBFBD>뢠<EFBFBD><EBA2A0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
still:
|
|||
|
mcall 10 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 10 - <20><><EFBFBD><EFBFBD><EFBFBD> ᮡ<><E1AEA1><EFBFBD><EFBFBD>
|
|||
|
cmp eax,1 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD> ?
|
|||
|
je red ; <20> <20><> - <20><> <20><><EFBFBD><EFBFBD><EFBFBD> red
|
|||
|
cmp eax,2 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ?
|
|||
|
je key ; <20> <20><> - <20><> key
|
|||
|
cmp eax,3 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ?
|
|||
|
je button ; <20> <20><> - <20><> button
|
|||
|
jmp still ; <20> <20><>㣮<EFBFBD> ᮡ<>⨥ - <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|||
|
;end_still
|
|||
|
|
|||
|
|
|||
|
key: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mcall 2 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 2 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD> (<28> ah) (<28><><EFBFBD> <20> <20>ਭ樯<E0A8AD> <20><> <20>㦭<EFBFBD>)
|
|||
|
jmp still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|||
|
;end_key
|
|||
|
|
|||
|
button:
|
|||
|
mcall 17 ; 17 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䨪<EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cmp ah, 1 ; <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> 1,
|
|||
|
jz bexit ; <20><>室<EFBFBD><E5AEA4>
|
|||
|
cmp ah, 7
|
|||
|
jne color_button
|
|||
|
call mouse_get
|
|||
|
jmp still
|
|||
|
color_button:
|
|||
|
push eax
|
|||
|
call mouse_local ; <20><><EFBFBD><EFBFBD>稫 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD>
|
|||
|
mov ebx,129
|
|||
|
mov ecx,[mouse_y]
|
|||
|
sub ebx,ecx
|
|||
|
mov ecx,3
|
|||
|
imul ecx,ebx
|
|||
|
|
|||
|
;push ecx
|
|||
|
|
|||
|
|
|||
|
pop eax
|
|||
|
red_button:
|
|||
|
cmp ah, 8
|
|||
|
jne green_button
|
|||
|
mov [cred],cl
|
|||
|
call set_spectr
|
|||
|
jmp still
|
|||
|
green_button:
|
|||
|
cmp ah, 9
|
|||
|
jne blue_button
|
|||
|
mov [cgreen],cl
|
|||
|
call set_spectr
|
|||
|
jmp still
|
|||
|
blue_button:
|
|||
|
cmp ah, 10
|
|||
|
jne still
|
|||
|
mov [cblue],cl
|
|||
|
call set_spectr
|
|||
|
jmp still
|
|||
|
bexit:
|
|||
|
mcall -1 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|
|||
|
;end_button
|
|||
|
|
|||
|
;#___________________________________________________________________________________________________
|
|||
|
;****************************************************************************************************|
|
|||
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
|
|||
|
;----------------------------------------------------------------------------------------------------/
|
|||
|
draw_window:
|
|||
|
mov eax,12 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 12: <20><><EFBFBD><EFBFBD>砥<EFBFBD>, <20><><EFBFBD> <20>㤥<EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,1 ; 1,<2C><>砫<EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD>
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD>
|
|||
|
|
|||
|
mov eax,48 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 48 - <20>⨫<EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,3 ; <20><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 3 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<><E6A2A5> <20><><EFBFBD><EFBFBD>.
|
|||
|
mov ecx,sc ; <20><><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> ࠧ<><E0A0A7> edx <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov edx,sizeof.system_colors ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⠡<><E2A0A1><EFBFBD><EFBFBD> 梥⮢ (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 40 <20><><EFBFBD><EFBFBD>)
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD>
|
|||
|
|
|||
|
mov eax,48 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 48 - <20>⨫<EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
mov ebx,4 ; <20><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 4 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> eax = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᪨<><E1AAA8>.
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD>
|
|||
|
mov ecx,eax ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᪨<><E1AAA8>
|
|||
|
|
|||
|
xor eax,eax ; <20><><EFBFBD>頥<EFBFBD> eax (mov eax,0) (<28>㭪<EFBFBD><E3ADAA><EFBFBD> 0)
|
|||
|
mov ebx,200 shl 16+325 ; [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x]*65536 + [ࠧ<><E0A0A7><EFBFBD> <20><> <20><><EFBFBD> x]
|
|||
|
add ecx,200 shl 16+168 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᪨<><E1AAA8> + [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD> <20><> y]
|
|||
|
mov edx,[sc.work] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⨫<EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><>䮫<EFBFBD><E4AEAB>
|
|||
|
or edx,0x34000000 ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> ᪨<><E1AAA8><EFBFBD> 䨪<><E4A8AA><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> ࠧ<><E0A0A7>
|
|||
|
mov edi,title ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD>
|
|||
|
|
|||
|
call draw_palitra ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
call draw_result ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
mov eax,8 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 8 - <20><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD>/㤠<><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,89 shl 16+222 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20> [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,9 shl 16+147 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov edx,0x60000007 ; <20><>砫쭮<E7A0AB> ID <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - 0xXYnnnnnn
|
|||
|
int 0x40
|
|||
|
|
|||
|
mov ebx,10 shl 16+8 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20> [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov edx,0x60000008 ; ID = 8
|
|||
|
mov ecx,45 shl 16+85 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40 ; <20><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <><E1ABA0><EFBFBD> red
|
|||
|
add ebx,29 shl 16 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞
|
|||
|
inc edx ; ID = 9
|
|||
|
int 0x40 ; <20><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <><E1ABA0><EFBFBD> green
|
|||
|
add ebx,29 shl 16 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞
|
|||
|
inc edx ; ID = 10
|
|||
|
int 0x40 ; <20><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <><E1ABA0><EFBFBD> blue
|
|||
|
|
|||
|
mov eax,12 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 12: <20><><EFBFBD><EFBFBD>砥<EFBFBD>, <20><><EFBFBD> <20>㤥<EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,2 ; 1,<2C><>砫<EFBFBD> <20><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD>
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD>
|
|||
|
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
;#___________________________________________________________________________________________________
|
|||
|
;****************************************************************************************************|
|
|||
|
; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
|
|||
|
;----------------------------------------------------------------------------------------------------/
|
|||
|
|
|||
|
mouse_global:
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>砥<EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
;.................................................................................................
|
|||
|
mov eax,37 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 37 - ࠡ<><E0A0A1><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,0 ; <20><><EFBFBD> <20>㦭<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD>
|
|||
|
int 0x40 ; eax = x*65536 + y, (x,y)=<3D><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ecx,eax ;
|
|||
|
shr ecx,16 ; ecx = x+1
|
|||
|
movzx edx,ax ; edx = y+1
|
|||
|
dec ecx ; ecx = x
|
|||
|
dec edx ; edx = y
|
|||
|
mov [mouse_x],ecx ; mouse_x = x
|
|||
|
mov [mouse_y],edx ; mouse_y = y
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_mouse_global
|
|||
|
|
|||
|
mouse_local:
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>砥<EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>⭮<EFBFBD><E2ADAE>⥫쭮 <20><><EFBFBD><EFBFBD>
|
|||
|
;.................................................................................................
|
|||
|
mov eax,37 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 37 - ࠡ<><E0A0A1><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,1 ; <20><><EFBFBD> <20>㦭<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD>
|
|||
|
int 0x40 ; eax = x*65536 + y, (x,y)=<3D><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ecx,eax ;
|
|||
|
shr ecx,16 ; ecx = x+1
|
|||
|
movzx edx,ax ; edx = y+1
|
|||
|
dec ecx ; ecx = x
|
|||
|
dec edx ; edx = y
|
|||
|
mov [mouse_x],ecx ; mouse_x = x
|
|||
|
mov [mouse_y],edx ; mouse_y = y
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_mouse_local
|
|||
|
|
|||
|
desktop_get:
|
|||
|
;.................................................................................................
|
|||
|
; <20><>।<EFBFBD><E0A5A4>塞 <20><>ਭ<EFBFBD> <20><>࠭<EFBFBD>
|
|||
|
;.................................................................................................
|
|||
|
mov eax,14 ; <20><>।<EFBFBD><E0A5A4>塞 <20><>ਭ<EFBFBD> <20><>࠭<EFBFBD> (eax = [xsize]*65536 + [ysize])
|
|||
|
int 0x40 ; xsize = ࠧ<><E0A0A7><EFBFBD> <20><> <20><>ਧ<EFBFBD><E0A8A7>⠫<EFBFBD> - 1
|
|||
|
mov ebx,eax ;
|
|||
|
shr ebx,16 ; ebx = xsize-1
|
|||
|
;movzx edx,ax ;; edx = ysize-1 (<28><>譨<EFBFBD> <20><><EFBFBD>)
|
|||
|
inc ebx ; ebx = xsize
|
|||
|
;inc edx ;; edx = ysize (<28><>譨<EFBFBD> <20><><EFBFBD>)
|
|||
|
mov [desctop_w],ebx
|
|||
|
ret
|
|||
|
;end_desktop_get
|
|||
|
|
|||
|
mouse_get:
|
|||
|
mov esi,2 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 䫠<> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>横<EFBFBD><E6A8AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
call mouse_global
|
|||
|
call desktop_get
|
|||
|
re_mouse_loop: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><>⪠ <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,[desctop_w]
|
|||
|
imul ebx,[mouse_y] ; ebx = y*xsize
|
|||
|
add ebx,[mouse_x] ; ebx = y*xsize+x
|
|||
|
|
|||
|
;.................................................................................................
|
|||
|
; <20><>६ 梥<> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;.................................................................................................
|
|||
|
mov eax,35 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<><E6A2A5>
|
|||
|
;mov ebx,ecx ;; ebx = y*xsize+x (<28><>譨<EFBFBD> <20><><EFBFBD>)
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>砥<EFBFBD> 梥<> <20> eax
|
|||
|
cmp eax,[sc.work] ; <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 䮭<><E4AEAD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
je mouse_err ; <20> <20><><EFBFBD> <20><> - <20><> <20><>祣<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cmp eax,0x222222 ; <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 梥⮬ <20><>⪨
|
|||
|
je mouse_err ; <20> <20><><EFBFBD> <20><> - <20><> <20><>祣<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
jmp mouse_set ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><>룠<EFBFBD><EBA3A0> <20>⮡<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> 梥<> <20><>⪨
|
|||
|
mouse_err: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> 䮭
|
|||
|
inc [mouse_y] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ᬥ頥<E1ACA5> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᭠砫<E1ADA0> <20><> <20>
|
|||
|
inc [mouse_x] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ᬥ頥<E1ACA5> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>⮬ <20><> <20>
|
|||
|
dec esi ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD>蠥<EFBFBD> 䫠<>
|
|||
|
cmp esi,0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>㫥<EFBFBD>
|
|||
|
jz mouse_exit ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20> <20><><EFBFBD><EFBFBD> <20><> ᤥ<><E1A4A5><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
jmp re_mouse_loop ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20> <20><> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ᥫ<EFBFBD><E1A5AB><EFBFBD> <20><><EFBFBD>ᥫ<EFBFBD>
|
|||
|
mouse_set:
|
|||
|
mov [color],eax ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 梥<>
|
|||
|
call draw_result ; <20>뢮<EFBFBD><EBA2AE><EFBFBD> १<><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mouse_exit:
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_mouse_get----------------------------------------------------------------------------------------
|
|||
|
|
|||
|
draw_palitra:
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> 䮭<> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;.................................................................................................
|
|||
|
mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
mov edx,0x222222 ; 梥<>
|
|||
|
mov ecx,9 shl 16+73 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov esi,2 ; <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
re_draw:
|
|||
|
mov ebx,89 shl 16+73 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov edi,3 ; <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢠ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
for_fon_loop:
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD>
|
|||
|
add ebx,75 shl 16 ; <20><><EFBFBD>頥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20>
|
|||
|
dec edi ; <20><><EFBFBD><EFBFBD><EFBFBD>蠥<EFBFBD> <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cmp edi,0 ; <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>㫥<EFBFBD>
|
|||
|
jnz for_fon_loop ; <20> <20><> <20><><EFBFBD><EFBFBD> <20><> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|||
|
dec esi ; <20><><EFBFBD><EFBFBD><EFBFBD>蠥<EFBFBD> <20><><EFBFBD>
|
|||
|
cmp esi,0 ; <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>㫥<EFBFBD>
|
|||
|
mov ecx,84 shl 16+73 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
jnz re_draw ; <20> <20><> <20><><EFBFBD><EFBFBD> <20><> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|||
|
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 横<><E6A8AA>
|
|||
|
;.................................................................................................
|
|||
|
mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
mov edx,0x0FFFFFFF ; 梥<>
|
|||
|
mov esi,6 ; <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢠ <20><><EFBFBD><EFBFBD>楢 (#4,8)
|
|||
|
mov ebx,78 shl 16+8 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
for_abz:
|
|||
|
;;push esi ; <20><><EFBFBD>࠭塞 <20><><EFBFBD>祭<EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD>稪<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>⥪
|
|||
|
cmp esi,3
|
|||
|
jne x2_line
|
|||
|
mov ebx,78 shl 16+8
|
|||
|
x2_line:
|
|||
|
add ebx,3 shl 16 ; <20><><EFBFBD>頥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> x
|
|||
|
mov edi,8 ; <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢠ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>ப<EFBFBD>
|
|||
|
for_stolbik:
|
|||
|
push edi ; <20><><EFBFBD>࠭塞 <20><><EFBFBD>祭<EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD>稪<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>⥪
|
|||
|
mov edi,8 ; <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢠ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>ப<EFBFBD>
|
|||
|
mov ecx, 1 shl 16+8 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
cmp esi,3
|
|||
|
jg y2_line ; <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4 <20><> <20><><EFBFBD><EFBFBD>ਬ
|
|||
|
mov ecx,76 shl 16+8
|
|||
|
y2_line:
|
|||
|
add ebx,9 shl 16 ; <20><><EFBFBD>頥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> x
|
|||
|
for_loop:
|
|||
|
add ecx,9 shl 16 ; <20><><EFBFBD>頥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> y
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD>
|
|||
|
sub edx,32 shl 16
|
|||
|
dec edi ; <20><><EFBFBD><EFBFBD><EFBFBD>蠥<EFBFBD> <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cmp edi,0 ; <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>㫥<EFBFBD>
|
|||
|
jnz for_loop ; <20> <20><> <20><><EFBFBD><EFBFBD> <20><> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|||
|
sub edx,32 shl 8
|
|||
|
pop edi ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
dec edi ; <20><><EFBFBD><EFBFBD><EFBFBD>蠥<EFBFBD> <20><><EFBFBD>
|
|||
|
cmp edi,0 ; <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>㫥<EFBFBD>
|
|||
|
jnz for_stolbik ; <20> <20><> <20><><EFBFBD><EFBFBD> <20><> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|||
|
sub edx,48 ; (#64,32)
|
|||
|
;;pop esi ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>稪 <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
dec esi ; <20><><EFBFBD><EFBFBD><EFBFBD>蠥<EFBFBD> <20><><EFBFBD>
|
|||
|
cmp esi,0 ; <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>㫥<EFBFBD>
|
|||
|
jnz for_abz ; <20> <20><> <20><><EFBFBD><EFBFBD> <20><> <20> <20><>砫<EFBFBD> 横<><E6A8AA>
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_draw_palitra-------------------------------------------------------------------------------------
|
|||
|
|
|||
|
draw_result:
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> १<><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<><E6A2A5> <20> hex
|
|||
|
;.................................................................................................
|
|||
|
mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
mov edx,0x222222 ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,4 shl 16+15 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,9 shl 16+15 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD> (<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>)
|
|||
|
mov ebx,23 shl 16+62 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD> (<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>)
|
|||
|
|
|||
|
mov edx,[color] ; 梥<>
|
|||
|
mov ebx,5 shl 16+13 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,10 shl 16+13 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD> (<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>)
|
|||
|
mov edx,0xFFFFFF ; 梥<>-䮭<>
|
|||
|
mov ebx,24 shl 16+60 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD> (<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>)
|
|||
|
|
|||
|
mov eax,47 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 47 - <20>뢮<EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ecx,[color] ; <20><> (<28><><EFBFBD> bl=0) <20><><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> (<28><><EFBFBD> bl=1)
|
|||
|
mov esi,0x0 ; 0xX0RRGGBB
|
|||
|
mov ebx,256+8 shl 16 ; <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> ⥪<><E2A5AA> (HEX)
|
|||
|
mov edx,34 shl 16+13 ; [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x]*65536 + [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> y]
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD> - <20>뢮<EFBFBD><EBA2AE><EFBFBD> १<><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (HEX)
|
|||
|
|
|||
|
mov eax,4 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 4: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<><E2A5AA> <20> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,27*65536+13 ; [x <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>] *65536 + [y <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>]
|
|||
|
mov ecx,0x0 ; 梥<> ⥪<><E2A5AA><EFBFBD> RRGGBB
|
|||
|
mov edx,hex ; <20><><EFBFBD>㥬 '#'
|
|||
|
mov esi,1 ; <20><><EFBFBD><EFBFBD><EFBFBD> ⥪<><E2A5AA><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int 0x40
|
|||
|
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> r g b <20><><EFBFBD>祭<EFBFBD><E7A5AD>
|
|||
|
;.................................................................................................
|
|||
|
call get_spectr
|
|||
|
mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
mov edx,0x222222 ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,4 shl 16+23 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,142 shl 16+15 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
mov ebx,33 shl 16+23 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
mov ebx,62 shl 16+23 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
mov edx,0xFFFFFF ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,5 shl 16+21 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,143 shl 16+13 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
mov ebx,34 shl 16+21 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
mov ebx,63 shl 16+21 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> r g b <20><><EFBFBD>祭<EFBFBD><E7A5AD>
|
|||
|
;.................................................................................................
|
|||
|
movzx eax,[cred] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,7*65536+146 ; [x <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>] *65536 + [y <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>]
|
|||
|
call draw_value ; <20>뢮<EFBFBD><EBA2AE><EFBFBD> १<><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
movzx eax,[cgreen] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,36*65536+146 ; [x <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>] *65536 + [y <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>]
|
|||
|
call draw_value ; <20>뢮<EFBFBD><EBA2AE><EFBFBD> १<><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
movzx eax,[cblue] ; ᨭ<><E1A8AD>
|
|||
|
mov ebx,65*65536+146 ; [x <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>] *65536 + [y <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>]
|
|||
|
call draw_value ; <20>뢮<EFBFBD><EBA2AE><EFBFBD> १<><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD><EFBFBD>塞 䮭
|
|||
|
;.................................................................................................
|
|||
|
mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
mov edx,[sc.work] ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,8 shl 16+66 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,40 shl 16+87 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
|
|||
|
;mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
;mov edx,0x222222 ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;mov ebx,4 shl 16+23 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
;mov ecx,30 shl 16+105 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
;int 0x40
|
|||
|
;add ebx,29 shl 16 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
;int 0x40
|
|||
|
;add ebx,29 shl 16 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
;int 0x40
|
|||
|
|
|||
|
mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
mov edx,[sc.work] ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,5 shl 16+21 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,31 shl 16+103 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
add ebx,29 shl 16 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
add ebx,29 shl 16 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
|
|||
|
;.................................................................................................
|
|||
|
; <20>뢮<EFBFBD><EBA2AE><EFBFBD> <20>㪢<EFBFBD> r g b
|
|||
|
;.................................................................................................
|
|||
|
mov eax,4 ; 4 - <20>뢥<EFBFBD><EBA2A5><EFBFBD> <20><>ப<EFBFBD> ⥪<><E2A5AA><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
|
|||
|
mov ebx,12 shl 16+34 ; [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x]*65536 + [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> y]
|
|||
|
mov ecx,0x0 ; 0xX0RRGGBB (RR, GG, BB <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<> ⥪<><E2A5AA><EFBFBD>)
|
|||
|
mov edx,cname ; 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>砫<EFBFBD> <20><>ப<EFBFBD>
|
|||
|
mov esi,2 ; <20>뢮<EFBFBD><EBA2AE><EFBFBD><EFBFBD> esi ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
newline: ; 横<>
|
|||
|
int 0x40 ; <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD>
|
|||
|
add ebx,29 shl 16 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞
|
|||
|
add edx,2 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞
|
|||
|
cmp [edx],byte 'x' ; <20>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>⮬ <20>
|
|||
|
jne newline ; <20> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> ࠢ<><E0A0A2>
|
|||
|
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <><E1ABA0><EFBFBD>
|
|||
|
;.................................................................................................
|
|||
|
mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
mov edx,0x222222 ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,12 shl 16+4 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,45 shl 16+85 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
add ebx,29 shl 16 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
add ebx,29 shl 16 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
|
|||
|
mov edx,0xFA0919 ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,13 shl 16+2 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
mov ecx,46 shl 16+83 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> y [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
mov edx,0x08CE19 ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
add ebx,29 shl 16 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
mov edx,0x0909FF ; 梥<>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
add ebx,29 shl 16 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> y]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
int 0x40
|
|||
|
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA>
|
|||
|
;.................................................................................................
|
|||
|
mov edx,0x0 ; 梥<>-<2D><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA>
|
|||
|
mov ebx,10 shl 16+8 ; <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> x [<5B>-<2D><> x]*65536 + [ࠧ<><E0A0A7><EFBFBD>]
|
|||
|
movzx eax,[cred] ; <20><>६ <20><><EFBFBD>祭<EFBFBD><E7A5AD> 梥<><E6A2A5>
|
|||
|
call draw_slider
|
|||
|
add ebx,29 shl 16
|
|||
|
movzx eax,[cgreen] ; <20><>६ <20><><EFBFBD>祭<EFBFBD><E7A5AD> 梥<><E6A2A5>
|
|||
|
call draw_slider
|
|||
|
add ebx,29 shl 16
|
|||
|
movzx eax,[cblue] ; <20><>६ <20><><EFBFBD>祭<EFBFBD><E7A5AD> 梥<><E6A2A5>
|
|||
|
call draw_slider
|
|||
|
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_draw_result
|
|||
|
|
|||
|
draw_slider:
|
|||
|
xor ecx,ecx
|
|||
|
mov cl,0x3 ; <20>㤥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> 3 ⠪ <20><><EFBFBD> <20><><EFBFBD><EFBFBD>㭪<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 85 <20><><EFBFBD>ᥫ<EFBFBD><E1A5AB>
|
|||
|
div cl ; <20><><EFBFBD><EFBFBD><EFBFBD> - 楫<><E6A5AB> <20> al <20><><EFBFBD><EFBFBD>⮪ <20> ah
|
|||
|
mov cl,128 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>窠 <20><><EFBFBD><EFBFBD>㭪<EFBFBD>
|
|||
|
sub cl,al ; cl=cl-al
|
|||
|
shl ecx,16
|
|||
|
add ecx,4 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>砫쭮<E7A0AB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov eax,13 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 13 - <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2><EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>
|
|||
|
int 0x40
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
;end_slider
|
|||
|
|
|||
|
draw_value:
|
|||
|
;.................................................................................................
|
|||
|
; <20>뢮<EFBFBD> <20><> <20><> <20><>ப<EFBFBD> <20> 㪠<><E3AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;.................................................................................................
|
|||
|
push ebx ; <20><><EFBFBD>࠭塞 <20><><EFBFBD><EFBFBD><E1ABA0><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD>
|
|||
|
mov ebx,10 ; <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>᭮<EFBFBD><E1ADAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5><EFBFBD>
|
|||
|
mov edi,buff ; 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>ப<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
call int2ascii ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬 <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><>ப<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> + esi <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov eax,4 ; <20>㭪<EFBFBD><E3ADAA><EFBFBD> 4: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<><E2A5AA> <20> <20><><EFBFBD><EFBFBD>
|
|||
|
pop ebx ; <20><><EFBFBD>⠥<EFBFBD> <20><> <20>⥪<EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA0><EFBFBD><EFBFBD> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD>
|
|||
|
mov ecx,0x0 ; 梥<> ⥪<><E2A5AA><EFBFBD> RRGGBB
|
|||
|
mov edx,buff ; 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>砫<EFBFBD> ⥪<><E2A5AA><EFBFBD>
|
|||
|
int 0x40
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_draw_value
|
|||
|
|
|||
|
hex_digit:
|
|||
|
;.................................................................................................
|
|||
|
; <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ASCII (<28><><EFBFBD> <20><><EFBFBD><EFBFBD>ᨬ<EFBFBD><E1A8AC><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>⥬<EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5><EFBFBD>)
|
|||
|
;.................................................................................................
|
|||
|
cmp dl,10 ; <20> dl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> 0 <20><> 15
|
|||
|
jb .less ; <20> dl<10 <20><> <20><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4>
|
|||
|
add dl,'A'-10 ; 10->A 11->B 12->C ...
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
.less:
|
|||
|
or dl,'0' ; <20> <20><><EFBFBD>⥬<EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5><EFBFBD> 10-<2D> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
ret ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_hex_digit
|
|||
|
|
|||
|
int2ascii:
|
|||
|
;.................................................................................................
|
|||
|
; <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><>ப<EFBFBD>
|
|||
|
;.................................................................................................
|
|||
|
; eax - 32-<2D> <20><><EFBFBD>筮<EFBFBD> <20><>
|
|||
|
; ebx - <20>᭮<EFBFBD><E1ADAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5><EFBFBD>
|
|||
|
; edi - 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>ப<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> esi - <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>
|
|||
|
;pushad
|
|||
|
xor esi,esi ; <20><><EFBFBD><EFBFBD><EFBFBD>塞 <20><><EFBFBD><EFBFBD>稪 ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
convert_loop:
|
|||
|
xor edx,edx ; <20><><EFBFBD><EFBFBD><EFBFBD>塞 ॣ<><E0A5A3><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮪
|
|||
|
div ebx ; eax/ebx - <20><><EFBFBD><EFBFBD>⮪ <20> edx
|
|||
|
call hex_digit ; <20>८<EFBFBD>ࠧ㥬 ᨬ<><E1A8AC><EFBFBD>
|
|||
|
push edx ; <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>⥪
|
|||
|
inc esi ; 㢥<><E3A2A5>稢<EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD><EFBFBD>稪
|
|||
|
test eax,eax ; <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
jnz convert_loop ; <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
cld ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 䫠<> <20><><EFBFBD>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD> DF (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|||
|
write_loop: ; <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
pop eax ; <20><><EFBFBD>⠥<EFBFBD> <20><> <20>⥪<EFBFBD> <20> <20><><EFBFBD>
|
|||
|
stosb ; <20><><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ES:(E)DI
|
|||
|
dec esi ; 㬥<><E3ACA5>蠥<EFBFBD> <20><><EFBFBD><EFBFBD>稪
|
|||
|
test esi,esi ; <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>⠢<EFBFBD><E2A0A2><EFBFBD> <20><> <20>⥪<EFBFBD>
|
|||
|
jnz write_loop ; <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov byte [edi],0 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> <20>㫥<EFBFBD><E3ABA5><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
;popad ; <20><><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD> ॣ<><E0A5A3><EFBFBD>
|
|||
|
; <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>祣<EFBFBD> <20><>饣<EFBFBD> <20> <20>㭪樨, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>祭<EFBFBD><E7A5AD><EFBFBD> <20><>ப<EFBFBD>
|
|||
|
mov edi,buff ; 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>砫<EFBFBD> ⥪<><E2A5AA><EFBFBD>
|
|||
|
call str_len
|
|||
|
mov esi,eax
|
|||
|
ret ; <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_int2ascii
|
|||
|
|
|||
|
get_spectr:
|
|||
|
;.................................................................................................
|
|||
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> r,g,b <20><><EFBFBD>⮢<EFBFBD><E2AEA2><EFBFBD>騥 梥<><E6A2A5>
|
|||
|
;.................................................................................................
|
|||
|
; get blue
|
|||
|
mov ecx,[color]
|
|||
|
movzx eax,cl
|
|||
|
mov [cblue],al
|
|||
|
; get red
|
|||
|
mov eax,ecx
|
|||
|
xor ax,ax
|
|||
|
shr eax,16
|
|||
|
mov [cred],al
|
|||
|
; get green
|
|||
|
shl ecx,16
|
|||
|
shr ecx,24
|
|||
|
mov [cgreen],cl
|
|||
|
ret ; <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_get_spectr
|
|||
|
|
|||
|
set_spectr:
|
|||
|
;.................................................................................................
|
|||
|
; <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> r,g,b 梥<>
|
|||
|
;.................................................................................................
|
|||
|
; get blue
|
|||
|
movzx eax,[cred]
|
|||
|
shl eax,8
|
|||
|
mov al,[cgreen]
|
|||
|
shl eax,8
|
|||
|
mov al,[cblue]
|
|||
|
mov [color],eax
|
|||
|
call draw_result ; <20>뢮<EFBFBD><EBA2AE><EFBFBD> १<><E0A5A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
ret ; <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;end_get_spectr
|
|||
|
|
|||
|
str_len:
|
|||
|
;.................................................................................................
|
|||
|
; <20><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD> (<28>室->EDI ZS offset ; <20><>室->EAX ZS length)
|
|||
|
;.................................................................................................
|
|||
|
push ecx
|
|||
|
push esi
|
|||
|
push edi
|
|||
|
|
|||
|
cld
|
|||
|
xor al, al
|
|||
|
mov ecx, 0FFFFFFFFh
|
|||
|
mov esi, edi
|
|||
|
repne scasb
|
|||
|
sub edi, esi
|
|||
|
mov eax, edi
|
|||
|
dec eax
|
|||
|
|
|||
|
pop edi
|
|||
|
pop esi
|
|||
|
pop ecx
|
|||
|
|
|||
|
ret
|
|||
|
;end_str_len
|
|||
|
;#___________________________________________________________________________________________________
|
|||
|
;****************************************************************************************************|
|
|||
|
; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
|
|||
|
;----------------------------------------------------------------------------------------------------/
|
|||
|
|
|||
|
color dd 00000000h ; <20>࠭<EFBFBD><E0A0AD> <20><><EFBFBD>祭<EFBFBD><E7A5AD> <20><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD> 梥<><E6A2A5>
|
|||
|
mouse_x dd 0 ; <20>࠭<EFBFBD><E0A0AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
mouse_y dd 0 ; <20>࠭<EFBFBD><E0A0AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
desctop_w dd 0 ; <20>࠭<EFBFBD><E0A0AD> <20><>ਭ<EFBFBD> <20><>࠭<EFBFBD>
|
|||
|
sc system_colors ; <20>࠭<EFBFBD><E0A0AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> 梥⮢ ᪨<><E1AAA8>
|
|||
|
title db 'Palitra v0.2',0 ; <20>࠭<EFBFBD><E0A0AD> <20><><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|
|||
|
hex db '#',0 ; <20><><EFBFBD> <20>뢮<EFBFBD><EBA2AE> <20><><EFBFBD><EFBFBD>⪨ <20><><EFBFBD> ⥪<><E2A5AA><EFBFBD>
|
|||
|
cname db 'R G B x' ; <20>࠭<EFBFBD><E0A0AD> ࠧ<><E0A0A7><EFBFBD><EFBFBD> 梥⮢ (red,green,blue) x-<2D><>⪠ <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cred db 0 ; <20>࠭<EFBFBD><E0A0AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᯥ<><E1AFA5><EFBFBD>
|
|||
|
cgreen db 0 ; <20>࠭<EFBFBD><E0A0AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᯥ<><E1AFA5><EFBFBD>
|
|||
|
cblue db 0 ; <20>࠭<EFBFBD><E0A0AD> ᨭ<><E1A8AD> ᯥ<><E1AFA5><EFBFBD>
|
|||
|
buff db '000',0
|
|||
|
I_END:
|
|||
|
|
|||
|
|