Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 195 → Rev 193

/programs/media/jpegview/trunk/jpegview.asm
98,8 → 98,8
cmp [winys],bp
jc .l1
 
add eax,2 ; offset for boarder
add ebx,2 ; offset for title bar
add eax,5 ; offset for boarder
add ebx,20 ; offset for title bar
push ax ; pox
push bx ; pos
push cx ; size
235,12 → 235,6
 
draw_window:
 
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
int 0x40
 
mov eax,12
mov ebx,1
int 0x40
279,26 → 273,39
mov cx, [winys]
 
xor eax,eax ; DRAW WINDOW
mov edx,[sc.work]
or edx,0x33000000
mov edx,[wcolor]
add edx,0x13000000
mov edi,header ; WINDOW LABEL
int 0x40
 
 
mov eax,8 ; BUTTON 2: slideshow
mov ebx,57
; draw status bar
mov eax, 13
movzx ebx, word [winxs]
sub ebx, 5
add ebx, 4*65536
mov cx, [winys]
sub cx, 39
sub ecx, 19
shl ecx, 16
add ecx, 3
mov edx, 0x00557799
int 0x40
 
mov eax,8 ; BUTTON 2: filename
mov ebx,4*65536+55
mov cx, [winys]
sub cx, 16
shl ecx, 16
add ecx, 12
mov esi, [sc.work_button]
mov esi, 0x00557799
mov edx,2
int 0x40
 
mov eax,4 ; Button text
movzx ebx, word [winys]
add ebx, 3 shl 16 - 36
mov ecx,[sc.work_button_text]
sub ebx, 13
add ebx, 6*65536
mov ecx,0x00ffffff
mov edx,setname
mov esi,setnamelen-setname
int 0x40
306,24 → 313,24
 
mov eax,8 ; BUTTON 3: set as background
mov bx, [winxs]
sub bx, 65
sub bx, 60
shl ebx, 16
mov bx,55
mov cx, [winys]
sub cx, 39
sub cx, 16
shl ecx, 16
add ecx, 12
mov esi, [sc.work_button]
mov esi, 0x00557799
mov edx,3
int 0x40
 
mov eax,4 ; Button text
movzx ebx, word [winxs]
sub ebx, 63
sub ebx, 60
shl ebx,16
mov bx, word [winys]
sub bx,36
mov ecx,[sc.work_button_text]
sub bx,13
mov ecx,0x00ffffff
mov edx,setbgr
mov esi,setbgrlen-setbgr
int 0x40
384,12 → 391,13
 
mov eax,13 ; clear picture area
movzx ebx, word [winxs]
add ebx, 1 shl 16 -10
sub ebx, 7
add ebx, 4 * 65536
movzx ecx, word [winys]
sub ecx, 40
add ecx, 1 shl 16
sub ecx, 39
add ecx, 20 * 65536
 
mov edx,[sc.work]
mov edx,0
int 0x40
mov ebp,[jpeg_st]
test ebp,ebp
402,9 → 410,10
pusha
mov eax,13 ; clear text area
movzx ebx, word [winxs]
add ebx, 59 shl 16 -125
sub ebx, 64+58
add ebx, 60*65536
mov cx, [winys]
sub cx, 39
sub cx, 16
shl ecx, 16
add ecx, 12
mov edx,0xffffff
412,7 → 421,8
 
mov eax,4 ;
movzx ebx, word [winys]
add ebx, 61 shl 16 - 37
sub ebx, 14
add ebx, 60*65536
mov ecx,0x000000
mov edx,name_string
mov esi,60
519,6 → 529,8
winys dw 0
jpeg_st dd 0
file_dir dd 0
tcolor dd 0x000000
btcolor dd 0x224466+0x808080
name_string: db '/rd/1/jpegview.jpg',0
rb 256
.end:
540,6 → 552,6
 
fin:
I_END:
sc system_colors
 
fileattr: rb 40
dirinfo: rb 32+304
/programs/media/gifview/trunk/gifview.asm
8,12 → 8,11
;
; COMPILE WITH FASM
 
appname equ 'GIF VIEWER'
 
WND_COLOR equ 0x02aabbcc
; input line dimensions
INP_X equ 5 shl 16+680
INP_Y equ 5 shl 16+16
INP_XY equ 10 shl 16+10
INP_X equ 10 shl 16+680
INP_Y equ 25 shl 16+16
INP_XY equ 15 shl 16+30
 
