Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 109 → Rev 485

/programs/demos/ss/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/ss/trunk/@SS.ASM
14,22 → 14,22
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include 'macros.inc'
include '..\..\..\macros.inc'
 
;include 'debug.inc'
 
START:
mov eax,14
int 0x40
mcall
and eax,0xFFFF0000
mov [top_right_corner],eax
 
mov eax,40 ; ãáâ ­®¢¨âì ¬ áªã ᮡë⨩
mov ebx,110010b ; ॠ£¨à㥬 ­  ª« ¢¨ âãàã, ¬ëèì, ®âà¨á®¢ªã ä®­ 
int 0x40
mcall
 
mov eax,14 ; ¯®«ã稬 à §¬¥àë íªà ­ 
int 0x40
mcall
mov [y_max],ax
shr eax,16
mov [x_max],ax
37,18 → 37,18
event: ; ®¡à ¡®â稪 ᮡë⨩ (¢á¥å)
mov eax,26
mov ebx,9
int 0x40 ; ¯®«ãç¨âì ¢à¥¬ï á¨á⥬ë
mcall ; ¯®«ãç¨âì ¢à¥¬ï á¨á⥬ë
; mov eax,3
; int 0x40
; mcall
mov [evtime],eax ; § ¯®¬­¨âì ¥£®
mov eax,37
mov ebx,2
int 0x40
mcall
cmp eax,3 ; ¯à®¤®«¦¨¬, ¥á«¨ ­ ¦ â  á।­ïï ª­®¯ª  ¬ëè¨
jne still
mov eax,37 ; ¯à®¢¥à¨¬ ª®®à¤¨­ âë
mov ebx,0
int 0x40
mcall
cmp [top_right_corner],eax
je create_setup ; ᮧ¤ ñ¬ ®ª­® ­ áâனª¨, ¥á«¨ ¬ëèì ¢ ¢¥àå­¥¬ ¯à ¢®¬
; 㣫ã íªà ­ 
59,7 → 59,7
 
mov eax,23 ; ¦¤ñ¬ ᮡëâ¨ï ¢ â¥ç¥­¨¥ 1 ᥪ㭤ë
mov ebx,100
int 0x40
mcall
 
bt dword [params],0 ; ssaver works?
jc event
75,7 → 75,7
 
mov eax,26
mov ebx,9
int 0x40
mcall
sub eax,[evtime]
xor edx,edx
mov ebx,60*100 ; ¯®¤¥«¨¬ ­  60*100, ¯®«ã稬 ¢à¥¬ï ¢ ¬¨­ãâ å
97,7 → 97,7
mov ebx,1
mov ecx,sthread
mov edx,0x3F000
int 0x40
mcall
bts dword [params],1
jmp still
 
106,7 → 106,7
mov ebx,1
mov ecx,thread
mov edx,0x3E000
int 0x40
mcall
bts dword [params],0
ret
 
113,10 → 113,10
thread:
mov eax,5
mov ebx,eax
int 0x40
mcall
mov eax,40
mov ebx,100010b
int 0x40
mcall
cmp dword [type],0
je drawsswin
cmp dword [type],24
135,7 → 135,7
mov dword [delay],25
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
asminit1:
mov eax,data_from_file
mov [stringstart],eax
152,14 → 152,14
inc ebx
inc ecx
mov edx,0x01000000
int 0x40
mcall
mov eax,13
xor edx,edx
int 0x40
mcall
tstill:
mov eax,23
mov ebx,[delay]
int 0x40
mcall
cmp eax,2
je thr_end
cmp eax,6
174,10 → 174,10
btr dword [params],0
mov eax,26
mov ebx,9
int 0x40
mcall
mov [evtime],eax
or eax,-1
int 0x40
mcall
 
drawssasm:
mov edi,[stringstart]
204,7 → 204,7
mov ecx,0x104ba010
mov edx,[stringstart]
mov esi,[stringlen]
int 0x40
mcall
inc dword [stringlen]
cmp byte [edi],byte ' '
je drawssasm
276,7 → 276,7
mov eax,38
mov edx,[lcolor]
and edx,0xffffff
int 0x40
mcall
 
dnol:
 
292,7 → 292,7
sstill:
 
mov eax,10 ; wait here for event
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
je sthread
305,7 → 305,7
 
sbutton: ; button
mov eax,17 ; get id
int 0x40
mcall
 
cmp ah,1 ; button id=1 ?
jne snoclose
312,7 → 312,7
 
btr dword [params],1
mov eax,-1 ; close this program
int 0x40
mcall
snoclose:
cmp ah,7
jne nosetfl
362,7 → 362,7
jne noshow
mov eax,5
mov ebx,150
int 0x40
mcall
call create_ss
jmp sstill
noshow:
387,7 → 387,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
 
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
394,7 → 394,8
mov ebx,100*65536+215 ; [x start] *65536 + [x size]
mov ecx,100*65536+70 ; [y start] *65536 + [y size]
mov edx,0x03400088 ; color of work area RRGGBB,8->color gl
int 0x40
mov edi,title
mcall
 
mov eax,8
mov ebx,47*65536+10
401,43 → 402,38
mov ecx,31*65536+10
mov edx,2
mov esi,0x702050
int 0x40
mcall
push ebx
add ebx,13*65536
mov edi,ebx
inc edx
int 0x40
mcall
pop ebx
add ecx,15*65536
inc edx
int 0x40
mcall
mov ebx,edi
inc edx
int 0x40
mcall
mov ebx,160*65536+40
mov ecx,28*65536+14
inc edx
int 0x40
; WINDOW LABEL
mcall
 
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
mov ecx,0x10ddeeff ; font 1 & color ( 0xF0RRGGBB )
mov edx,labelt ; pointer to text beginning
mov esi,17 ; text length
int 0x40
add ebx,7*65536+25
mov ebx,15*65536+33 ; [x start] *65536 + [y start]
mov ecx,0xffffff
mov edx,setuptext
mov esi,9
int 0x40
mcall
add ebx,15
add edx,esi
mov esi,30
int 0x40
mcall
mov ebx,169*65536+32
mov edx,buttext
mov esi,4
int 0x40
mcall
 
call drawtype
call drawtime
445,7 → 441,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
 
ret
 
458,7 → 454,7
jnc noblue
mov edx,0x4e00e7
noblue:
int 0x40
mcall
mov eax,4
mov ebx,82*65536+32
xor ecx,ecx
465,7 → 461,7
mov edx,typetext
add edx,[type]
mov esi,12
int 0x40
mcall
ret
 
drawtime:
477,13 → 473,13
jnc noblue1
mov edx,0x4e00e7
noblue1:
int 0x40
mcall
mov eax,47
mov edx,82*65536+47
xor esi,esi
movzx ecx,byte [time]
mov ebx,0x00020000
int 0x40
mcall
ret
 
drawflag:
492,7 → 488,7
mov ecx,45*65536+10
mov edx,7
mov esi,0xe0e0e0
int 0x40
mcall
mov eax,4
mov ebx,153*65536+47
xor ecx,ecx
502,13 → 498,13
jc setf
inc edx
setf:
int 0x40
mcall
ret
 
; DATA AREA
buttext db 'SHOW'
flag db 'V '
labelt db 'SCREENSAVER SETUP'
title db 'SCREENSAVER SETUP',0
setuptext db 'TYPE: < >TIME: < > MINUTES NEVER'
typetext db 'BLACK SCREENCOLOR LINES ASSEMBLER '
type dd 12
/programs/demos/ss/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm @ss.asm @ss
@erase lang.inc
@pause
/programs/demos/ss/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm @ss.asm @ss
@erase lang.inc
@pause