kolibrios-fun/programs/games/kox/trunk/main.inc

291 lines
12 KiB
PHP
Raw Normal View History

;#**************************
;#* X-0-X = MAIN()
;#************************** 21/10/2007
cB equ cBLACK
cW equ cWHITE
macro main_loop
{
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;========================================
draw_window:
mov eax,12 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 12: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx,1 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int 0x40
; ===== <EFBFBD><EFBFBD><EFBFBD><EFBFBD> !!!
mov eax,0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx,100*65536+250 ; [x <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] *65536 + [x <EFBFBD><EFBFBD><EFBFBD>]
mov ecx,ebx ;,100*65536+250 ; [y <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] *65536 + [y <EFBFBD><EFBFBD><EFBFBD>]
mov edx,0x02FFFFFF
mov esi,0x808899AA ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RRGGBB
mov edi,0xFFAAcc ; <EFBFBD> <EFBFBD><EFBFBD> RRGGBB
int 0x40
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KOX v0.001
mov eax,4 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx,8*65536+8 ; [x <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] *65536 + [y <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]
mov ecx,0x00224422 ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> RRGGBB
mov edx,text ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
mov esi,texts-text ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int 0x40
;-----------------------------------#-----------------------------------------
; SCENE OF GAME - PLAY YARD - BOARD - DESK - PLAYING FIELD
;---------------
playing_field ;macro in macs.inc
;-------------------------------------------------------------------------------
; ----<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>----
;-------------------------------------------------------------------------------
;buttons:
mov eax,8 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 8: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebx,230*65536+12 ; [x <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] *65536 + [x <EFBFBD><EFBFBD><EFBFBD>]
mov ecx,5*65536+12 ; [y <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] *65536 + [y <EFBFBD><EFBFBD><EFBFBD>]
mov edx,100 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =100
mov esi,0xFF6611 ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RRGGBB
int 0x40 ; ===<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>===
;--------------------------------------------
mov eax,8 ;
mov ebx,200*65536+35 ; ;
mov ecx,25*65536+20 ;
mov edx,200 ;== NEW GAME ==
mov esi,0xCC66CC
int 0x40
;--------------------------------------------
mov eax,4 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NEW
mov ebx,210*65536+30
mov ecx,cB
mov edx,textend
mov esi,3
int 0x40
endbut:
mov eax,12
mov ebx,2
int 0x40
;============================= draw_window: END
event_wait:
mov eax,23 ;==<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>==
mov ebx,100 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᥪ㭤<EFBFBD>
int 0x40
;-------------------------------------------------------------------------------
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> eax, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
;-------------------------------------------------------------------------------
cmp eax,1 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
je redraw
cmp eax,2 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
je key
cmp eax,3 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>?
je button
cmp eax,6 ; mouse - click or move?
je MOUSE
jmp event_wait ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>
; <EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
;-------------------------------------------------------------------------------
; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>
;-------------------------------------------------------------------------------
redraw:
call draw_window ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> draw_window <EFBFBD>
jmp event_wait ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
key:
mov eax,2 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ah.
int 0x40 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp ah,27
je clos0 ; exit on ESC
jmp event_wait ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> event_wait
button:
mov eax,17 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int 0x40 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ah.
;-------------------------------------------------------------------------------
; <EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ᮮ⢥<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>.
;-------------------------------------------------------------------------------
cmp ah,100 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> id=100("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")?
jne noclose ;
clos0: ;
mov eax,-1 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> -1: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>
int 0x40 ;
noclose: ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> id=200( "New" )
mov dword[pox],0
mov dword[pox+4],0 ;clear memory
mov dword[pox_],0 ;rest and other stuff
mov word[poxl],0 ; bits of pole X
mov word[pool],0 ; bits of pole O
;mov byte[fill],0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
;mov byte[xwin],0 ; flag - x winner
;mov byte[owin],0 ; flag - o winner
jmp redraw ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ==>>
;-------------------------------------------------------------------------------
; <EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;-------------------------------------------------------------------------------
MOUSE:
mov eax,37 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
mov ebx,2
int 0x40
cmp eax,0 ; ..<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>
je event_wait
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov eax,37 ; cursor coords
mov ebx,1
int 0x40 ;eax=x*65536+y
mov [px],eax ;[px][py] - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
xor eax,eax
g11: ;1st cell======
cmp word[px],92
ja g12 ;>92
cmp word[py],92
ja g12 ;>92
;mov dword[idx],0 ;N=(0..8)
jmp puts
g12: ;2nd cell========
inc al
cmp word[py],145
ja g13 ;>142
cmp word[px],92
ja g13 ;>92
;mov dword[idx],1 ;N=(0..8)
jmp puts
g13: ;3=========
inc al
cmp word[px],92
ja g21 ;>92
;mov dword[idx],2 ;N=(0..8)
jmp puts
g21: ;4========
inc al
cmp word[px],145
ja g22
cmp word[py],92
ja g22
;mov dword[idx],3 ;N=(0..8)
jmp puts
g22: ;5=======
inc al
cmp word[px],145
ja g23
cmp word[py],145
ja g23
;mov dword[idx],4 ;N=(0..8)
jmp puts
g23: ;6=======
inc al
cmp word[px],142
ja g31 ;>142
;mov dword[idx],5 ;N=(0..8)
jmp puts
g31: ;7=======
inc al
cmp word[py],92
ja g32
;mov dword[idx],6 ;N=(0..8)
jmp puts
g32: ;8======
inc al
cmp word[py],145
ja g33
;mov dword[idx],7 ;N=(0..8)
jmp puts
g33: ;9======
inc al
;mov dword[idx],8 ;N=(0..8)
puts: ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
push eax
pop dword[idx]
mov esi,dword[idx] ;
cmp byte[pox+esi],0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? (0-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
jne event_wait ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
shl esi,2 ;*4
mov eax,dword[pole+esi]
mov dword[px],eax ;x coord from tabl ->px
;mov ax,word[pole+esi+2]
;mov word[py],ax ;y coord from tabl ->py
call x_put ;"X"
mov esi,dword[idx] ;esi - cell number =0..8
mov byte[pox+esi],'x'
inc byte[fill] ;turn+1
xor eax,eax ;eax=0
inc eax ;bit=1 eax=1
mov ecx,dword[idx] ; esi=n
shl ax,cl ; <<n-bit bit[n]=1
or word[poxl],ax ;set bit in [poxl]
call x_win ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>
cmp byte[xwin],1 ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
jne del5 ;<EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> delay
mov eax,4 ; <EFBFBD> 4: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 'WINNER!'
mov ebx,18*65536+215 ; [x <EFBFBD><EFBFBD><EFBFBD>] *65536 + [y <EFBFBD><EFBFBD><EFBFBD>]
mov ecx,0x10FF22FF ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> RRGGBB
mov edx,texts ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
mov esi,textend-texts ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int 0x40 ;
jmp event_wait ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;===========================================================
del5: mov eax,5 ;=== delay 0,5 sec ===
mov ebx,50
int 0x40
cmp byte[fill],8 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
jnb event_wait ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
rnew: ;
call rndnext ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> eax
and eax, 0111b ; eax = 0..7
mov esi,eax ; eax->esi
call rndnext ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> eax
and eax, 01b ; eax= 0..1
add esi,eax ; esi+=eax
;esi=0..8 - index
cmp byte[pox+esi],0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
jne rnew ;<EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
cmp byte[pox+4],0 ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
jne @F ;<EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ( <EFBFBD> esi)
mov esi,4 ;<EFBFBD><EFBFBD> - <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> (4) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
@@:
mov dword[idx],esi ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> idx
;esi=0..8 - index
call o_com ;<EFBFBD><EFBFBD> 24<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> XX0
call x_com ;<EFBFBD><EFBFBD> 24<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 00*
mov esi,dword[idx] ;idx-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>(0..8) <EFBFBD>
shl esi,2 ; esi*4 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> dword
mov eax,dword[pole+esi] ;
mov dword[px],eax ;x coord from tabl ->px
; mov ax,word[pole+esi+2] ;
; mov word[py],ax ;y coord from tabl ->py
call o_put ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 'O'
mov esi,dword[idx]
mov byte[pox+esi],'o'
inc byte[fill] ;turn++
xor eax,eax ;eax=0
inc eax ;bit=1 eax=1
mov ecx,dword[idx] ; ecx=n
shl ax,cl ; <<n-bit bit[n]=1
or word[pool],ax ;set bit in [pool]
call o_win
cmp byte[owin],1
jne event_wait
mov eax,4 ; <EFBFBD> 4: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 'LOOSER!'
mov ebx,48*65536+215 ; [x <EFBFBD><EFBFBD><EFBFBD>] *65536 + [y <EFBFBD><EFBFBD><EFBFBD>]
mov ecx,0x10FF22FF ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> RRGGBB
mov edx,lootxt ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
mov esi,text-lootxt ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int 0x40 ;
jmp event_wait ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;===========================================--
;
}