use32
 
30,6 → 29,7
 
include 'lang.inc'
include 'macros.inc' ; decrease code size (optional)
;include '/hd/1/meos/debug.inc'
include 'debug.inc'
COLOR_ORDER equ MENUETOS
 
182,7 → 182,7
push edi
cmp [entered],0
jne highlight
mov esi,0x00aabbcc
mov esi,WND_COLOR
jmp di_draw
highlight:
mov esi,0xe0e0e0
193,7 → 193,7
mov edx,2
int 0x40
mov eax,4
mov ecx,0x00107a30
mov ecx,0x00107a30 ; èà¨äâ 1 ¨ 梥â ( 0xF0RRGGBB )
mov ebx,INP_XY
mov edx,fn_input
mov esi,[inp_pos]
207,12 → 207,6
 
draw_window:
 
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
int 0x40
 
mov eax,12
mov ebx,1
int 0x40
220,11 → 214,26
mov eax,0
mov ebx,50*65536+700
mov ecx,50*65536+500
mov edx,[sc.work]
or edx,0x33000000
mov edi,header
mov edx,WND_COLOR
mov esi,0x805080d0
mov edi,0x005080d0
int 0x40
 
 
mov eax,4
mov ebx,8*65536+8
mov ecx,0x10ddeeff
mov edx,zagolovok
mov esi,zag_konets-zagolovok
int 0x40
 
mov eax,8
mov ebx,(700-19)*65536+12
mov ecx,5*65536+12
mov edx,1
mov esi,0x6688dd
int 0x40
 
call draw_input
 
xor ecx,ecx
257,7 → 266,7
movzx edx,[gif_inf.Left]
shl edx,16
add edx,eax
add edx,5 shl 16 +25
add edx,10 shl 16 +45
mov eax,7
int 0x40
.enddraw:
265,8 → 274,16
 
; ‡¤¥áì ­ å®¤ïâáï ¤ ­­ë¥ ¯à®£à ¬¬ë:
 
header db appname,0 ; áâப  § £®«®¢ª 
; ¨­â¥àä¥©á ¯à®£à ¬¬ë ¤¢ãï§ëç­ë© - § ¤ ©â¥ ï§ëª ¢ macros.inc
 
zagolovok: ; áâப  § £®«®¢ª 
if lang eq ru
db 'Ž‘ŒŽ’ GIF'
else
db 'GIF VIEWER'
end if
zag_konets: ; ¨ ¥ñ ª®­¥æ
 
inp_pos dd inp_end-fn_input
fn_input:
; db '/hd/1/gif/smileys/sm100000.gif'
292,7 → 309,6
rb 257
;filename_len dd 0
entered rd 1
sc system_colors
 
imgcount rd 1
img_index rd 1
/programs/media/gifview/trunk/build_en.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm gifview.asm gifview
@erase lang.inc
@pause
/programs/media/gifview/trunk/build_ru.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm gifview.asm gifview
@erase lang.inc
@pause
/programs/system/kbd/trunk/build.bat
File deleted
\ No newline at end of file
/programs/system/kbd/trunk/readme.txt
File deleted
/programs/system/kbd/trunk/macros.inc
File deleted
\ No newline at end of file
/programs/system/kbd/trunk/kbd.ASM
File deleted
/programs/system/icon/trunk/icons.dat
File deleted
/programs/system/icon/trunk/iconstrp.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/programs/system/icon/trunk/icon.asm
11,8 → 11,10
ICON_SIZE equ 32*32*3
GIF_SIZE equ 45000
REC_SIZE equ 80
ICONS_DAT equ '/RD/1/ICONS.DAT'
ICON_APP equ '/RD/1/ICON'
ICON_LST equ '/RD/1/ICON2.LST'
;ICON_APP equ '/hd/1/me/icon2';
ICON_APP equ '/RD/1/ICON2'
;ICON_STRIP equ '/HD/1/ME/ICONSTRP.GIF'
ICON_STRIP equ '/RD/1/ICONSTRP.GIF'
 
use32
441,7 → 443,7
popa
ret
 
iconlst db ICONS_DAT,0
iconlst db ICON_LST,0
 
load_icon_list:
 
