Removal of outdated and unused version of ICON. If anyone ever need it, then he can take it out of the old versions the SVN repository. However, the existence of this program mislead people.

git-svn-id: svn://kolibrios.org@3608 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2013-06-05 22:13:54 +00:00
parent ee4049b00a
commit da53db0ae7
15 changed files with 0 additions and 1815 deletions

View File

@ -1,6 +0,0 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm icon.asm @icon
@erase lang.inc
@kpack @icon
@pause

View File

@ -1,6 +0,0 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm iconmngr.asm iconmngr
@erase lang.inc
@kpack iconmngr
@pause

View File

@ -1,424 +0,0 @@
;
; Formatted Debug Output (FDO)
; Copyright (c) 2005-2006, mike.dld
; Created: 2005-01-29, Changed: 2006-11-10
;
; For questions and bug reports, mail to mike.dld@gmail.com
;
; Available format specifiers are: %s, %d, %u, %x (with partial width support)
;
; to be defined:
; __DEBUG__ equ 1
; __DEBUG_LEVEL__ equ 5
macro debug_func name {
if used name
name@of@func equ name
}
macro debug_beginf {
align 4
name@of@func:
}
debug_endf fix end if
macro DEBUGS _sign,[_str] {
common
local tp
tp equ 0
match _arg:_num,_str \{
DEBUGS_N _sign,_num,_arg
tp equ 1
\}
match =0 _arg,tp _str \{
DEBUGS_N _sign,,_arg
\}
}
macro DEBUGS_N _sign,_num,[_str] {
common
pushf
pushad
local ..str,..label,is_str
is_str = 0
forward
if _str eqtype ''
is_str = 1
end if
common
if is_str = 1
jmp ..label
..str db _str,0
..label:
add esp,4*8+4
mov edx,..str
sub esp,4*8+4
else
mov edx,_str
end if
if ~_num eq
if _num eqtype eax
if _num in <eax,ebx,ecx,edx,edi,ebp,esp>
mov esi,_num
else if ~_num eq esi
movzx esi,_num
end if
else if _num eqtype 0
mov esi,_num
else
local tp
tp equ 0
match [_arg],_num \{
mov esi,dword[_arg]
tp equ 1
\}
match =0 =dword[_arg],tp _num \{
mov esi,dword[_arg]
tp equ 1
\}
match =0 =word[_arg],tp _num \{
movzx esi,word[_arg]
tp equ 1
\}
match =0 =byte[_arg],tp _num \{
movzx esi,byte[_arg]
tp equ 1
\}
match =0,tp \{
'Error: specified string width is incorrect'
\}
end if
else
mov esi,0x7FFFFFFF
end if
call fdo_debug_outstr
popad
popf
}
macro DEBUGD _sign,_dec {
local tp
tp equ 0
match _arg:_num,_dec \{
DEBUGD_N _sign,_num,_arg
tp equ 1
\}
match =0 _arg,tp _dec \{
DEBUGD_N _sign,,_arg
\}
}
macro DEBUGD_N _sign,_num,_dec {
pushf
pushad
if (~_num eq)
if (_dec eqtype eax | _dec eqtype 0)
'Error: precision allowed only for in-memory variables'
end if
if (~_num in <1,2,4>)
if _sign
'Error: 1, 2 and 4 are only allowed for precision in %d'
else
'Error: 1, 2 and 4 are only allowed for precision in %u'
end if
end if
end if
if _dec eqtype eax
if _dec in <ebx,ecx,edx,esi,edi,ebp,esp>
mov eax,_dec
else if ~_dec eq eax
if _sign = 1
movsx eax,_dec
else
movzx eax,_dec
end if
end if
else if _dec eqtype 0
mov eax,_dec
else
add esp,4*8+4
if _num eq
mov eax,dword _dec
else if _num = 1
if _sign = 1
movsx eax,byte _dec
else
movzx eax,byte _dec
end if
else if _num = 2
if _sign = 1
movsx eax,word _dec
else
movzx eax,word _dec
end if
else
mov eax,dword _dec
end if
sub esp,4*8+4
end if
mov cl,_sign
call fdo_debug_outdec
popad
popf
}
macro DEBUGH _sign,_hex {
local tp
tp equ 0
match _arg:_num,_hex \{
DEBUGH_N _sign,_num,_arg
tp equ 1
\}
match =0 _arg,tp _hex \{
DEBUGH_N _sign,,_arg
\}
}
macro DEBUGH_N _sign,_num,_hex {
pushf
pushad
if (~_num eq) & (~_num in <1,2,3,4,5,6,7,8>)
'Error: 1..8 are only allowed for precision in %x'
end if
if _hex eqtype eax
if _hex in <eax,ebx,ecx,edx,esi,edi,ebp,esp>
if ~_hex eq eax
mov eax,_hex
end if
else if _hex in <ax,bx,cx,dx,si,di,bp,sp>
if ~_hex eq ax
movzx eax,_hex
end if
shl eax,16
if (_num eq)
mov edx,4
end if
else if _hex in <al,ah,bl,bh,cl,ch,dl,dh>
if ~_hex eq al
movzx eax,_hex
end if
shl eax,24
if (_num eq)
mov edx,2
end if
end if
else if _hex eqtype 0
mov eax,_hex
else
add esp,4*8+4
mov eax,dword _hex
sub esp,4*8+4
end if
if ~_num eq
mov edx,_num
else
if ~_hex eqtype eax
mov edx,8
end if
end if
call fdo_debug_outhex
popad
popf
}
;-----------------------------------------------------------------------------
debug_func fdo_debug_outchar
debug_beginf
pushad
mov cl,al
mov ebx,1
mov eax,63
int 0x40
popad
ret
debug_endf
debug_func fdo_debug_outstr
debug_beginf
mov eax,63
mov ebx,1
.l1: dec esi
js .l2
mov cl,[edx]
or cl,cl
jz .l2
int 0x40
inc edx
jmp .l1
.l2: ret
debug_endf
debug_func fdo_debug_outdec
debug_beginf
or cl,cl
jz @f
or eax,eax
jns @f
neg eax
push eax
mov al,'-'
call fdo_debug_outchar
pop eax
@@: push 10
pop ecx
push -'0'
.l1: xor edx,edx
div ecx
push edx
test eax,eax
jnz .l1
.l2: pop eax
add al,'0'
jz .l3
call fdo_debug_outchar
jmp .l2
.l3: ret
debug_endf
debug_func fdo_debug_outhex
__fdo_hexdigits db '0123456789ABCDEF'
debug_beginf
mov cl,dl
neg cl
add cl,8
shl cl,2
rol eax,cl
.l1: rol eax,4
push eax
and eax,0x0000000F
mov al,[__fdo_hexdigits+eax]
call fdo_debug_outchar
pop eax
dec edx
jnz .l1
ret
debug_endf
;-----------------------------------------------------------------------------
macro DEBUGF _level,_format,[_arg] {
common
if __DEBUG__ = 1 & _level >= __DEBUG_LEVEL__
local ..f1,f2,a1,a2,c1,c2,c3,..lbl
_debug_str_ equ __debug_str_ # a1
a1 = 0
c2 = 0
c3 = 0
f2 = 0
repeat ..lbl-..f1
virtual at 0
db _format,0,0
load c1 word from %-1
end virtual
if c1 = '%s'
virtual at 0
db _format,0,0
store word 0 at %-1
load c1 from f2-c2
end virtual
if c1 <> 0
DEBUGS 0,_debug_str_+f2-c2
end if
c2 = c2 + 1
f2 = %+1
DEBUGF_HELPER S,a1,0,_arg
else if c1 = '%x'
virtual at 0
db _format,0,0
store word 0 at %-1
load c1 from f2-c2
end virtual
if c1 <> 0
DEBUGS 0,_debug_str_+f2-c2
end if
c2 = c2 + 1
f2 = %+1
DEBUGF_HELPER H,a1,0,_arg
else if c1 = '%d' | c1 = '%u'
local c4
if c1 = '%d'
c4 = 1
else
c4 = 0
end if
virtual at 0
db _format,0,0
store word 0 at %-1
load c1 from f2-c2
end virtual
if c1 <> 0
DEBUGS 0,_debug_str_+f2-c2
end if
c2 = c2 + 1
f2 = %+1
DEBUGF_HELPER D,a1,c4,_arg
else if c1 = '\n'
c3 = c3 + 1
end if
end repeat
virtual at 0
db _format,0,0
load c1 from f2-c2
end virtual
if (c1<>0)&(f2<>..lbl-..f1-1)
DEBUGS 0,_debug_str_+f2-c2
end if
virtual at 0
..f1 db _format,0
..lbl:
__debug_strings equ __debug_strings,_debug_str_,<_format>,..lbl-..f1-1-c2-c3
end virtual
end if
}
macro __include_debug_strings dummy,[_id,_fmt,_len] {
common
local c1,a1,a2
forward
if defined _len & ~_len eq
_id:
a1 = 0
a2 = 0
repeat _len
virtual at 0
db _fmt,0,0
load c1 word from %+a2-1
end virtual
if (c1='%s')|(c1='%x')|(c1='%d')|(c1='%u')
db 0
a2 = a2 + 1
else if (c1='\n')
dw $0A0D
a1 = a1 + 1
a2 = a2 + 1
else
db c1 and 0x0FF
end if
end repeat
db 0
end if
}
macro DEBUGF_HELPER _letter,_num,_sign,[_arg] {
common
local num
num = 0
forward
if num = _num
DEBUG#_letter _sign,_arg
end if
num = num+1
common
_num = _num+1
}
macro include_debug_strings {
if __DEBUG__ = 1
match dbg_str,__debug_strings \{
__include_debug_strings dbg_str
\}
end if
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

View File

@ -1,608 +0,0 @@
;
; ICON APPLICATION
;
; Compile with FASM for Menuet
;
; August 12, 2004 - 32-bit ICO format support (mike.dld)
; March 14, 2007 - rewriten for KolibriOS (heavyiron)
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x8000 ; memory for app
dd 0x8000 ; esp
dd I_PARAM , 0x0 ; I_Param , I_Icon
; params 4 xpos 4 ypos 30 iconfile 30 startfile 10 label
; +0 +4 +8 +38 +68
include '..\..\..\macros.inc'
;__DEBUG__ fix 1
;__DEBUG_LEVEL__ fix 1
;include 'debug-fdo.inc'
flipdelay = 5
START: ; start of execution
cmp [I_PARAM],byte 0
jne nohalt
mcall -1
nohalt:
mov eax,[I_PARAM+0]
sub eax,0x01010101
mov [xpos],eax
mov eax,[I_PARAM+4]
sub eax,0x01010101
mov [ypos],eax
mov esi,I_PARAM+8
mov edi,fname
mov ecx,30
cld
rep movsb
call fill_paths
;DEBUGF 1,"fname: '%s'\n",fname
mov esi,I_PARAM+8+30
mov edi,start_file
mov ecx,30
cld
rep movsb
call fill_paths
mov esi,I_PARAM+8+30+30
mov edi,labelt
mov ecx,10
cld
rep movsb
mcall 40,110001b
mcall 37,4,hand,1
mov ecx,eax
mcall 37,5
red:
call get_bg
call draw_window
still:
mcall 10 ; wait here for event
cmp eax,1 ; redraw request ?
jz red
cmp eax,6
jz mouse
call get_bg
call draw_icon
mcall 5,80
jmp still
mouse:
mcall 9,process,-1
xor ebx,ebx
mov bx,[process.window_stack_position]
cmp eax,ebx ;check is this process is active
jne still
cmp [mouse_pressed],1
je @f
mcall 37,2
test eax,1
jz still
mov [icon_moved],0
mcall 37,0
mov ebx,eax
shr eax,16 ; eax= abs x
and ebx,0xffff ; ebx= abs y
mov [xmouse_old],eax ; saving mouse coordinates
mov [ymouse_old],ebx
cmp eax,[process.box.left] ; check is mouse in icon area
jl still
sub eax,[process.box.left]
cmp eax,[process.box.width]
ja still
cmp ebx,[process.box.top]
jl still
sub ebx,[process.box.top]
cmp ebx,[process.box.height]
ja still
mov [xmouse_rel],eax ; saving relative coordinates
mov [ymouse_rel],ebx
mov [mouse_pressed],1
jmp still
@@:
mcall 37,2
test eax,1
jnz @F
mov [mouse_pressed],0
@@:
mcall 37,0
mov ecx,eax
shr eax,16 ; eax= abs x
and ecx,0xffff ; ecx= abs y
push eax ecx
cmp [icon_moved],1
je move
add eax,2
cmp eax,[xmouse_old]
jle move
sub eax,4
cmp eax,[xmouse_old]
jae move
add ecx,2
cmp ecx,[ymouse_old]
jle move
sub ecx,4
cmp ecx,[ymouse_old]
jae move
cmp [mouse_pressed],1
je still
mcall 70,finfo_start
call flip_icon
jmp still
move:
mov [icon_moved],1
pop ecx ebx
sub ebx,[xmouse_rel] ; ebx=new_x
sub ecx,[ymouse_rel] ; ecx=new_y
mov [xpos],ebx
mov [ypos],ecx
mcall 67,,,-1,-1 ; move
jmp still
fill_paths:
dec edi
mov ecx,30
std
mov al,' '
repe scasb
cld
mov byte[edi+2],0
ret
flip_icon:
mov eax,1
call flip
inc eax
call flip
inc eax
call flip
inc eax
call flip
inc eax
call flip
dec eax
call flip
dec eax
call flip
dec eax
call flip
dec eax
call flip
xor eax,eax
call flip
ret
flip:
push eax
mov [iconstate],eax
call get_bg
call draw_icon
mcall 5,flipdelay
pop eax
ret
draw_window:
mcall 12,1 ; function 12,1 - tell os about start of draw window
xor eax,eax ; function 0 : define and draw window
mov ebx,[xpos-2]
add ebx,51 ; [x start] *65536 + [x size]
mov ecx,[ypos-2]
add ecx,67 ; [y start] *65536 + [y size]
mov edx,0x01000000
mov esi,0x01000000
mcall
call draw_icon
mcall 12,2 ; function 12,2 - tell os about end of draw window
ret
get_bg:
mcall 61,1
mov [scrxy],eax
mcall 39,4 ; get background type
mov [bgrdrawtype],eax
mcall 39,1 ; get background size
mov [bgrxy],eax
mcall 70,finfo
mov [itype],0
cmp word[I_END+256],'BM'
je @f
inc [itype]
@@:
mov ebx,51
xor ecx,ecx ; 10608 = 52*68*3 - bg image
mov esi,I_END+256+9662 ; 9662 - icon file image
mov edi,51*3
newb:
push ebx ecx
yesbpix:
cmp [bgrdrawtype],2
jne nostretch
mov eax,[ypos]
add eax,ecx
xor edx,edx
movzx ebx,word [bgrxy]
mul ebx
xor edx,edx
movzx ebx,word [scrxy]
div ebx
xor edx,edx
movzx ebx,word [bgrxy+2]
mul ebx
push eax
mov eax,[xpos]
add eax,[esp+8]
xor edx,edx
movzx ebx,word [bgrxy+2]
mul ebx
xor edx,edx
movzx ebx,word [scrxy+2]
div ebx
add eax,[esp]
add esp,4
nostretch:
cmp [bgrdrawtype],1
jne notiled
mov eax,[ypos]
add eax,ecx
xor edx,edx
movzx ebx,word [bgrxy]
div ebx
mov eax,edx
movzx ebx,word [bgrxy+2]
xor edx,edx
mul ebx
push eax
mov eax,[xpos]
add eax,[esp+8]
movzx ebx,word [bgrxy+2]
xor edx,edx
div ebx
mov eax,edx
add eax,[esp]
add esp,4
notiled:
lea ecx,[eax+eax*2]
mcall 39,2
nobpix:
pop ecx ebx
mov [esi+edi+0],al
mov [esi+edi+1],ah
shr eax,16
mov [esi+edi+2],al
sub edi,3
dec ebx
jge newb
mov ebx,51
add esi,52*3
mov edi,51*3
inc ecx
cmp ecx,68
jne newb
;*****************************************************************************
mov esi,I_END+256+9662+10608-17*52*3+3 ;! 54+32*3*33-3
mov eax,[iconstate]
mov eax,[add_table0+eax*4]
add esi,eax
mov edi,I_END+256+62
cmp [itype],0
jne @f
mov edi,I_END+256+54
@@:
xor ebp,ebp
mov [pixl],0
newp:
virtual at edi
r db ?
g db ?
b db ?
a db ?
end virtual
virtual at esi+ebp
ar db ?
ag db ?
ab db ?
end virtual
movzx ecx,[a]
push ebp
cmp [iconstate],3
jb @f
neg ebp
@@:
cmp [itype],0
jne @f
mov eax,[edi]
and eax,$00FFFFFF
jnz @f
jmp no_transp
@@:
movzx eax,[r]
cmp [itype],0
je @f
movzx ebx,byte[ar]
sub eax,ebx
imul eax,ecx
xor edx,edx
or ebx,$0FF
div ebx
movzx ebx,[ar]
add eax,ebx
@@:
mov [esi+ebp+0],al
movzx eax,[g]
cmp [itype],0
je @f
movzx ebx,[ag]
sub eax,ebx
imul eax,ecx
xor edx,edx
or ebx,$0FF
div ebx
movzx ebx,[ag]
add eax,ebx
@@:
mov [esi+ebp+1],al
movzx eax,[b]
cmp [itype],0
je @f
movzx ebx,[ab]
sub eax,ebx
imul eax,ecx
xor edx,edx
or ebx,$0FF
div ebx
movzx ebx,[ab]
add eax,ebx
@@:
mov [esi+ebp+2],al
no_transp:
pop ebp
movzx eax,[itype]
imul eax,6
add eax,[iconstate]
push eax
mov eax,[add_table1+eax*4]
add edi,eax
add ebp,3
pop eax
mov eax,[add_table2+eax*4]
add [pixl],eax
cmp [pixl],48
jl newp
xor ebp,ebp
mov [pixl],0
sub esi,52*3
cmp esi,I_END+256+9662+52*4*3
jge newp
;*****************************************************************************
ret
draw_picture:
mcall 7,I_END+256+9662,52 shl 16+68,0
ret
draw_icon:
call draw_picture
call draw_text
ret
draw_text:
mov eax,labelt ;text_length
news:
cmp [eax],byte 40
jb founde
inc eax
cmp eax,labelt+11
jb news
founde:
sub eax,labelt
lea eax,[eax+eax*2] ; eax *= char_width/2
shl eax,16
mov ebx,26*65536+58
sub ebx,eax
movzx ecx,byte [I_PARAM+8+30+30+10]
shl ecx,16
add ebx,ecx
; black shade of text
; uncomment lines below if you like that style
xor ecx,ecx
mov edx,labelt
mov esi,labellen-labelt
add ebx,1 shl 16
mcall 4
inc ebx
mcall
add ebx,1 shl 16
mcall
inc ebx
mcall
sub ebx,1 shl 16
mcall
sub ebx,1*65536+1
mcall
sub ebx,1*65536+1
mcall
add ebx,1*65536-1
mcall
inc ebx
or ecx,0xffffff
mcall
;xor ecx,ecx
;mov edx,labelt
;mov esi,labellen-labelt
;mcall 4
;sub ebx,1*65536+1
;or ecx,0xffffff
;mcall
ret
; DATA AREA
itype db 0
tl dd 2
bgrxy dd 0x0
scrxy dd 0x0
bgrdrawtype dd 0x0
hand file 'hand.cur'
icon_moved dd 0
iconstate dd 0
add_table0 dd (24-6*4)*3,(24-6*2)*3,(24-6*1)*3,\
(24+6*1)*3,(24+6*2)*3,(24+6*4)*3
add_table1 dd 3,6,12,12,6,3
dd 4,8,16,16,8,4
add_table2 dd 1,2,4,4,2,1
dd 1,2,4,4,2,1
finfo_start:
dd 7
dd 0
dd 0
dd 0
dd 0
db 0
dd start_file
finfo:
dd 0
dd 0
dd 0
dd 9662
dd I_END+256
db 0
dd fname
start_file rb 30
fname rb 30
labelt:
rb 10
labellen:
pixl dd ?
xpos dd ?
ypos dd ?
mouse_pressed dd ?
xmouse_rel dd ?
ymouse_rel dd ?
xmouse_old dd ?
ymouse_old dd ?
processes dd ?
pid dd ?
process process_information
;include_debug_strings
I_PARAM:
I_END:

View File

@ -1,761 +0,0 @@
;
; DESKTOP ICON MANAGER
;
; Compile with FASM for Menuet
;
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x4000 ; memory for app
dd 0x4000 ; esp
dd I_Param , 0x0 ; I_Param , I_Icon
include '..\..\..\macros.inc'
include 'lang.inc'
START: ; start of execution
call load_icon_list
call check_parameters
red: ; redraw
call draw_window ; at first, draw the window
still:
mcall 10 ; wait here for event
dec eax ; redraw request ?
jz red
dec eax ; key in buffer ?
jz key
button: ; button
mcall 17 ; get id
shr eax,8
cmp eax,1 ; button id=1 ?
jne noclose
or eax,-1 ; close this program
mcall
noclose:
cmp eax,11
jb no_str
cmp eax,13
jg no_str
call read_string
jmp still
no_str:
cmp eax,21 ; apply changes
jne no_apply
; (1) save list
mov eax,70
mov ebx,finfo
mov dword[ebx],2
mov edx,78
imul edx,dword [icons]
mov dword[ebx+12],edx
mcall
; (2) terminate all icons
mov esi,1
newread:
inc esi
mov eax,9
mov ebx,I_END
mov ecx,esi
mcall
cmp esi,eax
jg all_terminated
cmp [I_END+10],dword '@ICO'
jne newread
mov eax,18
mov ebx,2
mov ecx,esi
mcall
mov esi,1
jmp newread
all_terminated:
apply_changes:
; (3) start icons from icon_data
mov edi,[icons]
mov esi,icon_data
start_new:
push edi
push esi
movzx eax,byte [esi] ; x position
cmp eax,'E'
jg no_left
sub eax,65
imul eax,70
add eax,15
jmp x_done
no_left:
sub eax,65
mov ebx,9
sub ebx,eax
imul ebx,70
push ebx
mcall 14
pop ebx
shr eax,16
sub eax,51+15
sub eax,ebx
x_done:
add eax,0x01010101
mov [icon_start_parameters],eax
movzx eax,byte [esi+1] ; y position
cmp eax,'E'
jg no_up
sub eax,65
imul eax,80
add eax,12
jmp y_done
no_up:
sub eax,65
mov ebx,9
sub ebx,eax
imul ebx,80
push ebx
mov eax,14
mcall
pop ebx
and eax,0xffff
sub eax,-1+20
sub eax,ebx
y_done:
add eax,0x01010101
mov [icon_start_parameters+4],eax
mov esi,[esp] ; icon picture
add esi,3
mov edi,icon_start_parameters+8
mov ecx,30
cld
rep movsb
mov esi,[esp] ; icon application
add esi,34
mov edi,icon_start_parameters+8+30
mov ecx,30
cld
rep movsb
mov esi,[esp] ; icon text
add esi,65
mov edi,icon_start_parameters+8+30+30
mov ecx,10
cld
rep movsb
mov byte[edi],0 ; ASCII -> ASCIIZ
mov eax,70
mov ebx,finfo_start
mcall
pop esi edi
add esi,76+2
dec edi
jnz start_new
cmp [I_Param],byte 0
je still
or eax,-1
mcall
no_apply:
cmp eax,22 ; user pressed the 'add icon' button
jne no_add_icon
mov eax,13
mov ebx,19*65536+260
mov ecx,225*65536+10
mov edx,0xffffff
mcall
mov eax,4
mov ebx,19*65536+225
mov ecx,0xc0ff0000
mov edx,add_text
mov edi,0xffffff
mcall
mov eax,10
mcall
cmp eax,3
jne still
mov al,17
mcall
shr eax,8
cmp eax,40
jb no_f
sub eax,40
xor edx,edx ; bcd -> 10
mov ebx,16
div ebx
imul eax,10
add eax,edx
mov ebx,eax
add ebx,icons_reserved
cmp [ebx],byte 'x'
je no_f
mov [ebx],byte 'x'
xor edx,edx
mov ebx,10
div ebx
add eax,65
add edx,65
mov [icon_default+0],dl
mov [icon_default+1],al
inc dword [icons]
mov edi,[icons]
dec edi
imul edi,76+2
add edi,icon_data
mov [current_icon],edi
mov esi,icon_default
mov ecx,76+2
cld
rep movsb
no_f:
call draw_window
jmp still
no_add_icon:
cmp eax,23 ; user pressed the remove icon button
jne no_remove_icon
mov eax,13
mov ebx,19*65536+260
mov ecx,225*65536+10
mov edx,0xffffff
mcall
mov eax,4
mov ebx,19*65536+225
mov ecx,0xc0ff0000
mov edx,rem_text
mov edi,0xffffff
mcall
mov eax,10
mcall
cmp eax,3
jne no_found
mov al,17
mcall
shr eax,8
cmp eax,40
jb no_found
sub eax,40
xor edx,edx
mov ebx,16
div ebx
imul eax,10
add eax,edx
mov ebx,eax
add ebx,icons_reserved
cmp [ebx],byte 'x'
jne no_found
mov [ebx],byte ' '
xor edx,edx
mov ebx,10
div ebx
shl eax,8
mov al,dl
add eax,65*256+65
mov esi,icon_data
mov edi,76+2
imul edi,[icons]
add edi,icon_data
news:
cmp word [esi],ax
je foundi
add esi,76+2
cmp esi,edi
jb news
jmp no_found
foundi:
mov ecx,edi
sub ecx,esi
mov edi,esi
add esi,76+2
cld
rep movsb
dec [icons]
mov eax,icon_data
mov [current_icon],eax
no_found:
call draw_window
jmp still
no_remove_icon:
cmp eax,40 ; user pressed button for icon position
jb no_on_screen_button
sub eax,40
mov edx,eax
shl eax,4
and edx,0xf
mov dh,ah
add edx,65*256+65
mov esi,icon_data
mov ecx,[icons]
cld
findl1:
cmp dx,[esi]
je foundl1
add esi,76+2
loop findl1
jmp still
foundl1:
mov [current_icon],esi
call print_strings
jmp still
no_on_screen_button:
jmp still
key: ; key
mov al,2 ; just read it and ignore
mcall
jmp still
current_icon dd icon_data
print_strings:
pusha
mov eax,13 ; clear text area
mov ebx,95*65536+180
mov ecx,253*65536+40
mov edx,0xffffff
mcall
mov eax,4 ; icon text
mov ebx,95*65536+253
mov ecx,0x000000
mov edx,[current_icon]
add edx,65
mov esi,10
mcall
;mov eax,4 ; icon application
add ebx,14
mov edx,[current_icon]
add edx,34
mov esi,30
mcall
;mov eax,4 ; icon file
add ebx,14
mov edx,[current_icon]
add edx,3
mov esi,30
mcall
popa
ret
load_icon_list:
;pusha
mov eax,70
mov ebx,finfo
mov dword[ebx],0
mov dword[ebx+12],4096 ; max size of icons.dat (in current format) is 4 kb
mcall
mov eax,ebx
add eax,2
xor edx,edx
mov ebx,76+2
div ebx
mov [icons],eax
mov edi,icons_reserved ; clear reserved area
mov eax,32
mov ecx,10*10
cld
rep stosb
mov ecx,[icons] ; set used icons to reserved area
mov esi,icon_data
cld
ldl1:
movzx ebx,byte [esi+1]
sub ebx,65
imul ebx,10
movzx eax,byte [esi]
add ebx,eax
sub ebx,65
add ebx,icons_reserved
mov [ebx],byte 'x'
add esi,76+2
loop ldl1
ret
check_parameters:
cmp [I_Param],dword 'BOOT'
je chpl1
ret
chpl1:
mov eax,21
jmp apply_changes
positions dd 65,34,3
read_string:
sub eax,11
shl eax,2
add eax,positions
mov eax,[eax]
mov esi,[current_icon]
add esi,eax
mov [addr],esi
mov edi,[addr]
mov eax,'_'
mov ecx,30
cld
rep stosb
call print_strings
mov edi,[addr]
f11:
mov eax,10
mcall
cmp eax,2
jz fbu
jmp rs_done
fbu:
mov eax,2
mcall
shr eax,8
cmp eax,13
je rs_done
cmp eax,8
jnz nobsl
cmp edi,[addr]
jz f11
dec edi
mov [edi],byte ' '
call print_strings
jmp f11
nobsl:
cmp eax,31
jbe f11
mov [edi],al
call print_strings
add edi,1
mov esi,[addr]
add esi,30
cmp esi,edi
jnz f11
rs_done:
mov ecx,[addr]
add ecx,30
sub ecx,edi
mov eax,32
cld
rep stosb
call print_strings
ret
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mcall 12,1 ; function 12,1 - tell os about start of draw window
xor eax,eax ; DRAW WINDOW
mov ebx,210*65536+300
mov ecx,30*65536+390
mov edx,0x33ffffff
mov edi,title
mcall
mov eax,13 ; WINDOW AREA
mov ebx,15*65536+260
mov ecx,10*65536+200
mov edx,0x3366cc
mcall
mov eax,38 ; VERTICAL LINE ON WINDOW AREA
mov ebx,145*65536+145
mov ecx,10*65536+235
mov edx,0xffffff
mcall
;mov eax,38 ; HOROZONTAL LINE ON WINDOW AREA
mov ebx,15*65536+280
mov ecx,110*65536+110
mov edx,0xffffff
mcall
mov eax,8 ; TEXT ENTER BUTTONS
mov ebx,15*65536+72
mov ecx,250*65536+13
mov edx,11
mov esi,[bcolor]
mcall
inc edx
add ecx,14*65536
mcall
inc edx
add ecx,14*65536
mcall
;mov eax,8 ; APPLY AND SAVE CHANGES BUTTON
mov ebx,15*65536+259
mov ecx,304*65536+15
mov edx,21
mov esi,[bcolor]
mcall
;mov eax,8 ; ADD ICON BUTTON
mov ebx,15*65536+129
add ecx,14*2*65536
inc edx
mcall
;mov eax,8 ; REMOVE ICON BUTTON
add ebx,130*65536
inc edx
mcall
xor eax,eax ; DRAW BUTTONS ON WINDOW AREA
mov ebx,15*65536+25
mov ecx,10*65536+19
mov edi,icon_table
mov edx,40
newbline:
cmp [edi],byte 'x'
jne no_button
mov esi,0x5577cc
cmp [edi+100],byte 'x'
jne nores
mov esi,0xcc5555
nores:
push eax
mov eax,8
mcall
pop eax
no_button:
add ebx,26*65536
inc edi
inc edx
inc al
cmp al,9
jbe newbline
mov al,0
add edx,6
ror ebx,16
mov bx,15
ror ebx,16
add ecx,20*65536
inc ah
cmp ah,9
jbe newbline
mov ebx,24*65536+225
mov ecx,0xffffff
mov edx,text
mov esi,36
mov eax,4
newline:
mov ecx,[edx]
add edx,4
mcall
add ebx,14
add edx,36
cmp [edx],byte 'x'
jne newline
call print_strings
mcall 12,2 ; function 12,2 - tell os about end of draw window
ret
; DATA AREA
bcolor dd 0x335599
icon_table:
times 4 db 'xxxx xxxx'
times 2 db ' '
times 3 db 'xxxx xxxx'
times 1 db ' '
icons_reserved:
times 10 db ' '
text:
db 0,0,0,0, 'Click on icon position to edit '
db 0,0,0,0, ' '
db 255,255,255,0 , 'Icon text '
db 255,255,255,0 , 'Icon app '
db 255,255,255,0 , 'Icon file '
db 0,0,0,0, ' '
db 255,255,255,0, ' Save and apply all changes '
db 0,0,0,0, ' '
db 255,255,255,0, ' Add icon Remove icon'
db 'x' ; <- End marker, dont delete
title db 'Icon manager',0
icons dd 0
addr dd 0
ya dd 0
add_text db 'Press button of unused icon position',0
rem_text db 'Press button of used icon ',0
finfo_start:
dd 7
dd 0
dd icon_start_parameters
dd 0
dd 0
db 0
dd icon_path
icon_path db '/sys/@ICON',0
finfo:
dd 0
dd 0
dd 0
dd 0
dd icon_data
db 0
dd icon_list
icon_list db '/sys/icons.dat',0
icon_start_parameters:
db 25,1,1,1
db 35,1,1,1
db '/sys/icons/fs.ico',0
rb 12
db '/sys/kfar',0
rb 20
db 'KFAR '
icon_default:
db 'AA-/sys/icons/fs.ico -/sys/kfar -KFAR *',13,10
icon_data: ; data length 76+2
rb 4096
I_Param:
I_END:

View File

@ -1,7 +0,0 @@
AA-/sys/icons/FS.ICO -/sys/File Managers/KFAR -FAR *
BA-/sys/icons/FASM.ICO -/sys/develop/FASM -Fasm *
CA-/sys/icons/WRITE.ICO -/sys/TINYPAD -Tinypad *
AB-/sys/icons/FLOPPY.ICO -/sys/RDSAVE -RDsave *
BB-/sys/icons/CALC.ICO -/sys/CALC -Calc *
IA-/sys/icons/BUG.ICO -/sys/develop/MTDBG -Debuger *
JA-/sys/icons/BOARD.ICO -/sys/develop/BOARD -Board *

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -1,3 +0,0 @@
„«ï ¨á¯®«ì§®¢ ­¨ï í⮩ ¢¥àᨨ ICON ­¥®¡å®¤¨¬® § ¬¥­¨âì icons.dat ¢ ®¡à §¥, § ª¨­ãâì â㤠 ¢áî ¯ ¯ªã icons,
᪮¬¯¨«¨à®¢ ­­ë¥ @icon ¨ iconmngr, ¯®¯à ¢¨âì autorun.dat (ICON § ¬¥­¨âì ­  ICONMNGR), ¯¥à¥ª®¬¯¨«¨à®¢ âì @RB,
§ ¬¥­¨¢ ¢ ¨á室­¨ª¥ ICON ­  ICONMNGR. ‚த¥ ¢á¥ :) ”®à¬ â ¨ª®­®ª *.ico - 48X48X32 bit (¯à®§à ç­®áâì ¯®¤¤¥à¦¨¢ ¥âáï)