Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 485 → Rev 484

/programs/games/arcanoid/trunk/ascl.inc
1,3 → 1,5
lang equ ru ; ru en fr ge fi
 
;
; Assembler
; SMALL
46,7 → 48,7
mov dword [fileinfo+8],1 ; how many blocks to read (1)
mov eax,58
mov ebx,fileinfo
mcall
int 0x40
mov eax,[file_load_area+2]
shr eax,9 ; ¯®¤¥«¨¬ ­  512 ¨ ¯à¨¡ ¢¨¬ 1 - ¯®«ã稬 ç¨á«® ¡«®ª®¢
inc eax
53,7 → 55,7
mov dword [fileinfo+8],eax
mov eax,58
mov ebx,fileinfo
mcall
int 0x40
}
 
 
88,7 → 90,7
mov edx,id
mov esi,bcolor
mov eax,8
mcall
int 0x40
 
mov eax,asd-lab ;calc size
mov ebx,6
113,7 → 115,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
mcall
int 0x40
}
 
 
142,7 → 144,7
mov eax,9
mov ebx,procinfo
mov ecx,-1
mcall
int 0x40
 
; convert eax bin to param dec
mov eax,dword [procinfo+30] ;offset of myPID
176,12 → 178,12
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,150 ; size 150 bytes
mcall
int 0x40
 
; change wanted events list 7-bit IPC event
mov eax,40
mov ebx,01000111b
mcall
int 0x40
 
;
; STEP 3 run SYSTEM XTREE with parameters
189,7 → 191,7
 
mov eax,58
mov ebx,run_fileinfo
mcall
int 0x40
 
call redproc
 
197,7 → 199,7
getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
mcall
int 0x40
 
cmp eax,1
je mred
212,7 → 214,7
mov ebx,procinfo
mov ecx,-1
mov eax,9
mcall
int 0x40
mov ebp,eax
 
loox:
219,7 → 221,7
mov eax,9
mov ebx,procinfo
mov ecx,ebp
mcall
int 0x40
mov eax,[DLGPID]
cmp [procinfo+30],eax ;IF Dialog find
je dlg_is_work ;jmp to dlg_is_work
244,15 → 246,15
jmp getmesloop
mkey:
mov eax,2
mcall ; read (eax=2)
int 0x40 ; read (eax=2)
jmp getmesloop
mbutton:
mov eax,17 ; get id
mcall
int 0x40
cmp ah,1 ; button id=1 ?
jne getmesloop
mov eax,-1 ; close this program
mcall
int 0x40
mgetmes:
 
; If dlg_pid_get then second message get jmp to still
354,7 → 356,7
mov eax,9
mov ebx,procinfo
mov ecx,-1
mcall
int 0x40
 
; convert eax bin to param dec
mov eax,dword [procinfo+30] ;offset of myPID
388,12 → 390,12
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,120 ; size 150 bytes
mcall
int 0x40
 
; change wanted events list 7-bit IPC event
mov eax,40
mov ebx,01000111b
mcall
int 0x40
 
;
; STEP 3 run SYSTEM XTREE with parameters
401,7 → 403,7
 
mov eax,58
mov ebx,run_fileinfo
mcall
int 0x40
 
call redproc
 
409,7 → 411,7
getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
mcall
int 0x40
 
cmp eax,1
je mred
424,7 → 426,7
mov ebx,procinfo
mov ecx,-1
mov eax,9
mcall
int 0x40
mov ebp,eax
 
loox:
431,7 → 433,7
mov eax,9
mov ebx,procinfo
mov ecx,ebp
mcall
int 0x40
mov eax,[DLGPID]
cmp [procinfo+30],eax ;IF Dialog find
je dlg_is_work ;jmp to dlg_is_work
455,15 → 457,15
call redproc
jmp getmesloop
mkey:
mcall ; read (eax=2)
int 0x40 ; read (eax=2)
jmp getmesloop
mbutton:
mov eax,17 ; get id
mcall
int 0x40
cmp ah,1 ; button id=1 ?
jne getmesloop
mov eax,-1 ; close this program
mcall
int 0x40
mgetmes:
 
; If dlg_pid_get then second message get jmp to still
615,7 → 617,7
macro scank
{
mov eax,10
mcall
int 0x40
}
 
macro putpix x,y,color
624,7 → 626,7
mov ecx,y
mov edx,color
mov eax,1
mcall
int 0x40
}
 
macro puttxt x,y,offs,size,color
637,7 → 639,7
mov edx,offs
mov esi,size
mov eax,4
mcall
int 0x40
}
 
macro outcount data, x, y, color, numtype
649,7 → 651,7
wordstoreg edx,x,y
mov esi,color
mov eax,47
mcall
int 0x40
}
 
; SCEVENT - Scan event
657,7 → 659,7
macro scevent red,key,but
{
mov eax,11
mcall
int 0x40
dec eax
jz red
dec eax
671,7 → 673,7
macro wtevent red,key,but
{
mov eax,10
mcall
int 0x40
dec eax
jz red
dec eax
686,7 → 688,7
{
mov eax,23
mov ebx,xfps
mcall
int 0x40
cmp eax,0
je noevent
dec eax
703,7 → 705,7
macro close
{
mov eax,-1
mcall
int 0x40
}
 
; DELAY - Create delay 1/100 sec
714,7 → 716,7
{
mov eax,5
mov ebx,arg1
mcall
int 0x40
}
 
; WINDOW - Draw window
729,7 → 731,7
wordstoreg ecx,arg2,arg4
mov edx,arg5
mov eax,0
mcall
int 0x40
}
 
macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7
740,7 → 742,7
mov esi,arg6
mov edi,arg7
mov eax,0
mcall
int 0x40
}
 
 
750,7 → 752,7
{
mov eax,12
mov ebx,1
mcall
int 0x40
}
 
; ENDWD - End window draw
759,7 → 761,7
{
mov eax,12
mov ebx,2
mcall
int 0x40
}
 
; LABEL - Put text to frame
780,7 → 782,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
mcall
int 0x40
}
 
;Key's