/programs/system/icon/trunk/build_ge.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix ge >lang.inc
@fasm icon.asm icon
@erase lang.inc
@pause
/programs/system/icon/trunk/build_en.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm icon.asm icon
@erase lang.inc
@pause
/programs/system/icon/trunk/build_ru.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm icon.asm icon
@erase lang.inc
@pause
/programs/system/end/trunk/end.asm
42,42 → 42,40
sub ecx,50*10000h - 100
 
mov eax,0 ; define and draw window
mov edx,[sc.work]
mov esi,edx
mov edi,edx
mov edx,[sc.work_button]
mov esi,edx ;[sc.work_button]
xor edi,edi
int 0x40
 
mov edx,0x444444
xor edx,edx
mov al,13
mcall ,18 shl 16+90,29 shl 16+27
mcall ,14 shl 16+90,25 shl 16+27
push ebx
mcall ,121 shl 16+90,
mcall ,117 shl 16+90,
xchg ebx,[esp]
mcall ,,63 shl 16+27
mcall ,,59 shl 16+27
pop ebx
mcall
 
xor edx,edx
mov al,8
inc edx
mcall ,15 shl 16+87,26 shl 16+24,,0xbb0055
mcall ,15 shl 16+87,26 shl 16+24,,0xdd7700
inc edx
mcall ,118 shl 16+87,,,0xaaaa ;cccc
mcall ,118 shl 16+87,,,0xbbbb ;cccc
inc edx
mcall ,15 shl 16+87,60 shl 16+24,,0x9900
mcall ,15 shl 16+87,60 shl 16+24,,0xbb00
inc edx
mcall ,118 shl 16+87,,,0xaaaaaa ;cccccc
mcall ,118 shl 16+87,,,0xbbbbbb ;cccccc
 
mov al,4 ; 0x00000004 = write text
mov ebx,75*65536+10
mov ecx,[sc.work_text] ; 8b window nro - RR GG BB color
mov ecx,[sc.work_button_text] ; 8b window nro - RR GG BB color
or ecx,0x10000000
mov edx,label1 ; pointer to text beginning
mov esi,label1_len ; text length
int 0x40
 
mov ecx,[sc.work_button_text] ; 8b window nro - RR GG BB color
or ecx,0x10000000
mov ecx,0x10ffffff
mov ebx,25*65536+30
mov edx,label2 ; pointer to text beginning
mov esi,label2_len ; text length
/programs/system/menu/trunk/menu.asm
468,11 → 468,11
shl ecx, 16
add ecx, BTN_HEIGHT-1
; edx = button identifier
mov esi, [sc.work]
mov esi, [sc.work_button]
inc dl
cmp [edi + cur_sel], dl
jne .nohighlight
add esi, 0x101010
add esi, 0x202020
.nohighlight:
or edx, 0x20000000
int 0x40
497,7 → 497,7
dec ecx
jnz .findline
 
mov ecx, [sc.work_text]
mov ecx, [sc.work_button_text]
mov eax, 4
mov esi, 21
int 0x40
/programs/demos/trantest/trunk/trantest.asm
29,7 → 29,7
 
still:
scevent red,key,button
fps 250,8,cl_White,cl_Black
fps 290,8,cl_White,cl_Black
 
main_loop:
random SCREEN_X,eax
85,9 → 85,9
int 0x40
 
xor eax,eax ;Draw window
mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size
mov ecx,100*65536+(SCREEN_Y+26) ;y start*65536+y size
mov edx,0x13000000 ;0x33 use skinned window
mov ebx,100*65536+(SCREEN_X+19) ;x start*65536+x size
mov ecx,100*65536+(SCREEN_Y+51) ;y start*65536+y size
mov edx,0x33000000 ;0x33 use skinned window
mov edi,header
int 0x40
 
/programs/other/calc/trunk/calc.asm
662,8 → 662,8
int 0x40
xor eax,eax
mov ebx,200 shl 16+255
mov ecx,200 shl 16+180
mov ebx,200*65536+255
mov ecx,200*65536+180
mov edx,[sc.work]
or edx,0x33000000
mov edi,header
670,8 → 670,8
int 0x40
 
mov eax,8
mov ebx,19 shl 16+28
mov ecx,49 shl 16+18
mov ebx,19*65536+28
mov ecx,49*65536+18
mov edx,6
mov esi,[sc.work_button]
mov edi,7
679,20 → 679,20
dec edi
jnz no_new_row
mov edi,7
mov ebx,19 shl 16+28
add ecx,20 shl 16
mov ebx,19*65536+28
add ecx,20*65536
no_new_row:
int 0x40
add ebx,30 shl 16
add ebx,30*65536
inc edx
cmp edx,39
jbe newbutton
mcall ,199 shl 16+28,49 shl 16+18,2 ; 'C'
mcall ,220 shl 16+8,7 shl 16+8,3 ; 'dec-bin-hex'
mcall ,199*65536+28,49*65536+18,2 ; 'C'
mcall ,220*65536+8,7*65536+8,3 ; 'dec-bin-hex'
 
mov eax,4
mov ebx,27 shl 16+54
mov ebx,27*65536+54
mov ecx,[sc.work_button_text]
mov edx,text
mov esi,33
713,10 → 713,10
 
print_display:
pusha
mcall 13,18 shl 16+210,19 shl 16+13,0xffffff
mcall 13,18*65536+210,19*65536+13,0xffffff
 
mov eax,4
mov ebx,135 shl 16+7
mov ebx,135*65536+7
mov ecx,[sc.work_text]
or ecx,0x40000000
mov edx,calc
724,7 → 724,7
mov edi,[sc.work]
int 0x40
 
mov ebx,198 shl 16+8
mov ebx,198*65536+8
mov edx,[display_type]
shl edx,2
add edx,display_type_text
734,7 → 734,7
cmp [dsign],byte '+'
je positive
mov ebx,23 shl 16+22
mov ebx,23*65536+22
mov ecx,0x0
mov edx,dsign
mov esi,1
746,7 → 746,7
cmp [decimal],0
je whole
 
mov ebx,180 shl 16+22
mov ebx,180*65536+22
mov ecx,0x0
mov edx,dot
mov esi,1
753,15 → 753,15
int 0x40
mov eax,47
mov ebx,10 shl 16
mov ebx,10*65536
mov ecx,[integer]
mov edx,120 shl 16+22
mov edx,120*65536+22
mov esi,0x0
int 0x40
mov ebx,6 shl 16
mov ebx,6*65536
mov ecx,[decimal]
mov edx,187 shl 16+22
mov edx,187*65536+22
mov esi,0x0
int 0x40
 
769,7 → 769,7
ret
whole:
mov ebx,220 shl 16+22
mov ebx,220*65536+22
mov ecx,0x0
mov edx,dot
mov esi,1
779,9 → 779,9
je null
 
mov eax,47
mov ebx,10 shl 16
mov ebx,10*65536
mov ecx,[integer]
mov edx,160 shl 16+22
mov edx,160*65536+22
mov esi,0x0
int 0x40
 
795,9 → 795,9
je null
mov eax,47
mov ebx,256+8 shl 16
mov ebx,256+8*65536
mov ecx,[integer]
mov edx,173 shl 16+22
mov edx,173*65536+22
mov esi,0x0
int 0x40
 
809,9 → 809,9
je null
 
mov eax,47
mov ebx,2*256+32 shl 16
mov ebx,2*256+32*65536
mov ecx,[integer]
mov edx,32 shl 16+22
mov edx,32*65536+22
mov esi,0x0
int 0x40
 
820,9 → 820,9
null:
mov eax,47
mov ebx,1 shl 16
mov ebx,1*65536
mov ecx,0
mov edx,214 shl 16+22
mov edx,214*65536+22
mov esi,0x0
int 0x40
 
/programs/network/airc/trunk/airc.asm
9,7 → 9,7
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
version equ '0.4'
version equ '0.3'
 
use32
 
22,17 → 22,16
dd 0x100000 ; required amount of memory
dd 0x100000
dd 0,0
 
include "lang.inc"
;include "macros.inc"
include "macros.inc"
 
irc_server_ip db 83,149,74,246 ;server: kolibrios.org
irc_server_ip db 192,168,1,1
 
user_nick dd 12 ; length
db 'kolibri_user ' ; string
user_nick dd 4 ; length
db 'airc ' ; string
 
user_real_name dd 14 ; length
db 'KolibriOS User ' ; string
user_real_name dd 8 ; length
db 'Joe User ' ; string
 
 
START: ; start of execution
424,19 → 423,6
start_user_list_at dd 0x0
 
 
recode_to_cp1251:
push esi edx
.loop:
lodsb
cmp al,0x80
jb @f
and eax,0x7F
mov al,[cp866_table+eax]
@@: mov [esi-1],al
dec edx
jnz .loop
pop edx esi
ret
 
 
send_data_to_server:
515,8 → 501,6
mov edx,[xpos]
inc edx
 
call recode_to_cp1251
 
mov eax, 53 ; write message
mov ebx, 7
mov ecx, [socket]
1646,27 → 1630,7
ret
 
 
cp1251_table:
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; 8
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; 9
db '?','?','?','?','?','?','?','?' , $F0,'?','?','?','?','?','?','?' ; A
db '?','?','?','?','?','?','?','?' , $F1,'?','?','?','?','?','?','?' ; B
db $80,$81,$82,$83,$84,$85,$86,$87 , $88,$89,$8A,$8B,$8C,$8D,$8E,$8F ; C
db $90,$91,$92,$93,$94,$95,$96,$97 , $98,$99,$9A,$9B,$9C,$9D,$9E,$9F ; D
db $A0,$A1,$A2,$A3,$A4,$A5,$A6,$A7 , $A8,$A9,$AA,$AB,$AC,$AD,$AE,$AF ; E
db $E0,$E1,$E2,$E3,$E4,$E5,$E6,$E7 , $E8,$E9,$EA,$EB,$EC,$ED,$EE,$EF ; F
 
cp866_table:
db $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7 , $C8,$C9,$CA,$CB,$CC,$CD,$CE,$CF ; 8
db $D0,$D1,$D2,$D3,$D4,$D5,$D6,$D7 , $D8,$D9,$DA,$DB,$DC,$DD,$DE,$DF ; 9
db $E0,$E1,$E2,$E3,$E4,$E5,$E6,$E7 , $E8,$E9,$EA,$EB,$EC,$ED,$EE,$EF ; A
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; B
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; C
db '?','?','?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; D
db $F0,$F1,$F2,$F3,$F4,$F5,$F6,$F7 , $F8,$F9,$FA,$FB,$FC,$FD,$FE,$FF ; E
db $A8,$B8,'?','?','?','?','?','?' , '?','?','?','?','?','?','?','?' ; F
 
 
print_character:
 
pusha
1785,6 → 1749,7
ret
 
 
 
read_incoming_byte:
 
mov eax, 53
1802,12 → 1767,6
mov ecx, [socket]
int 0x40
 
cmp bl,0x80
jb @f
and ebx,0x7F
mov bl,[cp1251_table+ebx]
@@:
 
mov ecx,0
 
no_more_data:
1915,20 → 1874,20
 
text:
 
db ' Real name : KolibriOS User - change with eg /areal Jill User '
db ' Nick : kolibri_user - change with eg /anick Jill '
db ' Server : 83.149.74.246 - change with eg /aserv 192.168.1.24 '
db ' Real name : Joe User - change with eg /areal Jill User '
db ' Nick : AIRC - change with eg /anick Jill '
db ' Server : 192.168.1.1 - change with eg /aserv 192.168.1.24 '
db ' '
db ' 1) Open socket 2) Send userinfo Close socket '
db ' '
db ' Commands after established connection: '
db ' '
db ' /join #ChannelName - eg /join #general '
db ' /part #ChannelName - eg /part #windows '
db ' /join #ChannelName - eg /join #menuet '
db ' /part #ChannelName - eg /part #linux '
db ' /query Nickname - eg /query Mary '
db ' /quit - Quit server and Close socket '
 
db 'x' ; <- END MARKER, DONT DELETE
db 'x <- END MARKER, DONT DELETE '
 
 
 
2321,10 → 2280,10
 
action_header_short db 10,'* ',0
 
has_left_channel db ' has left ',0
joins_channel db ' has joined ',0
has_left_channel db ' left channel ',0
joins_channel db ' joined channel ',0
is_now_known_as db ' is now known as ',0
has_quit_irc db ' has quit IRC',0
has_quit_irc db ' has quit irc',0
sets_mode db ' sets mode ',0
kicked db ' kicked from ',0
 
/programs/network/airc/trunk/build_en.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm airc.asm airc
@erase lang.inc
@pause
/programs/network/airc/trunk/build_ru.bat
1,5 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm airc.asm airc
@erase lang.inc
@pause