Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 108 → Rev 109

/programs/system/board/trunk/board.asm
0,0 → 1,221
;
; DEBUG BOARD for APPLICATIONS and KERNEL DEVELOPMENT
;
; See f63
;
; Compile with FASM for Menuet
;
 
include 'lang.inc'
include 'macros.inc'
 
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x2000 ; memory for app (4 Kb)
dd 0x2000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
 
MAXSTRINGS = 16
 
xpos dd 0x0
ypos dd 0
 
 
START: ; start of execution
 
mov ecx,1024
flush:
mov eax,63
mov ebx,2
int 0x40
loop flush
 
mov ecx, 80*(MAXSTRINGS+1)
xor eax, eax
mov edi, text
rep stosb
 
mov [tmp],'x'
 
mov eax,14
int 0x40
and eax,0xffff0000
sub eax,400 shl 16
add eax,400
mov [xstart],eax
 
call draw_window
 
still:
 
mov eax,23 ; wait here for event
mov ebx,1
int 0x40
 
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
 
mov eax,63
mov ebx,2
int 0x40
 
cmp ebx,1
jne still
 
new_data:
 
cmp al,13
jne no13
mov [xpos],0
jmp new_check
no13:
cmp al,10
jne no10
inc [ypos]
cmp [ypos],MAXSTRINGS
jbe noypos
mov [ypos],MAXSTRINGS
mov esi,text+80
mov edi,text
mov ecx,80*(MAXSTRINGS)
cld
rep movsb
 
mov esi,[ypos]
imul esi,80
add esi,[xpos]
add esi,text
mov ecx,80
xor al,al
rep stosb
noypos:
jmp new_check
no10:
 
mov esi,[ypos]
imul esi,80
add esi,[xpos]
mov [text+esi],al
inc [xpos]
cmp [xpos],80
jb xposok
mov [xpos],79
xposok:
 
new_check:
 
mov eax,63
mov ebx,2
int 0x40
 
cmp ebx,1
je new_data
 
call draw_window
 
jmp still
 
 
red: ; redraw
call draw_window
jmp still
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
jmp still
 
button: ; button
mov eax,17 ; get id
int 0x40
 
cmp ah,1 ; button id=1 ?
jne noclose
 
mov eax,-1 ; close this program
int 0x40
noclose:
 
jmp still
 
 
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
int 0x40
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
; mov ebx,50*65536+400 ; [x start] *65536 + [x size]
mov ebx,[xstart]
mov ecx,MAXSTRINGS*10+40 ; [y start] *65536 + [y size]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0x03000000
int 0x40
 
; WINDOW LABEL
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
mov ecx,[sc.grab_text] ; color of text RRGGBB
or ecx,0x10000000
mov edx,header ; pointer to text beginning
mov esi,header.len ; text length
int 0x40
 
mov ebx,15*65536+33 ; draw info text with function 4
mov ecx,[sc.work_text]
mov edx,text
mov esi,80
newline:
mov eax,4
int 0x40
add ebx,10
add edx,80
cmp [edx],byte 'x'
jne newline
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
 
ret
 
 
; DATA AREA
 
if lang eq ru
header:
db '„Ž‘Š€ Ž’‹€„Šˆ ˆ ‘ŽŽ™…ˆ‰'
.len = $ - header
else
header:
db 'GENERAL DEBUG & MESSAGE BOARD'
.len = $ - header
end if
I_END:
text rb 80*(MAXSTRINGS+1)
tmp db ?
xstart dd ?
sc system_colors
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/board/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm board.asm board
@pause
/programs/system/board/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm board.asm board
@pause
/programs/system/board/trunk/macros.inc
0,0 → 1,267
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/calendar/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm calendar.asm calendar
@pause
/programs/system/calendar/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm calendar.asm calendar
@pause
/programs/system/calendar/trunk/calendar.asm
0,0 → 1,838
; CALENDAR FOR MENUET v1.0
; Written in pure assembler by Ivushkin Andrey aka Willow
;
;
; Created: November 1, 2004
; Last changed: January 13, 2005
;
; COMPILE WITH FASM
 
WIN_X equ (150 shl 16+270)
WIN_Y equ (100 shl 16+300)
 
LINE1 equ 27 shl 16+16
B_MONTH_X equ 10 shl 16+158
B_Y equ LINE1
B_MONTH equ 63 shl 16+32
 
B_WBAR_X equ 10 shl 16+250
B_WBAR_Y equ 64 shl 16+20
B_WEEK equ 30 shl 16+70
B_WX_SHIFT equ 32 shl 16
 
B_DBAR_X equ B_WBAR_X
B_DBAR_Y equ 85 shl 16+190
 
B_DROP equ B_MONTH+16
B_DAYS_Y equ 100
B_DAYS_SHIFT equ 30
 
B_YEAR_X equ 173 shl 16+58
B_YEAR equ 188 shl 16+32
 
B_TODAY_X equ 25 shl 16
B_TODAY_Y equ 48 shl 16+10
B_TODAY equ 30 shl 16+50
 
B_SPIN_WIDTH equ 13
B_SPIN_X equ 234 shl 16+B_SPIN_WIDTH
B_SPIN equ 238 shl 16+32
 
B_DATE_X equ 26 shl 16+60
B_DATE_Y equ 275 shl 16+16
B_DATE_BSHIFT equ 80 shl 16
B_DATE equ 32 shl 16+280
B_DATE_SHIFT equ 80 shl 16
 
B_NS_X equ 185 shl 16+75
B_NS_Y equ 48 shl 16+10
B_NS equ 190 shl 16+50
 
FOCUSABLE equ 5
SKIP equ 1
 
use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
 
org 0x0 ;  ¤à¥á æ¨ï á ­ã«ï
 
db 'MENUET01' ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
dd start ;  ¤à¥á ¬¥âª¨, á ª®â®à®© ­ ç¨­ ¥âáï ¢ë¯®«­¥­¨¥ ¯à®£à ¬¬
dd I_END ; à §¬¥à ¯à®£à ¬¬ë
dd 0x1000 ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd 0x1000 ;  ¤à¥á ¢¥à設ë áâíª 
dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï áâப¨ ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
dd 0x0 ; § à¥§¥à¢¨à®¢ ­®
include 'lang.inc'
include 'macros.inc' ; 㬥­ìè ¥â à §¬¥à ¯à®£à ¬¬ë
;include 'debug.inc'
 
 
macro ShowFocus field,reg
{
local .nofocus, .exit
cmp [focus],field
jne .nofocus
if reg eq
mov ecx,0x10e7c750;0x10ddeeff
else
mov reg,0x10e7c750;0x10ddeeff
end if
jmp .exit
.nofocus:
if reg eq
mov ecx,0x10000000
else
mov reg,0x10000000
end if
.exit:
}
 
month_name:
if lang eq ru
db 8
db 'Ÿ­¢ àì '
db '”¥¢à «ì '
db 'Œ àâ '
db '€¯à¥«ì '
db 'Œ © '
db 'ˆî­ì '
db 'ˆî«ì '
db '€¢£ãáâ '
db '‘¥­âï¡àì'
db 'Žªâï¡àì '
db '®ï¡àì '
db '„¥ª ¡àì '
else if lang eq ge
db 9
db 'Januar '
db 'Februar '
db 'MÁrz '
db 'April '
db 'Mai '
db 'Juni '
db 'Juli '
db 'August '
db 'September'
db 'Oktober '
db 'November '
db 'Dezember '
else if lang eq fr
db 9
db 'Janvier '
db 'Fevrier '
db 'Mars '
db 'Avril '
db 'Mai '
db 'Juin '
db 'Juliet '
db 'Aout '
db 'Septembre'
db 'Octobre '
db 'Novembre '
db 'Decembre '
else if lang eq fi
db 9
db 'Tammikuu '
db 'Helmikuu '
db 'Maaliskuu'
db 'Huhtikuu '
db 'Toukokuu '
db 'KesÁkuu '
db 'HeinÁkuu '
db 'Elokuu '
db 'Syyskuu '
db 'Lokakuu '
db 'Marraskuu'
db 'Joulukuu '
else
db 9
db 'January '
db 'February '
db 'March '
db 'April '
db 'May '
db 'June '
db 'July '
db 'August '
db 'September'
db 'October '
db 'November '
db 'December '
end if
spinner db '< >'
week_days:
if lang eq ru
db 2
db 1
db '­'
db '‚â'
db '‘à'
db '—â'
db 'â'
db '‘¡'
db '‚á'
else if lang eq ge
db 2
db 7
db 'So'
db 'Mo'
db 'Di'
db 'Mi'
db 'Do'
db 'Fr'
db 'Sa'
else if lang eq fr
db 3
db 7
db 'Dim'
db 'Lun'
db 'Mar'
db 'Mer'
db 'Jeu'
db 'Ven'
db 'Sam'
else if lang eq fi
db 2
db 7
db 'Su'
db 'Ma'
db 'Ti'
db 'Ke'
db 'To'
db 'Pe'
db 'La'
else
db 3
db 7
db 'Sun'
db 'Mon'
db 'Tue'
db 'Wen'
db 'Thi'
db 'Fri'
db 'Sat'
end if
 
str2int:
xor eax,eax
lodsb
mov ebx,eax
shr ebx,4
and eax,0xf
imul ebx,10
add al,bl
ret
 
start:
mcall 29
mov [datestr],eax
mov esi,datestr
call str2int
add eax,1900
mov [Year],eax
call str2int
dec eax
mov [Month],eax
call str2int
mov [day_sel],eax
test byte[esi],0
jnz .no2000
add [Year],100
.no2000:
jmp upd ; §¤¥áì ­ ç¨­ ¥âáï ¢ë¯®«­¥­¨¥ ¯à®£à ¬¬ë
red: ; ¯¥à¥à¨á®¢ âì ®ª­®
 
call draw_window ; ¢ë§ë¢ ¥¬ ¯à®æ¥¤ãàã ®âà¨á®¢ª¨ ®ª­ 
 
still: ; ƒ‹€‚›‰ –ˆŠ‹ Žƒ€ŒŒ›
 
mov eax,10 ; äã­ªæ¨ï 10 - ¦¤ âì ᮡëâ¨ï
int 0x40 ; ¢ë§ë¢ ¥¬ á¨á⥬ã
.evt:
mov ebp,[focus]
cmp eax,1 ; ¯¥à¥à¨á®¢ âì ®ª­® ?
je red ; ¥á«¨ ¤  - ­  ¬¥âªã red
cmp eax,2 ; ­ ¦ â  ª« ¢¨è  ?
je key ; ¥á«¨ ¤  - ­  key
cmp eax,3 ; ­ ¦ â  ª­®¯ª  ?
je button ; ¥á«¨ ¤  - ­  button
 
jmp still ; ¥á«¨ ¤à㣮¥ ᮡë⨥ - ¢ ­ ç «® 横« 
 
key: ; ­ ¦ â  ª« ¢¨è  ­  ª« ¢¨ âãà¥
mov eax,2 ; äã­ªæ¨ï 2 - áç¨â âì ª®¤ ᨬ¢®« 
int 0x40 ; ¢ë§®¢ á¨á⥬ë
cmp ah,9
jne no_tab
.tab:
cmp ebp,FOCUSABLE
je foc_cycle
inc [focus]
upd:
call calculate
jmp red
foc_cycle:
mov [focus],2
jmp upd
no_tab:
push eax
shr eax,8
mov ecx,12
mov edi,Fkeys
repne scasb
pop eax
jnz .noFkey
sub edi,Fkeys+1
mov [Month],edi
jmp upd
.noFkey:
cmp ebp,4
jne no_spinner
cmp ah,176
je year_dec
cmp ah,179
je year_inc
no_spinner:
cmp ebp,2
jne .nomonth
cmp ah,177
je noclose.drop
jmp still
.nomonth:
cmp ebp,3
je noy_up.year_evt
cmp ebp,5
jne still
mov ebx,[day_sel]
cmp ah,176 ; left arrow
jb still
cmp ah,179
ja still
shr eax,8
sub eax,176
movsx ecx,byte[day_bounds+eax*2]
movzx eax,byte[day_bounds+eax*2+1]
add ecx,ebx
test eax,eax
jz .chk0
cmp ecx,eax
ja still
.ok:
mov [day_sel],ecx
call draw_days
jmp still ; ¢¥à­ãâìáï ª ­ ç «ã 横« 
.chk0:
cmp ecx,eax
jle still
jmp .ok
 
day_bounds db -1,0,7,0,-7,0,1,0 ; left,down,up,right
 
button: ; ­ ¦ â  ª­®¯ª  ¢ ®ª­¥ ¯à®£à ¬¬ë
mov eax,17 ; 17 - ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
int 0x40 ; ¢ë§®¢ á¨á⥬ë
movzx ebx,ah
cmp ah,200
jbe nodayselect
sub ah,200
mov byte[day_sel],ah
cmp ebp,5
jne .redraw
call draw_days
jmp still
.redraw:
mov [focus],5
jmp red
nodayselect:
cmp ah,100
jb no_list
sub ah,100
mov byte[Month],ah
mov [focus],2
jmp upd
no_list:
cmp ah,1 ; ¨¤¥­â¨ä¨ª â®à == 1 ?
jne noclose ; ¥á«¨ ­¥â - ¨¤¨ ¢¯¥àñ¤ ­  noclose
close:
or eax,-1 ; ¢ë室 ¨§ ¯à®£à ¬¬ë
int 0x40 ; ¢ë§®¢ á¨á⥬ë
 
noclose:
cmp ah,2 ; drop down list
jne no_dropdn
.drop:
mov [focus],2
cmp [dropped],al ; ==0
jne red
call draw_window
mov edx,1 shl 31+231
mov ecx,31
mov eax,8
.bremove:
int 0x40
dec edx
loop .bremove
call draw_dropdown
jmp still
no_dropdn:
cmp ah,3 ; year -1
jne noy_dn
year_dec:
dec [Year]
mov [focus],4
jmp upd
noy_dn:
cmp ah,4 ; year+1
jne noy_up
year_inc:
inc [Year]
mov [focus],4
jmp upd
noy_up:
cmp ah,5
jne noy_click
mov [focus],3
call draw_window
.still:
mcall 10
cmp eax,2
jne still.evt
mcall 2
.year_evt:
mov ebx,10
cmp ah,9
je key.tab
cmp ah,8 ; backspace
jne .nobsp
mov eax,[Year]
xor edx,edx
div ebx
.ch_year:
mov [Year],eax
call draw_year
jmp .still
.nobsp:
cmp ah,13 ; enter
je upd
cmp ah,182
jne .noclear ; del
xor eax,eax
jmp .ch_year
.noclear:
cmp ah,48
jb .still
cmp ah,57
ja .still
cmp [Year],1000
jae .still
shr eax,8
lea ecx,[eax-48]
mov eax,[Year]
imul eax,ebx
add eax,ecx
jmp .ch_year
noy_click:
cmp ah,10
jne start
xor [new_style],1
jmp upd
 
 
; *********************************************
; ******* Ž…„…‹…ˆ… ˆ Ž’ˆ‘Ž‚Š€ ŽŠ€ *******
; *********************************************
 
draw_window:
 
mov eax,12 ; äã­ªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª­ 
mov ebx,1 ; 1 - ­ ç¨­ ¥¬ à¨á®¢ âì
int 0x40
; ‘Ž‡„€ðŒ ŽŠŽ
xor eax,eax ; äã­ªæ¨ï 0 : ®¯à¥¤¥«¨âì ¨ ®âà¨á®¢ âì ®ª­®
mov ebx,WIN_X
if SKIP eq 0
mov ecx,WIN_Y
else
mov ecx,WIN_Y-15
end if
mov edx,0x03aabbcc ; 梥â à ¡®ç¥© ®¡« á⨠RRGGBB,8->color gl
mov esi,0x805080d0 ; 梥⠯®«®áë § £®«®¢ª  RRGGBB,8->color gl
mov edi,0x005080d0 ; 梥â à ¬ª¨ RRGGBB
int 0x40
call draw_week
 
mov eax,8
mov esi,0x05080d0
if SKIP eq 0
mov ebx,B_DATE_X
mov ecx,B_DATE_Y
mov edx,eax
int 0x40
inc edx
add ebx,B_DATE_BSHIFT
int 0x40
inc edx
else
mov edx,10
end if
or edx,1 shl 29+1 shl 30
mov ebx,B_NS_X
mov ecx,B_NS_Y
int 0x40
add edx,1-1 shl 29
mov ebx,B_TODAY_X+8*(today_end-today_msg)
mov ecx,B_TODAY_Y
int 0x40
mov ecx,B_Y
mov ebx,B_MONTH_X
mov edx,2
int 0x40
mov ebx,B_SPIN_X
inc edx
int 0x40
add ebx,B_SPIN_WIDTH shl 16
inc edx
int 0x40
call draw_days
 
; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ€
mov eax,4 ; äã­ªæ¨ï 4 : ­ ¯¨á âì ¢ ®ª­¥ ⥪áâ
mov ebx,8*65536+8 ; [x] *65536 + [y]
mov ecx,0x10ddeeff ; èà¨äâ 1 ¨ 梥â ( 0xF0RRGGBB )
mov edx,zagolovok ;  ¤à¥á áâப¨
mov esi,zag_konets-zagolovok ; ¨ ¥ñ ¤«¨­ 
int 0x40
 
if SKIP eq 0
mov ebx,B_DATE
mov edx,datebut
mov esi,9
btc ecx,28
int 0x40
add ebx,B_DATE_SHIFT
add edx,esi
int 0x40
end if
mov edx,n_style
mov esi,ns_end-n_style
mov ebx,B_NS
cmp [new_style],1
je .high
mov ecx,0xa0a0a0
jmp .int
.high:
mov ecx,0xac0000;d048c8
.int:
int 0x40
 
mov ecx,0xd048c8
mov edx,today_msg
mov ebx,B_TODAY
mov esi,today_end-today_msg
int 0x40
 
mov ebx,B_SPIN
mov edx,spinner
mov esi,3
ShowFocus 4
int 0x40
 
mov edx,[Month]
movzx esi,byte[month_name]
imul edx,esi
add edx,month_name+1
mov ebx,B_MONTH
ShowFocus 2
int 0x40
 
call draw_year
mov [dropped],0
mov eax,12 ; äã­ªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª­ 
mov ebx,2 ; 2, § ª®­ç¨«¨ à¨á®¢ âì
int 0x40
ret ; ¢ë室¨¬ ¨§ ¯à®æ¥¤ãàë
 
draw_year:
mcall 8,B_YEAR_X,B_Y,5,0x05080d0
ShowFocus 3,esi
mcall 47,0x40001,Year,B_YEAR
ret
 
draw_dropdown:
mov [dropped],1
push [Month]
pop [focus]
add [focus],100
mov ecx,12
mov edx,100
push dword month_name+1
push dword B_DROP
push dword B_Y+16 shl 16
.ddd_loop:
mov edi,edx
push ecx
mov ebx,B_MONTH_X
mov ecx,[esp+4]
mov esi,0x6f9fef
mov eax,8
int 0x40
shr eax,1
mov ebx,[esp+8]
xchg edx,[esp+12]
movzx esi,byte[month_name]
ShowFocus edi
int 0x40
add edx,esi
xchg edx,[esp+12]
add dword[esp+8],16
add dword[esp+4],16 shl 16
inc edx
pop ecx
loop .ddd_loop
add esp,12
ret
 
draw_week:
mov eax,13
mov ebx,B_WBAR_X
mov ecx,B_WBAR_Y
mov edx,0x90a0b0
int 0x40
movzx esi,byte[week_days]
movzx edi,byte[week_days+1]
mov ebx,B_WEEK
mov ecx,7
mov edx,week_days+2
mov eax,4
.week:
push ecx
cmp ecx,edi
je .holiday
mov ecx,0x10000000
jmp .noholiday
.holiday:
mov ecx,0x10cc1010
.noholiday:
int 0x40
add edx,esi
add ebx,B_WX_SHIFT
pop ecx
loop .week
ret
 
draw_days:
mov eax,13
mov ebx,B_DBAR_X
mov ecx,B_DBAR_Y
mov edx,0xe0e0e0
int 0x40
call count_days
cmp ecx,[day_sel]
jae .ok
mov [day_sel],ecx
.ok:
mov [number],0
mov eax,47
mov edx,B_DAYS_Y
mov ebx,0x20001
mov edi,[firstday]
.dayloop:
push ecx
movzx edx,dx
mov esi,edi
shl esi,21
lea edx,[edx+esi+30 shl 16]
mov ecx,edi
add cl,[week_days+1]
cmp ecx,7
je .holiday
mov esi,0x10000000
jmp .noholiday
.holiday:
mov esi,0x10cc1010
.noholiday:
mov ecx,number
inc dword[ecx]
pusha
mov ebx,edx
mov bx,20
sub ebx,3 shl 16
shrd ecx,edx,16
mov cx,20
sub ecx,7 shl 16
mov edx,[number]
cmp edx,[day_sel]
je .draw_sel
mov esi,0xe0e0e0
jmp .draw_but
.draw_sel:
mov esi,0x5080d0
cmp [focus],5
jne .draw_but
mov esi,0xef7840;0xe26830
.draw_but:
add edx,200+1 shl 29
mov eax,8
int 0x40
popa
int 0x40
pop ecx
inc edi
cmp edi,7
jne .nowrap
xor edi,edi
add dx,B_DAYS_SHIFT
.nowrap:
loop .eloop
jmp .ex
.eloop:
jmp .dayloop
.ex:
ret
 
count_days: ; ecx -days in month
call is_leap_year
mov ecx,[Month]
mov eax,1
movzx ecx,byte[day_count+ecx]
add ecx,28
cmp eax,[leap_year]
jne .noleap
cmp eax,[Month]
jne .noleap
inc ecx
.noleap:
mov [day_bounds+3],cl
mov [day_bounds+7],cl
ret
 
is_leap_year:
mov [leap_year],0
mov eax,[Year]
mov bl,100
div bl ; ah=Year mod 100, al=Year%100
test ah,ah
jz .century
shr ax,8 ; ax - last 2 digits
.century:
test al,11b
jnz .noleap
inc [leap_year]
.noleap:
ret
 
calculate:
mov ebx,[Year]
mov eax,[Month]
sub eax,2
jge .nojf
dec ebx
add eax,12
.nojf:
add eax,4
xor edx,edx
mov ecx,153
imul cx
mov ecx,5
div cx
inc eax
mov ecx,365
imul ecx,ebx
add eax,ecx
mov ecx,ebx
shr ecx,2
add eax,ecx
dec eax
cmp [new_style],0
je .nonew
add eax,2
xchg eax,ebx
mov ecx,100
xor edx,edx
div cx
sub ebx,eax
shr eax,2
add ebx,eax
.nonew:
add ebx,5
mov eax,ebx
xor edx,edx
movzx ebx,byte[week_days+1]
sub eax,ebx
inc eax
mov ebx,7
div bx
mov [firstday],edx
ret
 
; ‡¤¥áì ­ å®¤ïâáï ¤ ­­ë¥ ¯à®£à ¬¬ë:
 
; ¨­â¥àä¥©á ¯à®£à ¬¬ë ¤¢ãï§ëç­ë© - § ¤ ©â¥ ï§ëª ¢ macros.inc
day_count db 3,0,3,2,3,2,3,3,2,3,2,3
Fkeys db 210,211,212,213,214,215,216,217,208,209,228,159
 
zagolovok: ; áâப  § £®«®¢ª 
if lang eq ru
db 'Š€‹…„€œ'
else if lang eq ge
db 'KALENDER'
else if lang eq fr
db 'CALENDRIER'
else
db 'CALENDAR'
end if
zag_konets: ; ¨ ¥ñ ª®­¥æ
if SKIP eq 0
datebut:
if lang eq ru
db '1-ï ¤ â  '
db '2-ï ¤ â  '
else if lang eq fr
db '1ere date'
db '2eme date'
else if lang eq ge
db ' Datum 1 '
db ' Datum 2 '
else
db '1st date '
db '2nd date '
end if
end if
n_style:
if lang eq ru
db '®¢ë© á⨫ì'
else if lang eq ge
db 'Neustil'
else if lang eq fr
db 'Nouveau'
else
db 'New style'
end if
ns_end:
today_msg:
if lang eq ru
db '‘¥£®¤­ï'
else if lang eq ge
db 'Heute'
else if lang eq fr
db "Aujourd'hui"
else
db 'Today'
end if
today_end:
focus dd 3
new_style dd 1
dropped db 0
 
I_END: ; ª®­¥æ ¯à®£à ¬¬ë
firstday dd ?
Year dd ?
Month dd ?
day_sel dd ?
all_days dd ?
 
datestr dd ?
leap_year dd ?
number dd ?
year_input dd ?
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/calendar/trunk/calendar.txt
0,0 → 1,75
CALENDAR FOR MENUET v1.0 January 13, 2005
Written in pure assembler by Ivushkin Andrey aka Willow
 
I salute users and programmers of Menuet operation system!
Also, I tender thanks to everyone who spends his time in feasible efforts
for that little OS evolution. My special thanks to Ivan Poddubny whose distro
(re8pre2) runs on VMware Workstation incomparably and bugless. That, as well
as MACROS.INC and DEBUG.INC files, simplify the developing greatly.
 
Today I let you to judge a desktop calendar, similar to the Windows one.
Application abilities are:
 
1. Interface is translated into Russian,English, German, French, and Finnish
(not completely - there was no help). Day sequence difference is taken
into account as well. You may change localization through 'lang' constant
while compiling.
2. Calendar is equipped with additional buttons 'Today' and 'New style' that
are self-explaining.
3. I tied to follow world GUI standards: use TAB to move along fields; while
editing the year, use Backspace and Del, as well as left and right arrows
of 'spinner' when in its focus. Arrow keys navigate along day matrix.
Pressing Ctrl-F1...Ctrl-F12 selects appropriate month.
 
To-Do list:
 
1. Program internal routines allow calculating amount of days between two dates.
It is possible to add a feature of calculating biorhythms and draw their
graphs.
2. Add comments to source.
3. Correct bugs to be found ;-)
 
I dedicate my application to the Ukrainian Orange Revolution.
 
Razom nas bahato, nas ne podolaty!
 
 
****************************************
****************************************
 
Š€‹…„€œ „‹Ÿ MENUET v1.0 13 ï­¢ àï 2005 £.
 ¯¨á ­  ­  ç¨á⮬  áᥬ¡«¥à¥ ˆ¢ã誨­ë¬ €­¤à¥¥¬ (Willow)
 
—¥áâì ¨ 墠«  ࠬ ¨ ¯à®£à ¬¬¨áâ ¬ ®¯¥à æ¨®­­®© á¨á⥬ë Menuet!
‚ëà ¦ î ¨áªà¥­­îî ¡« £®¤ à­®áâì ¢á¥¬ ⥬, ªâ® ­¥ ¦ «¥ï ᢮¥£® ¢à¥¬¥­¨,
¤¥« ¥â ¯®á¨«ì­ë© ¢ª« ¤ ¢ à §¢¨â¨¥ í⮩ ¬ «¥­ìª®© Ž‘. Žá®¡®¥ ᯠᨡ® å®çã ᪠§ âì
ˆ¢ ­ã ®¤¤ã¡­®¬ã, ¤¨áâਡã⨢ ª®â®à®£® (re8pre2) ¡¥á¯®¤®¡­® ¨ ¡¥§ £«îª®¢
à ¡®â ¥â ¢ VMware Workstation. â®,   â ª¦¥ ä ©«ë MACROS.INC ¨ DEBUG.INC ᨫ쭮
ã¯à®é îâ ࠧࠡ®âªã.
 
‘¥£®¤­ï ï ¯à¥¤áâ ¢«ïî ­  ¢ è á㤠­ á⮫ì­ë© ª «¥­¤ à¨ª, ­ ¯®¤®¡¨¥ ⮣®, çâ®
¨¬¥¥âáï ¢ Windows. ‚®§¬®¦­®á⨠¯à®£à ¬¬ë:
 
1. ˆ­â¥àä¥©á ¯¥à¥¢¥¤¥­ ­  àãá᪨©,  ­£«¨©áª¨©, ­¥¬¥æª¨©, äà ­æã§áª¨© ¨ 䨭᪨©
(­¥ ¯®«­®áâìî - ªâ® ¡ë ¯®¬®£?) ï§ëª¨. “çâ¥­ë ®â«¨ç¨ï ¢ ¯®à浪¥ á«¥¤®¢ ­¨ï
¤­¥© ­¥¤¥«¨. Ÿ§ëª ¬®¦­® ¯®¬¥­ïâì ¯à¨ ª®¬¯¨«ï樨 áâ ­¤ àâ­®© ª®­á⠭⮩
"lang".
2. Š «¥­¤ à¨ª ®¡®à㤮¢ ­ ¤®¯®«­¨â¥«ì­ë¬¨ ª­®¯ª ¬¨ "‘¥£®¤­ï" ¨ "®¢ë© á⨫ì",
­ §¢ ­¨ï ª®â®àëå £®¢®àïâ á ¬¨ §  ᥡï.
3. Ÿ ¯ëâ «áï á«¥¤®¢ âì ¬¨à®¢ë¬ áâ ­¤ àâ ¬ GUI: ¤«ï ¯¥à¥¬¥é¥­¨ï ¬¥¦¤ã ¯®«ï¬¨
¢¢®¤  ¨á¯®«ì§ã¥âáï TAB, ¢ ¯®«¥ £®¤  ¤¥©áâ¢ãîâ ª« ¢¨è¨ Backspace ¨ Del,
ç¨á«® £®¤  ¬®¦­® ¨§¬¥­ïâì áâ५ª ¬¨ ¢«¥¢® ¨ ¢¯à ¢® ¢ 䮪ãᥠ"ᯨ­­¥à ", ¢
¯®«¥ ª «¥­¤ àï à ¡®â îâ áâ५ª¨.  ¦ â¨¥¬ Ctrl-F1...Ctrl-F12 ¬®¦­® ¡ëáâà®
¯¥à¥©â¨ ª ­ã¦­®¬ã ¬¥áïæã.
 
—â® ¥é¥ ¬®¦­® ᤥ« âì:
 
1. ‚­ãâ७­¨¥ ä㭪樨 ¯à®£à ¬¬ë ¯®§¢®«ïîâ ®¯à¥¤¥«¨âì ª®«¨ç¥á⢮ ¤­¥© ®â ®¤­®©
¤ âë ¤® ¤à㣮©. ‚ ª «¥­¤ àì ¬®¦­® ¡ã¤¥â ¤®¡ ¢¨âì ¢®§¬®¦­®áâì à áç¥â  â ª®£®
¯®¯ã«ïà­®£® ¯®ª § â¥«ï, ª ª ¡¨®à¨â¬ë (á £à ä¨ª ¬¨).
2. Žâª®¬¬¥­â¨à®¢ âì ª®¤.
3. ˆá¯à ¢¨âì ¡ £¨, ª®â®àë¥, ¢®§¬®¦­®, ­ ©¤ãâáï ;-)
 
â㠯ணࠬ¬ã ï ¯®á¢ïé î ãªà ¨­áª®© ¯®¬ à ­ç¥¢®© ॢ®«î樨.
 
 §®¬ ­ á ¡ £ â®, ­ á ­¥ ¯®¤®« â¨!
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/calendar/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/cpu/trunk/cpu.asm
0,0 → 1,620
;
; PROCESS MANAGEMENT
;
; VTurjanmaa
; additions by M.Lisovin lisovin@26.ru
; Compile with FASM for Menuet
;
 
use32
org 0x0
STACK_SIZE=1024
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd U_END+STACK_SIZE ; memory for app
dd U_END+STACK_SIZE ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include 'macros.inc'
display_processes=32 ; number of processes to show
START: ; start of execution
; calculate window position
; at the center of the screen
call calculate_window_pos
;main loop when process name isn't edited.
red:
mov ebp,1
call draw_window ; redraw all window
still:
mov eax,23 ; wait here for event
mov ebx,100 ; 1 sec.
int 0x40
 
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
still_end:
xor ebp,ebp ; draw new state of processes
call draw_window
jmp still
 
 
key: ; key
mov eax,2
int 0x40
cmp ah,184 ; PageUp
je pgdn
cmp ah,183
je pgup ; PageDown
cmp ah,27
je close ; Esc
jmp still_end
 
button:
; get button id
mov eax,17
int 0x40
shr eax,8
 
;id in [10,50] corresponds to terminate buttons.
cmp eax,10
jb noterm
cmp eax,50
jg noterm
 
;calculate button index
sub eax,11
;calculate process slot
mov ecx,[tasklist+4*eax]
;ignore empty buttons
test ecx,ecx
jle still_end
;terminate application
mov eax,18
mov ebx,2
int 0x40
jmp still_end
noterm:
 
;special buttons
cmp eax,51
jz pgdn
cmp eax,52
jz pgup
cmp eax,53
jz read_string
cmp eax,54
jz program_start
cmp eax,55
jz reboot
cmp eax,1
jz close
jmp still_end
;buttons handlers
pgdn:
sub [list_start],display_processes
cmp [list_start],0
jge still_end
mov [list_start],0
jmp still_end
 
pgup:
mov eax,[list_add] ;maximal displayed process slot
mov [list_start],eax
jmp still_end
program_start:
mov eax,58
mov ebx,file_start
int 0x40
jmp still_end
reboot:
mov eax,18
mov ebx,1
int 0x40
;close program if we going to reboot
 
close:
mov eax,-1 ; close this program
int 0x40
 
draw_next_process:
;input:
; edi - current slot
; [curposy] - y position
;output:
; edi - next slot (or -1 if no next slot)
;registers corrupted!
;create button
test ebp,ebp
jnz .nodelete
;delete old button
mov eax,8
mov edx,[index]
add edx,(1 shl 31)+11
int 0x40
.nodelete:
;create terminate process button
mov eax,8
mov ebx,15*65536+100
mov ecx,[curposy]
shl ecx,16
mov cx,10
mov edx,[index]
add edx,11
mov esi,0xaabbcc
;contrast
test dword [index],1
jz .change_color_button
mov esi,0x8899aa
.change_color_button:
int 0x40
;draw background for proccess information
mov eax,13
mov ebx,115*65536+395
;ecx was already set
mov edx,0x88ff88
;contrast
test dword [index],1
jz .change_color_info
mov edx,0xddffdd
.change_color_info:
int 0x40
;nothing else should be done
;if there is no process for this button
test edi,edi
jl .ret
;find process
inc edi
;more comfortable register for next loop
mov ecx,edi
;precacluate pointer to process buffer
mov ebx,process_info_buffer
;find process loop
.find_loop:
cmp ecx,256
jge .no_processes
;load process information in buffer
mov eax,9
; mov ebx,process_info_buffer
int 0x40
;if current slot greater than maximal slot,
;there is no more proccesses.
cmp ecx,eax
jg .no_processes
;if slot state is equal to 9, it is empty.
cmp [process_info_buffer+process_information.slot_state],9
jnz .process_found
inc ecx
jmp .find_loop
.no_processes:
mov edi,-1
ret
.process_found:
mov edi,ecx
mov [list_add],ecx
;get processor cpeed
;for percent calculating
mov eax,18
mov ebx,5
int 0x40
xor edx,edx
mov ebx,100
div ebx
;eax = number of operation for 1% now
;calculate process cpu usage percent
mov ebx,eax
mov eax,[process_info_buffer+process_information.cpu_usage]
; cdq
xor edx,edx ; for CPU more 2 GHz - mike.dld
div ebx
mov [cpu_percent],eax
;set text color to display process information
;([tcolor] variable)
;0% : black
;1-80% : green
;81-100% : red
test eax,eax
jg .no_black
mov [tcolor],eax
jmp .color_set
.no_black:
cmp eax,80
ja .no_green
mov dword [tcolor],0x107a30
jmp .color_set
.no_green:
mov dword [tcolor],0xac0000
.color_set:
 
;show slot number
mov eax,47
mov ebx,2*65536+1*256
;ecx haven't changed since .process_found
; mov ecx,edi
mov edx,[curposy]
add edx,20*65536+1
mov esi,[tcolor]
int 0x40
;show process name
mov eax,4
mov ebx,[curposy]
add ebx,50*65536+1
mov ecx,[tcolor]
mov edx,process_info_buffer.process_name
mov esi,11
int 0x40
;show pid
mov eax,47
mov ebx,8*65536+1*256
mov ecx,[process_info_buffer.PID]
mov edx,[curposy]
add edx,130*65536+1
mov esi,[tcolor]
int 0x40
;show cpu usage
mov ecx,[process_info_buffer.cpu_usage]
add edx,60*65536
int 0x40
;show cpu percent
mov ebx,3*65536+0*256
mov ecx,[cpu_percent]
add edx,60*65536
int 0x40
;show memory start - obsolete
mov ebx,8*65536+1*256
mov ecx,[process_info_buffer.memory_start]
add edx,30*65536
int 0x40
;show memory usage
mov ecx,[process_info_buffer.used_memory]
inc ecx
add edx,60*65536
int 0x40
;show window stack and value
mov ecx,dword [process_info_buffer.window_stack_position]
add edx,60*65536
int 0x40
;show window xy size
mov ecx,[process_info_buffer.x_size]
shl ecx,16
add ecx,[process_info_buffer.y_size]
add edx,60*65536
int 0x40
.ret:
;build index->slot map for terminating processes.
mov eax,[index]
mov [tasklist+4*eax],edi
ret
 
read_string:
 
;clean string
mov edi,start_application
xor eax,eax
mov ecx,60
cld
rep stosb
call print_text
 
mov edi,start_application
;edi now contains pointer to last symbol
jmp still1
 
;read string main loop
f11:
;full update
push edi
mov ebp,1
call draw_window
pop edi
still1:
;wait for message
mov eax,23
mov ebx,100
int 0x40
cmp eax,1
je f11
;if no message - update process information
cmp eax,0
jnz .message_received
push edi ;edi should be saved since draw_window
xor ebp,ebp ;corrupt registers
call draw_window
pop edi
jmp still1
.message_received:
cmp eax,2
jne read_done ;buttons message
;read char
mov eax,2
int 0x40
shr eax,8
;if enter pressed, exit read string loop
cmp eax,13
je read_done
;if backslash pressed?
cmp eax,8
jnz nobsl
;decrease pointer to last symbol
cmp edi,start_application
jz still1
dec edi
;fill last symbol with space because
;print_text show all symbols
mov [edi],byte 32
call print_text
jmp still1
nobsl:
;write new symbol
mov [edi],al
;display new text
call print_text
;increment pointer to last symbol
inc edi
;compare with end of string
mov esi,start_application
add esi,60
cmp esi,edi
jnz still1
 
;exiting from read string loop
read_done:
;terminate string for file functions
mov [edi],byte 0
 
call print_text
jmp still
 
 
print_text:
;display start_application string
 
pushad
;display text background
mov eax,13
mov ebx,64*65536+62*6
mov ecx,400*65536+12
mov edx,0xffffcc ;0xeeeeee
int 0x40
;display text
mov eax,4
mov edx,start_application ;from start_application string
mov ebx,70*65536+402 ;text center-aligned
xor ecx,ecx ;black text
mov esi,60 ;60 symbols
int 0x40
 
popad
ret
 
window_x_size=524
window_y_size=430
calculate_window_pos:
;set window size and position for 0 function
;to [winxpos] and [winypos] variables
 
;get screen size
mov eax,14
int 0x40
mov ebx,eax
;calculate (x_screen-window_x_size)/2
shr ebx,16+1
sub ebx,window_x_size/2
shl ebx,16
mov bx,window_x_size
;winxpos=xcoord*65536+xsize
mov [winxpos],ebx
;calculate (y_screen-window_y_size)/2
and eax,0xffff
shr eax,1
sub eax,window_y_size/2
shl eax,16
mov ax,window_y_size
;winypos=ycoord*65536+ysize
mov [winypos],eax
ret
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
;ebp=1 - redraw all
;ebp=0 - redraw only process information
 
test ebp,ebp
jz .show_process_info
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
mov ebx,[winxpos] ; [x start] *65536 + [x size]
mov ecx,[winypos] ; [y start] *65536 + [y size]
mov edx,0x03ddffdd ;ffffff ; color of work area RRGGBB,8->color
mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl
mov edi,0x005080d0 ; color of frames RRGGBB
int 0x40
 
; WINDOW CAPTION
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
mov ecx,0x10ffffff ; font 1 & color ( 0xF0RRGGBB )
mov edx,labelt ; pointer to text beginning
mov esi,labellen-labelt ; text length
int 0x40
 
mov ebx,22*65536+35 ; draw info text with function 4
xor ecx,ecx
mov edx,text
mov esi,79
mov eax,4
int 0x40
 
.show_process_info:
mov edi,[list_start]
mov [list_add],edi
mov dword [index],0
mov dword [curposy],54
.loop_draw:
call draw_next_process
inc dword [index]
add dword [curposy],10
cmp [index],display_processes
jl .loop_draw
test ebp,ebp
jz .end_redraw
mov eax,8
mov esi,0xaabbcc
; previous page button
mov ebx,30*65536+96
mov ecx,380*65536+10
mov edx,51
int 0x40
; next page button
mov ebx,130*65536+96
inc edx
int 0x40
; ">" (text enter) button
mov ebx,30*65536+20
add ecx,20 shl 16
inc edx
int 0x40
; run button
mov ebx,456*65536+50
inc edx
int 0x40
 
; reboot button
sub ebx,120*65536
add ebx,60
sub ecx,20 shl 16
inc edx
int 0x40
;"PREV PAGE", "NEXT PAGE" and "REBOOT" labels
mov eax,4
mov ebx,50*65536+382
xor ecx,ecx
mov edx,tbts
mov esi,tbte-tbts
int 0x40
 
;">" labels
mov eax,4
mov ebx,40*65536+402
xor ecx,ecx
mov edx,tbts_2
mov esi,1
int 0x40
 
;"RUN" labels
mov eax,4
mov ebx,475*65536+402
xor ecx,ecx
mov edx,tbts_3
mov esi,tbte_2-tbts_3
int 0x40
 
;print application name in text box
call print_text
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
.end_redraw:
ret
 
 
; DATA AREA
list_start dd 0
 
file_start: dd 16
dd 0,0,0,run_process_buffer
 
start_application: db '/RD/1/LAUNCHER',0
times 60 db 32
 
text:
db ' NAME/TERMINATE PID CPU-USAGE % '
db 'MEMORY START/USAGE W-STACK W-SIZE'
 
tbts: db 'PREV PAGE NEXT PAGE REBOOT SYSTEM'
tbte:
tbts_2 db '>'
tbts_3 db 'RUN'
tbte_2:
 
labelt:
db 'Processes - Ctrl/Alt/Del'
labellen:
 
I_END:
 
winxpos rd 1
winypos rd 1
 
cpu_percent rd 1
tcolor rd 1
list_add rd 1
curposy rd 1
index rd 1
tasklist rd display_processes
run_process_buffer:
process_info_buffer process_information
rb 4096-($-run_process_buffer) ;rest of run_process_buffer
U_END:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/cpu/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm cpu.asm cpu
@pause
/programs/system/cpu/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm cpu.asm cpu
@pause
/programs/system/cpu/trunk/macros.inc
0,0 → 1,261
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/cpuspeed/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm cpuspeed.asm cpuspeed
@pause
/programs/system/cpuspeed/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm cpuspeed.asm cpuspeed
@pause
/programs/system/cpuspeed/trunk/cpuspeed.asm
0,0 → 1,153
;
; CPU SPEED INDICATIOR
;
; Compile with FASM for Menuet
;
 
use32
org 0x0
 
db 'MENUET00' ; 8 byte id
dd 38 ; required os
dd START ; program start
dd I_END ; program image size
dd 0x1000 ; required amount of memory
dd 0x1000 ; esp
dd 0x00000000 ; reserved=no extended header
 
include 'lang.inc'
include 'macros.inc'
 
START: ; start of execution
 
mov eax,18
mov ebx,5
int 0x40
 
xor edx,edx
mov ebx,1000000
div ebx
mov ebx,10
mov edi,text+19
mov ecx,5
newnum:
xor edx,edx
mov ebx,10
div ebx
add dl,48
mov [edi],dl
sub edi,1
loop newnum
 
call draw_window ; at first, draw the window
 
still:
 
mov eax,10 ; wait here for event
int 0x40
 
cmp eax,1 ; redraw request ?
jz red
cmp eax,2 ; key in buffer ?
jz key
cmp eax,3 ; button in buffer ?
jz button
 
jmp still
 
red: ; redraw
call draw_window
jmp still
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
jmp still
 
button: ; button
mov eax,17 ; get id
int 0x40
 
cmp ah,1 ; button id=1 ?
jnz still
mov eax,-1 ; close this program
int 0x40
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
int 0x40
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+200 ; [x start] *65536 + [x size]
mov ecx,100*65536+65 ; [y start] *65536 + [y size]
mov edx,[sc.work] ; color of work area RRGGBB,8->color glide
mov esi,[sc.grab] ; color of grab bar RRGGBB,8->color
or esi,0x80000000
mov edi,[sc.frame] ; color of frames RRGGBB
int 0x40
 
; WINDOW LABEL
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
mov ecx,[sc.grab_text] ; color of text RRGGBB
or ecx,0x10000000
mov edx,labelt ; pointer to text beginning
mov esi,labellen-labelt ; text length
int 0x40
; CLOSE BUTTON
mov eax,8 ; function 8 : define and draw button
mov ebx,(200-17)*65536+12 ; [x start] *65536 + [x size]
mov ecx,5*65536+12 ; [y start] *65536 + [y size]
mov edx,1 ; button id
mov esi,[sc.grab_button] ; button color RRGGBB
int 0x40
 
mov ebx,25*65536+35 ; draw info text with function 4
mov ecx,[sc.work_text]
mov edx,text
mov esi,40
newline:
mov eax,4
int 0x40
add ebx,10
add edx,40
cmp [edx],byte 'x'
jnz newline
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
 
ret
 
 
; DATA AREA
 
 
text:
db 'CPU RUNNING AT MHZ '
db 'x' ; <- END MARKER, DONT DELETE
 
labelt:
db 'CPU SPEED'
labellen:
 
I_END:
 
sc system_colors
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/cpuspeed/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs equ <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/desktop/trunk/desktop.asm
0,0 → 1,922
;
; UNIFORM WINDOW COLOURS & SKIN
;
; Compile with FASM for Menuet
;
; < russian edition by Ivan Poddubny >
; < skin selection by Mike Semenyako >
;
 
;******************************************************************************
use32
org 0
db 'MENUET01' ; identifier
dd 1 ; header version
dd START ; start address
dd I_END ; file size
dd 28000h ; memory
dd 10000h ; stack pointer (0x10000+ - work area for os)
dd 0;,0 ; parameters, reserved
 
include 'lang.inc'
include 'macros.inc'
;******************************************************************************
 
 
struct SKIN_HEADER
.ident dd ?
.version dd ?
.params dd ?
.buttons dd ?
.bitmaps dd ?
ends
 
struct SKIN_PARAMS
.skin_height dd ?
.margin.right dw ?
.margin.left dw ?
.margin.bottom dw ?
.margin.top dw ?
.colors.inner dd ?
.colors.outer dd ?
.colors.frame dd ?
.colors_1.inner dd ?
.colors_1.outer dd ?
.colors_1.frame dd ?
.dtp.size dd ?
.dtp.data db 40 dup (?)
ends
 
struct SKIN_BUTTONS
.type dd ?
.pos:
.left dw ?
.top dw ?
.size:
.width dw ?
.height dw ?
ends
 
struct SKIN_BITMAPS
.kind dw ?
.type dw ?
.data dd ?
ends
 
 
START: ; start of execution
 
mov eax,48 ; get current colors
mov ebx,3
mov ecx,color_table
mov edx,4*10
int 0x40
 
cld
mov esi,default_skn
mov edi,fname
mov ecx,default_skn.size
rep movsb
mov [skin_info.fname],0
mov [skin_info.workarea],0x10000
call load_skin_file
 
 
red:
call draw_window ; at first, draw the window
 
still:
 
mov eax,23 ; wait here for event
mov ebx,5
int 0x40
 
dec eax ; redraw request ?
jz red
dec eax ; key in buffer ?
jz key
dec eax ; button in buffer ?
jz button
 
call draw_cursor
 
jmp still
 
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
jmp still
 
button: ; button
mov eax,17 ; get id
int 0x40
 
cmp ah,11 ; read string
jne no_string
call read_string
jmp still
no_string:
 
cmp ah,12 ; load file
jne no_load
call load_file
call draw_window
jmp still
no_load:
 
cmp ah,13 ; save file
jne no_save
call save_file
jmp still
no_save:
 
cmp ah,14 ; set 3d buttons
jne no_3d
mov eax,48
mov ebx,1
mov ecx,1
int 0x40
mov eax,48
mov ebx,0
mov ecx,0
int 0x40
jmp still
no_3d:
 
cmp ah,15 ; set flat buttons
jne no_flat
mcall 48, 1, 0
mcall 48, 0, 0
jmp still
no_flat:
 
cmp ah,16 ; apply
jne no_apply
apply_direct:
mov eax,48
mov ebx,2
mov ecx,color_table
mov edx,10*4
int 0x40
mov eax,48
mov ebx,0
mov ecx,0
int 0x40
no_apply:
 
cmp ah,17 ; load skin file
jne no_load_skin
call load_skin_file
call draw_window
jmp still
no_load_skin:
 
cmp ah,18 ; apply skin
jne no_apply_skin
cmp [skin_info.fname],0
je no_apply_skin
mcall 48,8,skin_info
call draw_window
jmp still
no_apply_skin:
 
cmp ah,31
jb no_new_colour
cmp ah,41
jg no_new_colour
shr eax,8
sub eax,31
shl eax,2
add eax,color_table
mov ebx,[color]
mov [eax],ebx
call draw_colours
jmp still
no_new_colour:
 
cmp ah,1 ; terminate
jnz noid1
mov eax,-1
int 0x40
noid1:
 
jmp still
 
 
draw_cursor:
 
pusha
mov eax,37
mov ebx,2
int 0x40
 
cmp eax,0
jne dc1
popa
ret
 
dc1:
 
mov eax,37
mov ebx,1
int 0x40
 
mov ebx,eax
shr ebx,16
mov ecx,eax
and ecx,0xffff
 
cmp ecx,32
jbe no_color
cmp ebx,32
jbe no_color
 
cmp ebx,266 ; CHANGE COLOR
jb no_color
cmp ebx,266+20*3
jg no_color
 
cmp ecx,30+128
jge no_color
cmp ecx,30
jb no_color
 
sub ebx,266
mov eax,ebx
cdq
mov ebx,20
div ebx
mov ebx,2
sub ebx,eax
 
add ecx,-30
not ecx
shl ecx,1
 
mov byte [ebx+color],cl
call draw_color
 
popa
ret
 
no_color:
 
popa
ret
 
 
load_file:
pushad
 
mov [read_info.mode] ,0
mov [read_info.start_block],0
mov [read_info.blocks] ,1
mov [read_info.address] ,color_table
mov [read_info.workarea] ,0x10000
mcall 58, read_info
 
popad
ret
 
load_skin_file:
pushad
 
mov [read_info.mode] ,0
mov [read_info.start_block],0
mov [read_info.blocks] ,64
mov [read_info.address] ,0x20000
mov [read_info.workarea] ,0x10000
mcall 58, read_info
 
cmp dword[0x20000+SKIN_HEADER.ident],'SKIN'
jne @f
 
mov esi,fname
mov edi,skin_info.fname
mov ecx,257
rep movsb
 
mov esi,0x20000
mov edi,0x18000
mov ecx,0x8000/4
rep movsd
 
mov ebp,0x18000
mov esi,[ebp+SKIN_HEADER.params]
add esi,ebp
lea esi,[esi+SKIN_PARAMS.dtp.data]
mov edi,color_table
mov ecx,10
rep movsd
@@:
 
popad
ret
 
 
save_file:
pushad
 
mov [write_info.mode] ,1
mov [write_info.bytes2write],10*4
mov [write_info.address] ,color_table
mov [write_info.workarea] ,0x10000
mcall 58, write_info
 
popad
ret
 
 
read_string:
 
pusha
 
mov edi,fname
mov al,'_'
mov ecx,87
cld
rep stosb
 
call print_text
 
mov edi,fname
 
f11:
mov eax,10
int 0x40
cmp eax,2
jne read_done
mov eax,2
int 0x40
shr eax,8
cmp eax,13
je read_done
cmp eax,8
jne nobsl
cmp edi,fname
je f11
dec edi
mov [edi],byte '_'
call print_text
jmp f11
nobsl:
mov [edi],al
 
call print_text
 
inc edi
cmp edi, fname+87
jne f11
 
read_done:
 
mov ecx, fname
add ecx, 88
sub ecx, edi
mov eax, 0
cld
rep stosb
 
call print_text
 
popa
 
ret
 
 
print_text:
pushad
 
mpack ebx,15,6*87+4
mpack ecx,(30+18*10+2),11
mcall 13,,,[w_work]
 
mpack ebx,17,(30+18*10+4)
mcall 4,,[w_work_text],fname,87
 
popad
ret
 
 
draw_color:
 
pusha
 
mov eax,13
mov ebx,266*65536+60
mov ecx,170*65536+30
mov edx,[color]
int 0x40
 
; mov eax,13
mov ebx,266*65536+60
mov ecx,200*65536+10
mov edx,[w_work]
int 0x40
 
mov eax,47
mov ebx,0+1*256+8*65536
mov ecx,[color]
mov edx,272*65536+201
mov esi,[w_work_text]
int 0x40
 
popa
 
ret
 
 
draw_colours:
 
pusha
 
mov esi,color_table
 
mov ebx,225*65536+32
mov ecx,32*65536+12
newcol:
mov eax,13
mov edx,[esi]
int 0x40
add ecx,18*65536
add esi,4
cmp esi,color_table+4*9
jbe newcol
 
popa
 
ret
 
 
draw_framerect: ; ebx,ecx
push ebx ecx
add bx,[esp+6]
mov cx,[esp+2]
dec ebx
mcall 38
add cx,[esp]
rol ecx,16
add cx,[esp]
sub ecx,0x00010001
mcall
mov ebx,[esp+4]
mov ecx,[esp]
mov bx,[esp+6]
add cx,[esp+2]
dec ecx
mcall
add bx,[esp+4]
rol ebx,16
add bx,[esp+4]
sub ebx,0x00010001
mcall
add esp,8
ret
 
find_bitmap:
mov edi,[ebp+SKIN_HEADER.bitmaps]
add edi,ebp
xor ebx,ebx
.lp1: cmp dword[edi],0
je .lp2
cmp dword[edi+0],eax
jne @f
mov ebx,[edi+SKIN_BITMAPS.data]
add ebx,ebp
mov ecx,[ebx-2]
mov cx,[ebx+4]
add ebx,8
.lp2: ret
@@: add edi,8
jmp .lp1
 
draw_skin:
mcall 13,<345,206>,<20,191>,0x00FFFFFF
mov ebp,0x18000
mov edi,[ebp+SKIN_HEADER.params]
add edi,ebp
mpack ebx,345+45,150
mpack ecx,20+10,140
mov edx,[edi+SKIN_PARAMS.colors_1.outer]
call draw_framerect
mpack ebx,345+45+4,150-8
mpack ecx,20+10+4,140-8
mov edx,[edi+SKIN_PARAMS.colors_1.inner]
call draw_framerect
mcall 13,<345+45+1,148>,<20+10+1,3>,[edi+SKIN_PARAMS.colors_1.frame]
add ecx,135*65536
mcall
mcall ,<345+45+1,3>,<20+10+1,138>
add ebx,145*65536
mcall
mcall ,<345+45+5,140>,<20+10+5,130>,dword[edi+SKIN_PARAMS.dtp.data+system_colors.work]
 
mov eax,0x00000001 ; left, inactive
call find_bitmap
mcall 7,,,<345+45,20+10>
 
pushd [ebx-8]
mov eax,0x00000003 ; base, inactive
call find_bitmap
pop edx
mov esi,345+45+150-1
sub esi,edx
shl edx,16
add edx,(345+45)*65536+20+10
mcall 7
@@: rol edx,16
add dx,[ebx-8]
cmp dx,si
ja @f
rol edx,16
mcall 7
jmp @b
@@:
 
mov eax,0x00000002 ; oper, inactive
call find_bitmap
mov edx,ecx
shr edx,16
neg edx
shl edx,16
add edx,(345+45+150)*65536+20+10
mcall 7
 
mov ebp,0x18000
mov edi,[ebp+SKIN_HEADER.params]
add edi,ebp
mov eax,dword[edi+SKIN_PARAMS.margin.left-2]
mov ax,word[edi+SKIN_PARAMS.skin_height]
sub ax,[edi+SKIN_PARAMS.margin.bottom]
shr ax,1
add ax,[edi+SKIN_PARAMS.margin.top]
add ax,-4
push eax
lea ebx,[eax+(345+45)*65536+20+10]
mcall 4,,dword[edi+SKIN_PARAMS.dtp.data+system_colors.grab_text],test_text,test_text.size
 
;---------------------------------------------------------
 
mov edi,[ebp+SKIN_HEADER.params]
add edi,ebp
mpack ebx,345+10,150
mpack ecx,20+40,140
mov edx,[edi+SKIN_PARAMS.colors.outer]
call draw_framerect
mpack ebx,345+10+4,150-8
mpack ecx,20+40+4,140-8
mov edx,[edi+SKIN_PARAMS.colors.inner]
call draw_framerect
mcall 13,<345+10+1,148>,<20+40+1,3>,[edi+SKIN_PARAMS.colors.frame]
add ecx,135*65536
mcall
mcall ,<345+10+1,3>,<20+40+1,138>
add ebx,145*65536
mcall
mcall ,<345+10+5,140>,<20+40+5,130>,dword[edi+SKIN_PARAMS.dtp.data+system_colors.work]
 
mov eax,0x00010001 ; left, inactive
call find_bitmap
mcall 7,,,<345+10,20+40>
 
pushd [ebx-8]
mov eax,0x00010003 ; base, inactive
call find_bitmap
pop edx
mov esi,345+10+150-1
sub esi,edx
shl edx,16
add edx,(345+10)*65536+20+40
mcall 7
@@: rol edx,16
add dx,[ebx-8]
cmp dx,si
ja @f
rol edx,16
mcall 7
jmp @b
@@:
 
mov eax,0x00010002 ; oper, inactive
call find_bitmap
mov edx,ecx
shr edx,16
neg edx
shl edx,16
add edx,(345+10+150)*65536+20+40
mcall 7
 
mov ebp,0x18000
mov edi,[ebp+SKIN_HEADER.params]
add edi,ebp
pop eax
lea ebx,[eax+(345+10)*65536+20+40]
mcall 4,,dword[edi+SKIN_PARAMS.dtp.data+system_colors.grab_text],test_text,test_text.size
 
;----------------------------------------------------------------------
 
mov edi,[ebp+SKIN_HEADER.buttons]
add edi,ebp
.lp1: cmp dword[edi],0
je .lp2
mov ebx,dword[edi+SKIN_BUTTONS.left-2]
mov bx,[edi+SKIN_BUTTONS.width]
mov ecx,dword[edi+SKIN_BUTTONS.top-2]
mov cx,[edi+SKIN_BUTTONS.height]
add ebx,(345+10+150)*65536
add ecx,(20+40)*65536
dec ebx
dec ecx
mcall 8,,,0x40000000
add edi,12
jmp .lp1
.lp2: ret
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
mov eax,48
mov ebx,3
mov ecx,app_colours
mov edx,10*4
int 0x40
 
mov eax,14
int 0x40
 
sub eax,60*65536
mov ebx,eax
mov bx,40
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,110*65536+555 ; [x start] *65536 + [x size]
mov ecx,50*65536+255 ; [y start] *65536 + [y size]
mov edx,[w_work] ; color of work area RRGGBB,8->color
or edx,0x02000000
mov esi,[w_grab] ; color of grab bar RRGGBB,8->color gl
or esi,0x80000000
mov edi,[w_frame] ; color of frames RRGGBB
int 0x40
 
; WINDOW LABEL
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+7 ;8 ; [x start] *65536 + [y start]
mov ecx,[w_grab_text] ; color of text RRGGBB
if lang eq ru
or ecx,0x10000000
end if
mov edx,labelt ; pointer to text beginning
mov esi,labelt.size ; text length
int 0x40
; CLOSE BUTTON
mov eax,8 ; function 8 : define and draw button
mov ebx,(555-19)*65536+12 ; [x start] *65536 + [x size]
mov ecx,4*65536+12 ; [y start] *65536 + [y size]
mov edx,1 ; button id
mov esi,[w_grab_button] ; button color RRGGBB
int 0x40
 
if lang eq ru
load_w = (5*2+6*9)
save_w = (5*2+6*9)
flat_w = (5*2+6*7)
apply_w = (5*2+6*9)
else
load_w = (5*2+6*6)
save_w = (5*2+6*6)
flat_w = (5*2+6*4)
apply_w = (5*2+6*7)
end if
 
; mov eax,8 ; FILENAME BUTTON
mov ebx,5*65536+545
mov ecx,212*65536+10
mov edx,0x4000000B
int 0x40
 
; mov eax,8 ; LOAD BUTTON
mov ebx,15*65536+load_w
mov ecx,(30+18*11)*65536+14
mov edx,12
mov esi,[w_work_button]
int 0x40
 
; mov eax,8 ; SAVE BUTTON
add ebx,(load_w+2)*65536-load_w+save_w
inc edx
int 0x40
 
; mov eax,8 ; 3D
mov ebx,(340-t1.size*6-13)*65536+(5*2+6*4)
inc edx
int 0x40
; mov eax,8 ; FLAT
add ebx,(5*2+6*4+2)*65536-(5*2+6*4)+flat_w
inc edx
int 0x40
 
; mov eax,8 ; APPLY BUTTON
add ebx,(flat_w+6+2)*65536-flat_w+apply_w
inc edx
int 0x40
 
; mov eax,8 ; LOAD SKIN BUTTON
mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+load_w
inc edx
int 0x40
 
; mov eax,8 ; APPLY SKIN BUTTON
add ebx,(load_w+6+2)*65536-load_w+apply_w
inc edx
int 0x40
 
mov eax, 4
mov ebx, (339-t1.size*6-12)*65536+(30+18*11+4)
mov ecx, [w_work_button_text]
mov edx, t1
mov esi, t1.size
int 0x40
 
mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+(30+18*11+4)
mov edx,t2
mov esi,t2.size
int 0x40
 
 
mov eax,38 ; R G B COLOR GLIDES
mov ebx,266*65536+285
mov ecx,30*65536+30
mov edx,0xff0000
.newl:
int 0x40
pusha
add ebx,20*65536+20
shr edx,8
int 0x40
add ebx,20*65536+20
shr edx,8
int 0x40
popa
sub edx,0x020000
add ecx,0x00010001
cmp ecx,158*65536+158
jnz .newl
 
call draw_color
 
mov edx,31 ; BUTTON ROW
mov ebx,15*65536+200
mov ecx,30*65536+14
mov esi,[w_work_button]
newb:
mov eax,8
int 0x40
add ecx,18*65536
inc edx
cmp edx,40
jbe newb
 
mov ebx,15*65536+34 ; ROW OF TEXTS
mov ecx,[w_work_button_text]
mov edx,text
mov esi,32
newline:
mov eax,4
int 0x40
add ebx,18
add edx,32
cmp [edx],byte 'x'
jne newline
 
call draw_colours
 
mcall 13,<5,546>,<212,11>,[w_work]
mcall 13,<337,7>,<2,250>,[w_frame]
shr edx,1
and edx,0x007F7F7F
mcall 38,<336,336>,<20,250>
add ebx,0x00080008
mcall
sub ebx,0x00040004
mcall ,,<0,255>
mcall ,<5,550>,<211,211>
add ecx,0x000C000C
mcall
 
call print_text
 
cmp dword[0x18000+SKIN_HEADER.ident],'SKIN'
jne @f
call draw_skin
@@:
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
 
ret
 
 
; DATA AREA
 
lsz text,\
ru, ' €ŒŠ€ ŽŠ€ ',\
ru, ' Ž‹Ž‘€ ‡€ƒŽ‹Ž‚Š€ ',\
ru, ' ŠŽŠ€ € Ž‹Ž‘… ‡€ƒŽ‹Ž‚Š€ ',\
ru, ' ’…Š‘’ € ŠŽŠ… € ‡€ƒŽ‹Ž‚Š… ',\
ru, ' ’…Š‘’ ‡€ƒŽ‹Ž‚ŽŠ€ ',\
ru, ' €Ž—€Ÿ Ž‹€‘’œ ',\
ru, ' ŠŽŠ€ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\
ru, ' ’…Š‘’ € ŠŽŠ… ',\
ru, ' ’…Š‘’ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\
ru, ' ƒ€”ˆŠ€ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\
ru, ' ',\
ru, ' ‡€ƒ“‡ˆ’œ ‘Ž•€ˆ’œ ',\
ru, 'x',\
en, ' WINDOW FRAME ',\
en, ' WINDOW GRAB BAR ',\
en, ' WINDOW GRAB BUTTON ',\
en, ' WINDOW GRAB BUTTON TEXT ',\
en, ' WINDOW GRAB TITLE ',\
en, ' WINDOW WORK AREA ',\
en, ' WINDOW WORK AREA BUTTON ',\
en, ' WINDOW WORK AREA BUTTON TEXT ',\
en, ' WINDOW WORK AREA TEXT ',\
en, ' WINDOW WORK AREA GRAPH ',\
en, ' ',\
en, ' LOAD SAVE ',\
en, 'x'
 
 
lsz t1,\
ru, ' 3D ‹Ž‘Šˆ… ˆŒ…ˆ’œ ',\
en, ' 3D FLAT APPLY '
 
lsz t2,\
ru, ' ‡€ƒ“‡ˆ’œ ˆŒ…ˆ’œ ',\
en, ' LOAD APPLY ',\
 
lsz test_text,\
ru, '‡ £®«®¢®ª',\
en, 'Caption'
 
lsz labelt,\
ru, '€‘’Ž‰Š€ –‚…’Ž‚',\
en, 'DESKTOP COLOURS - DEFINE COLOR AND CLICK ON TARGET'
 
sz default_skn, '/RD/1/DEFAULT.SKN',0
 
color dd 0
 
I_END:
 
read_info:
.mode dd ? ; read
.start_block dd ? ; first block
.blocks dd ? ; 512 bytes
.address dd ?
.workarea dd ?
fname rb 256+1 ; filename (+1 - for zero at the end)
 
virtual at read_info
write_info:
.mode dd ?
rd 1
.bytes2write dd ?
.address dd ?
.workarea dd ?
end virtual
 
skin_info:
.mode dd ?
.start_block dd ?
.blocks dd ?
.address dd ?
.workarea dd ?
.fname rb 256+1
 
app_colours:
 
w_frame dd ?
w_grab dd ?
w_grab_button dd ?
w_grab_button_text dd ?
w_grab_text dd ?
w_work dd ?
w_work_button dd ?
w_work_button_text dd ?
w_work_text dd ?
w_work_graph dd ?
 
color_table:
times 10 dd ?
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/desktop/trunk/macros.inc
0,0 → 1,276
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
; structure definition helper
macro struct name, [arg]
{
common
name@struct equ name
struc name arg {
}
 
macro struct_helper name
{
match xname,name
\{
virtual at 0
xname xname
sizeof.#xname = $ - xname
name equ sizeof.#xname
end virtual
\}
}
 
ends fix } struct_helper name@struct
 
; structures used in MeOS
struct process_information
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
ends
 
struct system_colors
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
ends
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/desktop/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm desktop.asm desktop
@pause
/programs/system/desktop/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm desktop.asm desktop
@pause
/programs/system/end/trunk/end.asm
0,0 → 1,211
;
; END
;
; <diamond> note that 'mov al,xx' is shorter than 'mov eax,xx'
; and if we know that high 24 bits of eax are zero, we can use 1st form
; the same about ebx,ecx,edx
 
include "lang.inc"
include "macros.inc"
 
meos_app_start
code
 
do_draw:
 
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
int 0x40
 
mov al,12 ; eax=12 - tell os about redraw start
mov bl,1
int 0x40
 
mov al,14 ; eax=14 - get screen max x & max y
int 0x40
 
movzx ecx,ax
 
shr eax,17
; sub eax,110
shl eax,16
; mov ebx,eax
; add ebx,220
lea ebx,[eax-110*10000h+220]
 
shr ecx,1
; sub ecx,50
shl ecx,16
; add ecx,100
sub ecx,50*10000h - 100
 
mov eax,0 ; define and draw window
mov edx,[sc.work_button]
mov esi,edx ;[sc.work_button]
xor edi,edi
int 0x40
 
xor edx,edx
mov al,13
mcall ,14 shl 16+90,25 shl 16+27
push ebx
mcall ,117 shl 16+90,
xchg ebx,[esp]
mcall ,,59 shl 16+27
pop ebx
mcall
 
mov al,8
inc edx
mcall ,15 shl 16+87,26 shl 16+24,,0xdd7700
inc edx
mcall ,118 shl 16+87,,,0xbbbb ;cccc
inc edx
mcall ,15 shl 16+87,60 shl 16+24,,0xbb00
inc edx
mcall ,118 shl 16+87,,,0xbbbbbb ;cccccc
 
mov al,4 ; 0x00000004 = write text
mov ebx,75*65536+10
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,0x10ffffff
mov ebx,25*65536+30
mov edx,label2 ; pointer to text beginning
mov esi,label2_len ; text length
int 0x40
 
mov ebx,20*65536+64
mov edx,label3 ; pointer to text beginning
mov esi,label3_len ; text length
int 0x40
 
mov ecx,0xffffff
mov ebx,45*65536+41
mov edx,label4 ; pointer to text beginning
mov esi,label4_len ; text length
int 0x40
 
mov ebx,40*65536+75
mov edx,label5 ; pointer to text beginning
mov esi,label5_len ; text length
int 0x40
 
mov al,12 ; tell os about redraw end
mov ebx,2
int 0x40
 
still:
 
mov eax,10 ; wait here for event
int 0x40
 
dec eax
jz do_draw
dec eax
jnz button
key:
mov al,2 ; now eax=2 - get key code
int 40h
mov al,ah
cmp al,13
jz restart
cmp al,27
jz close_1
cmp al,180
jz restart_kernel
cmp al,181
jz power_off
jmp still
 
button:
mov al,17 ; now eax=17 - get pressed button id
int 0x40
xchg al,ah
dec eax
jz power_off
dec eax
jz restart_kernel
dec eax
jz restart
; we have only one button left, this is close button
; dec eax
; jnz still
close_1:
or eax,-1
int 40h
 
power_off:
push 2
jmp mcall_and_close
 
restart:
push 3
jmp mcall_and_close
 
restart_kernel:
push 4
mcall_and_close:
pop ecx
mcall 18,9
jmp close_1
 
data
 
if lang eq ru
 
label1:
db '‚€˜ ‚›Ž:'
label1_len = $ - label1
 
label2:
db '‚›Š‹ž—ˆ’œ Ÿ„Ž'
label2_len = $ - label2
 
label3:
db '……‡€“‘Š Ž’Œ…€'
label3_len = $ - label3
 
label4:
db '(End) (Home)'
label4_len = $ - label4
 
label5:
db '(Enter) (Esc)'
label5_len = $ - label5
 
else
 
label1:
db ' SELECT:'
label1_len = $ - label1
 
label2:
db 'POWER OFF KERNEL'
label2_len = $ - label2
 
label3:
db ' RESTART CANCEL'
label3_len = $ - label3
 
label4:
db '(End) (Home)'
label4_len = $ - label4
 
label5:
db '(Enter) (Esc)'
label5_len = $ - label5
 
end if
 
 
udata
sc system_colors
 
meos_app_end
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/end/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm end.asm end
@pause
/programs/system/end/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm end.asm end
@pause
/programs/system/end/trunk/macros.inc
0,0 → 1,267
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/icon/trunk/icon.asm
0,0 → 1,1428
;********************************
;* *
;* DESKTOP ICON MANAGER *
;* *
;* Compile with flat assembler *
;* *
;********************************
; 22.02.05 was modified for work with new multi-thread ICON.
;******************************************************************************
RAW_SIZE equ 350000
ICON_SIZE equ 32*32*3
GIF_SIZE equ 45000
REC_SIZE equ 80
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
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd icon_data+0x30000 ; memory for app
dd icon_data+0x30000 ; esp
dd I_Param , 0x0 ; I_Param , I_Icon
include 'macros.inc'
include 'lang.inc'
COLOR_ORDER equ MENUETOS
include 'gif_lite.inc'
;include 'debug.inc'
purge newline
;******************************************************************************
START: ; start of execution
mcall 58,finfo
cmp ebx,GIF_SIZE
ja close
mov esi,gif_file
mov edi,strip_file
mov eax,icon_data
call ReadGIF
movzx eax,word[strip_file+10]
shr eax,5
mov [icon_count],eax
call load_ic
boot_str:
cmp [I_Param],dword 'BOOT'
je load_icon_list2
call load_icon_list
red:
call draw_window ; at first, draw the window
mov esi,[current_icon]
jmp band
still:
 
mov eax,10 ; wait here for event
int 0x40
 
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
 
jmp still
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
jmp still
 
button: ; button
mov eax,17 ; get id
int 0x40
 
shr eax,8
 
cmp eax,1 ; button id=1 ?
je close
noclose:
mov esi,[current_icon]
add esi,12
mov ebx,[cur_band];eax
cmp eax,31
jne .no_back
add ebx,8
mov eax,[icon_count]
cmp eax,ebx
jae .drwic2
xor ebx,ebx
jmp .drwic2
.no_back:
cmp eax,30
jne .no_side
test ebx,ebx
jnz .dec
mov ebx,[icon_count]
and ebx,0xfffffff8
add ebx,8
.dec:
sub ebx,8
.drwic2:
mov [cur_band],ebx
.drwic1:
call draw_icon
jmp still
.no_side:
cmp eax,32
jne .no_ico
push ebx
mcall 37,1
pop ebx
shr eax,16
sub eax,33-19
mov edi,34
xor edx,edx
div edi
lea ecx,[ebx+eax]
cmp ecx,[icon_count]
jae still
mov [sel_icon1],eax
mov ecx,eax
add eax,ebx
call itoa
jmp .drwic1
.no_ico:
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 ebx,finfo
mov dword[ebx],1
mov edx,REC_SIZE
imul edx,dword [icons]
mov [ebx+8],edx
mov esi,iconlst
call lst_path
mcall 58
 
; (2) terminate all icons
mov eax,9
mov ebx,I_END
mov ecx,-1
int 0x40
mov edi,[ebx+30]
newread2:
mov esi,1
newread:
inc esi
mov eax,9
mov ebx,I_END
mov ecx,esi
int 0x40
cmp edi,[ebx+30]
je newread
cmp esi,eax
jg all_terminated
 
cmp [I_END+10],dword 'ICON'
jne newread
mov eax,51
cmp eax,[I_END+42]
jne newread
cmp eax,[I_END+46]
jne newread
 
mov eax,18
mov ebx,2
mov ecx,esi
int 0x40
 
jmp newread2
 
finfo:
dd 0
dd 0
dd GIF_SIZE/512
dd gif_file
dd icon_data
.path:
db ICON_STRIP,0
rb 31-($-.path)
 
all_terminated:
 
apply_changes:
 
mov ebx,finfo
mov dword[ebx],16
mov dword[ebx+8],boot_str+6
mov esi,iconname
call lst_path
mcall 58
jmp still
 
no_apply:
 
cmp eax,22 ; user pressed the 'add icon' button
jne no_add_icon
 
mov eax,13
mov ebx,24*65536+270
mov ecx,(250+8*14)*65536+8
mov edx,0xffffff
int 0x40
mov eax,4
mov ebx,24*65536+250+8*14
mov ecx,0xff0000
mov edx,add_text
mov esi,add_text_len-add_text
int 0x40
 
mov eax,10
int 0x40
cmp eax,3
jne still
mov eax,17
int 0x40
shr eax,8
cmp eax,40
jb no_f
mov edi,eax
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'
 
mov [cur_btn],edi
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,REC_SIZE
add edi,icon_data
 
mov [current_icon],edi
 
mov esi,icon_default
mov ecx,REC_SIZE
cld
rep movsb
mov esi,[current_icon]
jmp band
no_f:
 
call draw_btns;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,24*65536+270
mov ecx,(250+8*14)*65536+8
mov edx,0xffffff
int 0x40
mov eax,4
mov ebx,24*65536+250+8*14
mov ecx,0xff0000
mov edx,rem_text
mov esi,rem_text_len-rem_text
int 0x40
 
mov eax,10
int 0x40
cmp eax,3
jne no_f;ound
mov eax,17
int 0x40
shr eax,8
cmp eax,40
jb red;no_f;ound
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 red
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,REC_SIZE
imul edi,[icons]
add edi,icon_data
news:
cmp word [esi],ax
je foundi
add esi,REC_SIZE
cmp esi,edi
jb news
jmp red
 
foundi:
 
mov ecx,edi
sub ecx,esi
 
mov edi,esi
add esi,REC_SIZE
 
cld
rep movsb
 
dec [icons]
 
mov eax,icon_data
mov [current_icon],eax
movzx ebx,word[eax]
sub bx,'AA'
shl bl,4
shr ebx,4
add ebx,40
mov [cur_btn],ebx
 
jmp red
 
no_remove_icon:
 
cmp eax,40 ; user pressed button for icon position
jb no_on_screen_button
mov edi,eax
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,REC_SIZE
loop findl1
jmp still
 
foundl1:
 
mov [current_icon],esi
mov [cur_btn],edi
band:
add esi,12
call atoi
and eax,0xfffff8
mov [cur_band],eax
call draw_btns
 
jmp still
 
no_on_screen_button:
 
 
jmp still
 
 
current_icon dd icon_data
 
 
print_strings:
 
pusha
 
mov eax,13 ; clear text area
mov ebx,100*65536+180
mov ecx,(278+12)*65536+40
mov edx,0xffffff
int 0x40
 
xor edi,edi
mov eax,4 ; icon text
mov ebx,100*65536+278+14
mov ecx,3
.ll:
push ecx
mov ecx,0x000000
mov edx,[current_icon]
add edx,[positions+edi*4]
movzx esi,byte[str_lens+edi]
inc edi
int 0x40
add ebx,14
pop ecx
loop .ll
 
popa
ret
 
iconlst db ICON_LST,0
 
load_icon_list:
 
mov edi,icons_reserved ; clear reserved area
mov eax,32
mov ecx,10*9
cld
rep stosb
 
mov ecx,[icons] ; set used icons to reserved area
mov esi,icon_data
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,REC_SIZE
loop ldl1
ret
 
lst_path:
mov ecx,30
mov edi,finfo.path
rep movsb
ret
 
load_ic:
mov ebx,finfo
mov dword[ebx+8],(48*REC_SIZE)shr 9+1
mov dword[ebx+12],icon_data
mov dword[ebx+16],gif_file
mov esi,iconlst
call lst_path
mcall 58
lea eax,[ebx+10]
xor edx,edx
mov ebx,REC_SIZE
div ebx
mov [icons],eax
ret
 
 
positions dd 3,16,47
str_lens db 8,30,30
 
read_string:
pusha
sub eax,11
movzx ecx,byte[str_lens+eax]
mov [cur_str],ecx
mov eax,[positions+eax*4]
 
mov edi,[current_icon]
add edi,eax
mov [addr],edi
 
add edi,ecx
 
.l1:
dec edi
cmp byte[edi],' '
jne .found
mov byte[edi],'_'
loop .l1
dec edi
.found:
inc edi
push edi
call print_strings
 
pop edi
f11:
mov eax,10
int 0x40
cmp eax,2
jz fbu
jmp rs_done
fbu:
mov eax,2
int 0x40
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
 
inc edi
mov esi,[addr]
add esi,[cur_str]
cmp esi,edi
jnz f11
 
rs_done:
 
mov ecx,[addr]
add ecx,[cur_str]
sub ecx,edi
mov eax,32
cld
rep stosb
call print_strings
popa
ret
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
; DRAW WINDOW
mov eax,0
mov ebx,210*65536+300
mov ecx,30*65536+390-14
mov edx,0x03ffffff
mov esi,0x808899ff
mov edi,0x008899ff
int 0x40
 
; WINDOW LABEL
mov eax,4
mov ebx,8*65536+8
mov ecx,0x10ffffff
mov edx,labelt
mov esi,labellen-labelt
int 0x40
 
mov eax,13 ; WINDOW AREA
mov ebx,20*65536+260
mov ecx,35*65536+200
mov edx,0x3366cc
int 0x40
 
mov eax,38 ; VERTICAL LINE ON WINDOW AREA
mov ebx,150*65536+150
mov ecx,35*65536+235
mov edx,0xffffff
int 0x40
 
mov eax,38 ; HOROZONTAL LINE ON WINDOW AREA
mov ebx,20*65536+280
mov ecx,135*65536+135
mov edx,0xffffff
int 0x40
 
mov eax,8 ; TEXT ENTER BUTTONS
mov ebx,20*65536+72
mov ecx,(275+1+14)*65536+13-2
mov edx,11
mov esi,[bcolor]
int 0x40
inc edx
add ecx,14*65536
int 0x40
inc edx
add ecx,14*65536
int 0x40
 
; mov eax,8 ; APPLY AND SAVE CHANGES BUTTON
mov ebx,20*65536+259
mov ecx,(329+2)*65536+15-4
mov edx,21
mov esi,[bcolor]
int 0x40
 
; mov eax,8 ; ADD ICON BUTTON
mov ebx,20*65536+129-2
add ecx,14*65536
inc edx
int 0x40
 
; mov eax,8 ; REMOVE ICON BUTTON
add ebx,(130+2)*65536
inc edx
int 0x40
 
mcall ,<20-14,8>,<260-23,32>,30+1 shl 30 ; IMAGE BUTTON
inc edx
add ebx,(36*7+26) shl 16
mcall
add edx,1+1 shl 29
mov ebx,(33-19) shl 16+(34*8)
mcall
mcall 4,<23-15,273-24>,0,arrows,1
add ebx,(36*7+27)shl 16
add edx,2
mcall
dec edx
mcall ,<120,250>
lea edx,[ebx+8 shl 16]
mov ecx,[icon_count]
mcall 47,0x30000,,,0
 
;;
mov ebx,24*65536+250+14+14+14
mov ecx,0xffffff
mov edx,text
mov esi,47
newline:
mov ecx,[edx]
add edx,4
mov eax,4
int 0x40
add ebx,14
add edx,47
cmp [edx],byte 'x'
jne newline
draw_btns:
;;
mov eax,0 ; DRAW BUTTONS ON WINDOW AREA
mov ebx,20*65536+25
mov ecx,35*65536+19
mov edi,icon_table
mov edx,40
newbline:
 
cmp [edi],byte 'x'
jne no_button
 
mov esi,0x5577cc
cmp [edi+90],byte 'x'
jne nores
mov esi,0xcc5555
cmp edx,[cur_btn]
jne nores
mov esi,0xe7e05a
nores:
 
push eax
mov eax,8
int 0x40
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,20
ror ebx,16
add ecx,20*65536
 
inc ah
cmp ah,8;9
jbe newbline
call print_strings
call draw_icon
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
 
ret
 
draw_icon:
mcall 13,<33-20,34*8+2>,<260-24,37+15-2>,0xffffff
mov esi,[current_icon]
add esi,12
call atoi
push eax
cmp eax,[cur_band]
jb .nou
sub eax,[cur_band]
cmp eax,7
ja .nou
imul eax,34 shl 16
lea ebx,[eax+(33-19) shl 16]
mov bx,34
mcall 13,,<236+35,3>,0xff0000
mov eax,[esp]
.nou:
mov eax,[cur_band]
and eax,0xfffffff8
push eax
imul eax,ICON_SIZE
lea ebx,[strip_file+12+eax]
mov ecx,8
mov edx,(33-18) shl 16+238
.nxt:
push ecx
mcall 7,,<32,32>
pop ecx
add ebx,ICON_SIZE
add edx,34 shl 16
loop .nxt
 
mcall 4,<45,280-2>,0,rep_text,rep_text_len-rep_text
lea edx,[ebx+(8*5)shl 16]
pop ecx
mcall 47,0x30000,,,0xff
add ecx,7
add edx,(3*8+4)shl 16
mcall
mov ecx,[icon_count]
add edx,(5*8+4)shl 16
mcall
pop ecx
add edx,(10*8+4)shl 16
mcall ,,,,0xff0000
ret
 
; DATA AREA
 
 
bcolor dd 0x335599
 
icon_table:
 
times 4 db 'xxxx xxxx'
times 2 db ' '
times 1 db ' '
times 2 db 'xxxx xxxx'
; times 1 db ' '
 
icons_reserved:
times 9 db ' '
 
if lang eq ru
text:
db 255,255,255,0, ' ’…Š‘’ '
db 255,255,255,0, ' Žƒ€ŒŒ€ '
db 255,255,255,0, ' €€Œ…’› '
db 255,255,255,0, ' ˆŒ…ˆ’œ '
db 255,255,255,0, ' „Ž€‚ˆ’œ “„€‹ˆ’œ '
db 0,0,0,0, '€†Œˆ’… € Ž‡ˆ–ˆž ˆŠŽŠˆ „‹Ÿ …„€Š’ˆŽ‚€ˆŸ '
db 'x' ; <- END MARKER, DONT DELETE
 
labelt:
db ' áâனª  à ¡®ç¥£® á⮫ '
labellen:
else
text:
db 255,255,255,0, ' TITLE '
db 255,255,255,0, ' APP NAME '
db 255,255,255,0, ' PARAMETERS '
db 255,255,255,0, ' APPLY CHANGES '
db 255,255,255,0, ' ADD ICON REMOVE ICON '
db 0,0,0,0, '€†Œˆ’… € Ž‡ˆ–ˆž ˆŠŽŠˆ „‹Ÿ …„€Š’ˆŽ‚€ˆŸ '
db 'x' ; <- END MARKER, DONT DELETE
 
labelt:
db 'Icon Manager'
labellen:
end if
 
;ya dd 0
 
add_text db '€†Œˆ’… € Ž‡ˆ–ˆž …ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ'
add_text_len:
 
rem_text db '€†Œˆ’… € Ž‡ˆ–ˆž ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ'
rem_text_len:
arrows db '</>'
iconname:
db ICON_APP,0
 
icon_default:
db 'AA-SYSXTREE-000-/RD/1/SYSXTREE '
db '- *'
db 13,10
 
rep_text:
if lang eq ru
db '‡€—Šˆ - ˆ‡ , ‚›€ #'
else
db 'ICONS - OF , SELECTED'
end if
 
rep_text_len:
 
;//////////////////////////
get_bg_info:
mov eax,39
mov ebx,4
int 0x40
mov [bgrdrawtype],eax
 
mov eax,39 ; get background size
mov ebx,1
int 0x40
mov [bgrxy],eax
 
mov ebx,eax
shr eax,16
and ebx,0xffff
mov [bgrx],eax
mov [bgry],ebx
ret
 
calc_icon_pos:
movzx eax,byte [ebp-20] ; x position
sub eax,'A' ;eax - number of letter
cmp eax,4
jg no_left
shl eax,6 ;imul eax,64
add eax,16
movzx ebx,[warea.left]
add eax,ebx
jmp x_done
no_left:
sub eax,9
sal eax,6 ;imul eax,64
sub eax,16+52-1
movzx ebx,[warea.right]
add eax,ebx
x_done:
; mov [xpos],eax
mov [ebp-12],eax
 
movzx eax,byte [ebp-20+1] ; y position
sub eax,'A' ; eax - number of letter
cmp eax,4
jg no_up
shl eax,6 ;imul eax,80
add eax,16
movzx ebx,[warea.top]
add eax,ebx
jmp y_done
no_up:
sub eax,9
shl eax,6 ;imul eax,80
sub eax,16-1
movzx ebx,[warea.bottom]
add eax,ebx
y_done:
; mov [ypos],eax
mov [ebp-8],eax
ret
 
;START2:
load_icon_list2:
mov eax,finfo
mov dword[eax],16
mov dword[eax+8],param_str
call get_bg_info
 
mcall 48,5
mov [warea.by_x],eax
mov [warea.by_y],ebx
 
mov eax,14
int 0x40
add eax,0x00010001
mov [scrxy],eax
 
apply_changes2:
 
mov edi,[icons]
mov esi,icon_data
mov ebp,0x5000 ; threads stack starting point
 
start_new:
mov eax,[esi]
mov [ebp-20],eax
call calc_icon_pos
 
mov eax,51
mov ebx,1
mov ecx,thread
; mov edx,[thread_stack]
mov edx,ebp
; sub edx,4
; mov [edx],esi
mov dword[ebp-4],esi
int 0x40
; add [thread_stack],0x100
add ebp,0x100
 
mov eax,5
mov ebx,1
wait_thread_start: ;wait until thread draw itself first time
cmp [create_thread_event],bl
jz wait_thread_end
int 0x40
jmp wait_thread_start
wait_thread_end:
dec [create_thread_event] ;reset event
 
 
add esi,REC_SIZE
dec edi
jnz start_new
close:
or eax,-1
int 0x40
 
thread:
; pop ebp ;ebp - address of our icon
sub esp,12
mov ebp,esp
sub esp,16
call draw_window2
mov [create_thread_event],1
mov eax,40
mov ebx,010101b
int 0x40
 
still2:
 
mov eax,10
int 0x40
 
cmp eax,1
je red2
cmp eax,3
je button2
cmp eax,5
jne still2
 
call get_bg_info
mov eax,5
mov ebx,1
call draw_icon2
 
jmp still2
 
red2:
mcall 14
add eax,0x00010001
mov [scrxy],eax
mcall 48,5
mov [warea.by_x],eax
mov [warea.by_y],ebx
add ebp,+12
call calc_icon_pos
add ebp,-12
mcall 9,I_END,-1
mov eax,[I_END+process_information.x_start]
cmp eax,[ebp+0]
jne @f
mov eax,[I_END+process_information.y_start]
cmp eax,[ebp+4]
je .lp1
@@: call get_bg_info
mcall 67,[ebp+0],[ebp+4],51,51
 
.lp1: call draw_window2
jmp still2
 
key2:
mov eax,2
int 0x40
 
jmp still2
 
button2:
mov eax,17
int 0x40
 
; mcall 55,eax, , ,klick_music
 
mov esi,[ebp+8]
mov ebx,1
mov edi,finfo.path
call fill_paths
inc ebx
mov edi,param_str
mov dword[finfo+8],param_str
call fill_paths
cmp byte[edi],0
jne .no0
and dword[finfo+8],0
.no0:
; lea ebx,[ebp+19]
mov ebx,finfo
mov eax,58
int 0x40
; dph eax
cmp eax,1024
jae still2
mcall 55,eax, , ,klick_music
jmp still2
 
klick_music db 0x85,0x60,0x85,0x70,0x85,0x65,0
 
fill_paths:
push esi edi
; dps '>'
movzx ecx,byte[str_lens+ebx]
add esi,[positions+ebx*4]
push esi
; mov edx,esi
add esi,ecx
 
.l1:
dec esi
cmp byte[esi],' '
jnz .found
loop .l1
pop esi
jmp .noms
.found:
lea ecx,[esi+1]
pop esi
sub ecx,esi
rep movsb
.noms:
and byte[edi],0
; call debug_outstr
; dps <'<',13,10>
pop edi esi
ret
 
atoi:
push esi
xor eax,eax
xor ebx,ebx
.nxt:
lodsb
cmp al,'0'
jb .done
cmp al,'9'
ja .done
sub eax,'0'
imul ebx,10
add ebx,eax
jmp .nxt
.done:
pop esi
mov eax,ebx
ret
 
itoa:
; mov esi,[current_icon]
add esi,2
mov ebx,10
mov ecx,3
.l0:
xor edx,edx
div ebx
add dl,'0'
mov [esi],dl
dec esi
loop .l0
; and byte[esi],0
ret
 
draw_picture:
mov [image],0x3000
mov edi,[ebp+8]
lea esi,[edi+12]
call atoi
cmp eax,[icon_count]
ja toponly.ex
imul eax,(32*3*32)
lea edi,[eax+strip_file+12]
xor ebx,ebx
xor ecx,ecx
mov esi,edi;strip_file+12+(32*3*32)*2
 
mov [pixpos],0
newb:
push ebx
push ecx
 
cmp ebx,10
jb yesbpix
cmp ebx,42
jge yesbpix
cmp ecx,31;2
jg yesbpix
 
push esi
mov esi,edi
add esi,[pixpos]
 
no_correction_pixpos:
add [pixpos],3
mov eax,[esi]
and eax,0xffffff
 
pop esi
 
cmp eax,0
je yesbpix
cmp eax,0xfffcff ;f5f5f5
je yesbpix
jmp nobpix
 
yesbpix:
 
stretch:
cmp [bgrdrawtype],dword 2
jne nostretch
; mov eax,[ypos]
mov eax,[ebp+4]
add eax,ecx
imul eax,[bgry]
cdq
movzx ebx,word [scrxy]
div ebx
imul eax,[bgrx]
push eax
; mov eax,[xpos]
mov eax,[ebp+0]
add eax,[esp+8]
imul eax,[bgrx]
cdq
movzx ebx,word [scrxy+2]
div ebx
add eax,[esp]
add esp,4
 
jmp notiled
 
nostretch:
 
cmp [bgrdrawtype],dword 1
jne notiled
; mov eax,[ypos]
mov eax,[ebp+4]
add eax,ecx
cdq
movzx ebx,word [bgrxy]
div ebx
mov eax,edx
imul eax,[bgrx]
push eax
; mov eax,[xpos]
mov eax,[ebp+0]
add eax,[esp+8]
movzx ebx,word [bgrxy+2]
cdq
div ebx
mov eax,edx
add eax,[esp]
add esp,4
 
notiled:
 
lea ecx,[eax+eax*2]
mov eax,39
mov ebx,2
int 0x40
 
nobpix:
 
pop ecx
pop ebx
 
mov edx,eax
mov eax,[image]
mov [eax],edx
mov [eax],dl
inc eax
ror edx,8
mov [eax],dl
inc eax
ror edx,8
mov [eax],dl
inc eax
mov [image],eax
inc ebx
mov eax,[yw]
inc eax
cmp ebx,eax
jnz newb
xor ebx,ebx
 
inc ecx
 
mov eax,[ya]
add [pixpos],eax
 
cmp [top],1
jne notop
cmp ecx,38
je toponly
 
notop:
 
cmp ecx,52
jnz newb
 
toponly:
 
mov eax,7
mov ebx,0x3000
mov ecx,52 shl 16 + 52
xor edx,edx
int 0x40
.ex:
mov [load_pic],0
ret
 
draw_text:
 
mov esi,[ebp+8]
add esi,3
push edi
mov edi,labelt
mov ecx,8
cld
rep movsb
pop edi
mov eax,labelt
news2:
cmp [eax],byte 33
jb founde
inc eax
cmp eax,labelt+8;11
jb news2
founde:
sub eax,labelt
mov [tl],eax
 
mov eax,[tl]
lea eax,[eax+eax*2] ; eax *= char_width/2
shl eax,16
 
mov ebx,27*65536+42
sub ebx,eax
 
mov eax,4
xor ecx,ecx ; black shade of text
mov edx,labelt
mov esi,[tl]
add ebx,1 shl 16 ;*65536+1
int 0x40
inc ebx
int 0x40
add ebx,1 shl 16
int 0x40
inc ebx
int 0x40
sub ebx,1 shl 16
int 0x40
dec ebx
sub ebx,1 shl 16
int 0x40
sub ebx,1 shl 16
dec ebx
int 0x40
dec ebx
add ebx,1 shl 16
int 0x40
inc ebx
mov ecx,0xffffff
 
int 0x40
mov [draw_pic],0
ret
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window2:
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
; mov ebx,[xpos-2]
mov ebx,[ebp+0-2]
; mov ecx,[ypos-2]
mov ecx,[ebp+4-2]
add ebx,[yw] ; [x start] *65536 + [x size]
add ecx,51 ; [y start] *65536 + [y size]
mov edx,0x01000000 ; color of work area RRGGBB,8->color gl
int 0x40
 
mov eax,8 ; button
mov ebx,51
mov ecx,50
mov edx,1+20000000 ; or 0x40000000
int 0x40
 
mov eax,5
mov ebx,1
draw_icon2:
xchg [load_pic],bl
test bl,bl
je draw_icon_end
int 0x40
jmp draw_icon2
draw_icon_end:
 
mov eax,5
mov ebx,1
draw_icon_2:
xchg [draw_pic],bl
test bl,bl
je draw_icon_end_2
int 0x40
jmp draw_icon_2
draw_icon_end_2:
 
mov eax,9
mov ebx,process_table
mov ecx,-1
int 0x40
 
call draw_picture
call draw_text
 
mov eax,12
mov ebx,2
int 0x40
 
ret
 
tl dd 8
yw dd 51
ya dd 0
cur_btn dd 40
 
;xpos dd 15
;ypos dd 185
draw_pic db 0
load_pic db 0
create_thread_event db 0
 
 
image dd 0x3000
;thread_stack dd 0x5000
 
;icons dd 0
 
 
I_Param:
 
icon_data = I_END+0x1400
process_table = I_END+0x2400
 
;I_END:
 
bgrx dd ?
bgry dd ?
param_str rb 31
 
;//////////////////////////
 
bgrxy dd ?
warea:
.by_x:
.right dw ?
.left dw ?
.by_y:
.bottom dw ?
.top dw ?
scrxy dd ?
bgrdrawtype dd ?
 
pixpos dd ?
top dd ?
icons dd ?
addr dd ?
cur_str dd ?
cur_band dd ?
sel_icon1 rd 1
icon_count rd 1
gif_file rb GIF_SIZE
strip_file rb RAW_SIZE
;I_Param:
 
; icon_data = I_END+256
 
I_END:
/programs/system/icon/trunk/gif_lite.inc
0,0 → 1,328
; GIF LITE v2.0 by Willow
; Written in pure assembler by Ivushkin Andrey aka Willow
;
; This include file will contain functions to handle GIF image format
;
; Created: August 15, 2004
; Last changed: September 9, 2004
 
; Change COLOR_ORDER in your program
; if colors are displayed improperly
 
if ~ (COLOR_ORDER in <MENUETOS,OTHER>)
; This message may not appear under MenuetOS, so watch...
display 'Please define COLOR_ORDER: MENUETOS or OTHER',13,10
end if
 
; virtual structure, used internally
 
struc GIF_list
{
.NextImg rd 1
.Left rw 1
.Top rw 1
.Width rw 1
.Height rw 1
}
 
struc GIF_info
{
.Left rw 1
.Top rw 1
.Width rw 1
.Height rw 1
}
 
_null fix 0x1000
 
; ****************************************
; FUNCTION GetGIFinfo - retrieve Nth image info
; ****************************************
; in:
; esi - pointer to image list header
; ecx - image_index (0...img_count-1)
; edi - pointer to GIF_info structure to be filled
 
; out:
; eax - pointer to RAW data, or 0, if error
 
GetGIFinfo:
push esi ecx edi
xor eax,eax
jecxz .eloop
.lp:
mov esi,[esi]
test esi,esi
jz .error
loop .lp
.eloop:
add esi,4
movsd
movsd
mov eax,esi
.error:
pop edi ecx esi
ret
 
; ****************************************
; FUNCTION ReadGIF - unpacks GIF image
; ****************************************
; in:
; esi - pointer to GIF file in memory
; edi - pointer to output image list
; eax - pointer to work area (MIN 16 KB!)
 
; out:
; eax - 0, all OK;
; eax - 1, invalid signature;
; eax >=8, unsupported image attributes
;
; ecx - number of images
 
ReadGIF:
push esi edi
mov [.table_ptr],eax
mov [.cur_info],edi
xor eax,eax
mov [.globalColor],eax
mov [.img_count],eax
inc eax
cmp dword[esi],'GIF8'
jne .er ; signature
mov ecx,[esi+0xa]
inc eax
add esi,0xd
mov edi,esi
bt ecx,7
jnc .nextblock
mov [.globalColor],esi
call .Gif_skipmap
.nextblock:
cmp byte[edi],0x21
jne .noextblock
inc edi
cmp byte[edi],0xf9 ; Graphic Control Ext
jne .no_gc
add edi,7
jmp .nextblock
.no_gc:
cmp byte[edi],0xfe ; Comment Ext
jne .no_comm
inc edi
.block_skip:
movzx eax,byte[edi]
lea edi,[edi+eax+1]
cmp byte[edi],0
jnz .block_skip
inc edi
jmp .nextblock
.no_comm:
cmp byte[edi],0xff ; Application Ext
jne .nextblock
add edi,13
jmp .block_skip
.noextblock:
cmp byte[edi],0x2c ; image beginning
jne .er
inc [.img_count]
inc edi
mov esi,[.cur_info]
add esi,4
xchg esi,edi
movsd
movsd
push edi
movzx ecx,word[esi]
inc esi
bt ecx,7
jc .uselocal
push [.globalColor]
mov edi,esi
jmp .setPal
.uselocal:
call .Gif_skipmap
push esi
.setPal:
movzx ecx,byte[edi]
inc ecx
mov [.codesize],ecx
dec ecx
pop [.Palette]
lea esi,[edi+1]
mov edi,[.table_ptr]
xor eax,eax
cld
lodsb ; eax - block_count
add eax,esi
mov [.block_ofs],eax
mov [.bit_count],8
mov eax,1
shl eax,cl
mov [.CC],eax
inc eax
mov [.EOI],eax
lea ecx,[eax-1]
mov eax, _null shl 16
.filltable:
stosd
inc eax
loop .filltable
pop edi
mov [.img_start],edi
.reinit:
mov edx,[.EOI]
inc edx
push [.codesize]
pop [.compsize]
call .Gif_get_sym
cmp eax,[.CC]
je .reinit
call .Gif_output
.cycle:
movzx ebx,ax
call .Gif_get_sym
cmp eax,edx
jae .notintable
cmp eax,[.CC]
je .reinit
cmp eax,[.EOI]
je .end
call .Gif_output
.add:
push eax
mov eax,[.table_ptr]
mov [eax+edx*4],ebx
pop eax
cmp edx,0xFFF
jae .cycle
inc edx
bsr ebx,edx
cmp ebx,[.compsize]
jne .noinc
inc [.compsize]
.noinc:
jmp .cycle
.notintable:
push eax
mov eax,ebx
call .Gif_output
push ebx
movzx eax,bx
call .Gif_output
pop ebx eax
jmp .add
.er:
pop edi
jmp .ex
.end:
mov eax,[.cur_info]
mov [eax],edi
mov [.cur_info],edi
add esi,2
xchg esi,edi
.nxt:
cmp byte[edi],0
jnz .continue
inc edi
jmp .nxt
.continue:
cmp byte[edi],0x3b
jne .nextblock
xor eax,eax
stosd
mov ecx,[.img_count]
.ex:
pop edi esi
ret
 
.Gif_skipmap:
; in: ecx - image descriptor, esi - pointer to colormap
; out: edi - pointer to area after colormap
 
and ecx,111b
inc ecx ; color map size
mov ebx,1
shl ebx,cl
lea ebx,[ebx*2+ebx]
lea edi,[esi+ebx]
ret
 
.Gif_get_sym:
mov ecx,[.compsize]
push ecx
xor eax,eax
.shift:
ror byte[esi],1
rcr eax,1
dec [.bit_count]
jnz .loop1
inc esi
cmp esi,[.block_ofs]
jb .noblock
push eax
xor eax,eax
lodsb
test eax,eax
jnz .nextbl
mov eax,[.EOI]
sub esi,2
add esp,8
jmp .exx
.nextbl:
add eax,esi
mov [.block_ofs],eax
pop eax
.noblock:
mov [.bit_count],8
.loop1:
loop .shift
pop ecx
rol eax,cl
.exx:
xor ecx,ecx
ret
 
.Gif_output:
push esi eax edx
mov edx,[.table_ptr]
.next:
push word[edx+eax*4]
mov ax,word[edx+eax*4+2]
inc ecx
cmp ax,_null
jnz .next
shl ebx,16
mov bx,[esp]
.loop2:
pop ax
 
lea esi,[eax+eax*2]
add esi,[.Palette]
 
if COLOR_ORDER eq MENUETOS
mov esi,[esi]
bswap esi
shr esi,8
mov [edi],esi
add edi,3
else
movsw
movsb
end if
 
loop .loop2
pop edx eax esi
ret
 
.globalColor rd 1
.img_count rd 1
.cur_info rd 1 ; image table pointer
.img_start rd 1
.codesize rd 1
.compsize rd 1
.bit_count rd 1
.CC rd 1
.EOI rd 1
.Palette rd 1
.block_ofs rd 1
.table_ptr rd 1
/programs/system/icon/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm icon.asm icon
@pause
/programs/system/icon/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm icon.asm icon
@pause
/programs/system/icon/trunk/macros.inc
0,0 → 1,267
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/ir/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm ir.asm ir
@pause
/programs/system/ir/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm ir.asm ir
@pause
/programs/system/ir/trunk/ir.asm
0,0 → 1,333
;
; INFRARED
;
; Compile with FASM for Menuet
;
 
use32
 
org 0x0
 
db 'MENUET00' ; 8 byte id
dd 56 ; required os
dd START ; program start
dd I_END ; program image size
dd 0x1000 ; required amount of memory
dd 0x1000 ; esp = 0x7FFF0
dd 0x00000000 ; reserved=no extended header
 
 
include 'lang.inc'
include 'macros.inc'
 
START: ; start of execution
 
call draw_window ; at first, draw the window
 
call set_variables
 
still:
 
mov eax,10 ; wait here for event
int 0x40
 
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
cmp eax,16+4
je readir
 
jmp still
 
pos dd 0x0
 
cdplayer db 'CDPLAY '
 
readir:
mov eax,42
mov ebx,4
int 0x40
 
cmp ebx,80
jne nocd
 
mov eax,19
mov ebx,cdplayer
mov ecx,0
int 0x40
 
 
nocd:
 
push ebx
mov eax,[pos]
add eax,1
cmp eax,10*20+1
jb noeaxz
mov esi,text+10*4
mov edi,text
mov ecx,10*21*4
cld
rep movsb
mov eax,13
mov ebx,20*65536+260
mov ecx,22*65536+220
mov edx,[wcolor]
int 0x40
mov eax,10*19+1
noeaxz:
mov [pos],eax
pop ebx
and ebx,0xff
call draw_data
jmp still
 
red: ; redraw
call draw_window
jmp still
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
jmp still
 
button: ; button
mov eax,17 ; get id
int 0x40
 
cmp ah,1 ; button id=1 ?
jne noclose
 
mov eax,45 ; free irq
mov ebx,1
mov ecx,4
int 0x40
 
mov eax,46 ; free ports 0x3f0-0x3ff
mov ebx,1
mov ecx,0x3f0
mov edx,0x3ff
int 0x40
 
mov eax,-1 ; close this program
int 0x40
noclose:
 
jmp still
 
 
 
draw_data:
 
pusha
 
xchg eax,ebx
 
mov ecx,10
shl ebx,2
mov esi,3
newnum:
xor edx,edx
div ecx
add edx,48
mov [ebx+text-1],dl
dec ebx
dec esi
jnz newnum
 
call draw_text
 
popa
 
ret
 
 
irqtable:
 
dd 0x3f8+0x01000000 ; + 01 = read byte, 02 read word
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
 
 
 
set_variables:
 
 
pusha
 
mov eax,46 ; reserve ports 0x3f0 - 0x3ff
mov ebx,0
mov ecx,0x3f0
mov edx,0x3ff
int 0x40
 
mov eax,45 ; reserve irq 4
mov ebx,0
mov ecx,4
int 0x40
 
mov eax,46 ; reserve ports 0x3f0-0x3ff
mov ebx,0
mov ecx,0x3f0
mov edx,0x3ff
int 0x40
 
mov eax,44 ; set read ports for irq 4
mov ebx,irqtable
mov ecx,4
int 0x40
 
mov cx,0x3f3+8
mov bl,0x80
mov eax,43
int 0x40
 
mov cx,0x3f1+8
mov bl,0
mov eax,43
int 0x40
 
mov cx,0x3f0+8
mov bl,0x30 / 4
mov eax,43
int 0x40
 
mov cx,0x3f3+8
mov bl,3
mov eax,43
int 0x40
 
mov cx,0x3f4+8
mov bl,0xB
mov eax,43
int 0x40
 
mov cx,0x3f1+8
mov bl,1
mov eax,43
int 0x40
 
mov eax,5
mov ebx,100
int 0x40
 
mov cx,0x3f8
mov bl,'I'
mov eax,43
int 0x40
 
mov eax,5
mov ebx,10
int 0x40
 
mov cx,0x3f8
mov bl,'R'
mov eax,43
int 0x40
 
mov eax,40 ; get com 1 data with irq 4
mov ebx,0000000000010000b shl 16 + 111b
int 0x40
 
popa
 
ret
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+300 ; [x start] *65536 + [x size]
mov ecx,100*65536+250 ; [y start] *65536 + [y size]
mov edx,[wcolor] ; color of work area RRGGBB,8->color
mov esi,0x8099bbff ; color of grab bar RRGGBB,8->color glide
mov edi,0x00ffffff ; color of frames RRGGBB
int 0x40
 
; WINDOW LABEL
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
mov ecx,0x00ffffff ; color of text RRGGBB
mov edx,labelt ; pointer to text beginning
mov esi,labellen-labelt ; text length
int 0x40
 
; CLOSE BUTTON
mov eax,8 ; function 8 : define and draw button
mov ebx,(300-19)*65536+12 ; [x start] *65536 + [x size]
mov ecx,5*65536+12 ; [y start] *65536 + [y size]
mov edx,1 ; button id
mov esi,0x5599cc ; button color RRGGBB
; int 0x40
 
call draw_text
 
mov eax,12
mov ebx,2
int 0x40
 
ret
 
draw_text:
 
pusha
 
mov ebx,25*65536+35 ; draw info text with function 4
mov ecx,0xffffff
mov edx,text
mov esi,40
mov edi,20
newline:
mov eax,4
int 0x40
add ebx,10
add edx,40
dec edi
jne newline
 
popa
 
ret
 
 
 
; DATA AREA
 
wcolor dd 0x03000000
 
labelt db 'INFRARED RECEIVER FOR IRMAN IN COM 1'
labellen:
 
text:
 
I_END:
 
 
 
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/ir/trunk/macros.inc
0,0 → 1,267
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/launcher/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm launcher.asm launcher
@pause
/programs/system/launcher/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm launcher.asm launcher
@pause
/programs/system/launcher/trunk/launcher.asm
0,0 → 1,203
;
; LAUNCHER - €‚’Ž‡€“‘Š Žƒ€ŒŒ
; Š®¤ ¯à®£à ¬¬ë ᮢᥬ ­¥ ®¯â¨¬¨§¨à®¢ ­, ­® ®ç¥­ì ¯à®áâ ¤«ï ¯®­¨¬ ­¨ï.
; â®â « ã­ç¥à £à㧨⠨­ä®à¬ æ¨î ® ¯à®£à ¬¬ å ¤«ï § ¯ã᪠ ¨§ ä ©« 
; AUTORUN.DAT. ”®à¬ â ®ç¥­ì ¯à®áâ ¨ ¢ ª®¬¬¥­â à¨ïå ­¥ ­ã¦¤ ¥âáï.
;
; Š®¬¯¨«¨àã©â¥ á ¯®¬®éìî FASM 1.52 ¨ ¢ëè¥
;
include "lang.inc"
include "macros.inc"
 
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 0x0 , 0x0 ; I_Param , I_Icon
 
;include "DEBUG.INC"
 
START: ; start of execution
 
mov eax, 5
mov ebx, 10
int 0x40
 
mov eax, 58 ; load AUTORUN.DAT
mov ebx, autorun_dat_info
int 0x40
 
call get_number
mov [number_of_files], eax
;dps "NUMBER OF FILES: "
;dpd eax
;dps <13,10>
call next_line
 
start_program:
;dps <"STARTING A PROGRAM",13,10>
call clear_strings
mov edi, program
call get_string
mov edi, parameters
call get_string
call get_number
call run_program
call next_line
dec [number_of_files]
jnz start_program
 
exit:
or eax, -1
int 0x40
 
 
run_program: ; time to delay in eax
push eax
mcall 58, start_info
pop ebx
 
mov eax, 5
int 0x40
ret
 
 
clear_strings: ; clears buffers
pushad
 
mov ecx, 60
mov edi, program
xor al, al ;mov al, ' '
rep stosb
 
mov ecx, 60
mov edi, parameters
xor al, al
rep stosb
 
popad
ret
 
 
get_string: ; pointer to destination buffer in edi
pushad
call skip_spaces
mov esi, [position]
;dpd esi
;dps <13,10>
add esi, file_data
.start:
lodsb
cmp al, ' '
je .finish
stosb
inc [position]
jmp .start
.finish:
popad
ret
 
 
get_number:
push ebx esi
call skip_spaces
mov esi, [position]
add esi, file_data
xor eax, eax
xor ebx, ebx
.start:
lodsb
cmp al, '0'
jb .finish
cmp al, '9'
ja .finish
sub al, '0'
imul ebx, 10
add ebx, eax
inc [position]
jmp .start
.finish:
mov eax, ebx
pop esi ebx
ret
 
 
skip_spaces:
pushad
xor eax, eax
mov esi, [position]
add esi, file_data
.start:
lodsb
cmp al, ' '
jne .finish
inc [position]
jmp .start
.finish:
;dps "NOW AL = "
;mov [tmp],al
;mov edx, tmp
;call debug_outstr
;dps <13,10>
popad
ret
 
 
next_line:
pushad
mov esi, [position]
add esi, file_data
.start:
lodsb
cmp al, 13
je .finish
inc [position]
jmp .start
.finish:
add [position], 2
inc esi
lodsb
cmp al, '#'
je .skipline
cmp al, 13
jne .donotskip
.skipline:
call next_line
.donotskip:
popad
ret
 
 
 
; DATA:
position dd 0 ; position in file
 
autorun_dat_info: ; AUTORUN.DAT
.mode dd 0 ; read file
.start_block dd 0 ; block to read
.blocks dd 0x10 ; 16*512 bytes max
.address dd file_data
.workarea dd work_area
db "/RD/1/AUTORUN.DAT",0
 
start_info:
.mode dd 16
dd 0
.params dd parameters
dd 0
.workarea dd work_area
.path: ;      
 
I_END:
 
program rb 61 ; 60 + [0] char
parameters rb 61
 
number_of_files dd ?
 
work_area rb 0x4000
file_data rb 16*512
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/launcher/trunk/macros.inc
0,0 → 1,267
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/menu/trunk/menu.asm
0,0 → 1,566
;******************************************************************************
; MAIN MENU by lisovin@26.ru
; Some parts of code rewritten by Ivan Poddubny <ivan-yar@bk.ru>
;
; Compile with FASM for Menuet
;******************************************************************************
include "lang.inc"
include "macros.inc"
 
BTN_HEIGHT = 22
TXT_Y = (BTN_HEIGHT)/2-5
 
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x20000 ; memory for app
dd 0x20000-1 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
;******************************************************************************
;include "DEBUG.INC" ; debug macros
START: ; start of execution
 
mov eax, 48 ; load system colors
mov ebx, 3
mov ecx, sc
mov edx, sizeof.system_colors
int 0x40
 
mov eax, 70 ; load MENU.DAT
mov ebx, fileinfo
int 0x40
test eax, eax ; error ?
jz @f
cmp eax,6
jnz close
@@:
test ebx, ebx ; length = 0 ?
jz close
mov ecx, ebx
mov edi, mem_end
newsearch:
mov al, '#'
cld
repne scasb
test ecx, ecx ; if not found
jz close
call get_number
test ebx, ebx
jnz .number
cmp al, '#'
je search_end
.number:
shl ebx, 4
add ebx, menu_data ; pointer to process table
mov [ebx], edi
inc [processes]
jmp newsearch
search_end:
mov [end_pointer], edi
mov ebx, [processes]
dec ebx
shl ebx, 4
add ebx, menu_data
newprocess:
xor edx, edx
mov ecx, edi
sub ecx, [ebx]
mov al, 10
newsearch1:
std
repne scasb
test ecx, ecx
je endprocess
cmp [edi], byte 13
jne newsearch1
inc edx
jmp newsearch1
endprocess:
mov esi, ebx
add esi, 4
dec edx
mov [esi], dl
cmp ebx, menu_data
jbe search_end1
sub ebx, 16
jmp newprocess
search_end1:
mov eax, 14
int 0x40
sub ax, 20
mov [menu_data + y_end], ax
mov [menu_data + x_start], 5
mov al, [menu_data + rows]
mov [menu_data + cur_sel], al ; clear selection
mov [menu_data + prev_sel], al
 
mov [buffer], 0
thread:
mov eax, [buffer] ; identifier
shl eax, 4
add eax, menu_data
mov edi, eax
 
mov eax, 40 ; set event mask
mov ebx, 100111b ; mouse + button + key + redraw
int 0x40
 
call draw_window
 
still:
mov eax, 23 ; wait here for event
mov ebx, 5
int 0x40
 
test [close_now], 1 ; is close flag set?
jnz close
 
cmp eax, 1 ; redraw request ?
je red
cmp eax, 2 ; key pressed ?
je key
cmp eax, 3 ; button in buffer ?
je button
cmp eax, 6 ; mouse event ?
je mouse
 
cmp edi, menu_data
je still ; if main process-ignored
 
movzx ebx, [edi + parent] ; parent id
shl ebx, 4
add ebx, menu_data ; ebx = base of parent info
call backconvert ; get my id in al
cmp al, [ebx + child] ; if I'm not child of my parent, I shall die :)
jne close
 
jmp still
 
 
red: ; redraw
call draw_window
jmp still
 
 
key:
; mov eax, 2
int 0x40
 
mov al, [edi + rows] ; number of buttons
 
cmp ah, 178 ; KEY_UP
jne .noup
 
mov ah, [edi+cur_sel]
mov [edi+prev_sel], ah
dec byte [edi+cur_sel]
jnz redrawbut
mov [edi+cur_sel], al
jmp redrawbut
 
 
.noup:
cmp ah, 177 ; KEY_DOWN
jne .nodn
 
mov ah, [edi + cur_sel]
mov [edi + prev_sel], ah
inc [edi + cur_sel]
cmp [edi + cur_sel], al
jna redrawbut
mov [edi + cur_sel], 1
jmp redrawbut
 
.nodn:
cmp ah, 13 ; ENTER
jne .noenter
mov ah, [edi + cur_sel]
jmp button1
 
.noenter:
cmp ah, 27 ; ESC
jne still
jmp close
 
; include "DEBUG.INC"
 
button: ; BUTTON HANDLER
mov eax, 17 ; get id
int 0x40
 
button1:
mov esi, edi
push edi
mov edi, [edi + pointer]
 
; print "hello"
mov al, [esi + cur_sel]
mov [esi + prev_sel], al
mov [esi + cur_sel], ah
pushad
mov edi, esi
; dph eax
call draw_only_needed_buttons
popad
 
; look for the next line <ah> times; <ah> = button_id
push eax
.next_string:
call searchstartstring
dec ah
jnz .next_string
pop eax
 
mov ecx, 40
mov al, '/'
cld
repne scasb
test ecx, ecx ; if '/' not found
je searchexit
 
cmp [edi], byte '@' ; check for submenu
je runthread
 
dec edi
push edi ; pointer to start of filename
call searchstartstring ; search for next string
sub edi, 2 ; to last byte of string
 
mov ecx, edi
pop esi
sub ecx, esi
inc ecx ; length of filename
mov edi, fileinfo_start.name
rep movsb ; copy string
mov byte [edi], 0 ; store terminator
mov eax, 70 ; start program
mov ebx, fileinfo_start
int 0x40
; mcall 5,100
or [close_now], 1 ; set close flag
pop edi
mov [mousemask], 0
jmp close
 
searchexit:
pop edi
jmp still
 
 
runthread:
inc edi
 
push eax
call get_number ; get number of this process
pop eax
 
test ebx, ebx ; returned zero - main menu or not number
jz searchexit
 
mov al, bl
 
mov ebx, [processes]
dec bl
cmp al, bl
ja searchexit ; such process doesnt exist
cmp al, [esi + child]
je searchexit ; such process already exists
 
mov [esi + child], al ; this is my child
mov cx, [esi + x_start]
add cx, 141 ; new x_start in cx
movzx edx, al
shl edx, 4
add edx, menu_data ; edx points to child's base address
mov [edx + x_start], cx ; xstart for new thread
mov cx, [esi + y_end] ; y_end in cx
mov bl, [esi + rows] ; number of buttons in bl
sub bl, ah ; number of btn from bottom
movzx eax, al
mov [buffer], eax ; thread id in buffer
movzx ebx, bl
push edx
mov eax, BTN_HEIGHT
mul ebx
sub cx, ax ; new y_end for new thread
pop edx
mov [edx + y_end], cx ; store y_end
mov edi, esi
call backconvert ; get number of this process (al)
mov [edx + parent], al ; store number of parent process
mov al, [edx + rows]
mov [edx + cur_sel], al ; clear current selected element
mov [edx + prev_sel], al ; clear previous selected element
mov [edx + child], 0
 
cmp [thread_stack], 0x1e000
jne thread_stack_not_full
mov [thread_stack], 0xE000
 
thread_stack_not_full:
add [thread_stack], 0x2000 ; start new thread
mov eax, 51
mov ebx, 1
mov ecx, thread
mov edx, [thread_stack]
int 0x40
 
jmp searchexit
 
 
mouse: ; MOUSE EVENT HANDLER
mov eax, 37
mov ebx, 2
int 0x40
test eax, eax ; check buttons state
jnz click
mov eax, 37
mov ebx, 1
int 0x40
ror eax, 16 ; eax = [ Y | X ] relative to window
cmp ax, 140 ; pointer in window?
ja noinwindow
;  in window 
 
shr eax, 16 ; eax = [ 0 | Y ]
xor edx, edx
mov ebx, BTN_HEIGHT
div ebx
inc eax ; number of "button" in eax
movzx ebx, [edi + rows] ; total strings in ebx
cmp eax, ebx
ja noinwindow
cmp [edi + cur_sel], al
je noredrawbut
mov bl, [edi + cur_sel]
 
;;;;;;
cmp [edi + child], 0
jne noredrawbut
;;;;;;
 
mov [edi + cur_sel], al
mov [edi + prev_sel], bl
redrawbut:
call draw_only_needed_buttons
noredrawbut:
call backconvert
bts [mousemask], eax
jmp still
noinwindow:
call backconvert
btr [mousemask], eax
jmp still
click:
cmp [mousemask], 0 ; not in a window (i.e. menu)
je close
jmp still
 
 
close:
or eax, -1 ; close this thread
mov [edi + child], al ; my child is not mine
int 0x40
 
 
backconvert: ; convert from pointer to process id
mov eax, edi
sub eax, menu_data
shr eax, 4
ret
 
 
;==================================
; get_number
; load number from [edi] to ebx
;==================================
get_number:
push edi
 
xor eax, eax
xor ebx, ebx
 
.get_next_char:
mov al, [edi]
inc edi
cmp al, '0'
jb .finish
cmp al, '9'
ja .finish
sub al, '0'
imul ebx, 10
add ebx, eax
jmp .get_next_char
 
.finish:
pop edi
ret
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
mov eax, 12 ; function 12:tell os about windowdraw
mov ebx, 1 ; 1, start of draw
int 0x40
 
movzx ebx, [edi + rows]
imul eax, ebx, BTN_HEIGHT ; eax = height of window
movzx ecx, [edi + y_end]
sub ecx, eax ; ecx = Y_START
shl ecx, 16
add ecx, eax ; ecx = [ Y_START | Y_SIZE ]
dec ecx
movzx ebx, [edi + x_start]
shl ebx, 16
mov bx, 140 ; ebx = [ X_START | X_SIZE ]
xor eax, eax ; function 0 : define and draw window
mov edx, 0x01000000 ; color of work area RRGGBB,8->color gl
mov esi, edx ; unmovable window
int 0x40
 
call draw_all_buttons
 
mov eax,12
mov ebx,2
int 0x40
 
ret
 
 
draw_all_buttons:
xor edx, edx
.new_button:
call draw_one_button
inc edx
cmp dl, [edi + rows]
jb .new_button
 
ret
 
 
draw_only_needed_buttons:
xor edx, edx
mov dl, [edi + cur_sel]
dec dl
call draw_one_button
mov dl, [edi + prev_sel]
dec dl
call draw_one_button
ret
 
 
draw_one_button:
; receives number of button in dl
push edx;ad
 
mov eax, 8
mov ebx, 140
movzx ecx, dl
imul ecx, BTN_HEIGHT
shl ecx, 16
add ecx, BTN_HEIGHT-1
; edx = button identifier
mov esi, [sc.work_button]
inc dl
cmp [edi + cur_sel], dl
jne .nohighlight
add esi, 0x202020
.nohighlight:
or edx, 0x20000000
int 0x40
movzx edx, dl
 
dec dl
imul ebx, edx, BTN_HEIGHT
add ebx, (4 shl 16) + TXT_Y
 
movzx ecx, dl
inc ecx
mov edx, [edi + pointer]
.findline:
cmp byte [edx], 13
je .linefound
inc edx
jmp .findline
.linefound:
inc edx
cmp byte [edx], 10
jne .findline
dec ecx
jnz .findline
 
mov ecx, [sc.work_button_text]
mov eax, 4
mov esi, 21
int 0x40
 
pop edx;ad
ret
 
 
searchstartstring:
mov ecx, 40
mov al, 13
cld
repne scasb
cmp byte [edi], 10
jne searchstartstring
ret
 
 
;*** DATA AREA ****************************************************************
 
thread_stack dd 0xE000
processes dd 0
 
fileinfo:
.subfunction dd 0 ; 0=READ
.start dd 0 ; start byte
.size_high dd 0 ; rezerved
.size dd 0x10000-mem_end ; blocks to read
.return dd mem_end ; return data pointer
.name:
db '/RD/1/MENU.DAT',0 ; ASCIIZ dir & filename
 
fileinfo_start:
.subfunction dd 7 ; 7=START APPLICATION
.flags dd 0 ; flags
.params dd 0x0 ; nop
.rezerved dd 0x0 ; nop
.rezerved_1 dd 0x0 ; nop
.name:
times 50 db ' '
 
I_END:
 
close_now dd ? ; close all processes immediately
end_pointer dd ?
buffer dd ?
mousemask dd ? ; mask for mouse pointer location
 
sc system_colors
 
menu_data:
rb 0x4000 ;x10000
 
virtual at 0 ; PROCESSES TABLE (located at menu_data)
pointer dd ? ; +0 pointer in file
rows db ? ; +4 numer of strings
x_start dw ? ; +5 x start
y_end dw ? ; +7 y end
child db ? ; +9 id of child menu
parent db ? ; +10 id of parent menu
cur_sel db ? ; +11 current selection
prev_sel db ? ; +12 previous selection
rb 16-$+1 ; [16 bytes per element]
end virtual
 
mem_end:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/menu/trunk/readme2.txt
0,0 → 1,6
Changes:
11.07.06 - Mario79, application used function 70.
Earlier changes were made:
Ivan Poddubny, Mario79 and Halyavin
 
 
/programs/system/menu/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm menu.asm menu
@pause
/programs/system/menu/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm menu.asm menu
@pause
/programs/system/menu/trunk/macros.inc
0,0 → 1,267
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/menu/trunk/readme.txt
0,0 → 1,73
English text is below
ÍÎÂÎÅ ÃËÀÂÍÎÅ ÌÅÍÞ.
Âíèìàíèå: äëÿ êîððåêòíîé ðàáîòû ðåêîìåíäóåòñÿ MENUET íå íèæå 0.76
è öâåòíîé ìîíèòîð (íà ìîíîõðîìíîì ïîäñâåòêà íå âèäíà)
 
Îòëè÷èÿ îò Âèëëèíîãî ìåíþ:
1.Êîíôèãóðèðóåìîñòü. Ïóíêòû êàê îñíîâíîãî, òàê è äîïîëíèòåëüíûõ
ìåíþøåê çàäàþòñÿ ôàéëîì MENU.DAT.
Ýòî ïîçâîëÿåò:
-äîáàâëÿòü/óáèðàòü ëþáûå ïóíêòû â ìåíþ. Ïðîãðàììà ñàìà àíàëèçèðóåò
èçìåíåíèÿ è ðèñóåò îêíî ñ êíîïêàìè ïî êîëè÷åñòâó ïóíêòîâ. äàëüíåéøåì
èìõî ýòî ïîçâîëèò êîíôèãóðèðîâàòü ìåíþ íå òîëüêî âðó÷íóþ, íî è ïðîã-
ðàììíî. Íèêàêîãî âìåøàòåëüñòâà â êîä, ÷òî ïîçâîëÿåò êîíôèãóðèòü ìåíþ
è ïðîñòûì ïîëüçîâàòåëÿì.
-ïåðåâîäèòü ìåíþ íà ëþáûå ÿçûêè, íå ëàçÿ â êîä.
-ïîñêîëüêó çàïóñê ïðèëîæåíèé ÷åðåç 58-þ ôóíêöèþ, ïðèëîæåíèÿ ìîãóò íàõîäèòü-
ñÿ íå òîëüêî íà ðàìäèñêå.
2.Âåùèöà, ñîâñåì íå èíòåðåñíàÿ äëÿ ïîëüçîâàòåëåé, íî âîçìîæíî
ïðåäñòàâëÿþùàÿ èíòåðåñ äëÿ ïðîãðàììèñòîâ. Ïðèëîæåíèå ìíîãîïîòî÷íîå, íî âñå
ïîòîêè çàïóñêàþòñÿ íà îäíîì è òîì æå êîäå. Ýòî ïîçâîëèëî çàìåíèòü èñïîë-
íÿåìûå ôàéëû MENU, SELECT1, SELECT2 è ò.ä. îäíèì-åäèíñòâåííûì MENU
è ñèëüíî ñýêîíîìèòü ìåñòî íà äèñêå.
3.Ñàìîóíè÷òîæàåìîñòü ìåíþ ïðè êëèêå çà åãî ïðåäåëàìè è ïðè çàïóñêå ïðèëîæåíèÿ
4.Êíîïêè, ïîäñâå÷èâàåìûå ïðè íàâåäåíèè íà íèõ ìûøüþ (íà ìîíîõðîìíîì ìîíèòîðå
ïîäñâåòêà íå âèäíà).
5.Ïîääåðæêà êëàâèàòóðû. Êíîïêè Ââåðõ, Âíèç, Enter è Esc.
 îáùåì, ïîñòàðàëñÿ ïðèáëèçèòüñÿ ê âèíäîâñêîé ìåíþøêå.
 
Çàìå÷àíèÿ ïî ñèíòàêñèñó ôàéëà MENU.DAT:
Ðàçìåð ôàéëà MENU.DAT-íå áîëåå 2Ê
Ìåíþ #0-âñåãäà ãëàâíîå.
Êîëè÷åñòâî ìåíþ-íå áîëåå 10 - îò #0 äî #9
 êàæäîé ñòðîêå ëèáî ïóòü íà èñïîëíÿåìûé ôàéë, ëèáî ññûëêà íà äî÷åðíåå
ìåíþ, íàïðèìåð /@5
Ìàðêåð êîíöà ## îáÿçàòåëåí (âíèìàíèå! TINYPAD áûâàåò åãî îáðåçàåò)
Ïîä òåêñò íà ìåíþøíûõ êíîïêàõ îòâîäÿòñÿ ïåðâûå 20 ïîçèöèé êàæäîé ñòðîêè
Êàæäàÿ ñòðîêà îòäåëÿåòñÿ ENTERîì, ò.å. äîëæíû ïðèñóòñòâîâàòü çíàêè ïåðå-
âîäà ñòðîêè 0x0d,0x0a
 
Ïðîãà Î×ÅÍÜ ñûðàÿ, ïîýòîìó ïðîñüáà íå óäèâëÿòüñÿ, åñëè ÷òî-íèòü íå áóäåò
ðàáîòàòü. Ñ ôàéëîì MENU.DAT ïðîñüáà îáðàùàòüñÿ î÷åíü îñòîðîæíî. TINYPAD
èíîãäà åãî êàëå÷èò. Îñîáåííî ìàðêåð êîíöà ôàéëà!
Èñïîëíÿåìûé ôàéë î÷åíü ðåêîìåíäóåòñÿ íàçâàòü MENU. (ïðè êîìïèëÿöèè)
Òîãäà îí áóäåò âûçûâàòüñÿ èç ïàíåëè êàê è ïîëîæåíî.
Âñå çàìå÷àíèÿ è ïðåäëîæåíèÿ ñ óäîâîëüñòâèåì ïðèíèìàþòñÿ íà lisovin@26.ru
Ïðèàòòà÷åííûå ôàéëû ñëåäóåò âûñûëàòü íà mutny@rambler.ru
Ñ óâàæåíèåì,
Ìèõàèë Ëèñîâèí
 
NEW MAIN MENU
Requirements: MENUET 0.76, color monitor
WHAT'S NEW?
1.Self-configuring menu. All the configurational data is in MENU.DAT
You may add/remove menu positions, translate menu to any language,
run menu applications from HDD without source code change.
2.Multi-thread application. There're two files only: MENU and MENU.DAT
instead of MENU, SELECT1, SELECT2, SELECT3 etc.
3.Self-closing when running application or clicking out of menu.
4.Button highlight
5.Keyboard support (keys Up, Dn, Enter, Esc.)
So, it's just like Windows menu ;)
NOTES ON MENU.DAT:
Size of MENU.DAT should be not more than 2K
Number of menus-not more than 10 (from #0 to #9). #0 is always main menu
## is an end file marker - always required.
First 20 positions of any string reserved for button text
Any string contains file path or link to submenu, for example /@4.
You may edit MENU.DAT by any text editor, but be careful when using
TINYPAD (sometimes it cuts end marker).
It is recommended to compile MMENU.ASM as MENU. So, you can run it from
standard panel.
All the comments and bugreports send to lisovin@26.ru
Michail Lisovin.
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/panel/trunk/@PANEL.ASM
0,0 → 1,2023
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; MENUBAR for KolibriOS - Compile with fasm ;
; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; program start
dd I_END ; program image size
dd 0xA000 ; reguired amount of memory - 10 Kb
dd 0xA000 ; esp
dd 0x0,0x0 ; param, icon
 
include 'lang.inc'
include 'macros.inc'
 
width dd 305
buttons dd 1 ; 0 no frames ; 1 frames
soften_up dd 1 ; 0 no ; 1 yes
soften_down dd 0 ; 0 no ; 1 yes
minimize_left dd 1
minimize_right dd 1
icons_position dd 95
menu_enable dd 1
setup_enable dd 0
graph_text dd 1
soften_middle dd 1 ; 0 no ; 1 yes
icons dd 1 ; 0 defaults ; 1 activate
 
PANEL_HEIGHT = 18
 
handle_key:
 
mcall 18, 7
mov [active_process],eax
 
mcall 2
cmp al, 2
jnz begin_1.ret
mov ebx, exec_fileinfo
shr eax, 8
cmp al, 88
jz start_end_application
cmp al, 91
jz start_menu_application
cmp al, 92
jz start_menu_application
cmp al, 62
jz kill_active_application
cmp al, 71
jz page_list_next
cmp al, 72
jz page_list_prev
; this is hotkey Ctrl+Shift or LShift+RShift
mov ebx, setup_exec
test ah, 001100b
jnz change_key_lang
mov dword [ebx+8], syslang
mcall 70
call syslang_music
; mcall 5, 25
begin_1:
mov ecx,[active_process]
mcall 18, 3
mcall 5, 25
.ret:
ret
 
change_key_lang:
mov dword [ebx+8], chlang
mcall 70
call chlang_music
; mcall 5, 25
jmp begin_1
 
start_end_application:
mov dword [ebx+21], end_name
mcall 70
mcall 5 ,50
jmp begin_1.ret
 
kill_active_application:
mcall 18, 7
mov ecx,eax
; mcall 9, area9
; mov eax,area9
; mov ecx,[eax+4]
mcall 18, 2
jmp begin_1.ret
 
start_menu_application:
mov [draw_window_1], 1
mov dword [ebx+21], menu_name
mcall 70
call menu_music
mcall 5,50
jmp begin_1.ret
 
page_list_next:
cmp [page_list],15
je @f
inc [page_list]
mov [draw_window_1],1
@@:
jmp begin_1.ret
 
page_list_prev:
cmp [page_list],0
je @f
dec [page_list]
mov [draw_window_1],1
@@:
jmp begin_1.ret
 
active_process dd 0
 
calendar_music:
mcall 55, eax, , , calendarmusic
ret
setup_music:
mcall 55,eax, , ,setupmusic
ret
sysmeter_music:
mcall 55,eax, , ,sysmetermusic
ret
button_music:
mcall 55,eax, , ,buttonmusic
ret
syslang_music:
mcall 55, eax, , , syslangmusic
ret
chlang_music:
mcall 55, eax, , , chlangmusic
ret
menu_music:
mcall 55,eax, , ,menumusic
ret
 
chlangmusic: db 0x82,0x60,0x83,0x65,0x82,0x60,0
 
syslangmusic: db 0x82,0x65,0x83,0x70,0x82,0x65,0
 
menumusic: db 0x82,0x50,0x84,0x48,0x82,0x50,0x84,0x53,0x82,0x51,0
 
activatemusic: db 0x83,0x30,0x85,0x60,0
 
buttonmusic: db 0x85,0x25,0x85,0x40,0
 
sysmetermusic: db 0x85,0x35,0x85,0x45,0
 
setupmusic: db 0x85,0x40,0x85,0x50,0
 
calendarmusic: db 0x85,0x37,0x85,0x48,0
 
; .exit: mcall -1
 
 
START:
mcall 66,4,0,2 ; LShift+RShift
mcall 66, , ,11h ; Ctrl+Shift
mcall 66,,88,110h ; Alt+Ctrl+F12
mcall 66,,91,100h ; Alt+LWin
mcall 66,,92 ; Alt+RWin
mcall 66,,62 ; Alt+F4
mcall 66,,71 ; Alt+Home
mcall 66,,72 ; Alt+Up
mcall 18, 8, 1
test eax, eax
jne @f
mcall 18, 8, 2
@@:
mov eax, 70
mov ebx, dat_fileinfo
int 0x40
 
mov edi,width
mov esi,I_END
xor eax,eax
new_number:
cmp [esi],byte ';'
je number_ready
imul eax,10
movzx ebx,byte [esi]
sub ebx,'0'
add eax,ebx
inc esi
jmp new_number
number_ready:
stosd
xor eax,eax
inc esi
cmp [esi],byte 'x'
jne new_number
 
mcall 14
mov [screen_size],eax
 
mcall 48,5
mov ecx,eax
lea edx,[ebx-PANEL_HEIGHT-1]
mcall 48,6
 
call set_variables
 
start_after_minimize:
 
call draw_window
call draw_info
call draw_running_applications
 
mov eax, 23
mov ebx, 30
int 0x40
 
still:
; mcall 13,<390,70>,<3,11>,0xffffff
; mov ecx,[button_presssed_alt]
; mcall 47,0x80100,ecx ,400 shl 16+5,0
 
call draw_info
call draw_running_applications
 
mov eax, 23
mov ebx, 20
int 0x40
 
cmp eax,1 ; redraw ?
jz red
cmp eax,3 ; button ?
jz button
call handle_key
jmp still
 
red: ; redraw window
 
mcall 14
movzx ecx,ax
mov edx,eax
shr edx,16
cmp [screen_size.height],ax
jne @f
rol eax,16
cmp [screen_size.width],ax
je .lp1
rol eax,16
@@: mov [screen_size],eax
sub ecx,PANEL_HEIGHT
mcall 67,0,,,PANEL_HEIGHT
 
.lp1:
call draw_window
call draw_info
jmp still
 
button: ; button
mov eax,17
int 0x40
 
cmp ah,50
jb no_activate
cmp ah,70
jg no_activate
 
movzx ecx,byte ah
sub ecx,52
shl ecx,2
 
mov eax,18
mov ebx,3
mov ecx,[app_list+ecx]
int 0x40
; cmp [music_type],0
; je still
mcall 55,eax, , ,activatemusic
jmp still
no_activate:
 
 
cmp ah,101 ; minimize to left
je left_button
 
cmp ah,102 ; minimize to right
je right_button
 
cmp ah,byte 1 ; start/terminate menu
jnz noselect
call menu_handler
; cmp [music_type],0
; je still
call menu_music
jmp still
noselect:
 
mov ebx, exec_fileinfo
cmp ah,byte 2 ; start calendar
jnz noid15 ;noclock
mov dword [ebx+21], calendar_name
mov eax, 70
int 0x40
call calendar_music
jmp still
 
noid15:
cmp ah,16
jne noid16
mov ebx, setup_exec
mov dword [ebx+8], chlang
mov eax, 70
int 0x40
call chlang_music
mcall 5, 25
jmp still
 
noid16:
cmp ah,17
jne noid17
mov ebx, setup_exec
mov dword [ebx+8], syslang
mov eax, 70
int 0x40
call syslang_music
mcall 5, 25
jmp still
 
noid17:
cmp ah,18
jne noid18
mov dword [ebx+21], sysmeter_name
mov eax, 70
int 0x40
call sysmeter_music
jmp still
 
noid18:
cmp ah,19
jne noid19
; inc [music_type]
; and [music_type],1
mcall 18,8,2
; mcall 18,8
; mov [sound_flag],al
 
; mcall 15,4,2
mcall 15,3
jmp red
 
noid19:
cmp ah,20 ; start system setup
jnz noid20
mov ebx, setup_exec
and dword [ebx+8], 0
mov eax, 70
int 0x40
call setup_music
jmp still
 
noid20:
cmp ah,21
jnz noid21
cmp [page_list],15
je @f
inc [page_list]
jmp red
@@:
jmp still
 
noid21:
cmp ah,22
jnz noid22
cmp [page_list],0
je @f
dec [page_list]
jmp red
@@:
jmp still
 
noid22:
 
jmp still
 
 
 
draw_running_applications:
 
pusha
 
cmp [icons],1
jne dr_ret
 
call calculate_applications
 
cmp edi,[running_applications]
jne noret
popa
ret
noret:
 
; cmp edi,[running_applications]
; jge no_application_decrease
call draw_window
; no_application_decrease:
 
mov [running_applications],edi
 
mov edi,0
mov ecx,2
mov [contrast],0
mov eax,[max_applications]
mul [page_list]
test eax,eax
je @f
inc eax
@@:
mov [draw_start_position],eax
 
 
newpr:
 
mov eax,9
mov ebx,0x8000
int 0x40
 
push eax
push ecx
 
cmp eax,ecx
jb norpl2
 
cmp byte [0x8000+10], '@'
je norpl
cmp [0x8000+10],dword 'ICON'
jne .noicon
cmp dword[0x8000+42],51
jne .noicon
cmp dword[0x8000+46],51
je norpl
.noicon:
cmp [0x8000+11],dword 'ENU '
je norpl
; cmp [0x8000+12],dword 'NEL '
; je norpl
cmp [0x8000+10],dword ' '
je norpl
dec [draw_start_position]
cmp [draw_start_position],0
jg norpl
mov eax,13
mov ebx,edi
inc ebx
shl ebx,16
imul ebx,6*10
add ebx,17 shl 16+54
mov ecx,3 shl 16+14
xor edx,edx
sub ebx,10 shl 16
int 0x40
 
sub ebx,1 shl 16
mov bx,1
mov ecx,4 shl 16+12
int 0x40
 
sub ebx,1 shl 16
mov ecx,5 shl 16+10
int 0x40
 
add ebx,56 shl 16
mov ecx,4 shl 16+12
int 0x40
 
add ebx,1 shl 16
mov ecx,5 shl 16+10
int 0x40
 
inc [contrast]
and [contrast],1
cmp [contrast],1
je contrast1
mov edx,0x88ff
jmp contrast2
contrast1:
mov edx,0x55ff
contrast2:
sub ebx,55 shl 16
mov bx,54
mov ecx,4 shl 16+12
; mov edx,0x66ff
int 0x40
 
sub ebx,1 shl 16
mov bx,1
mov ecx,5 shl 16+10
int 0x40
 
add ebx,55 shl 16
int 0x40
 
mov eax,4
mov ebx,edi
inc ebx
shl ebx,16
imul ebx,6*10 ;13
add ebx,20*65536+7
mov ecx,0xffffff ;[wcolor]
; add ecx,0x303030
mov edx,0x8000+10
mov esi,11
sub ebx,10 shl 16
int 0x40
 
norpl2:
 
inc edi
 
norpl:
 
pop ecx
pop eax
 
inc ecx
 
cmp edi,[max_applications]
jb newpr
 
nompr:
 
dr_ret:
 
popa
 
ret
 
 
calculate_applications:
 
mov eax,[max_applications]
mul [page_list]
test eax,eax
je @f
inc eax
@@:
mov [draw_start_position],eax
 
mov edi,app_list
mov ecx,20
mov eax,0xff
cld
rep stosd
 
mov edi,0
mov ecx,2
 
cnewpr:
 
mov eax,9
mov ebx,0x8000
int 0x40
 
cmp byte [0x8000+10], '@'
je cnorpl
cmp [0x8000+10],dword 'ICON'
jne .noicon
cmp dword[0x8000+42],51
jne .noicon
cmp dword[0x8000+46],51
je cnorpl
.noicon:
cmp [0x8000+11],dword 'CON '
je cnorpl
cmp [0x8000+11],dword 'ENU '
je cnorpl
; cmp [0x8000+12],dword 'NEL '
; je cnorpl
cmp [0x8000+10],dword ' '
je cnorpl
dec [draw_start_position]
cmp [draw_start_position],0
jg cnorpl
 
mov [app_list+edi*4],ecx
 
inc edi
 
cnorpl:
inc ecx
 
cmp eax,ecx
jge cnewpr
 
ret
 
 
draw_application_buttons:
 
pusha
 
cmp [icons],1
jne da_ret
 
mov eax,14
int 0x40
 
shr eax,16
 
cmp eax,639
jne now1
mov [max_applications],7 ;6
now1:
cmp eax,799
jne now2
mov [max_applications],9 ;10 ;8
now2:
cmp eax,1023
jne now3
mov [max_applications],12 ;13 ;8
now3:
cmp eax,1279
jne now4
mov [max_applications],17 ;18 ;8
now4:
mov edi,1
 
nb:
 
mov eax,8
mov ebx,edi
shl ebx,16
imul ebx,6*10 ;13
add ebx,15*65536+10*6-1 ;13
mov ecx,1*65536+17
mov edx,edi
add edx,51
cmp [buttons],1
je bufr
or edx,0x60000000
bufr:
mov esi,[wcolor]
sub ebx,11 shl 16
int 0x40
 
inc edi
cmp edi,[max_applications]
jbe nb
 
da_ret:
 
popa
 
ret
 
 
menu_handler:
mov eax, 70
mov ebx, exec_fileinfo
mov dword [ebx+21], menu_name
int 0x40
ret
 
draw_small_right:
 
pusha
 
mov eax,12
mov ebx,1
int 0x40
 
mov eax,0
mov edx,[wcolor]
mov esi,edx
mov edi,edx
or edx, 0x01000000
int 0x40
 
mov eax,8
mov ebx,0*65536+9
mov ecx,0*65536
mov cx,[b_size_y]
mov edx,1
mov esi,[wcolor]
int 0x40
 
mov eax,4
mov ebx,2*65536+16
cmp [graph_text],1
jne nos3
mov ebx,2*65536+7
nos3:
mov ecx,[wcolor]
add ecx,0x303030
mov edx,hidetext
mov esi,1
int 0x40
 
mov eax,12
mov ebx,2
int 0x40
 
popa
 
ret
 
 
 
draw_small_left:
 
pusha
 
mov eax,12
mov ebx,1
int 0x40
 
mov eax,0
mov edx,[wcolor]
mov esi,edx
mov edi,edx
or edx, 0x01000000
int 0x40
 
cmp [graph_text],1
je nos4
 
mov eax,8
mov ebx,0*65536+9
mov ecx,0*65536+18-6
mov edx,2
mov esi,[wcolor]
int 0x40
 
mov eax,4
mov ebx,2*65536+4
mov ecx,[wcolor]
add ecx,0x303030
mov edx,hidetext+2
mov esi,1
int 0x40
 
nos4:
 
mov eax,8
mov ebx,0*65536+9
mov ecx,13*65536+25
cmp [graph_text],1
jne nos6
mov ecx,0*65536
mov cx,word [b_size_y]
nos6:
mov edx,1
mov esi,[wcolor]
int 0x40
 
mov eax,4
mov ebx,3*65536+22
cmp [graph_text],1
jne nos7
mov ebx,3*65536+7
nos7:
mov ecx,[wcolor]
add ecx,0x303030
mov edx,hidetext+1
mov esi,1
int 0x40
 
mov eax,12
mov ebx,2
int 0x40
 
popa
ret
 
 
;-------------------------------------------------
 
right_button:
 
call button_music
 
mov [small_draw],dword draw_small_right
 
mcall 14
shr eax, 16
mov ebx, eax
mov ecx, -1
mov edx, 9
sub ebx, edx
mov esi, -1
mcall 67
 
call draw_small_right
 
jmp small_wait
 
;-------------------------------------------------
 
left_button:
 
call button_music
 
mov [small_draw],dword draw_small_left
 
mov ebx, 0
mov edx, 9
mov ecx, -1
mov esi, -1
mcall 67
 
call draw_small_left
 
;-------------------------------------------------
 
small_wait:
 
mov eax, 10
int 0x40
 
cmp eax,1
jne no_win
call [small_draw]
jmp small_wait
no_win:
cmp eax,2
jne no_key
call handle_key
jmp small_wait
no_key:
 
mov eax,17
int 0x40
 
cmp ah,1
jne no_full
 
mov eax, 14 ; get screen max x & max y
int 0x40
mov edx, eax
shr edx, 16
xor ebx, ebx
mov ecx, -1
mov esi, -1
mcall 67 ; x0 y0 xs ys
 
call button_music
 
jmp still
 
 
no_full:
 
call menu_handler
 
jmp small_wait
 
 
 
set_variables:
 
pusha
 
mov [b_size_y],dword 38
cmp [graph_text],1
jne noy2
mov [b_size_y],dword 18
noy2:
 
mov [button_frames],0x0
cmp [buttons],0
jne no_frames
mov [button_frames],0x40000000
no_frames:
 
 
mov eax,48 ; 3d button look
mov ebx,1
mov ecx,1
int 0x40
 
mov eax,0x40404040 ; dividers for processes
mov edi,pros
mov ecx,10
cld
rep stosd
 
popa
ret
 
 
 
; eax = number (1 or 2)
; ebx = language id
draw_flag:
pusha
 
; cmp [graph_text],0
; je mini_flag
 
; eax = 2 BIG
; eax = 1 small
 
mov edx,ebx
 
mov ebx,[maxx]
and eax,1
imul eax,17 ;17
sub ebx,eax
sub ebx,76 ;79 ;28
 
pushad
; dec ebx
sub ebx,2
shl ebx, 16
add ebx, 15 ;25
mov ecx, 4*65536+13
mov edx,0
mov eax,13
int 0x40
add ebx,1 shl 16
sub ebx,2
mov ecx, 5 shl 16+11
cmp [type_lang],1
je label_1
mov edx,0xff ;[wcolor]
jmp label_2
label_1:
mov edx,0x7700
label_2:
mov eax, 13
int 0x40
popad
 
shl ebx,16
add ebx,7 ;24
 
mov ecx,[bte] ; color
 
dec edx
shl edx,1
add edx,flag_text
mov esi,2
mov eax,4
int 0x40
 
mov ebx,[maxx]
sub ebx,48
shl ebx,16
mov bx,34
mov ecx,3 shl 16+14
xor edx,edx
mov eax,13
int 0x40
add ebx,1 shl 16
sub ebx,2
mov ecx,4 shl 16+12
mov edx,0x66cc
int 0x40
 
popa
ret
 
;mini_flag:
; popa
; ret
 
 
 
 
; ***************************************************
; ********* WINDOW DEFINITIONS AND DRAW *************
; ***************************************************
 
 
draw_window:
 
pusha
 
mov [running_applications],-1
mov [checks],-1
 
mov eax, 12 ; tell os about redraw
mov ebx, 1
int 0x40
 
mov eax, 48
mov ebx, 3
mov ecx, system_colours
mov edx, 10*4
int 0x40
 
mov eax, [system_colours+4*6]
mov [wcolor], eax
 
mov eax,14 ; get screen max x & max y
int 0x40
 
cmp [width],0
je no_def_width
and eax,0xffff
mov ebx,[width]
shl ebx,16
add eax,ebx
no_def_width:
 
mov ebx,eax
mov [screenxy],ebx
shr ebx,16
sub ax,38
shl eax,16
mov ecx,eax
add ecx,0*65536+38
cmp [graph_text],1
jne no_text_1
mov cx,PANEL_HEIGHT
add ecx,20*65536
no_text_1:
mov eax, 0 ; DEFINE AND DRAW WINDOW
mov edx, [wcolor]
or edx, 0x01000000 ; do not draw the window
mov esi, [wcolor]
or esi, 0x01000000 ; unmovable window
mov edi, [wcolor]
int 0x40
 
movzx ebx,word [screenxy+2]
mov ecx,0*65536+0
mov edx,[wcolor]
add edx,0x161616
newline:
sub edx,0x040404
mov eax,38
cmp [soften_up],1
jne no_su
and edx,0x00FFFFFF
int 0x40
no_su:
 
pusha
cmp [soften_down],1
jne no_sd
sub edx,0x141414
mov edi,[b_size_y]
shl edi,16
add edi,[b_size_y]
add ecx,edi
sub ecx,3*65536+3
and edx,0x00FFFFFF
int 0x40
no_sd:
popa
 
add ecx,1*65536+1
cmp cx,5
jb newline
 
cmp [soften_middle],1
jne no_sm
 
movzx ebx,word [screenxy+2]
mov ecx,5*65536+5
mov esi,stripe
mov edx,[wcolor]
newline3:
add edx,[esi]
add esi,4
 
mov eax,38
and edx,0x00FFFFFF
int 0x40
add ecx,1*65536+1
cmp cx,15
jb newline3
 
no_sm:
 
cmp [minimize_left],1
jne no_mleft
mov eax,8 ; ABS LEFT
mov ebx,0 *65536+9
mov ecx,1 *65536
add ecx,[b_size_y]
dec ecx
mov edx,101
add edx,[button_frames]
mov esi,[wcolor]
int 0x40
mov eax,4 ; HIDE TEXT
mov ebx,2*65536+17
cmp [graph_text],1
jne no_y1
mov bx,7
no_y1:
mov ecx,[wcolor]
add ecx,0x303030
mov edx,hidetext
mov esi,1
int 0x40
no_mleft:
 
movzx eax,word [screenxy+2]
mov [maxx],eax
 
cmp [minimize_right],1
jne no_mright
mov eax,[maxx]
sub eax,77
shl eax,16
mov ebx,eax
add ebx,67
mov eax,8 ; ABS RIGHT
mov ecx,1 *65536
add ecx,[b_size_y]
dec ecx
add ebx,68*65536
mov bx,9
mov edx,102
add edx,[button_frames]
mov esi,[wcolor]
int 0x40
mov edx,hidetext+1
mov eax,4
mov ebx,[maxx]
sub ebx,6
shl ebx,16
mov bx,17
cmp [graph_text],1
jne no_y2
mov bx,7
no_y2:
mov ecx,[wcolor]
add ecx,0x303030
mov esi,1
int 0x40
no_mright:
 
call draw_menuet_icon
 
call draw_program_icons
 
mov [ptime],0
call draw_info
 
call draw_application_buttons
 
; mov ecx,[button_presssed_alt]
; mcall 47,0x80100,ecx ,400 shl 16+5,0
 
mov eax,12
mov ebx,2
int 0x40
 
popa
ret
 
 
 
draw_menuet_icon:
 
pusha
 
cmp [menu_enable],1
jne no_menu
 
 
mov eax, 8 ; M BUTTON
mov ebx, 10*65536 + 47
cmp [minimize_left], 0
jne @f
sub ebx, 10*65536
@@:
mov ecx, 1*65536
add ecx, [b_size_y]
dec ecx
mov edx, 0x20000001
add edx, [button_frames]
mov esi, [wcolor]
int 0x40
 
cmp [graph_text], 1
jne no_mtext
 
push ebx
mov eax,13
mov ebx,12 shl 16+44 ;51
mov ecx,1 shl 16+17
xor edx,edx
int 0x40
; mov ebx,63 shl 16+1
mov ebx,56 shl 16+1
mov ecx,2 shl 16+15
int 0x40
mov ebx,57 shl 16+1
mov ecx,4 shl 16+11
int 0x40
mov ebx,58 shl 16+1
mov ecx,6 shl 16+7
int 0x40
; mov ebx,66 shl 16+1
; mov ecx,9 shl 16+1
; int 0x40
mov ebx,13 shl 16+43 ;50
mov ecx,2 shl 16+15
mov edx,0x7700
int 0x40
; mov ebx,62 shl 16+1
; mov ecx,3 shl 16+14
; int 0x40
mov ebx,56 shl 16+1
mov ecx,4 shl 16+11
int 0x40
mov ebx,57 shl 16+1
mov ecx,6 shl 16+7
int 0x40
pop ebx
 
mov eax, 4
mov bx, 7
add ebx, 8*65536
mov ecx, 0x10ffffff
mov edx, m_text
mov esi, 4
int 0x40
 
popa
ret
 
no_mtext:
 
 
 
mov eax,[wcolor]
mov [m_icon+4],eax
 
; load & display menuet.bmp
mov eax, 70
mov ebx, m_bmp_fileinfo
int 0x40
 
mov eax,40
mov ebx,0
mov edi,image+53
 
new_m_pix:
 
; movzx ecx,byte [edi]
; shr ecx,5
 
cmp byte [edi], 10
jb nopix
cmp byte [edi+1], 10
jb nopix
cmp byte [edi+2], 10
jb nopix
 
pusha
cmp [minimize_left],0
jne no_m_s2
sub ebx,10
no_m_s2:
; mov edx,[ecx*4+m_icon]
mov edx,[edi+1]
 
mov ecx,eax
mov eax,1
add ebx,12
int 0x40
popa
 
nopix:
 
add edi,3
add ebx,1
cmp ebx,40
jnz new_m_pix
 
mov ebx,0
dec eax
jnz new_m_pix
 
no_menu:
 
popa
ret
 
 
draw_program_icons:
 
pusha
 
cmp [icons],0
jne dp_ret
 
mov edi,1
push edi
 
new_icon_file:
 
pusha
mov edx,[esp+32]
add edx,10
push edx
mov esi,[wcolor]
mov ecx,1*65536
add ecx,[b_size_y]
dec ecx
mov eax,edi
dec eax
imul eax,40
mov ebx,eax
add ebx,[icons_position]
shl ebx,16
mov bx,39
pop edx
add edx,[button_frames]
or edx, 0x20000000
mov eax,8
int 0x40
popa
 
mov ecx,[esp]
add ecx,48
mov [iconf+6],cl
 
mov eax, 70
mov ebx, iconf_fileinfo
int 0x40
 
mov eax,0
mov ebx,32
mov edi,image+51+32*33*3
 
np2: ; new pixel of file
 
mov edx,[edi]
and edx,0xffffff
 
cmp eax,3 ; Y draw limits
jb nopix2
cmp eax,36
jg nopix2
cmp ebx,38 ; X draw limits
jg nopix2
cmp ebx,2
jb nopix2
 
cmp edx,0
jz nopix2
 
cmp [graph_text],1
jne no_icon_text
 
pusha
 
mov ebx,[esp+32]
dec ebx
imul ebx,40
add ebx,8
add ebx,[icons_position]
shl ebx,16
mov bx,7
 
mov eax,4
mov ecx,0xffffff
mov edx,[esp+32]
dec edx
imul edx,4
add edx,mi_text
mov esi,4
int 0x40
 
popa
 
jmp nopix2
 
no_icon_text:
 
mov esi,[esp]
pusha
push edx
mov ecx,eax
add ecx,2
mov eax,esi
dec eax
imul eax,40
add ebx,eax
add ebx,3
add ebx,[icons_position]
pop edx
mov eax,1
int 0x40
popa
 
nopix2:
 
sub edi,3
dec ebx
jnz np2
 
mov ebx,32
add eax,1
cmp eax,32
jnz np2
 
add dword [esp],1
mov edi,[esp]
cmp dword [esp],4
jbe new_icon_file
add esp,4
 
mov eax,4
mov ebx,40
imul ebx,3
add ebx,[icons_position]
add ebx,10
shl ebx,16
mov bx,23
mov ecx,[wcolor]
mov edx,gpl
mov esi,3
int 0x40
 
dp_ret:
 
popa
ret
 
 
 
draw_info: ; draw cpu usage, time, date
 
pusha
 
cmp [setup_enable],1
jne no_setup
 
cmp [minimize_right],0
jne no_m_r
add [maxx],10
 
no_m_r:
 
mov eax,3
int 0x40
cmp eax,[ptime]
jz _ret
mov [ptime],eax
 
call draw_cpu_usage
 
mov eax,[maxx] ; blink sec
sub eax,33
shl eax,16
mov ebx,eax
add ebx,9
mov eax,3
int 0x40
cmp [graph_text],1
jne no_y4
sub bx,2
no_y4:
mov ecx,eax
shr ecx,16
and ecx,1
mov edx,[bte]
sub edx,[wcolor]
imul ecx,edx
add ecx,[wcolor]
mov edx,sec
mov eax,4
mov esi,1
int 0x40
 
 
mov eax,26 ; check for change in time or country
mov ebx,5
int 0x40
mov edx,eax
mov eax,26
mov ebx,2
mov ecx,9
int 0x40
add edx,eax
mov eax,3
int 0x40
and eax,0xffff
add edx,eax
cmp edx,[checks]
je _ret
mov [checks],edx
 
mov ebx,[maxx]
sub ebx,48 ;;94 ;;74
shl ebx,16
add ebx,33 ;;84 ;;64
 
mov eax,8 ; time/date button
mov ecx,3 *65536
add ecx,[b_size_y]
; dec ecx
sub cx,5
mov edx,2+0x20000000
mov esi,[wcolor]
int 0x40
pusha
mov eax,13
add ebx,10*65536-16
add ecx,5*65536-8
mov edx,[wcolor]
int 0x40
popa
and edx,0xffff
add edx,[button_frames]
int 0x40
 
mov eax,8
mov ebx,[maxx]
sub ebx,77 ;80
shl ebx,16
add ebx,12
mov ecx,5 shl 16+10
mov edx,16+0x20000000 ;button 16
mov esi,[wcolor]
int 0x40
sub ebx,17 shl 16
inc edx ;button 17
int 0x40
add ebx,33 shl 16
mov bx,8
inc edx ;button 18
int 0x40
sub ebx,47 shl 16
mov bx,10
inc edx ;button 19
int 0x40
sub ebx,14 shl 16
inc edx ;button 20
int 0x40
sub ebx,12 shl 16
mov bx,8
mov ecx,6 shl 16+10
inc edx ;button 21
int 0x40
sub ebx,18 shl 16
inc edx ;button 22
int 0x40
 
; flags
 
mov eax,26
mov ebx,5
int 0x40
mov ebx,eax
 
mov eax,1
mov [type_lang],al
call draw_flag
 
mov eax,26
mov ebx,2
mov ecx,9
int 0x40
mov ebx,eax
 
mov eax,2
mov [type_lang],al
call draw_flag
 
mcall 18,8,1
mov [sound_flag],al
 
mov ebx,[maxx]
sub ebx,109 ;112 ;28
shl ebx,16
mov bx,12
mov ecx, 4*65536+13
mov edx,0
mov eax,13
int 0x40
add ebx,1 shl 16
sub bx,2
mov ecx,5 shl 16+11
mov edx,0xcc
int 0x40
add ebx,1 shl 16
mov bx,5
mov ecx,8 shl 16+5
mov edx,0xdddd00
int 0x40
add ebx,5 shl 16
mov bx,1
mov ecx,7 shl 16+7
int 0x40
add ebx,1 shl 16
mov ecx,6 shl 16+9
int 0x40
add ebx,1 shl 16
mov ecx,5 shl 16+11
int 0x40
 
; cmp [music_type],0
; jne dalshe
cmp [sound_flag],0
je dalshe
 
sub ebx,8 shl 16
ror ebx,16
mov cx,bx
rol ebx,16
mov bx,cx
add bx,8
mov ecx,5 shl 16+15
mov edx,0xff0000
mov eax,38
int 0x40
add ebx,1 shl 16
inc bx
int 0x40
rol ecx,16
int 0x40
sub ebx,1 shl 16
dec bx
int 0x40
 
dalshe:
 
mov ebx,[maxx]
sub ebx,123
shl ebx,16
mov bx,12
mov ecx, 4*65536+13
mov edx,0
mov eax,13
int 0x40
add ebx,1 shl 16
sub bx,2
mov ecx,5 shl 16+11
mov edx,0xffcc00
int 0x40
mov eax,4
mov ebx,[maxx]
sub ebx,121
shl ebx,16
mov bx,7
mov ecx,0x10000000
mov edx,file_sys
mov esi,1
int 0x40
add ebx,1 shl 16
int 0x40
 
mov edx,0
mov eax,13
mov ebx,[maxx]
sub ebx,134
shl ebx,16
mov bx,9
mov ecx,6 shl 16+11
int 0x40
sub ebx,18 shl 16
int 0x40
add ebx,19 shl 16
sub bx,2
mov ecx,7 shl 16+9
mov edx,0xffffff
int 0x40
sub ebx,18 shl 16
int 0x40
 
mov eax,4
mov edx,page_a1
mov ebx,[maxx]
sub ebx,150
shl ebx,16
mov bx,8
mov esi,4
int 0x40
add ebx,1 shl 16
int 0x40
 
mov eax,47
mov ebx,0x10100
mov ecx,[page_list]
mov edx,[maxx]
sub edx,141
shl edx,16
mov dx,7
mov esi,0xffffff
int 0x40
 
; sub ebx,14 shl 16
; mov bx,7
; mov edx,turn_text
; mov esi,1
 
; mov ecx,0x60a060 ;[wcolor]
; add ecx,0x303030
; mov eax,4
; int 0x40
; add ebx,1 shl 16
; int 0x40
; add ebx,1 shl 16
; int 0x40
; add ebx,1 shl 16
; int 0x40
 
; add ebx,1 shl 16
; mov ecx,0x60a060 ;[wcolor]
; int 0x40
; add ebx,1 shl 16
; int 0x40
; add ebx,1 shl 16
; sub ecx,0x303030
; int 0x40
 
; sub ebx,6 shl 16
; mov bx,1
; mov ecx,2 shl 16+15
; mov edx,0x60a060 ;[wcolor]
; add edx,0x303030
; mov eax,13
; int 0x40
; add ebx,1 shl 16
; mov bx,1
; mov edx,0x60a060 ;[wcolor]
; int 0x40
; add ebx,1 shl 16
; mov bx,1
; sub edx,0x303030
; int 0x40
; add ebx,1 shl 16
; mov edx,[wcolor]
; int 0x40
 
mov eax,3 ; get time
int 0x40
 
movzx ebx,al
shr eax,8
movzx ecx,al
shr eax,8
movzx edx,al
 
; ebx ecx edx h m s
 
push ebx
push ecx
 
mov eax,[maxx]
sub eax,32
shl eax,16
mov ebx,eax
add ebx,9
 
mov ecx,[bte]
 
cmp [graph_text],1
jne no_y3
sub bx,2
mov ecx,0xffffff
no_y3:
 
 
mov edx,[esp] ; __:_X
and edx,15
mov eax,4
add ebx,10*65536
add edx,text
mov esi,1
int 0x40
 
pop edx ; __:X_
shr edx,4
and edx,15
mov eax,4
sub ebx,6*65536
add edx,text
mov esi,1
int 0x40
 
mov edx,[esp] ; _X:__
and edx,15
mov eax,4
sub ebx,11*65536
add edx,text
mov esi,1
int 0x40
 
pop edx ; X_:__
shr edx,4
and edx,15
mov eax,4
sub ebx,6*65536
add edx,text
mov esi,1
int 0x40
 
call draw_cpu_usage
 
_ret:
 
cmp [minimize_right],0
jne no_m_r2
sub [maxx],10
no_m_r2:
 
no_setup:
 
popa
ret
 
 
 
draw_cpu_usage:
 
pusha
 
mov [ysi],30
cmp [graph_text],1
jne @f
mov [ysi],10
@@:
 
 
mov eax,18 ; TSC / SEC
mov ebx,5
int 0x40
shr eax,20
push eax
mov eax,18 ; IDLE / SEC
mov ebx,4
int 0x40
shr eax,20
xor edx,edx
imul eax,[ysi]
 
cdq
pop ebx
inc ebx
div ebx
push eax
 
mov eax,13
mov ebx,[maxx]
sub ebx,60 ;;65
shl ebx,16
mov bx,8
push ebx
mov eax,13
mov ecx,5*65536
add cx,word [ysi]
inc cx
 
push ebx
inc ecx
sub ebx,1 shl 16
add ebx,2
xor edx,edx
int 0x40
dec ecx
pop ebx
 
mov edx,0xff0000 ;[wcolor]
; sub edx,0x303030
int 0x40
pop ebx
pop eax
 
; push ebx
inc eax
mov ecx,5*65536
mov cx,ax
; pop ebx
push ecx
push ebx
sub ecx,1 shl 16
add ecx,1
sub ebx,1 shl 16
add ebx,2
mov eax,13
xor edx,edx
int 0x40
pop ebx
pop ecx
mov edx,0x44aa44 ;[wcolor]
; add edx,0x00101010
int 0x40
 
popa
 
ret
 
; DATA
 
stripe:
dd -0x010101
dd -0x010101
dd -0x020202
dd -0x010101
dd -0x000000
 
dd 0x000000
dd 0x010101
dd 0x020202
dd 0x010101
dd 0x010101
 
m_icon:
dd 0x0
dd 0x808080
dd 0x000000
dd 0x000000
dd 0xffffff
 
 
lsz m_text,\
ru, "Œ…ž",\
en, "MENU"
 
mi_text db 'WAVETETRBGRDGPL '
 
flag_text db 'EnFiGeRuFr'
 
type_lang db 0
;music_type db 1
sound_flag db 0
button_frames dd 0x0
 
checks dd -1
hidetext db 0x11,0x10,0x1e
 
turn_text db '><'
gpl db 'GPL'
 
chlang db 'LANG',0
syslang db 'SLAN',0
 
contrast db 0
 
running_applications dd 0x100
max_applications dd 11
 
page_list dd 0
draw_start_position dd 0
draw_window_1 db 0
 
b_size_y: dd 0x0
ysi dd 0
small_draw dd 0x0
 
ptime dd 0x0
maxx dd 0x0
text db '0123456789'
page_a1 db '< >'
bte dd 0xccddee
 
wcolor dd 0x506070
 
sec db ': '
pros db ' '
db ' '
 
screenxy dd 0x0
stcount dd 0x0
 
setup_exec:
dd 7
dd 0
.cmdline dd ?
dd 0
dd 0
db '/RD/1/'
file_sys db 'SETUP',0
 
exec_fileinfo:
dd 7
dd 0
dd 0
dd 0
dd 0
db 0
.name dd ?
 
end_name db '/RD/1/END',0
menu_name db '/RD/1/MENU',0
calendar_name db '/RD/1/CALENDAR',0
sysmeter_name db '/RD/1/SYSMETER',0
 
dat_fileinfo:
dd 0
dd 0
dd 0
dd 1024
dd I_END
db '/RD/1/PANEL.DAT',0
 
m_bmp_fileinfo:
dd 0
dd 0
dd 0
dd 8192
dd image
db '/RD/1/MENUET.BMP',0
 
iconf_fileinfo:
dd 0
dd 0
dd 0
dd 8192
dd image
db '/RD/1/'
iconf db 'MBAR_IX.BMP',0
 
I_END:
 
screen_size:
.height dw ?
.width dw ?
 
area9 rb 100
system_colours rd 10
app_list rd 50
tictable:
rd 256
image:
/programs/system/panel/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm @panel.asm @panel
@pause
/programs/system/panel/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm @panel.asm @panel
@pause
/programs/system/panel/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/pcidev/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm pcidev.asm pcidev
@pause
/programs/system/pcidev/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm pcidev.asm pcidev
@pause
/programs/system/pcidev/trunk/pcidev.asm
0,0 → 1,1041
;***************************************************************
; project name: PCI Device Enumeration
; target platform: MenuetOS, x86 (IA-32), x86-64 achitectures
; compiler: flat assmebler 1.60
; version: 1.25
; last update: 2th October 2005
; maintained by: Sergey Kuzmin aka Wildwest
; e-mail: kuzmin_serg@list.ru
; project site: http://coolthemes.narod.ru/pcidev.html
;***************************************************************
;Summary: This program will attempt to scan the PCI Bus
; and display basic information about each device
; connected to the PCI Bus.
;***************************************************************
;HISTORY:
;keep dates in european format (dd/mm/yyyy), please
; '!' means big changes
; to-do:
;PCI version should be normalized (0210->02.10)
;----------------------------------------------------------------
;1.25: PCIDEV 02/10/2005
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: !Description is based on Class and SubClass now (PCI 3.0)
; deleted label Descriptions (names of Classes)
; names of Classes and SubClasses are in the end of Vendors.inc
;----------------------------------------------------------------
;1.20: PCIDEV 16/08/2005
;Author: Victor Alberto Gil Hanla a.k.a. vhanla <vhanla@gmail.com>
;Features: !added many vendor lists (865)
; previous version's list deleted
; previous Company Name searching and printing changed
;NOTE:
; It was only tested in my old PII Computer,
; there might be some bugs... PLZ test it and send comments
;----------------------------------------------------------------
;1.15: PCIDEV 03/06/2005
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: added quantity of devices,
; ! detection of Company Name based on Vendor ID,
; database of VenID (35 ID's),
; macros.inc for smaller size,
; interface+(skinned window),
; VenID before DevID in 'table'(was DevID before VenID)
;----------------------------------------------------------------
;1.0: PCIDEV 30/01/2005
;Author: Jason Delozier
;Features: able to detect PCI version, quantity of PCI buses,
; Vendor&Device ID for appropriate Device on Bus;
; detect Revision, Class and Subclass of Device,
; and make Description based on Class
;-------------------------------------------------------------
use32
 
org 0x0
 
db 'MENUET01'; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0xE000 ; memory for app E000
dd 0xE000 ; esp E000
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'macros.inc'
include 'VENDORS.INC'
 
START: ; start of execution
call draw_window
 
still:
mov eax,10 ; wait here for event
int 0x40
 
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
 
jmp still
 
red: ; redraw
call draw_window
jmp still
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
jmp still
button: ; button
mov eax,17 ; get id
int 0x40
 
cmp ah,1 ; button id=1 ?
jne noclose
 
mov eax,-1 ; close this program
int 0x40
noclose:
jmp still
 
 
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,20*65536+750 ; [x start] *65536 + [x size]
mov ecx,20*65536+550 ; [y start] *65536 + [y size]
mov edx,0x03ffffff ; color of work area RRGGBB,8->color gl
mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl
mov edi,0x005080d0 ; color of frames RRGGBB
int 0x40
 
; WINDOW LABEL
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,labellen-labelt ; text length
int 0x40
 
mov [total],0
 
mov ebx, 20*65536+25 ;Draw work format
mov ecx, 0x224466
mov edx, PCIWin
mov esi, 106 ; lenght of line
newline:
mov eax, 4
int 0x40
add ebx, 10
add edx, 106 ; lenght of line
cmp [edx], byte 'x'
jne newline
 
 
call Get_PCI_Info
 
mov cx, [PCI_Version]
mov eax, 47
mov ebx, 0x00040100
mov esi, 0x00000000
mov edx, 110*65536+45
int 0x40
 
mov cl, [PCI_LastBus]
mov eax, 47
mov ebx, 0x00020100
mov esi, 0x00000000
mov edx, 110*65536+55
int 0x40
 
call scan_Pci
 
xor ecx, ecx
mov cl, [total]
mov eax, 47
mov ebx, 0x00020000
mov esi, 0x00000000
mov edx, 150*65536+65
int 0x40
 
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
 
ret
; ***********************************************
; ******* END WINDOW DEFINITIONS & DRAW *******
; ***********************************************
 
Get_PCI_Info:
mov eax, 62
mov ebx, 0
int 0x40
mov [PCI_Version], ax
;mov [PCI_Version_h], ah
;mov [PCI_Version_l], al
 
mov eax, 62
mov ebx, 1
int 0x40
mov [PCI_LastBus], al
ret
 
 
 
scan_Pci:
cmp [PCI_LastBus],0xff
jne Pci_Exists
ret
Pci_Exists:
mov [V_Bus], 0 ;reset varibles
mov [V_Dev], 0 ;
mov edx, 20*65536+110 ;start write position
 
Start_Enum:
mov bl, 6 ;get Device ID / Vendor ID
mov bh, [V_Bus]
mov ch, [V_Dev]
mov cl, 0
mov eax, 62
int 0x40
 
cmp ax, 0 ;check next slot if nothing exists
je nextDev
cmp ax, 0xffff
je nextDev
 
mov [PCI_Vendor], ax
shr eax, 16
mov [PCI_Device], ax
 
mov eax, 62 ;PCI Sys Function
mov bl, 4 ;Read config byte
mov bh, [V_Bus] ;Bus #
mov ch, [V_Dev] ;Device # on bus
mov cl, 0x08 ;Register to read (Get Revision)
int 0x40 ;Read it
mov [PCI_Rev], al ;Save it
 
mov eax, 62 ;PCI Sys Function
mov cl, 0x0b ;Register to read (Get class)
int 0x40 ;Read it
mov [PCI_Class], al ;Save it
 
mov eax, 62 ;PCI Sys Function
mov cl, 0x0a ;Register to read (Get Subclass)
int 0x40 ;Read it
mov [PCI_SubClass], al ;Save it
 
call Print_New_Device
 
nextDev:
inc [V_Dev]
jno Start_Enum ;jump if no overflow (<256)
 
mov [V_Dev], 0
inc [V_Bus]
mov al, [PCI_LastBus]
 
cmp byte [V_Bus], al
jbe Start_Enum
ret
 
Print_New_Device:
inc [total]
 
mov eax, 47 ;Write number to screen
mov ebx,0x00040100 ;4 byte number, print in hexidecimal
mov esi, 0x00000000 ;Color of text
xor ecx,ecx
mov cx,[PCI_Vendor] ;Pointer to number to be written
int 0x40 ;Write it
 
push dx ;Calculate position
mov dx, 62 ;
shl edx, 16 ;
pop dx ;
mov cx, [PCI_Device] ;Write Vendor ID
int 0x40 ;
 
mov ebx, 0x00020100 ;2 byte number, in hexidecimal format
push dx ;move write cursor
mov dx, 110 ;
shl edx, 16 ;
pop dx ;
mov cl, [V_Bus] ;write bus number
int 0x40 ;
 
push dx ;move write cursor
mov dx, 146 ;
shl edx, 16 ;
pop dx ;
mov cl, [V_Dev] ;Write device number
int 0x40 ;
 
push dx ;move write cursor
mov dx, 179 ;
shl edx, 16 ;
pop dx ;
mov cl, [PCI_Rev] ;Draw Revision to screen
int 0x40 ;
 
push dx ;move write cursor
mov dx, 215 ;
shl edx, 16 ;
pop dx ;
mov cl, [PCI_Class] ;Draw Class to screen
int 0x40 ;
 
push dx ;move write curson
mov dx, 266 ;
shl edx, 16 ;
pop dx ;
mov cl, [PCI_SubClass] ;Draw Sub Class to screen
int 0x40 ;
 
 
;Write Names
push dx ;remember our current write line
mov esi, 17 ;length of text
mov bx, 310 ;X-position of text on screen
shl ebx, 16 ;
mov bx, dx ;Current Y position
mov ecx, 0 ;color of text
 
mov [cur], dx
 
mov [r],0
;**********************************************************
; modified part by vhanla (I know it is not a fastest way to search)
; it needs optimization... HELP this project!
;-------------------------------------------------------------------------------
cmp [PCI_Vendor],4807 ; Check if Vendor's value is less than this number
jae next1 ; if it is less, let's continue, or jump to next1
mov [listcount],255 ; number of available lists into this range
mov [r],1 ; counter
mov [valor],50 ; List's number of characters = 50
rep1:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[_FIRSTPART+bx]
mov [address],_FIRSTPART
add [address],ebx
sub [address],50
pop ebx
cmp [PCI_Vendor],ax
jz ex
add [valor],52 ; Number of characters plus value (WORD) 50+2 bytes
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next1
inc [r]
jmp rep1
;-------------------------------------------------------------------------------
next1:
cmp [PCI_Vendor],5320
jae next2
mov [listcount],255 ; number of available lists into this range
mov [r],1
mov [valor],50
rep2:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[_SECONDPART+bx]
mov [address],_SECONDPART
add [address],ebx
sub [address],50
pop ebx
cmp [PCI_Vendor],ax
jz ex
add [valor],52
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next2
inc [r]
jmp rep2
;-------------------------------------------------------------------------------
next2:
cmp [PCI_Vendor],5580
jae next3
mov [listcount],255 ; number of available lists into this range
mov [r],1
mov [valor],50
rep3:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[_THIRDPART+bx]
mov [address],_THIRDPART
add [address],ebx
sub [address],50
pop ebx
cmp [PCI_Vendor],ax
jz ex
add [valor],52
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next3
inc [r]
jmp rep3
;-------------------------------------------------------------------------------
next3:
cmp [PCI_Vendor],65535 ;the last in a WORD
jae next4
mov [listcount],100 ; number of available lists into this range
mov [r],1
mov [valor],50
rep4:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[_FOURTHPART+bx]
mov [address],_FOURTHPART
add [address],ebx
sub [address],50
pop ebx
cmp [PCI_Vendor],ax
jz ex
add [valor],52
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next4
inc [r]
jmp rep4
;-------------------------------------------------------------------------------
next4:
 
;-------------------------------------------------------------------------------
; tHIS PART FOR OTHER ... LISTS
mov [listcount],7 ; number of available lists into this range
mov [r],1
mov [valor],50
repO:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[PREVIOUSVERSIONLIST+bx]
mov [address],PREVIOUSVERSIONLIST
add [address],ebx
sub [address],50
pop ebx
cmp [PCI_Vendor],ax
jz ex
add [valor],52
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next5
inc [r]
jmp repO
;-------------------------------------------------------------------------------
next5:
mov [address],_UNKNOWN
;-------------------------------------------------------------------------------
ex:
; lets print the vendor Name
 
mov eax,4
mov edx,[address]
mov esi,50
int 0x40
;-------------------------------------------------------------------------------
; END OF SEARCHING AND PRINTING
;------------------------------------------------------------------
 
; mov esi, 26 ;length of text
; mov bx, 560 ;X-position of text on screen
; shl ebx, 16 ;
; mov bx, [cur] ;Current Y position
; mov ecx, 0 ;color of text
 
 
; xor eax, eax ;calculate pointer to string
; mov al, [PCI_Class] ;Determine Description based on class
; mov dl, 26 ;Each description is 26 characters long
; mul dl ;get offset to correct description
; mov edx, Descriptions ;starting point of description text
; add edx, eax ;calculated corresponding description
; mov eax, 4 ;draw text sys function
; int 0x40
cmp [PCI_Class], 00h
je sub0
cmp [PCI_Class], 01h
je sub1
cmp [PCI_Class], 02h
je sub2
cmp [PCI_Class], 03h
je sub3
cmp [PCI_Class], 04h
je sub4
cmp [PCI_Class], 05h
je sub5
cmp [PCI_Class], 06h
je sub6
cmp [PCI_Class], 07h
je sub7
cmp [PCI_Class], 08h
je sub8
cmp [PCI_Class], 09h
je sub9
cmp [PCI_Class], 0Ah
je sub10
cmp [PCI_Class], 0Bh
je sub11
cmp [PCI_Class], 0Ch
je sub12
cmp [PCI_Class], 0Dh
je sub13
cmp [PCI_Class], 0Eh
je sub14
cmp [PCI_Class], 0Fh
je sub15
cmp [PCI_Class], 10h
je sub16
cmp [PCI_Class], 11h
je sub17
jmp endd
sub0:
mov [listcount],2 ; number of available lists into this range
mov [r],1
mov [valor],32
repu0:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class0+bx]
mov [address],Class0
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu0
jmp endd
 
sub1:
mov [listcount],8 ; number of available lists into this range
mov [r],1
mov [valor],32
repu1:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class1+bx]
mov [address],Class1
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu1
jmp endd
 
 
sub2:
mov [listcount],8 ; number of available lists into this range
mov [r],1
mov [valor],32
repu2:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class2+bx]
mov [address],Class2
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu2
jmp endd
 
sub3:
mov [listcount],4 ; number of available lists into this range
mov [r],1
mov [valor],32
repu3:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class3+bx]
mov [address],Class3
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu3
jmp endd
 
 
sub4:
mov [listcount],4 ; number of available lists into this range
mov [r],1
mov [valor],32
repu4:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class4+bx]
mov [address],Class4
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu4
jmp endd
 
sub5:
mov [listcount],3 ; number of available lists into this range
mov [r],1
mov [valor],32
repu5:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class5+bx]
mov [address],Class5
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu5
jmp endd
 
sub6:
mov [listcount],12 ; number of available lists into this range
mov [r],1
mov [valor],32
repu6:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class6+bx]
mov [address],Class6
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu6
jmp endd
 
sub7:
mov [listcount],7 ; number of available lists into this range
mov [r],1
mov [valor],32
repu7:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class7+bx]
mov [address],Class7
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu7
jmp endd
 
sub8:
mov [listcount],8 ; number of available lists into this range
mov [r],1
mov [valor],32
repu8:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class8+bx]
mov [address],Class8
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu8
jmp endd
 
sub9:
mov [listcount],6 ; number of available lists into this range
mov [r],1
mov [valor],32
repu9:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class9+bx]
mov [address],Class9
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu9
jmp endd
 
sub10:
mov [listcount],2 ; number of available lists into this range
mov [r],1
mov [valor],32
repu10:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[ClassA+bx]
mov [address],ClassA
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu10
jmp endd
 
sub11:
mov [listcount],7 ; number of available lists into this range
mov [r],1
mov [valor],32
repu11:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[ClassB+bx]
mov [address],ClassB
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu11
jmp endd
 
sub12:
mov [listcount],10 ; number of available lists into this range
mov [r],1
mov [valor],32
repu12:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[ClassC+bx]
mov [address],ClassC
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu12
jmp endd
 
sub13:
mov [listcount],8 ; number of available lists into this range
mov [r],1
mov [valor],32
repu13:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[ClassD+bx]
mov [address],ClassD
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu13
jmp endd
 
sub14:
mov [listcount],1 ; number of available lists into this range
mov [r],1
mov [valor],32
repu14:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[ClassE+bx]
mov [address],ClassE
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu14
jmp endd
 
sub15:
mov [listcount],4 ; number of available lists into this range
mov [r],1
mov [valor],32
repu15:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[ClassF+bx]
mov [address],ClassF
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu15
jmp endd
 
sub16:
mov [listcount],3 ; number of available lists into this range
mov [r],1
mov [valor],32
repu16:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class10+bx]
mov [address],Class10
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu16
jmp endd
 
sub17:
mov [listcount],5 ; number of available lists into this range
mov [r],1
mov [valor],32
repu17:
push ebx
xor ebx,ebx
mov bx,[valor]
mov ax,word[Class11+bx]
mov [address],Class11
add [address],ebx
sub [address],32
pop ebx
cmp word [PCI_SubClass],ax
jz endd
add [valor],34
push eax
mov ah,[r]
cmp [listcount],ah
pop eax
jz next50
inc [r]
jmp repu17
jmp endd
 
next50:
mov [address],_UNKNOWND
endd:
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
mov bx, 560 ;X-position of text on screen
shl ebx, 16 ;
mov bx, [cur] ;Current Y position
mov ecx, 0 ;color of text
 
mov eax,4
mov edx,[address]
mov esi,32
int 0x40
mov dx, 20 ;Starting Y coordinate
shl edx, 16 ;
pop dx ;
add edx, 10 ;Next line down
 
ret
 
 
 
; DATA AREA
 
labelt:
db 'PCI Device Enumeration v 1.25 by J. Delozier, S. Kuzmin and V. Hanla'
labellen:
 
PCIWin:
db 'Please remember to enable PCI Access to Applications in Setup Menu. '
db ' '
db 'PCI Version = '
db 'Last PCI Bus = '
db 'Quantity of devices = '
db ' '
db 'VenID DevID Bus# Dev# Rev Class Subclass Company Description '
db '----- ----- ---- ---- --- ----- -------- ------------------------------------------ ----------------'
db 'x'
 
valor dw ?
r db ?
cur dw ?
total db ?
address dd ?
listcount db ?
V_Bus db 0
V_Dev db 0
PCI_Version dw 0
PCI_LastBus db 0
PCI_Device dw 0
PCI_Vendor dw 0
PCI_Bus db 0
PCI_Dev db 0
PCI_Rev db 0
PCI_Class db 0
PCI_SubClass db 0
 
I_END:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/pcidev/trunk/vendors.inc
0,0 → 1,2004
; AUTHOR: Victor Alberto Gil Hancco Laquita <vhanla@gmail.com>
; This list might content mistakes, plz report it
; There are 865 Lists of Vendors' Names
; Date: 8/14/2005
;
; IN CONCLUSION, IF THERE EXISTS BUGS, PLEASE HELP THE PROJECT...
; maybe this list is outdated...
; (the source was from 2004 list)
 
_FIRSTPART: ;lists the 255 Vendor IDs
db 'PARADYNE CORP. '
dw 51 ; 0x0033
db 'REAL 3D '
dw 61 ; 0x003D
db 'NCIPHER CORP. LTD '
dw 256 ; 0x0100
db 'BREA TECHNOLOGIES INC '
dw 2697 ; 0x0A89
db 'COMPAQ COMPUTER CORP. '
dw 3601 ; 0x0E11
db 'SYMBIOS LOGIC INC/LSI Logic '
dw 4096 ; 0x1000
db 'KOLTER ELECTRONIC '
dw 4097 ; 0x1001
db 'ATI TECHNOLOGIES INC '
dw 4098 ; 0x1002
db 'VLSI TECHNOLOGY INC '
dw 4100 ; 0x1004
db 'NATIONAL SEMICONDUCTOR CORPORATION '
dw 4107 ; 0x100B
db 'VIDEO LOGIC LTD '
dw 4112 ; 0x1010
db 'IBM '
dw 4116 ; 0x1014
db 'UNISYS CORPORATION '
dw 4120 ; 0x1018
db 'ELITEGROUP COMPUTER SYS '
dw 4121 ; 0x1019
db 'NCR '
dw 4122 ; 0x101A
db 'AMERICAN MEGATRENDS '
dw 4126 ; 0x101E
db 'HITACHI COMPUTER PRODUCTS '
dw 4128 ; 0x1020
db 'OKI ELECTRIC INDUSTRY CO. LTD. '
dw 4129 ; 0x1021
db 'ADVANCED MICRO DEVICES '
dw 4130 ; 0x1022
db 'TRIDENT MICROSYSTEMS '
dw 4131 ; 0x1023
db 'DELL COMPUTER CORPORATION '
dw 4136 ; 0x1028
db 'LSI LOGIC CORPORATION '
dw 4138 ; 0x102A
db 'MATROX GRAPHICS. '
dw 4139 ; 0x102B
db 'TOSHIBA AMERICA '
dw 4143 ; 0x102F
db 'NEC CORPORATION '
dw 4147 ; 0x1033
db 'AMP '
dw 4152 ; 0x1038
db 'SILICON INTEGRATED SYSTEMS '
dw 4153 ; 0x1039
db 'SYNOPSYS/LOGIC MODELING GROUP '
dw 4159 ; 0x103F
db 'Micron Electronics. '
dw 4162 ; 0x1042
db 'ASUSTEK COMPUTER. '
dw 4163 ; 0x1043
db 'DISTRIBUTED PROCESSING TECHNOLOGY '
dw 4164 ; 0x1044
db 'OPTI INC. '
dw 4165 ; 0x1045
db 'ELSA AG '
dw 4168 ; 0x1048
db 'FOUNTAIN TECHNOLOGIES. '
dw 4169 ; 0x1049
db 'TEXAS INSTRUMENTS '
dw 4172 ; 0x104C
db 'SONY CORPORATION '
dw 4173 ; 0x104D
db 'WINBOND ELECTRONICS CORP '
dw 4176 ; 0x1050
db 'HITACHI '
dw 4180 ; 0x1054
db 'Standard Microsystems Corp. '
dw 4181 ; 0x1055
db 'ETRI '
dw 4184 ; 0x1058
db 'TEKNOR INDUSTRIAL COMPUTERS INC '
dw 4185 ; 0x1059
db 'PROMISE TECHNOLOGY. '
dw 4186 ; 0x105A
db 'FOXCONN INTERNATIONAL INC '
dw 4187 ; 0x105B
db 'NUMBER 9 VISUAL TECHNOLOGY '
dw 4189 ; 0x105D
db 'INFOTRONIC AMERICA INC '
dw 4191 ; 0x105F
db 'OCEAN MANUFACTURING LTD '
dw 4195 ; 0x1063
db 'ALCATEL '
dw 4196 ; 0x1064
db 'MITSUBISHI ELECTRIC AMERICA '
dw 4199 ; 0x1067
db 'DIVERSIFIED TECHNOLOGY '
dw 4200 ; 0x1068
db 'MYLEX CORPORATION '
dw 4201 ; 0x1069
db 'APPLE COMPUTER INC. '
dw 4203 ; 0x106B
db 'SEQUENT COMPUTER SYSTEMS '
dw 4205 ; 0x106D
db 'DAEWOO TELECOM LTD '
dw 4208 ; 0x1070
db 'MITAC '
dw 4209 ; 0x1071
db 'YAMAHA CORPORATION '
dw 4211 ; 0x1073
db 'QLOGIC '
dw 4215 ; 0x1077
db 'I-BUS '
dw 4217 ; 0x1079
db 'GATEWAY 2000 '
dw 4219 ; 0x107B
db 'INTERPHASE CORPORATION '
dw 4222 ; 0x107E
db 'OLICOM '
dw 4237 ; 0x108D
db 'SILICON IMAGE (WAS CMD TECHNOLOGY INC) '
dw 4245 ; 0x1095
db 'ALACRON '
dw 4246 ; 0x1096
db 'APPIAN/ETMA '
dw 4247 ; 0x1097
db 'PACKARD BELL NEC '
dw 4250 ; 0x109A
db 'BROOKTREE CORPORATION '
dw 4254 ; 0x109E
db 'TRIGEM COMPUTER INC. '
dw 4255 ; 0x109F
db 'MEIDENSHA CORPORATION '
dw 4256 ; 0x10A0
db 'QUANTUM EFFECT DESIGN '
dw 4258 ; 0x10A2
db 'SILICON GRAPHICS '
dw 4265 ; 0x10A9
db 'HONEYWELL IAC '
dw 4268 ; 0x10AC
db 'MICRO COMPUTER SYSTEMS INC '
dw 4271 ; 0x10AF
db 'PLX TECHNOLOGY. '
dw 4277 ; 0x10B5
db 'MADGE NETWORKS '
dw 4278 ; 0x10B6
db '3COM '
dw 4279 ; 0x10B7
db 'ACER LABS '
dw 4281 ; 0x10B9
db 'MITSUBISHI ELECTRIC CORP. '
dw 4282 ; 0x10BA
db 'AUSPEX SYSTEMS INC. '
dw 4290 ; 0x10C2
db 'NEOMAGIC CORPORATION '
dw 4296 ; 0x10C8
db 'FUJITSU MICROELECTRONIC '
dw 4298 ; 0x10CA
db 'OMRON CORPORATION '
dw 4299 ; 0x10CB
db 'ADVANCED SYSTEM PRODUCTS '
dw 4301 ; 0x10CD
db 'FUJITSU LIMITED '
dw 4303 ; 0x10CF
db 'FUTUREPLUS SYSTEMS CORP. '
dw 4305 ; 0x10D1
db 'MOLEX INCORPORATED '
dw 4306 ; 0x10D2
db 'ROHM LSI SYSTEMS '
dw 4315 ; 0x10DB
db 'EVANS & SUTHERLAND '
dw 4317 ; 0x10DD
db 'NVIDIA CORPORATION '
dw 4318 ; 0x10DE
db 'EMULEX CORPORATION '
dw 4319 ; 0x10DF
db 'TEKRAM TECHNOLOGY CO.LTD. '
dw 4321 ; 0x10E1
db 'TUNDRA SEMICONDUCTOR CORP '
dw 4323 ; 0x10E3
db 'MICRO INDUSTRIES CORPORATION '
dw 4325 ; 0x10E5
db 'REALTEK SEMICONDUCTOR CORP. '
dw 4332 ; 0x10EC
db 'XILINX. '
dw 4334 ; 0x10EE
db 'TYAN COMPUTER '
dw 4337 ; 0x10F1
db 'NKK CORPORATION '
dw 4341 ; 0x10F5
db 'CREATIVE ELECTRONIC SYSTEMS SA '
dw 4342 ; 0x10F6
db 'I-O DATA DEVICE. '
dw 4348 ; 0x10FC
db 'FAST MULTIMEDIA AG '
dw 4350 ; 0x10FE
db 'INITIO CORPORATION '
dw 4353 ; 0x1101
db 'CREATIVE LABS '
dw 4354 ; 0x1102
db 'SIGMA DESIGNS '
dw 4357 ; 0x1105
db 'VIA TECHNOLOGIES. '
dw 4358 ; 0x1106
db 'ASCEND COMMUNICATIONS. '
dw 4359 ; 0x1107
db 'Adaptec/Cogent Data Technologies Inc '
dw 4361 ; 0x1109
db 'SIEMENS PC SYSTEME GMBH '
dw 4362 ; 0x110A
db 'SANTA CRUZ OPERATION '
dw 4369 ; 0x1111
db 'ACCTON TECHNOLOGY '
dw 4371 ; 0x1113
db 'MEDIA 100 '
dw 4374 ; 0x1116
db 'DATACUBE '
dw 4375 ; 0x1117
db 'FCI ELECTRONICS '
dw 4376 ; 0x1118
db 'ICP-VORTEX COMPUTERSYSTEM GMBH '
dw 4377 ; 0x1119
db 'EFFICIENT NETWORKS '
dw 4378 ; 0x111A
db 'INTEGRATED DEVICE TECH '
dw 4381 ; 0x111D
db 'EMC CORPORATION '
dw 4384 ; 0x1120
db 'FORE SYSTEMS INC '
dw 4391 ; 0x1127
db 'HERMES ELECTRONICS COMPANY '
dw 4394 ; 0x112A
db 'IMAGING TECHNOLOGY '
dw 4399 ; 0x112F
db 'PHILIPS SEMICONDUCTORS '
dw 4401 ; 0x1131
db 'MITEL CORP '
dw 4402 ; 0x1132
db 'EICON TECHNOLOGY CORPORATION '
dw 4403 ; 0x1133
db 'MERCURY COMPUTER SYSTEMS '
dw 4404 ; 0x1134
db 'FUJI XEROX CO LTD '
dw 4405 ; 0x1135
db 'MOMENTUM DATA SYSTEMS '
dw 4406 ; 0x1136
db 'CISCO SYSTEMS INC '
dw 4407 ; 0x1137
db 'ZIATECH CORPORATION '
dw 4408 ; 0x1138
db 'CYCLONE MICROSYSTEMS. '
dw 4412 ; 0x113C
db 'SANYO ELECTRIC CO-Information Systems Division '
dw 4414 ; 0x113E
db 'CREST MICROSYSTEM INC. '
dw 4417 ; 0x1141
db 'WORKBIT CORPORATION '
dw 4421 ; 0x1145
db 'FORCE COMPUTERS GMBH '
dw 4422 ; 0x1146
db 'SYSKONNECT '
dw 4424 ; 0x1148
db 'ANNABOOKS '
dw 4428 ; 0x114C
db 'DIGI INTERNATIONAL '
dw 4431 ; 0x114F
db 'MELCO INC '
dw 4436 ; 0x1154
db 'PHOTRON LTD. '
dw 4444 ; 0x115C
db 'XIRCOM '
dw 4445 ; 0x115D
db 'PFU LIMITED '
dw 4449 ; 0x1161
db 'RENDITION '
dw 4451 ; 0x1163
db 'Reliance Computer '
dw 4454 ; 0x1166
db 'ELECTRONICS FOR IMAGING '
dw 4462 ; 0x116E
db 'INVENTEC CORPORATION '
dw 4464 ; 0x1170
db 'BLUE WAVE SYSTEMS '
dw 4465 ; 0x1171
db 'ALTERA CORPORATION '
dw 4466 ; 0x1172
db 'TOSHIBA AMERICA INFO SYSTEMS '
dw 4473 ; 0x1179
db 'RICOH CO LTD '
dw 4480 ; 0x1180
db 'D-LINK SYSTEM INC '
dw 4486 ; 0x1186
db 'ADVANCED TECHNOLOGY LABORATORIES '
dw 4487 ; 0x1187
db 'MATSUSHITA ELECTIC INDUSTRIAL CO LTD '
dw 4489 ; 0x1189
db 'PLATYPUS TECHNOLOGY PTY LTD '
dw 4491 ; 0x118B
db 'COROLLARY '
dw 4492 ; 0x118C
db 'ACARD TECHNOLOGY '
dw 4497 ; 0x1191
db 'RATOC SYSTEMS INC '
dw 4501 ; 0x1195
db 'MINDSHARE. '
dw 4506 ; 0x119A
db 'BUG. '
dw 4509 ; 0x119D
db 'FUJITSU MICROELECTRONICS LTD. '
dw 4510 ; 0x119E
db 'BULL HN INFORMATION SYSTEMS '
dw 4511 ; 0x119F
db 'HAMAMATSU PHOTONICS K.K. '
dw 4513 ; 0x11A1
db 'INNOSYS '
dw 4521 ; 0x11A9
db 'ACTEL '
dw 4522 ; 0x11AA
db 'GALILEO TECHNOLOGY LTD. '
dw 4523 ; 0x11AB
db 'LITE-ON COMMUNICATIONS INC '
dw 4525 ; 0x11AD
db 'SCITEX CORPORATION '
dw 4526 ; 0x11AE
db 'AVID TECHNOLOGY INC '
dw 4527 ; 0x11AF
db 'V3 SEMICONDUCTOR INC. '
dw 4528 ; 0x11B0
db 'EASTMAN KODAK '
dw 4530 ; 0x11B2
db 'BARR SYSTEMS INC. '
dw 4531 ; 0x11B3
db 'ASTRODESIGN '
dw 4543 ; 0x11BF
db 'DAINIPPON SCREEN MFG. CO. LTD '
dw 4550 ; 0x11C6
db 'DOLPHIN INTERCONNECT SOLUTIONS AS '
dw 4552 ; 0x11C8
db 'MAGMA '
dw 4553 ; 0x11C9
db 'LSI SYSTEMS '
dw 4554 ; 0x11CA
db 'SPECIALIX INTERNATIONAL LTD '
dw 4555 ; 0x11CB
db 'NETACCESS '
dw 4558 ; 0x11CE
db 'LOCKHEED MARTIN-Electronics & Communications '
dw 4560 ; 0x11D0
db 'AURAVISION '
dw 4561 ; 0x11D1
db 'INTERCOM INC. '
dw 4562 ; 0x11D2
db 'ANALOG DEVICES '
dw 4564 ; 0x11D4
db 'IKON CORPORATION '
dw 4565 ; 0x11D5
db 'TOSHIBA TEC CORPORATION '
dw 4569 ; 0x11D9
db 'NOVELL '
dw 4570 ; 0x11DA
db 'NEW WAVE PDG '
dw 4575 ; 0x11DF
db 'QUICKLOGIC CORPORATION '
dw 4579 ; 0x11E3
db 'CORECO INC '
dw 4588 ; 0x11EC
db 'DOME IMAGING SYSTEMS INC '
dw 4590 ; 0x11EE
db 'PMC-SIERRA INC '
dw 4600 ; 0x11F8
db 'AGFA CORPORATION '
dw 4611 ; 0x1203
db 'AMDAHL CORPORATION '
dw 4614 ; 0x1206
db 'ESSENTIAL COMMUNICATIONS '
dw 4623 ; 0x120F
db 'PERFORMANCE TECHNOLOGIES. '
dw 4628 ; 0x1214
db 'PURUP-EskoFot A/S '
dw 4630 ; 0x1216
db 'O2MICRO. '
dw 4631 ; 0x1217
db '3DFX INTERACTIVE '
dw 4634 ; 0x121A
db 'VIRATA LTD '
dw 4635 ; 0x121B
db 'CONTEC CO. LTD '
dw 4641 ; 0x1221
db 'ARTESYN COMMUNICATIONS PRODUCTS INC '
dw 4643 ; 0x1223
db 'TECH-SOURCE '
dw 4647 ; 0x1227
db 'SICAN GMBH '
dw 4652 ; 0x122C
db 'MARCONI COMMUNICATIONS LTD '
dw 4658 ; 0x1232
db 'SOLITON SYSTEMS K.K. '
dw 4961 ; 0x1361
db 'CENTURY SYSTEMS. '
dw 4668 ; 0x123C
db 'ENGINEERING DESIGN TEAM. '
dw 4669 ; 0x123D
db 'C-CUBE MICROSYSTEMS '
dw 4671 ; 0x123F
db 'JAYCOR NETWORKS INC. '
dw 4674 ; 0x1242
db 'AVM AUDIOVISUELLES MKTG & COMPUTER SYSTEM GMBH '
dw 4676 ; 0x1244
db 'SBS TECHNOLOGIES '
dw 4683 ; 0x124B
db 'HITACHI ULSI SYSTEMS CO LTD '
dw 4688 ; 0x1250
db 'GUZIK TECHNICAL ENTERPRISES '
dw 4691 ; 0x1253
db 'OPTIBASE LTD '
dw 4693 ; 0x1255
db 'ALLIED TELESYN INTERNATIONAL '
dw 4697 ; 0x1259
db 'AURORA TECHNOLOGIES. '
dw 4700 ; 0x125C
db 'CONCURRENT TECHNOLOGIES '
dw 4703 ; 0x125F
db 'INTERSIL CORP '
dw 4704 ; 0x1260
db 'MATSUSHITA-KOTOBUKI ELECTRONICS '
dw 4705 ; 0x1261
db 'AVAL NAGASAKI CORPORATION '
dw 4708 ; 0x1264
db 'TEKTRONIX '
dw 4712 ; 0x1268
db 'NORTEL NETWORKS '
dw 4716 ; 0x126C
db 'SPLASH TECHNOLOGY. '
dw 4717 ; 0x126D
db 'SUMITOMO METAL INDUSTRIES '
dw 4718 ; 0x126E
db 'SILICON MOTION. '
dw 4719 ; 0x126F
db 'OLYMPUS OPTICAL CO. LTD. '
dw 4720 ; 0x1270
db 'CREATIVE LABS (WAS ENSONIQ, MALVERN) '
dw 4724 ; 0x1274
db 'NETWORK APPLIANCE CORPORATION '
dw 4725 ; 0x1275
db 'TRANSTECH DSP LTD '
dw 4728 ; 0x1278
db 'TRANSMETA CORPORATION '
dw 4729 ; 0x1279
db 'VELA RESEARCH LP '
dw 4733 ; 0x127D
db 'FUJIFILM '
dw 4735 ; 0x127F
db 'YOKOGAWA ELECTRIC CORPORATION '
dw 4737 ; 0x1281
db 'INTEGRATED TECHNOLOGY EXPRESS. '
dw 4739 ; 0x1283
db 'MAZET GMBH '
dw 4742 ; 0x1286
db 'TRANSWITCH CORPORATION '
dw 4747 ; 0x128B
db 'G2 NETWORKS. '
dw 4749 ; 0x128D
db 'TATENO DENNOU. '
dw 4751 ; 0x128F
db 'TOSHIBA PERSONAL COMPUTER SYSTEM CORP. '
dw 4752 ; 0x1290
db 'NCS COMPUTER ITALIA SRL '
dw 4753 ; 0x1291
db 'TRITECH MICROELECTRONICS INC '
dw 4754 ; 0x1292
db 'SHUTTLE COMPUTER '
dw 4759 ; 0x1297
db 'KNOWLEDGE TECHNOLOGY LAB. '
dw 4761 ; 0x1299
db 'VMETRO. '
dw 4762 ; 0x129A
db 'VICTOR COMPANY OF JAPAN '
dw 4766 ; 0x129E
db 'ALLEN- BRADLEY COMPANY '
dw 4768 ; 0x12A0
db 'LUCENT TECHNOLOGIES '
dw 4771 ; 0x12A3
db 'AMO GMBH '
dw 4775 ; 0x12A7
db 'XIOTECH CORPORATION '
dw 4777 ; 0x12A9
db 'YUAN YUAN ENTERPRISE CO. LTD. '
dw 4779 ; 0x12AB
db 'ALTEON WEBSYSTEMS INC '
dw 4782 ; 0x12AE
db 'NATURAL MICROSYSTEMS '
dw 4790 ; 0x12B6
db 'COGNEX MODULAR VISION SYSTEMS DIV.-ACUMEN INC. '
dw 4791 ; 0x12B7
db '3Com '
dw 4793 ; 0x12B9
db 'ARRAY MICROSYSTEMS '
dw 4796 ; 0x12BC
db 'ANCHOR CHIPS INC. '
dw 4798 ; 0x12BE
db 'Fujifilm Microdevices '
dw 4799 ; 0x12BF
db 'INFIMED '
dw 4800 ; 0x12C0
db 'HOLTEK SEMICONDUCTOR INC '
dw 4803 ; 0x12C3
db 'Connect Tech Inc '
dw 4804 ; 0x12C4
db 'Mitan Corporation '
dw 4806 ; 0x12C6
_SECONDPART: ;lists 255 Vendors
db 'Dialogic Corp '
dw 4807 ; 0x12C7
db 'Integrated Computing Engines '
dw 4810 ; 0x12CA
db 'Aims Lab '
dw 4813 ; 0x12CD
db 'GE VINGMED ULTRASOUND AS '
dw 4819 ; 0x12D3
db 'COMVERSE NETWORKS SYSTEM & Ulticom. '
dw 4820 ; 0x12D4
db 'Equator Technologies '
dw 4821 ; 0x12D5
db 'Analogic Corp '
dw 4822 ; 0x12D6
db 'PERICOM SEMICONDUCTOR '
dw 4824 ; 0x12D8
db 'Aculab PLC '
dw 4825 ; 0x12D9
db 'True Time Inc. '
dw 4826 ; 0x12DA
db 'Rainbow Technologies '
dw 4830 ; 0x12DE
db 'SBS Technologies Inc '
dw 4831 ; 0x12DF
db 'Chase Research '
dw 4832 ; 0x12E0
db 'Datum Inc. Bancomm-Timing Division '
dw 4834 ; 0x12E2
db 'Brooktrout Technology Inc '
dw 4836 ; 0x12E4
db 'Sebring Systems '
dw 4839 ; 0x12E7
db 'Real Vision '
dw 4842 ; 0x12EA
db 'AUREAL INC. '
dw 4843 ; 0x12EB
db '3A '
dw 4844 ; 0x12EC
db 'PENTEK '
dw 4848 ; 0x12F0
db 'COGNEX INC. '
dw 4855 ; 0x12F7
db 'Spectrum Signal Processing '
dw 4859 ; 0x12FB
db 'CAPITAL EQUIPMENT CORP '
dw 4860 ; 0x12FC
db 'ESD Electronic System Design GmbH '
dw 4862 ; 0x12FE
db 'Juniper Networks Inc. '
dw 4868 ; 0x1304
db 'Computer Boards '
dw 4871 ; 0x1307
db 'LEVEL ONE COMMUNICATIONS '
dw 4872 ; 0x1308
db 'Mitsubishi Electric MicroComputer '
dw 4874 ; 0x130A
db 'Colorgraphic Communications Corp '
dw 4875 ; 0x130B
db 'Advanet Inc '
dw 4879 ; 0x130F
db 'GESPAC '
dw 4880 ; 0x1310
db 'YASKAWA ELECTRIC CO. '
dw 4883 ; 0x1313
db 'TERADYNE INC. '
dw 4886 ; 0x1316
db 'ADMTEK INC '
dw 4887 ; 0x1317
db 'Packet Engines Inc. '
dw 4888 ; 0x1318
db 'ForteMedia '
dw 4889 ; 0x1319
db 'SIIG Inc '
dw 4895 ; 0x131F
db 'SALIX TECHNOLOGIES INC '
dw 4901 ; 0x1325
db 'SeaChange International '
dw 4902 ; 0x1326
db 'RadiSys Corp. '
dw 4913 ; 0x1331
db 'PRISA NETWORKS '
dw 4925 ; 0x133D
db 'SCM MICROSYSTEMS '
dw 4927 ; 0x133F
db 'PROMAX SYSTEMS INC '
dw 4930 ; 0x1342
db 'MICRON TECHNOLOGY INC '
dw 4932 ; 0x1344
db 'ARK RESEARCH CORP. '
dw 4939 ; 0x134B
db 'CHORI JOHO SYSTEM CO. LTD '
dw 4940 ; 0x134C
db 'PC-TEL INC '
dw 4941 ; 0x134D
db 'BRAIN BOXES LIMITED '
dw 4954 ; 0x135A
db 'QUATECH INC '
dw 4956 ; 0x135C
db 'SEALEVEL SYSTEMS INC '
dw 4958 ; 0x135E
db 'I-DATA INTERNATIONAL A-S '
dw 4959 ; 0x135F
db 'MEINBERG FUNKUHREN '
dw 4960 ; 0x1360
db 'PHOENIX TECHNOLOGIES LTD '
dw 4963 ; 0x1363
db 'HITACHI ZOSEN CORPORATION '
dw 4967 ; 0x1367
db 'SKYWARE CORPORATION '
dw 4968 ; 0x1368
db 'DIGIGRAM '
dw 4969 ; 0x1369
db 'KAWASAKI STEEL CORPORATION '
dw 4971 ; 0x136B
db 'ADTEK SYSTEM SCIENCE CO LTD '
dw 4972 ; 0x136C
db 'BOEING-SUNNYVALE '
dw 4981 ; 0x1375
db 'ELECTRONIC EQUIPMENT PRODUCTION & DISTRIBUTION '
dw 4983 ; 0x1377
db 'MARK OF THE UNICORN INC '
dw 4986 ; 0x137A
db 'PPT VISION '
dw 4987 ; 0x137B
db 'IWATSU ELECTRIC CO LTD '
dw 4988 ; 0x137C
db 'DYNACHIP CORPORATION '
dw 4989 ; 0x137D
db 'SANRITZ AUTOMATION CO LTC '
dw 4992 ; 0x1380
db 'BRAINS CO. LTD '
dw 4993 ; 0x1381
db 'CONTROLNET INC '
dw 4995 ; 0x1383
db 'STELLAR SEMICONDUCTOR INC '
dw 4996 ; 0x1384
db 'NETGEAR '
dw 4997 ; 0x1385
db 'SYSTRAN CORP '
dw 4999 ; 0x1387
db 'HITACHI INFORMATION TECHNOLOGY CO LTD '
dw 5000 ; 0x1388
db 'APPLICOM INTERNATIONAL '
dw 5001 ; 0x1389
db 'SITERA '
dw 5002 ; 0x138A
db 'TOKIMEC INC '
dw 5003 ; 0x138B
db 'BASLER GMBH '
dw 5006 ; 0x138E
db 'PATAPSCO DESIGNS INC '
dw 5007 ; 0x138F
db 'MOXA TECHNOLOGIES CO LTD '
dw 5011 ; 0x1393
db 'LEVEL ONE COMMUNICATIONS '
dw 5012 ; 0x1394
db 'AMBICOM INC '
dw 5013 ; 0x1395
db 'CIPHER SYSTEMS INC '
dw 5014 ; 0x1396
db 'COLOGNE CHIP DESIGNS GMBH '
dw 5015 ; 0x1397
db 'CLARION CO. LTD '
dw 5016 ; 0x1398
db 'RIOS SYSTEMS CO LTD '
dw 5017 ; 0x1399
db 'ALACRITECH INC '
dw 5018 ; 0x139A
db 'QUANTUM 3D INC '
dw 5020 ; 0x139C
db 'XSTREAMS PLC/ EPL LIMITED '
dw 5021 ; 0x139D
db 'ECHOSTAR DATA NETWORKS '
dw 5022 ; 0x139E
db 'AETHRA S.R.L. '
dw 5023 ; 0x139F
db 'CRYSTAL GROUP INC '
dw 5024 ; 0x13A0
db 'KAWASAKI HEAVY INDUSTRIES LTD '
dw 5025 ; 0x13A1
db 'OSITECH COMMUNICATIONS INC '
dw 5026 ; 0x13A2
db 'RASCOM INC '
dw 5028 ; 0x13A4
db 'TELES AG '
dw 5031 ; 0x13A7
db 'EXAR CORP. '
dw 5032 ; 0x13A8
db 'SIEMENS MEDICAL SYSTEMS '
dw 5033 ; 0x13A9
db 'NORTEL NETWORKS-BWA DIVISION '
dw 5034 ; 0x13AA
db 'T.SQWARE '
dw 5039 ; 0x13AF
db 'TAMURA CORPORATION '
dw 5041 ; 0x13B1
db 'WELLBEAN CO INC '
dw 5044 ; 0x13B4
db 'ARM Ltd '
dw 5045 ; 0x13B5
db 'DLoG GMBH '
dw 5046 ; 0x13B6
db 'NOKIA TELECOMMUNICATIONS OY '
dw 5048 ; 0x13B8
db 'SHARP CORPORATION '
dw 5053 ; 0x13BD
db 'SHAREWAVE INC '
dw 5055 ; 0x13BF
db '3WARE '
dw 5057 ; 0x13C1
db 'TECHNOTREND SYSTEMTECHNIK GMBH '
dw 5058 ; 0x13C2
db 'JANZ COMPUTER AG '
dw 5059 ; 0x13C3
db 'CONDOR ENGINEERING INC '
dw 5062 ; 0x13C6
db 'BLUE CHIP TECHNOLOGY LTD '
dw 5063 ; 0x13C7
db 'IOMEGA CORPORATION '
dw 5066 ; 0x13CA
db 'METHEUS CORPORATION '
dw 5068 ; 0x13CC
db 'STUDIO AUDIO & VIDEO LTD '
dw 5071 ; 0x13CF
db 'B2C2 '
dw 5072 ; 0x13D0
db 'ABOCOM SYSTEMS '
dw 5073 ; 0x13D1
db 'SHARK MULTIMEDIA INC '
dw 5074 ; 0x13D2
db 'IMC NETWORKS '
dw 5075 ; 0x13D3
db 'GRAPHICS MICROSYSTEMS INC '
dw 5076 ; 0x13D4
db 'K.I. TECHNOLOGY CO LTD '
dw 5078 ; 0x13D6
db 'TOSHIBA ENGINEERING CORPORATION '
dw 5079 ; 0x13D7
db 'PHOBOS CORPORATION '
dw 5080 ; 0x13D8
db 'APEX INC '
dw 5081 ; 0x13D9
db 'NETBOOST CORPORATION '
dw 5084 ; 0x13DC
db 'ABB ROBOTICS PRODUCTS '
dw 5086 ; 0x13DE
db 'E-TECH INC '
dw 5087 ; 0x13DF
db 'GVC CORPORATION '
dw 5088 ; 0x13E0
db 'NEST INC '
dw 5091 ; 0x13E3
db 'CALCULEX INC '
dw 5092 ; 0x13E4
db 'TELESOFT DESIGN LTD '
dw 5093 ; 0x13E5
db 'INTRASERVER TECHNOLOGY INC '
dw 5097 ; 0x13E9
db 'DALLAS SEMICONDUCTOR '
dw 5098 ; 0x13EA
db 'SUNDANCE TECHNOLOGY INC '
dw 5104 ; 0x13F0
db 'OCE-TECHNOLOGIES B.V. '
dw 5105 ; 0x13F1
db 'FORD MICROELECTRONICS INC '
dw 5106 ; 0x13F2
db 'TROIKA NETWORKS INC '
dw 5108 ; 0x13F4
db 'C-MEDIA ELECTRONICS INC '
dw 5110 ; 0x13F6
db 'NTT ADVANCED TECHNOLOGY CORP. '
dw 5113 ; 0x13F9
db 'AYDIN CORP '
dw 5115 ; 0x13FB
db 'MICRO SCIENCE INC '
dw 5117 ; 0x13FD
db 'ARTX INC '
dw 5120 ; 0x1400
db 'MEILHAUS ELECTRONIC GmbH '
dw 5122 ; 0x1402
db 'FUNDAMENTAL SOFTWARE INC '
dw 5124 ; 0x1404
db 'OCE PRINTING SYSTEMS GmbH '
dw 5126 ; 0x1406
db 'LAVA COMPUTER MFG INC '
dw 5127 ; 0x1407
db 'ALOKA CO. LTD '
dw 5128 ; 0x1408
db 'DSP RESEARCH INC '
dw 5130 ; 0x140A
db 'RAMIX INC '
dw 5131 ; 0x140B
db 'MATSUSHITA ELECTRIC WORKS LTD '
dw 5133 ; 0x140D
db 'ADDONICS '
dw 5139 ; 0x1413
db 'OXFORD SEMICONDUCTOR LTD '
dw 5141 ; 0x1415
db 'KYUSHU ELECTRONICS SYSTEMS INC '
dw 5144 ; 0x1418
db 'EXCEL SWITCHING CORP '
dw 5145 ; 0x1419
db 'ZOOM TELEPHONICS INC '
dw 5147 ; 0x141B
db 'FANUC LTD '
dw 5150 ; 0x141E
db 'PSION DACOM PLC '
dw 5152 ; 0x1420
db 'EDEC CO LTD '
dw 5160 ; 0x1428
db 'UNEX TECHNOLOGY CORP '
dw 5161 ; 0x1429
db 'KINGMAX TECHNOLOGY INC '
dw 5162 ; 0x142A
db 'RADIOLAN '
dw 5163 ; 0x142B
db 'MINTON OPTIC INDUSTRY CO LTD '
dw 5164 ; 0x142C
db 'PIXSTREAM INC '
dw 5165 ; 0x142D
db 'ITT AEROSPACE/COMMUNICATIONS DIVISION '
dw 5168 ; 0x1430
db 'ELTEC ELEKTRONIK GMBH '
dw 5171 ; 0x1433
db 'CIS TECHNOLOGY INC '
dw 5174 ; 0x1436
db 'NISSIN INC CO '
dw 5175 ; 0x1437
db 'ATMEL-DREAM '
dw 5176 ; 0x1438
db 'LIGHTWELL CO LTD-ZAX DIVISION '
dw 5183 ; 0x143F
db 'AGIE SA '
dw 5185 ; 0x1441
db 'LOGICAL CO LTD '
dw 5189 ; 0x1445
db 'GRAPHIN CO. LTD '
dw 5190 ; 0x1446
db 'AIM GMBH '
dw 5191 ; 0x1447
db 'ADLINK TECHNOLOGY '
dw 5194 ; 0x144A
db 'LORONIX INFORMATION SYSTEMS INC '
dw 5195 ; 0x144B
db 'SAMSUNG ELECTRONICS CO LTD '
dw 5197 ; 0x144D
db 'OCTAVE COMMUNICATIONS IND. '
dw 5200 ; 0x1450
db 'SP3D CHIP DESIGN GMBH '
dw 5201 ; 0x1451
db 'MYCOM INC '
dw 5203 ; 0x1453
db 'LOGIC PLUS PLUS INC '
dw 5205 ; 0x1455
db 'GIGA-BYTE TECHNOLOGY '
dw 5208 ; 0x1458
db 'CRYPTEK '
dw 5212 ; 0x145C
db 'BALDOR ELECTRIC COMPANY '
dw 5215 ; 0x145F
db 'DYNARC INC '
dw 5216 ; 0x1460
db 'MICRO-STAR INTERNATIONAL CO LTD '
dw 5218 ; 0x1462
db 'FAST CORPORATION '
dw 5219 ; 0x1463
db 'INTERACTIVE CIRCUITS & SYSTEMS LTD '
dw 5220 ; 0x1464
db 'GN NETTEST TELECOM DIV. '
dw 5221 ; 0x1465
db 'AMBIT MICROSYSTEMS CORP. '
dw 5224 ; 0x1468
db 'CLEVELAND MOTION CONTROLS '
dw 5225 ; 0x1469
db 'RUBY TECH CORP. '
dw 5228 ; 0x146C
db 'TACHYON. '
dw 5229 ; 0x146D
db 'WILLIAMS ELECTRONICS GAMES. '
dw 5230 ; 0x146E
db 'INTEGRATED TELECOM EXPRESS INC '
dw 5233 ; 0x1471
db 'ZAPEX TECHNOLOGIES INC '
dw 5235 ; 0x1473
db 'DOUG CARSON & ASSOCIATES '
dw 5236 ; 0x1474
db 'NET INSIGHT '
dw 5239 ; 0x1477
db 'DIATREND CORPORATION '
dw 5240 ; 0x1478
db 'ABIT '
dw 5243 ; 0x147B
db 'NIHON UNISYS '
dw 5247 ; 0x147F
db 'ISYTEC-Integrierte Systemtechnik Gmbh '
dw 5250 ; 0x1482
db 'LABWAY COPORATION '
dw 5251 ; 0x1483
db 'ERMA-ELECTRONIC GMBH '
dw 5253 ; 0x1485
db 'KYE SYSTEMS CORPORATION '
dw 5257 ; 0x1489
db 'OPTO 22 '
dw 5258 ; 0x148A
db 'INNOMEDIALOGIC INC. '
dw 5259 ; 0x148B
db 'OSI PLUS CORPORATION '
dw 5262 ; 0x148E
db 'PLANT EQUIPMENT. '
dw 5263 ; 0x148F
db 'TC LABS PTY LTD. '
dw 5264 ; 0x1490
db 'MAKER COMMUNICATIONS '
dw 5267 ; 0x1493
db 'TOKAI COMMUNICATIONS INDUSTRY CO. LTD '
dw 5269 ; 0x1495
db 'JOYTECH COMPUTER CO. LTD. '
dw 5270 ; 0x1496
db 'SMA REGELSYSTEME GMBH '
dw 5271 ; 0x1497
db 'EMTEC CO. LTD '
dw 5273 ; 0x1499
db 'ANDOR TECHNOLOGY LTD '
dw 5274 ; 0x149A
db 'SEIKO INSTRUMENTS INC '
dw 5275 ; 0x149B
db 'OVISLINK CORP. '
dw 5276 ; 0x149C
db 'NEWTEK INC '
dw 5277 ; 0x149D
db 'MAPLETREE NETWORKS INC. '
dw 5278 ; 0x149E
db 'LECTRON CO LTD '
dw 5279 ; 0x149F
db 'SOFTING GMBH '
dw 5280 ; 0x14A0
db 'SYSTEMBASE CO LTD '
dw 5281 ; 0x14A1
db 'MILLENNIUM ENGINEERING INC '
dw 5282 ; 0x14A2
db 'MAVERICK NETWORKS '
dw 5283 ; 0x14A3
db 'GVC/BCM ADVANCED RESEARCH '
dw 5284 ; 0x14A4
db 'XIONICS DOCUMENT TECHNOLOGIES INC. '
dw 5285 ; 0x14A5
db 'INOVA COMPUTERS GMBH & CO KG '
dw 5286 ; 0x14A6
db 'FEATRON TECHNOLOGIES CORPORATION '
dw 5288 ; 0x14A8
db 'HIVERTEC INC. '
dw 5289 ; 0x14A9
db 'MENTOR GRAPHICS CORP. '
dw 5291 ; 0x14AB
db 'NOVAWEB TECHNOLOGIES INC '
dw 5292 ; 0x14AC
db 'TIME SPACE RADIO AB '
dw 5293 ; 0x14AD
db 'CTI PET Systems '
dw 5294 ; 0x14AE
db 'GUILLEMOT CORPORATION '
dw 5295 ; 0x14AF
db 'BST COMMUNICATION TECHNOLOGY LTD '
dw 5296 ; 0x14B0
db 'NEXTCOM K.K. '
dw 5297 ; 0x14B1
db 'ENNOVATE NETWORKS INC '
dw 5298 ; 0x14B2
db 'XPEED INC. '
dw 5299 ; 0x14B3
db 'PHILIPS BUSINESS ELECTRONICS B.V. '
dw 5300 ; 0x14B4
db 'CREAMWARE GMBH '
dw 5301 ; 0x14B5
db 'QUANTUM DATA CORP. '
dw 5302 ; 0x14B6
db 'PROXIM INC '
dw 5303 ; 0x14B7
db 'TECHSOFT TECHNOLOGY CO LTD '
dw 5304 ; 0x14B8
db 'AIRONET WIRELESS COMMUNICATIONS '
dw 5305 ; 0x14B9
db 'INTERNIX INC. '
dw 5306 ; 0x14BA
db 'SEMTECH CORPORATION '
dw 5307 ; 0x14BB
db 'GLOBESPAN SEMICONDUCTOR INC. '
dw 5308 ; 0x14BC
db 'CARDIO CONTROL N.V. '
dw 5309 ; 0x14BD
db 'L3 COMMUNICATIONS '
dw 5310 ; 0x14BE
db 'SPIDER COMMUNICATIONS INC. '
dw 5311 ; 0x14BF
db 'COMPAL ELECTRONICS INC '
dw 5312 ; 0x14C0
db 'MYRICOM INC. '
dw 5313 ; 0x14C1
db 'DTK COMPUTER '
dw 5314 ; 0x14C2
db 'MEDIATEK CORP. '
dw 5315 ; 0x14C3
db 'IWASAKI INFORMATION SYSTEMS CO LTD '
dw 5316 ; 0x14C4
db 'ABB AUTOMATION PRODUCTS '
dw 5317 ; 0x14C5
db 'DATA RACE INC '
dw 5318 ; 0x14C6
db 'MODULAR TECHNOLOY HOLDINGS LTD '
dw 5319 ; 0x14C7
_THIRDPART: ;lists 255 vendors
db 'TURBOCOMM TECH. INC. '
dw 5320 ; 0x14C8
db 'ODIN TELESYSTEMS INC '
dw 5321 ; 0x14C9
db 'PE LOGIC CORP. '
dw 5322 ; 0x14CA
db 'Billionton Systems Inc./Cadmus Micro Inc. '
dw 5323 ; 0x14CB
db 'NAKAYO TELECOMMUNICATIONS INC '
dw 5324 ; 0x14CC
db 'UNIVERSAL SCIENTIFIC IND '
dw 5325 ; 0x14CD
db 'WHISTLE COMMUNICATIONS '
dw 5326 ; 0x14CE
db 'TEK MICROSYSTEMS INC. '
dw 5327 ; 0x14CF
db 'ERICSSON AXE R & D '
dw 5328 ; 0x14D0
db 'COMPUTER HI-TECH CO LTD '
dw 5329 ; 0x14D1
db 'TITAN ELECTRONICS INC '
dw 5330 ; 0x14D2
db 'CIRTECH (UK) LTD '
dw 5331 ; 0x14D3
db 'PANACOM TECHNOLOGY CORP '
dw 5332 ; 0x14D4
db 'NITSUKO CORPORATION '
dw 5333 ; 0x14D5
db 'ACCUSYS '
dw 5334 ; 0x14D6
db 'HIRAKAWA HEWTECH CORP '
dw 5335 ; 0x14D7
db 'HOPF ELEKTRONIK GMBH '
dw 5336 ; 0x14D8
db 'ALPHA PROCESSOR INC '
dw 5337 ; 0x14D9
db 'NATIONAL AEROSPACE LABORATORIES '
dw 5338 ; 0x14DA
db 'AVLAB TECHNOLOGY INC '
dw 5339 ; 0x14DB
db 'AMPLICON LIVELINE LTD '
dw 5340 ; 0x14DC
db 'IMODL INC. '
dw 5341 ; 0x14DD
db 'APPLIED INTEGRATION CORPORATION '
dw 5342 ; 0x14DE
db 'BASIS COMMUNICATIONS CORP '
dw 5343 ; 0x14DF
db 'INVERTEX '
dw 5345 ; 0x14E1
db 'INFOLIBRIA '
dw 5346 ; 0x14E2
db 'AMTELCO '
dw 5347 ; 0x14E3
db 'BROADCOM CORPORATION '
dw 5348 ; 0x14E4
db 'PIXELFUSION LTD '
dw 5349 ; 0x14E5
db 'SHINING TECHNOLOGY INC '
dw 5350 ; 0x14E6
db '3CX '
dw 5351 ; 0x14E7
db 'RAYCER INC '
dw 5352 ; 0x14E8
db 'GARNETS SYSTEM CO LTD '
dw 5353 ; 0x14E9
db 'PLANEX COMMUNICATIONS INC '
dw 5354 ; 0x14EA
db 'SEIKO EPSON CORPORATION '
dw 5355 ; 0x14EB
db 'ACQIRIS '
dw 5356 ; 0x14EC
db 'DATAKINETICS LTD '
dw 5357 ; 0x14ED
db 'MASPRO KENKOH CORP '
dw 5358 ; 0x14EE
db 'CARRY COMPUTER ENG. CO LTD '
dw 5359 ; 0x14EF
db 'CANON RESEACH CENTRE FRANCE '
dw 5360 ; 0x14F0
db 'CONEXANT '
dw 5361 ; 0x14F1
db 'MOBILITY ELECTRONICS '
dw 5362 ; 0x14F2
db 'BROADLOGIC '
dw 5363 ; 0x14F3
db 'TOKYO ELECTRONIC INDUSTRY CO LTD '
dw 5364 ; 0x14F4
db 'SOPAC LTD '
dw 5365 ; 0x14F5
db 'COYOTE TECHNOLOGIES LLC '
dw 5366 ; 0x14F6
db 'WOLF TECHNOLOGY INC '
dw 5367 ; 0x14F7
db 'AUDIOCODES INC '
dw 5368 ; 0x14F8
db 'AG COMMUNICATIONS '
dw 5369 ; 0x14F9
db 'WAVETEK WANDEL & GOLTERMANN '
dw 5370 ; 0x14FA
db 'TRANSAS MARINE (UK) LTD '
dw 5371 ; 0x14FB
db 'QUADRICS SUPERCOMPUTERS WORLD '
dw 5372 ; 0x14FC
db 'JAPAN COMPUTER INDUSTRY INC. '
dw 5373 ; 0x14FD
db 'ARCHTEK TELECOM CORP. '
dw 5374 ; 0x14FE
db 'TWINHEAD INTERNATIONAL CORP '
dw 5375 ; 0x14FF
db 'LANTECH COMPUTER COMPANY '
dw 5376 ; 0x1500
db 'BANKSOFT CANADA LTD '
dw 5377 ; 0x1501
db 'MITSUBISHI ELECTRIC LOGISTICS SUPPORT CO '
dw 5378 ; 0x1502
db 'KAWASAKI LSI USA INC '
dw 5379 ; 0x1503
db 'KAISER ELECTRONICS '
dw 5380 ; 0x1504
db 'ITA INGENIEURBURO FUR TESTAUFGABEN GMBH '
dw 5381 ; 0x1505
db 'CHAMELEON SYSTEMS INC '
dw 5382 ; 0x1506
db 'HTEC LTD '
dw 5383 ; 0x1507
db 'HONDA CONNECTORS/MHOTRONICS INC '
dw 5384 ; 0x1508
db 'FIRST INTERNATIONAL COMPUTER INC '
dw 5385 ; 0x1509
db 'FORVUS RESEARCH INC '
dw 5386 ; 0x150A
db 'YAMASHITA SYSTEMS CORP '
dw 5387 ; 0x150B
db 'KYOPAL CO LTD '
dw 5388 ; 0x150C
db 'WARPSPPED INC '
dw 5389 ; 0x150D
db 'C-PORT CORPORATION '
dw 5390 ; 0x150E
db 'INTEC GMBH '
dw 5391 ; 0x150F
db 'BEHAVIOR TECH COMPUTER CORP '
dw 5392 ; 0x1510
db 'CENTILLIUM TECHNOLOGY CORP '
dw 5393 ; 0x1511
db 'ROSUN TECHNOLOGIES INC '
dw 5394 ; 0x1512
db 'RAYCHEM '
dw 5395 ; 0x1513
db 'TFL LAN INC '
dw 5396 ; 0x1514
db 'ICS ADVENT '
dw 5397 ; 0x1515
db 'MYSON TECHNOLOGY INC '
dw 5398 ; 0x1516
db 'ECHOTEK CORPORATION '
dw 5399 ; 0x1517
db 'PEP MODULAR COMPUTERS GMBH '
dw 5400 ; 0x1518
db 'TELEFON AKTIEBOLAGET LM Ericsson '
dw 5401 ; 0x1519
db 'GLOBETEK INC '
dw 5402 ; 0x151A
db 'COMBOX LTD '
dw 5403 ; 0x151B
db 'DIGITAL AUDIO LABS INC '
dw 5404 ; 0x151C
db 'FUJITSU COMPUTER PRODUCTS OF AMERICA '
dw 5405 ; 0x151D
db 'MATRIX CORP. '
dw 5406 ; 0x151E
db 'TOPIC SEMICONDUCTOR CORP '
dw 5407 ; 0x151F
db 'CHAPLET SYSTEM INC '
dw 5408 ; 0x1520
db 'BELL CORPORATION '
dw 5409 ; 0x1521
db 'MAINPINE LIMITED '
dw 5410 ; 0x1522
db 'MUSIC SEMICONDUCTORS '
dw 5411 ; 0x1523
db 'ENE TECHNOLOGY INC '
dw 5412 ; 0x1524
db 'IMPACT TECHNOLOGIES '
dw 5413 ; 0x1525
db 'ISS '
dw 5414 ; 0x1526
db 'SOLECTRON '
dw 5415 ; 0x1527
db 'ACKSYS '
dw 5416 ; 0x1528
db 'AMERICAN MICROSYSTEMS INC '
dw 5417 ; 0x1529
db 'QUICKTURN DESIGN SYSTEMS '
dw 5418 ; 0x152A
db 'FLYTECH TECHNOLOGY CO LTD '
dw 5419 ; 0x152B
db 'MACRAIGOR SYSTEMS LLC '
dw 5420 ; 0x152C
db 'QUANTA COMPUTER INC '
dw 5421 ; 0x152D
db 'MELEC INC '
dw 5422 ; 0x152E
db 'PHILIPS-CRYPTO '
dw 5423 ; 0x152F
db 'ACQIS TECHNOLOGY '
dw 5424 ; 0x1530
db 'CHRYON CORP. '
dw 5425 ; 0x1531
db 'ECHELON CORPORATION '
dw 5426 ; 0x1532
db 'BALTIMORE '
dw 5427 ; 0x1533
db 'ROAD CORPORATION '
dw 5428 ; 0x1534
db 'EVERGREEN TECHNOLOGIES INC '
dw 5429 ; 0x1535
db 'DATALEX COMMUNCATIONS '
dw 5431 ; 0x1537
db 'ARALION INC. '
dw 5432 ; 0x1538
db 'ATELIER INFORMATIQUES et ELECTRONIQUE ETUDES S.A. '
dw 5433 ; 0x1539
db 'ONO SOKKI '
dw 5434 ; 0x153A
db 'TERRATEC ELECTRONIC GMBH '
dw 5435 ; 0x153B
db 'ANTAL ELECTRONIC '
dw 5436 ; 0x153C
db 'FILANET CORPORATION '
dw 5437 ; 0x153D
db 'TECHWELL INC '
dw 5438 ; 0x153E
db 'MIPS DENMARK '
dw 5439 ; 0x153F
db 'PROVIDEO MULTIMEDIA CO LTD '
dw 5440 ; 0x1540
db 'TELOSITY INC. '
dw 5441 ; 0x1541
db 'VIVID TECHNOLOGY INC '
dw 5442 ; 0x1542
db 'SILICON LABORATORIES '
dw 5443 ; 0x1543
db 'DCM DATA SYSTEMS '
dw 5444 ; 0x1544
db 'VISIONTEK '
dw 5445 ; 0x1545
db 'IOI TECHNOLOGY CORP. '
dw 5446 ; 0x1546
db 'MITUTOYO CORPORATION '
dw 5447 ; 0x1547
db 'JET PROPULSION LABORATORY '
dw 5448 ; 0x1548
db 'INTERCONNECT SYSTEMS SOLUTIONS '
dw 5449 ; 0x1549
db 'MAX TECHNOLOGIES INC. '
dw 5450 ; 0x154A
db 'COMPUTEX CO LTD '
dw 5451 ; 0x154B
db 'VISUAL TECHNOLOGY INC. '
dw 5452 ; 0x154C
db 'PAN INTERNATIONAL INDUSTRIAL CORP '
dw 5453 ; 0x154D
db 'SERVOTEST LTD '
dw 5454 ; 0x154E
db 'STRATABEAM TECHNOLOGY '
dw 5455 ; 0x154F
db 'OPEN NETWORK CO LTD '
dw 5456 ; 0x1550
db 'SMART ELECTRONIC DEVELOPMENT GMBH '
dw 5457 ; 0x1551
db 'RACAL AIRTECH LTD '
dw 5458 ; 0x1552
db 'CHICONY ELECTRONICS CO LTD '
dw 5459 ; 0x1553
db 'PROLINK MICROSYSTEMS CORP. '
dw 5460 ; 0x1554
db 'GESYTEC GMBH '
dw 5461 ; 0x1555
db 'PLD APPLICATIONS '
dw 5462 ; 0x1556
db 'MEDIASTAR CO. LTD '
dw 5463 ; 0x1557
db 'CLEVO/KAPOK COMPUTER '
dw 5464 ; 0x1558
db 'SI LOGIC LTD '
dw 5465 ; 0x1559
db 'INNOMEDIA INC '
dw 5466 ; 0x155A
db 'PROTAC INTERNATIONAL CORP '
dw 5467 ; 0x155B
db 'CEMAX-ICON INC '
dw 5468 ; 0x155C
db 'MAC SYSTEM CO LTD '
dw 5469 ; 0x155D
db 'LP ELEKTRONIK GMBH '
dw 5470 ; 0x155E
db 'PERLE SYSTEMS LIMITED '
dw 5471 ; 0x155F
db 'TERAYON COMMUNICATIONS SYSTEMS '
dw 5472 ; 0x1560
db 'VIEWGRAPHICS INC '
dw 5473 ; 0x1561
db 'SYMBOL TECHNOLOGIES '
dw 5474 ; 0x1562
db 'A-TREND '
dw 5475 ; 0x1563
db 'YAMAKATSU ELECTRONICS INDUSTRY CO LTD '
dw 5476 ; 0x1564
db 'BIOSTAR MICROTECH INT CORP '
dw 5477 ; 0x1565
db 'ARDENT TECHNOLOGIES INC '
dw 5478 ; 0x1566
db 'JUNGSOFT '
dw 5479 ; 0x1567
db 'DDK ELECTRONICS INC '
dw 5480 ; 0x1568
db 'PALIT MICROSYSTEMS INC '
dw 5481 ; 0x1569
db 'AVTEC SYSTEMS '
dw 5482 ; 0x156A
db '2WIRE '
dw 5483 ; 0x156B
db 'VIDAC ELECTRONICS GMBH '
dw 5484 ; 0x156C
db 'ALPHA-TOP CORP '
dw 5485 ; 0x156D
db 'ALFA INC '
dw 5486 ; 0x156E
db 'M-SYSTEMS FLASH DISK PIONEERS LTD '
dw 5487 ; 0x156F
db 'LECROY CORPORATION '
dw 5488 ; 0x1570
db 'CONTEMPORARY CONTROLS '
dw 5489 ; 0x1571
db 'OTIS ELEVATOR COMPANY '
dw 5490 ; 0x1572
db 'LATTICE-VANTIS '
dw 5491 ; 0x1573
db 'FAIRCHILD SEMICONDUCTOR '
dw 5492 ; 0x1574
db 'VOLTAIRE ADVANCED DATA SECURITY LTD '
dw 5493 ; 0x1575
db 'VIEWCAST COM '
dw 5494 ; 0x1576
db 'HITT '
dw 5496 ; 0x1578
db 'DUAL TECHNOLOGY CORPORATION '
dw 5497 ; 0x1579
db 'JAPAN ELECRONICS IND. INC '
dw 5498 ; 0x157A
db 'STAR MULTIMEDIA CORP. '
dw 5499 ; 0x157B
db 'EUROSOFT (UK) LTD '
dw 5500 ; 0x157C
db 'GEMFLEX NETWORKS '
dw 5501 ; 0x157D
db 'TRANSITION NETWORKS '
dw 5502 ; 0x157E
db 'PX INSTRUMENTS TECHNOLOGY LTD '
dw 5503 ; 0x157F
db 'PRIMEX AEROSPACE CO. '
dw 5504 ; 0x1580
db 'SEH COMPUTERTECHNIK GMBH '
dw 5505 ; 0x1581
db 'CYTEC CORPORATION '
dw 5506 ; 0x1582
db 'INET TECHNOLOGIES INC '
dw 5507 ; 0x1583
db 'UNIWILL COMPUTER CORP '
dw 5508 ; 0x1584
db 'LOGITRON '
dw 5509 ; 0x1585
db 'LANCAST INC '
dw 5510 ; 0x1586
db 'KONICA CORPORATION '
dw 5511 ; 0x1587
db 'SOLIDUM SYSTEMS CORP '
dw 5512 ; 0x1588
db 'ATLANTEK MICROSYSTEMS PTY LTD '
dw 5513 ; 0x1589
db 'DIGALOG SYSTEMS INC '
dw 5514 ; 0x158A
db 'ALLIED DATA TECHNOLOGIES '
dw 5515 ; 0x158B
db 'HITACHI SEMICONDUCTOR & DEVICES SALES CO LTD '
dw 5516 ; 0x158C
db 'POINT MULTIMEDIA SYSTEMS '
dw 5517 ; 0x158D
db 'LARA TECHNOLOGY INC '
dw 5518 ; 0x158E
db 'DITECT COOP '
dw 5519 ; 0x158F
db '3PARDATA '
dw 5520 ; 0x1590
db 'ARN '
dw 5521 ; 0x1591
db 'SYBA TECH LIMITED '
dw 5522 ; 0x1592
db 'BOPS INC '
dw 5523 ; 0x1593
db 'NETGAME LTD '
dw 5524 ; 0x1594
db 'DIVA SYSTEMS CORP. '
dw 5525 ; 0x1595
db 'FOLSOM RESEARCH INC '
dw 5526 ; 0x1596
db 'MEMEC DESIGN SERVICES '
dw 5527 ; 0x1597
db 'GRANITE MICROSYSTEMS '
dw 5528 ; 0x1598
db 'DELTA ELECTRONICS INC '
dw 5529 ; 0x1599
db 'GENERAL INSTRUMENT '
dw 5530 ; 0x159A
db 'FARADAY TECHNOLOGY CORP '
dw 5531 ; 0x159B
db 'STRATUS COMPUTER SYSTEMS '
dw 5532 ; 0x159C
db 'NINGBO HARRISON ELECTRONICS CO LTD '
dw 5533 ; 0x159D
db 'A-MAX TECHNOLOGY '
dw 5534 ; 0x159E
db 'GALEA NETWORK SECURITY '
dw 5535 ; 0x159F
db 'COMPUMASTER SRL '
dw 5536 ; 0x15A0
db 'GEOCAST NETWORK SYSTEMS INC '
dw 5537 ; 0x15A1
db 'CATALYST ENTERPRISES INC '
dw 5538 ; 0x15A2
db 'ITALTEL '
dw 5539 ; 0x15A3
db 'X-NET OY '
dw 5540 ; 0x15A4
db 'TOYOTA MACS INC '
dw 5541 ; 0x15A5
db 'SUNLIGHT ULTRASOUND TECHNOLOGIES LTD '
dw 5542 ; 0x15A6
db 'SSE TELECOM INC '
dw 5543 ; 0x15A7
db 'SHANGHAI COMMUNICATIONS TECHNOLOGIES CENTER '
dw 5544 ; 0x15A8
db 'MORETON BAY '
dw 5546 ; 0x15AA
db 'BLUESTEEL NETWORKS INC '
dw 5547 ; 0x15AB
db 'NORTH ATLANTIC INSTRUMENTS '
dw 5548 ; 0x15AC
db 'VMWARE '
dw 5549 ; 0x15AD
db 'AMERSHAM PHARMACIA BIOTECH '
dw 5550 ; 0x15AE
db 'ZOLTRIX INTERNATIONAL LIMITED '
dw 5552 ; 0x15B0
db 'SOURCE TECHNOLOGY INC '
dw 5553 ; 0x15B1
db 'MOSAID TECHNOLOGIES INC. '
dw 5554 ; 0x15B2
db 'MELLANOX TECHNOLOGY '
dw 5555 ; 0x15B3
db 'CCI/TRIAD '
dw 5556 ; 0x15B4
db 'CIMETRICS INC '
dw 5557 ; 0x15B5
db 'TEXAS MEMORY SYSTEMS INC '
dw 5558 ; 0x15B6
db 'SANDISK CORP. '
dw 5559 ; 0x15B7
db 'ADDI-DATA GMBH '
dw 5560 ; 0x15B8
db 'MAESTRO DIGITAL COMMUNICATIONS '
dw 5561 ; 0x15B9
db 'IMPACCT TECHNOLOGY CORP '
dw 5562 ; 0x15BA
db 'PORTWELL INC '
dw 5563 ; 0x15BB
db 'AGILENT TECHNOLOGIES '
dw 5564 ; 0x15BC
db 'DFI INC. '
dw 5565 ; 0x15BD
db 'SOLA ELECTRONICS '
dw 5566 ; 0x15BE
db 'HIGH TECH COMPUTER CORP (HTC) '
dw 5567 ; 0x15BF
db 'BVM LIMITED '
dw 5568 ; 0x15C0
db 'QUANTEL '
dw 5569 ; 0x15C1
db 'NEWER TECHNOLOGY INC '
dw 5570 ; 0x15C2
db 'TAIWAN MYCOMP CO LTD '
dw 5571 ; 0x15C3
db 'EVSX '
dw 5572 ; 0x15C4
db 'PROCOMP INFORMATICS LTD '
dw 5573 ; 0x15C5
db 'TECHNICAL UNIVERSITY OF BUDAPEST '
dw 5574 ; 0x15C6
db 'TATEYAMA SYSTEM LABORATORY CO LTD '
dw 5575 ; 0x15C7
db 'PENTA MEDIA CO. LTD '
dw 5576 ; 0x15C8
db 'SEROME TECHNOLOGY INC '
dw 5577 ; 0x15C9
db 'BITBOYS OY '
dw 5578 ; 0x15CA
db 'AG ELECTRONICS LTD '
dw 5579 ; 0x15CB
_FOURTHPART: ;lists 100 vendors
db 'HOTRAIL INC. '
dw 5580 ; 0x15CC
db 'DREAMTECH CO LTD '
dw 5581 ; 0x15CD
db 'GENRAD INC. '
dw 5582 ; 0x15CE
db 'HILSCHER GMBH '
dw 5583 ; 0x15CF
db 'INFINEON TECHNOLOGIES AG '
dw 5585 ; 0x15D1
db 'FIC (FIRST INTERNATIONAL COMPUTER INC) '
dw 5586 ; 0x15D2
db 'NDS TECHNOLOGIES ISRAEL LTD '
dw 5587 ; 0x15D3
db 'IWILL CORPORATION '
dw 5588 ; 0x15D4
db 'TATUNG CO. '
dw 5589 ; 0x15D5
db 'ENTRIDIA CORPORATION '
dw 5590 ; 0x15D6
db 'ROCKWELL-COLLINS '
dw 5591 ; 0x15D7
db 'CYBERNETICS TECHNOLOGY CO LTD '
dw 5592 ; 0x15D8
db 'SUPER MICRO COMPUTER INC '
dw 5593 ; 0x15D9
db 'CYBERFIRM INC. '
dw 5594 ; 0x15DA
db 'APPLIED COMPUTING SYSTEMS INC. '
dw 5595 ; 0x15DB
db 'LITRONIC INC '
dw 5596 ; 0x15DC
db 'SIGMATEL INC. '
dw 5597 ; 0x15DD
db 'MALLEABLE TECHNOLOGIES INC '
dw 5598 ; 0x15DE
db 'INFINILINK CORP. '
dw 5599 ; 0x15DF
db 'CACHEFLOW INC '
dw 5600 ; 0x15E0
db 'VOICE TECHNOLOGIES GROUP INC '
dw 5601 ; 0x15E1
db 'QUICKNET TECHNOLOGIES INC '
dw 5602 ; 0x15E2
db 'NETWORTH TECHNOLOGIES INC '
dw 5603 ; 0x15E3
db 'VSN SYSTEMEN BV '
dw 5604 ; 0x15E4
db 'VALLEY TECHNOLOGIES INC '
dw 5605 ; 0x15E5
db 'AGERE INC. '
dw 5606 ; 0x15E6
db 'GET ENGINEERING CORP. '
dw 5607 ; 0x15E7
db 'NATIONAL DATACOMM CORP. '
dw 5608 ; 0x15E8
db 'PACIFIC DIGITAL CORP. '
dw 5609 ; 0x15E9
db 'TOKYO DENSHI SEKEI K.K. '
dw 5610 ; 0x15EA
db 'DRSEARCH GMBH '
dw 5611 ; 0x15EB
db 'BECKHOFF GMBH '
dw 5612 ; 0x15EC
db 'MACROLINK INC '
dw 5613 ; 0x15ED
db 'IN WIN DEVELOPMENT INC. '
dw 5614 ; 0x15EE
db 'INTELLIGENT PARADIGM INC '
dw 5615 ; 0x15EF
db 'B-TREE SYSTEMS INC '
dw 5616 ; 0x15F0
db 'TIMES N SYSTEMS INC '
dw 5617 ; 0x15F1
db 'DIAGNOSTIC INSTRUMENTS INC '
dw 5618 ; 0x15F2
db 'DIGITMEDIA CORP. '
dw 5619 ; 0x15F3
db 'VALUESOFT '
dw 5620 ; 0x15F4
db 'POWER MICRO RESEARCH '
dw 5621 ; 0x15F5
db 'EXTREME PACKET DEVICE INC '
dw 5622 ; 0x15F6
db 'BANCTEC '
dw 5623 ; 0x15F7
db 'KOGA ELECTRONICS CO '
dw 5624 ; 0x15F8
db 'ZENITH ELECTRONICS CORPORATION '
dw 5625 ; 0x15F9
db 'J P AXZAM CORPORATION '
dw 5626 ; 0x15FA
db 'ZILOG INC. '
dw 5627 ; 0x15FB
db 'TECHSAN ELECTRONICS CO LTD '
dw 5628 ; 0x15FC
db 'N-CUBED.NET '
dw 5629 ; 0x15FD
db 'KINPO ELECTRONICS INC '
dw 5630 ; 0x15FE
db 'FASTPOINT TECHNOLOGIES INC. '
dw 5631 ; 0x15FF
db 'NORTHROP GRUMMAN-CANADA LTD '
dw 5632 ; 0x1600
db 'TENTA TECHNOLOGY '
dw 5633 ; 0x1601
db 'PROSYS-TEC INC. '
dw 5634 ; 0x1602
db 'NOKIA WIRELESS BUSINESS COMMUNICATIONS '
dw 5635 ; 0x1603
db 'CENTRAL SYSTEM RESEARCH CO LTD '
dw 5636 ; 0x1604
db 'PAIRGAIN TECHNOLOGIES '
dw 5637 ; 0x1605
db 'EUROPOP AG '
dw 5638 ; 0x1606
db 'LAVA SEMICONDUCTOR MANUFACTURING INC. '
dw 5639 ; 0x1607
db 'AUTOMATED WAGERING INTERNATIONAL '
dw 5640 ; 0x1608
db 'SCIEMETRIC INSTRUMENTS INC '
dw 5641 ; 0x1609
db 'AMBIENT TECHNOLOGIES INC '
dw 6163 ; 0x1813
db 'Jaton Corp '
dw 6931 ; 0x1B13
db 'TEMPORAL RESEARCH LTD '
dw 8193 ; 0x2001
db 'CHAINTECH COMPUTER CO. LTD '
dw 9999 ; 0x270F
db 'HINT CORP '
dw 13192 ; 0x3388
db 'QUANTUM DESIGNS (H.K.) INC. '
dw 13329 ; 0x3411
db 'AVANCE LOGIC INC '
dw 16389 ; 0x4005
db 'DELTA NETWORKS INC '
dw 16435 ; 0x4033
db 'ALADDIN KNOWLEDGE SYSTEMS '
dw 16748 ; 0x416C
db 'CONEXANT (WAS ICOMPRESION INC.) '
dw 17476 ; 0x4444
db 'GROWTH NETWORKS '
dw 18755 ; 0x4943
db 'SEANIX TECHNOLOGY INC '
dw 19617 ; 0x4CA1
db 'MEDIAQ INC. '
dw 19793 ; 0x4D51
db 'MICROTECHNICA CO LTD '
dw 19796 ; 0x4D54
db 'S S TECHNOLOGIES '
dw 20790 ; 0x5136
db 'S3 INC. '
dw 21299 ; 0x5333
db 'TERALOGIC INC '
dw 21580 ; 0x544C
db 'GENROCO INC '
dw 21845 ; 0x5555
db 'LOGITEC CORP. '
dw 25609 ; 0x6409
db 'DECISION COMPUTER INTERNATIONAL CO. '
dw 26214 ; 0x6666
db 'INTEL CORP. '
dw 32902 ; 0x8086
db 'SILICON MAGIC CORP. '
dw 34952 ; 0x8888
db 'COMPUTONE CORPORATION '
dw 36366 ; 0x8E0E
db 'ADAPTEC '
dw 36868 ; 0x9004
db 'GIGAPIXEL CORP '
dw 37274 ; 0x919A
db 'OMNI MEDIA TECHNOLOGY INC. '
dw 38553 ; 0x9699
db 'AOPEN INC. '
dw 41120 ; 0xA0A0
db 'HEWLETT PACKARD '
dw 41561 ; 0xA259
db 'DIGITAL RECEIVER TECHNOLOGY INC '
dw 44062 ; 0xAC1E
db 'MOTOROLA '
dw 49374 ; 0xC0DE
db 'MOTION ENGINEERING. '
dw 49406 ; 0xC0FE
db 'VARIAN AUSTRIALIA PTY LTD '
dw 51792 ; 0xCA50
db 'CHRYSALIS-ITS '
dw 51966 ; 0xCAFE
db 'CATAPULT COMMUNICATIONS '
dw 52428 ; 0xCCCC
db 'DY4 Systems Inc '
dw 54484 ; 0xD4D4
db 'EKF ELEKTRONIK GMBH '
dw 58559 ; 0xE4BF
db 'EAGLE TECHNOLOGY '
dw 59905 ; 0xEA01
db 'FAST SEARCH & TRANSFER ASA '
dw 64087 ; 0xFA57
db 'EPIGRAM INC '
dw 65242 ; 0xFEDA
;----------------------------------------------------------------------
_UNKNOWN: db 'UNKOWN VENDOR '
 
 
PREVIOUSVERSIONLIST:
db 'LUCENT '
dw 4545 ; 0x11C1
db 'EPOX '
dw 5781 ; 0x1695
db 'AVERMEDIA '
dw 5217 ; 0x1461
db 'NVIDIA (WAS: STB,SGS THOMPSON) '
dw 4818 ; 0x12D2
db 'ALBATRON '
dw 6130 ; 0x17F2
db 'ASROCK '
dw 6217 ; 0x1849
db 'CONEXANT, ROCKWELL '
dw 4730 ; 0x127A
 
_UNKNOWND:
db 'UNKOWN DEVICE '
 
Class0:
db 'Prehistoric - misc '
dw 00 ; 0x00
db 'Prehistoric - VGA '
dw 01 ; 0x01
 
Class1:
db 'Storage - SCSI '
dw 00 ; 0x00
db 'Storage - IDE '
dw 01 ; 0x01
db 'Storage - Floppy '
dw 02 ; 0x02
db 'Storage - IPI '
dw 03 ; 0x03
db 'Storage - RAID '
dw 04 ; 0x04
db 'Storage - ATA with DMA '
dw 05 ; 0x05
db 'Storage - Serial ATA '
dw 06 ; 0x06
db 'Storage - misc '
dw 128 ; 0x80
 
 
Class2:
db 'Network - Ethernet '
dw 00 ; 0x0
db 'Network - Token Ring '
dw 01 ; 0x1
db 'Network - FDDI '
dw 02 ; 0x2
db 'Network - ATM '
dw 03 ; 0x3
db 'Network - ISDN '
dw 04 ; 0x4
db 'Network - WorldFip '
dw 05 ; 0x5
db 'Network - PICMG 2.14 '
dw 06 ; 0x6
db 'Network - misc '
dw 128 ; 0x80
Class3:
db 'Display - VGA controller '
dw 00 ; 0x0
db 'Display - XGA controller '
dw 01 ; 0x1
db 'Display - 3D controller '
dw 02 ; 0x2
db 'Display - misc '
dw 128 ; 0x80
 
Class4:
db 'Multimedia - Video '
dw 00 ; 0x0
db 'Multimedia - Audio '
dw 01 ; 0x1
db 'Multimedia - Computer telephony '
dw 02 ; 0x2
db 'Multimedia - misc '
dw 128 ; 0x80
Class5:
db 'Memory - RAM '
dw 00 ; 0x0
db 'Memory- Flash memory '
dw 01 ; 0x1
db 'Memory - misc '
dw 128 ; 0x80
 
Class6:
db 'Bridge - CPU/PCI '
dw 00 ; 0x00
db 'Bridge - PCI/ISA '
dw 01 ; 0x01
db 'Bridge - PCI/EISA '
dw 02 ; 0x02
db 'Bridge - PCI/MCA '
dw 03 ; 0x03
db 'Bridge - PCI/PCI '
dw 04 ; 0x04
db 'Bridge - PCMCIA '
dw 05 ; 0x05
db 'Bridge - NuBus '
dw 06 ; 0x06
db 'Bridge - CardBus '
dw 07 ; 0x07
db 'Bridge - RACEway '
dw 08 ; 0x08
db 'Bridge - Semi-transpar. PCI/PCI '
dw 09 ; 0x09
db 'Bridge - InfiniBand/PCI '
dw 10 ; 0x0A
db 'Bridge - misc '
dw 128 ; 0x80
Class7:
db 'Communication - Serial '
dw 00 ; 0x0
db 'Communication - Parallel '
dw 01 ; 0x1
db 'Communication - Multiport Serial'
dw 02 ; 0x2
db 'Communication - Modem '
dw 03 ; 0x3
db 'Communication - GPIB '
dw 04 ; 0x4
db 'Communication - Smart Card '
dw 05 ; 0x5
db 'Communication - misc '
dw 128 ; 0x80
Class8:
db 'System - PIC '
dw 00 ; 0x0
db 'System - DMAC '
dw 01 ; 0x1
db 'System - Timer '
dw 02 ; 0x2
db 'System - RTC '
dw 03 ; 0x3
db 'System - PCI Hot-Plug '
dw 04 ; 0x4
db 'System - misc '
dw 128 ; 0x80
 
Class9:
db 'Input - Keyboard '
dw 00 ; 0x0
db 'Input - Digitazer (pen) '
dw 01 ; 0x1
db 'Input - Mouse '
dw 02 ; 0x2
db 'Input - Scanner '
dw 03 ; 0x3
db 'Input - Gameport '
dw 04 ; 0x4
db 'Input - misc '
dw 128 ; 0x80
ClassA:
db 'Docking - Generic station '
dw 00 ; 0x0
db 'Docking - misc '
dw 128 ; 0x80
 
 
ClassB:
db 'Processor - 386 '
dw 00 ; 0x0
db 'Processor - 486 '
dw 01 ; 0x1
db 'Processor - Pentium '
dw 02 ; 0x2
db 'Processor - Alpha '
dw 16 ; 0x10
db 'Processor - PowerPC '
dw 32 ; 0x20
db 'Processor - MIPS '
dw 48 ; 0x30
db 'Processor - Co-processor '
dw 64 ; 0x40
ClassC:
db 'Serial Bus - FireWire '
dw 00 ; 0x0
db 'Serial Bus - ACCESS.bus '
dw 01 ; 0x1
db 'Serial Bus - SSA '
dw 02 ; 0x2
db 'Serial Bus - USB/USB2 '
dw 03 ; 0x3
db 'Serial Bus - Fibre Channel '
dw 04 ; 0x4
db 'Serial Bus - SMBus '
dw 05 ; 0x5
db 'Serial Bus - InfiniBand '
dw 06 ; 0x6
db 'Serial Bus - IPMI '
dw 07 ; 0x7
db 'Serial Bus - SERCOS '
dw 08 ; 0x8
db 'Serial Bus - CANbus '
dw 09 ; 0x9
 
ClassD:
db 'Wireless - iRDA '
dw 00 ; 0x0
db 'Wireless - Consumer IR '
dw 01 ; 0x1
db 'Wireless - RF '
dw 16 ; 0x10
db 'Wireless - Bluetooth '
dw 17 ; 0x11
db 'Wireless - Broadband '
dw 18 ; 0x12
db 'Wireless - Ethernet (802.11a) '
dw 32 ; 0x20
db 'Wireless - Ethernet (802.11b) '
dw 33 ; 0x21
db 'Wireless - misc '
dw 128 ; 0x80
 
ClassE:
db 'Intelligent I/O - I/O contr. '
dw 00 ; 0x0
 
ClassF:
db 'Satellite Communication - TV '
dw 01 ; 0x1
db 'Satellite Communication - Audio '
dw 02 ; 0x2
db 'Satellite Communication - Voice '
dw 03 ; 0x3
db 'Satellite Communication - Data '
dw 04 ; 0x4
 
Class10:
db 'En/Decryption - Network&comput. '
dw 00 ; 0x0
db 'En/Decryption - Entertainment '
dw 16 ; 0x10
db 'En/Decryption - misc '
dw 128 ; 0x80
 
Class11:
db 'DSP - DPIO modules '
dw 00 ; 0x0
db 'DSP - Performance counters '
dw 01 ; 0x1
db 'DSP - Sync./Test/Measurement '
dw 16 ; 0x10
db 'DSP - Managamant card '
dw 32 ; 0x20
db 'DSP - misc '
dw 128 ; 0x80
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/pic4/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm pic4.asm pic4
@pause
/programs/system/pic4/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm pic4.asm pic4
@pause
/programs/system/pic4/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/pic4/trunk/pic4.asm
0,0 → 1,707
;
; BACKGROUND SET - Compile with fasm
;
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; version
dd START ; program start
dd I_END ; image size
dd 0x80000 ; reguired amount of memory
dd 0x80000 ; stack pointer
dd I_Param,0
 
include 'lang.inc'
include 'macros.inc'
 
START:
 
call check_parameters
call draw_window
 
call load_texture
call draw_image
 
still:
 
mov eax,10 ; wait here for event
int 0x40
cmp eax,1
jz red
cmp eax,2
jz key
cmp eax,3
jz button
jmp still
 
key:
mov eax,2
int 0x40
jmp still
 
red:
call draw_window
jmp still
 
button:
mov eax,17
int 0x40
 
shr eax,8
and eax,255
 
cmp eax,101 ; tiled
jne no101
mov eax,15
mov ebx,4
mov ecx,1
int 0x40
mov eax,15
mov ebx,3
int 0x40
jmp still
no101:
 
cmp eax,102 ; stretch
jne no102
mov eax,15
mov ebx,4
mov ecx,2
int 0x40
mov eax,15
mov ebx,3
int 0x40
jmp still
no102:
 
cmp eax,1 ; end program
jnz noproend
or eax,-1
int 0x40
noproend:
 
cmp eax,11
jz bg
cmp eax,12
jz bg
cmp eax,13
jz bg
 
cmp eax,121
jb no_bg_select
cmp eax,133
jg no_bg_select
sub eax,121
shl eax,2
add eax,arrays
mov eax,[eax]
mov [usearray],eax
call load_texture
call draw_image
jmp still
no_bg_select:
 
cmp eax,14+20
jge bg4
 
jmp bg2
 
 
set_default_colours:
 
pusha
 
mov eax,6 ; load default color map
mov ebx,defcol
mov ecx,0
mov edx,-1
mov esi,0x8000
int 0x40
 
mov eax,48 ; set default color map
mov ebx,2
mov ecx,0x8000
mov edx,10*4
int 0x40
 
popa
ret
 
defcol db 'DEFAULT.DTP'
 
 
check_parameters:
 
cmp [I_Param],dword 'BOOT'
je @f
ret
@@:
 
call set_default_colours
call load_texture
 
mov eax,15
mov ebx,1
mov ecx,256
mov edx,256
int 0x40
 
mov eax,15
mov ebx,5
mov ecx,0x40000+1
mov edx,0
mov esi,256*3*256
int 0x40
 
mov eax,15
mov ebx,4
mov ecx,2
int 0x40
 
mov eax,15
mov ebx,3
int 0x40
 
mov eax,-1
int 0x40
 
 
 
set_picture:
 
mov eax,image+99-3*16
mov ebx,0x40000+255*3+255*3*256
newpix:
mov ecx,[eax]
mov [ebx],cx
shr ecx,16
mov [ebx+2],cl
add eax,3
sub ebx,3
cmp ebx,0x40002
jge newpix
 
ret
 
 
load_texture:
 
call gentexture
call set_picture
 
ret
 
 
; set background
 
bg:
 
mov edi,0x40000
 
cmp eax,12
jnz bb1
mov edi,0x40000+1
bb1:
cmp eax,13
jnz bb2
mov edi,0x40000+2
bb2:
 
mov eax,15
mov ebx,1
mov ecx,256
mov edx,256
int 0x40
 
mov eax,15
mov ebx,5
mov ecx,edi
mov edx,0
mov esi,256*256*3
int 0x40
 
mov eax,15
mov ebx,3
int 0x40
 
jmp still
 
 
; colored background
 
bg2:
 
push eax
 
mov eax,15
mov ebx,1
mov ecx,8
mov edx,8
int 0x40
 
mov eax,[esp]
 
sub eax,14
shl eax,2
 
mov edx,[colors+eax]
 
mov esi,32*32*4
mov edi,0
mov ecx,0
dbl2:
mov eax,15
mov ebx,2
int 0x40
add ecx,3
inc edi
cmp edi,esi
jb dbl2
 
 
mov eax,15
mov ebx,3
int 0x40
 
jmp still
 
 
; shaped background
 
bg4:
 
sub eax,14+20
shl eax,3
add eax,shape
mov ecx,[eax+0]
mov edx,[eax+4]
 
mov eax,15
mov ebx,1
int 0x40
 
mov eax,15
mov ebx,3
int 0x40
 
jmp still
 
 
; *********************************************
; ******* CELLULAR TEXTURE GENERATION *********
; **** by Cesare Castiglia (dixan/sk/mfx) *****
; ********* dixan@spinningkids.org **********
; *********************************************
; * the algorythm is kinda simple. the color *
; * component for every pixel is evaluated *
; * according to the squared distance from *
; * the closest point in 'ptarray'. *
; *********************************************
 
gentexture:
 
mov ecx,0 ; ycounter
mov edi,0 ; pixel counter
 
mov ebp,[usearray]
 
ylup:
mov ebx,0
 
call precalcbar
 
xlup:
push edi
mov edi, 0
mov esi, 512000000 ; abnormous initial value :)
 
pixlup:
push esi
; add edi,4
mov eax,ebx ; evaluate first distance
sub eax, [ebp+edi] ; x-x1
call wrappit
imul eax
mov esi, eax ; (x-x1)^2
mov eax, ecx
add edi,4
sub eax, [ebp+edi] ; y-y1
call wrappit
imul eax ; (y-y1)^2
add eax,esi ; (x-x1)^2+(y-y1)^2
pop esi
 
cmp esi,eax
jb ok ; compare and take the smaller one
mov esi,eax
 
ok:
add edi,4
cmp [ebp+edi],dword 777
jne pixlup
 
mov eax,esi ; now evaluate color...
 
cmp eax,255*24
jbe ok2
; imul eax,12
ok2:
 
mov edi,24 ; 50 = max shaded distance
idiv edi
 
pop edi
mov [image+51+edi],eax
add edi,3
 
add ebx,1 ; bounce x loop
cmp ebx,256 ; xsize
jne xlup
 
add ecx,1
cmp ecx,256 ; ysize
jne ylup
 
ret
 
wrappit:
cmp eax,0 ; this makes the texture wrap
jg noabs
neg eax
noabs:
cmp eax,128
jb nowrap
neg eax
add eax,256
nowrap:
ret
 
precalcbar:
pusha
mov eax,1
mov ebx,ecx
add ebx,18
mov ecx,44
mov edx,0x00000060
bar:
add ecx,2
add edx,0x00020100
; int 0x40
cmp ecx,298
jb bar
popa
ret
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW *********
; *********************************************
 
 
draw_image:
 
mov eax,7
mov ebx,0x40000
mov ecx,256*65536+255
mov edx,19*65536+65;55
int 0x40
 
ret
 
 
y_add equ 44 ; 30
y_s equ 13
 
y_add2 equ 340 ;325
set equ 0 ;15
 
button_color equ 0A0A0A0h ; 207090 306090h
wnd_color equ 3B0B0B0h ; 34090B0h
 
 
draw_window:
 
mov eax, 12 ; tell os about draw
mov ebx, 1
int 0x40
 
mov eax, 0 ; define and draw window
mov ebx, 220*65536+293
mov ecx, 50*65536+408
mov edx, wnd_color
int 0x40
 
call draw_image
 
mov eax,8 ; Blue button
mov ebx,(set+195+27)*65536+17
mov ecx,y_add*65536+y_s
mov edx,11
mov esi,0x004444cc
int 0x40
mov eax,8 ; Red button
mov ebx,(set+213+27)*65536+17
mov edx,12
mov esi,0x00cc4444
int 0x40
mov eax,8 ; Green button
mov ebx,(set+258)*65536+17
mov edx,13
mov esi,0x0044cc44
int 0x40
 
mov eax, 8 ; tiled
mov ebx, 96*65536+63
mov ecx, y_add*65536+y_s
mov edx, 101
mov esi, button_color
int 0x40
 
mov eax, 8 ; stretch
mov ebx, 160*65536+61
mov edx, 102
int 0x40
 
mov eax, 4 ; window header
mov ebx, 8*65536+8
mov ecx, 0x10ffffff
mov edx, header
mov esi, header.size
int 0x40
 
mov ebx, 220*65536+30
mov ecx, 0
mov edx, apply_text
mov esi, apply_text.size
int 0x40
 
mov ebx, 19*65536+326
mov edx, image_buttons_text
mov esi, image_buttons_text.size
int 0x40
 
mov ebx, 19*65536+(y_add2+27)
mov edx, simple_text
mov esi, simple_text.size
int 0x40
 
mov ecx, (y_add2)*65536+20
mov ebx, (18)*65536+25
mov edx, 121
mov esi, button_color
mov edi, 9
mov eax, 8
@@:
int 0x40
add ebx, 29*65536
inc edx
dec edi
jnz @b
 
 
mov edx, 34+4
mov edi, 4
mov eax, 8
mov ebx, 18*65536+18
mov ecx, y_add*65536+y_s
@@:
int 0x40
inc edx
add ebx, 19*65536
dec edi
jnz @b
 
 
;-----------------------
mov edx,14 ; button number
mov ebx,(18)*65536+17 ; button start x & size
mov ecx,(y_add2+40)*65536+14 ; button start y & size
 
newcb:
push edx
sub edx,14
shl edx,2
add edx,colors
mov esi,[edx]
pop edx
 
mov eax,8
int 0x40
 
inc edx
add ebx,20*65536
add esi,5*256*256
 
cmp edx,27
jnz newcb
;-----------------------
 
mov eax, 4
mov ebx, 8*65536+4+y_add
mov ecx, 0
mov edx, la2
mov esi, la2.size
int 0x40
 
mov eax,12
mov ebx,2
int 0x40
 
ret
 
 
 
; DATA SECTION
 
lsz header,\
ru, "ƒ¥­¥à â®à ä®­  à ¡®ç¥£® á⮫ ",\
en, "BACKGROUND"
 
lsz apply_text,\
ru, "à¨¬¥­¨âì:",\
en, "Apply:"
 
lsz image_buttons_text,\
ru, "‚ë¡¥à¨â¥ ®¡à §¥æ:",\
en, "Select pattern:"
 
lsz simple_text,\
ru, "Ž¤­®æ¢¥â­ë© ä®­:",\
en, "Single-color background:"
 
lsz la2,\
ru, " ‡€ŒŽ‘’ˆ’œ €‘’Ÿ“’œ",\
en, " TILED STRETCH"
 
 
xx db 'x'
 
colors:
dd 0x770000
dd 0x007700
dd 0x000077
dd 0x777700
dd 0x770077
dd 0x007777
dd 0x777777
dd 0x335577
dd 0x775533
dd 0x773355
dd 0x553377
dd 0x000000
dd 0xcccccc
 
 
shape:
 
dd 1024,64
dd 1024,32
dd 2048,32
dd 4096,32
 
dd 512,16
dd 1024,16
dd 2048,16
dd 4096,16
 
dd 64,32
dd 64,16
dd 32,32
dd 8,8
dd 16,16
dd 64,64
 
usearray dd ptarray
 
arrays dd ptarray,ptarray2,ptarray3,ptarray4,ptarray5,ptarray6
dd ptarray7,ptarray8,ptarray9
 
ptarray:
 
dd 150,50
dd 120,30
dd 44,180
dd 50,66
dd 27,6
dd 95,212
dd 128,177
dd 201,212
dd 172,201
dd 250,100
dd 24,221
dd 11,123
dd 248,32
dd 34,21
dd 777 ; <- end of array
 
ptarray2:
 
dd 0,0,50,50,100,100,150,150,200,200,250,250
dd 50,150,150,50,200,100,100,200
dd 777
 
ptarray3:
 
dd 55,150,150,55,200,105,105,200
dd 30,30,220,220
dd 777
 
ptarray4:
 
dd 196,0,196,64,196,128,196,196
dd 64,32,64,96,64,150,64,228
dd 777
 
ptarray5:
 
dd 196,0,196,64,196,128,196,196
dd 64,0,64,64,64,128,64,196
dd 777
 
ptarray6:
 
dd 49,49,128,50,210,50
dd 50,128,128,128,210,128
dd 50,210,128,210,210,210
 
dd 777
 
ptarray7:
 
dd 0,0
dd 196,196,64,64
dd 128,0
dd 0,128
dd 64,64,196,64
dd 196,196,64,196
dd 128,128
 
dd 777
 
ptarray8:
 
dd 0, 128
dd 0, 128
dd 128, 0
dd 0, 128
dd 128, 0
dd 0, 128
dd 128, 0
dd 0, 128
dd 128, 0
dd 128, 128
 
dd 777
 
ptarray9:
 
 
dd 0,248,64,128,128,64,196,48,160,160,94,224,240,96,5,5,777
 
 
 
I_Param:
 
image:
 
 
I_END:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/rb/trunk/@RB.ASM
0,0 → 1,422
;
; DESKTOP CONTEXT MENU
; written by Ivan Poddubny
;
; €¢â®à - ˆ¢ ­ ®¤¤ã¡­ë©
; e-mail: ivan-yar@bk.ru
;
; Compile with flat assembler
;
include 'lang.inc'
include 'macros.inc'
 
meos_app_start
code
 
mov [start_info.mode], 16
mov [start_info.params], 0
mov [start_info.workarea], work_area
 
mov eax,40 ; ãáâ ­®¢¨¬ ¬ áªã ᮡë⨩
mov ebx,100000b ; ­ á ¨­â¥à¥áã¥â ⮫쪮 ¬ëèì
int 0x40
 
still: ; £« ¢­ë© 横« ®á­®¢­®£® ¯à®æ¥áá 
 
mov eax,10 ; ¦¤ñ¬ ᮡëâ¨ï
int 0x40
 
cmp eax,6 ; ¬ëèì?
jne still
 
mov eax,37 ; ª ª¨¥ ­ ¦ âë ª¯®¯ª¨?
mov ebx,2
int 0x40
 
cmp eax,2 ; ¥á«¨ ­¥ ¯à ¢ ï, ¢®§¢à â
jne still
 
;---¯®¥å «¨!---
 
; mov eax,37 ; íâ® ¤«ï ®â« ¤ª¨ - ¥á«¨ ¬ëèì ¢ â®çª¥ (0;0), § ªà®¥¬áï
; xor ebx,ebx
; int 0x40
; test eax,eax ; ªãàá®à ¢ â®çª¥ (0;0), â.¥. eax = 0
; je exit
 
 
mov eax,9 ; ¯®«ã稬 ç¨á«® ¯à®æ¥áᮢ ¢ á¨á⥬¥
mov ebx,procinfo
xor ecx,ecx
int 0x40
 
inc eax ; ⥯¥àì ¢ eax ᮤ¥à¦¨âáï ç¨á«® ¯à®æ¥áᮢ + 1
mov [processes],eax
mov ecx,1
 
new_process:
pushad
mov eax,9 ; ¯®«ã稬 ¨­ä®à¬ æ¨î ® ¯à®æ¥áá¥; ­®¬¥à - ¢ ecx
mov ebx,procinfo
int 0x40
mov eax,37 ; ª®®à¤¨­ âë ªãàá®à 
xor ebx,ebx
int 0x40
mov ebx,eax ; eax = cursor_x
shr eax,16 ; ebx = cursor_y
and ebx,0xffff
mov [curx1],eax ; curx1 = cursor_x
mov [cury1],ebx ; cury1 = cursor_y
mov eax,[procinfo.x_start] ; eax = wnd_x_start
mov ebx,[procinfo.y_start] ; ebx = wnd_y_start
 
mov ecx,[procinfo.x_size]
add ecx,eax ; ecx = wnd_x_end
mov edx,[procinfo.y_size]
add edx,ebx ; ecx = wnd_y_end
 
cmp eax,[curx1] ; wnd_x_start > cursor_x => ªãàá®à «¥¢¥¥ ®ª­ 
jg ne_goden
cmp ecx,[curx1] ; wnd_x_end < cursor_x => ªãàá®à ¯à ¢¥¥ ®ª­ 
jl ne_goden
cmp ebx,[cury1] ; wnd_y_start > cursor_y => ªãàá®à ¢ëè¥ ®ª­ 
jg ne_goden
cmp edx,[cury1] ; wnd_y_end < cursor_y => ªãàá®à ­¨¦¥ ®ª­ 
jl ne_goden
 
goden: ; ª«¨ª ¡ë« ¢­ãâਠª ª®£®-â® ®ª­ , ¯®í⮬㠭¨ç¥£® ­¥ ¤¥« ¥¬
popad
jmp still
 
ne_goden: ; ª«¨ª ¡ë« á­ à㦨 à áᬠâਢ ¥¬®£® ®ª­ , ¯®í⮬ã
popad
inc ecx
cmp ecx,[processes]
jl new_process ; «¨¡® ᬮਬ á«¥¤ãî饥 ®ª­®, «¨¡® § ¯ã᪠¥¬ ¬¥­î
 
 
@@: ; ¯®¤®¦¤ñ¬, ¯®ª  ¯®«ì§®¢ â¥«ì ­¥ ®â¯ãá⨫ ¯à ¢ãî ª­®¯ªã ¬ëè¨
mov eax,37
mov ebx,2 ; äã­ªæ¨ï 37-2:
int 0x40 ; ­ ¦ âë «¨ ª­®¯ª¨ ¬ëè¨?
cmp eax,ebx ; ¥á«¨ ®â¯ãá⨫, (eax != 2)
jnz @f ; ¨¤ñ¬ ¢ ­ ç «® £« ¢­®£® 横« 
 
mov eax,5 ; ¨­ ç¥
mov ebx,2 ; ¯®¤®¦¤ñ¬ 2 ¬á
int 0x40
 
jmp @b ; ¨ ¯à®¢¥à¨¬ ¬ëèì ®¯ïâì
@@:
 
; ¥á«¨ 㦥 ¡ë«® ®âªàëâ® ¬¥­î, ­ã¦­® ¯®¤®¦¤ âì, ¯®ª  ®­® § ªà®¥âáï:
@@:
cmp [menu_opened],0
je @f
mov eax,5
mov ebx,3 ; ¦¤ñ¬ 3 ¬á
int 0x40
jmp @b
@@:
 
mov eax,51 ;   ⥯¥àì ¬®¦­® ᬥ«® § ¯ã᪠âì ¯à®æ¥áá (¯®â®ª) ¬¥­î
mov ebx,1 ; ᮧ¤ ñ¬ ¯®â®ª (thread)
mov ecx,start_wnd ; â®çª  ¢å®¤  ¯®â®ª 
mov edx,stack_wnd ; ¢¥à設  áâíª  ¤«ï ¯®â®ª 
int 0x40
 
jmp still
 
 
 
exit_menu: ; ¥á«¨ ¢ë室¨¬ ¨§ ¬¥­î, ­ ¤® § ¯¨á âì ¢ [menu_opened] 0
mov [menu_opened],0
exit: ; á ¬ë ¨¤ñ¬, ª®£¤  ¢ë室¨¬ ¨§ ®á­®¢­®£® ¯à®æ¥áá 
or eax,-1 ; eax = -1
int 0x40
 
 
 
 
; §¤¥áì áâ àâã¥â ¯à®æ¥áá ¬¥­î
start_wnd:
mov [menu_opened],1
call draw_window
 
mov eax,40 ; ãáâ ­®¢¨¬ ¬ áªã ¦¥« ¥¬ëå ᮡë⨩ ¤«ï í⮣® ¯à®æ¥áá 
mov ebx,100101b ; ¬¥­î + ª­®¯ª¨ + ¯¥à¥à¨á®¢ª 
int 0x40
 
still2: ; £« ¢­ë© 横« ¯à®æ¥áá  ¬¥­î
 
mov eax,10 ; ¦¤ñ¬ ᮡëâ¨ï
int 0x40
 
cmp eax,1 ; ¯¥à¥à¨á®¢ª ?
je red
cmp eax,3 ; ª­®¯ª ?
je button
cmp eax,6 ; ¬ëèì?
je mouse
 
jmp still2 ; ¢¥à­ñ¬áï ¢ ­ ç «® £« ¢­®£® 横« 
 
 
; Ž€Ž’—ˆŠ Œ›˜ˆ
mouse: ; ª®£¤  ¯®«ì§®¢ â¥«ì ­ ¦¬ñâ ª­®¯ªã ¬ëè¨, § ªà®¥¬áï
mov eax,37
mov ebx,2 ; ª ª¨¥ ª­®¯ª¨ ­ ¦ âë?
int 0x40
test eax,eax ; ­¨ª ª¨¥? - ⮣¤  ¯à¥ªà á­®! ¢¥à­ñ¬áï ¢ £« ­ë© 横«
jz still2
jmp exit_menu ;   ¥á«¨ ¢áñ-â ª¨ ­ ¦ âë - § ªà®¥¬ ®ª­®
 
 
; ……ˆ‘Ž‚€’œ ŽŠŽ
red:
call draw_window
jmp still2
 
 
; €†€’€ ŠŽŠ€
button:
mov eax,17 ; ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
int 0x40
 
cmp ah,10 ; áà ¢­¨¢ ¥¬ á 10
jl nofuncbtns ; ¥á«¨ ¬¥­ìè¥ - § ªà뢠¥¬ ¬¥­î
 
add ah,-10 ; ¢ëç⥬ ¨§ ¨¤¥­â¨ä¨ª â®à  ª­®¯ª¨ 10
movzx ebx,ah ; ¯®«ã稫¨ ­®¬¥à ¯à®£à ¬¬ë ¢ ᯨ᪥ ¢ ebx
lea esi, [startapps + ebx*4]
lea edi, [start_info.path]
mov esi, [esi]
cld
@@:
lodsb
stosb
test al, al
jnz @b
mcall 58, start_info
 
; mov eax,5 ; ¯®¤®¦¤ñ¬, ¯®ª  ¯à®£à ¬¬  § ¯ãáâ¨âìáï
; mov ebx,1 ;   â® ¥ñ ®ª­® ­¥ ¡ã¤¥â ®âà¨á®¢ ­® (¡ £ ¢ ï¤à¥???)
; int 0x40 ; à áª®¬¬¥­â¨àã©â¥ í⨠áâப¨, ¥á«¨ ã ¢ á ¯à®¡«¥¬ë
; á ®âà¨á®¢ª®©
 
nofuncbtns: ; § ªà뢠¥¬ ¬¥­î
jmp exit_menu
 
 
 
_BTNS_ = 8 ; ª®«¨ç¥á⢮ ª­®¯®ª ("¯ã­ªâ®¢ ¬¥­î")
 
if lang eq ru
font = 0x00000000
string_length = 20 ; ¤«¨­  áâப¨
wnd_x_size = 133 ; è¨à¨­  ®ª­ 
header_pos = 36 shl 16 + 7
else
font = 0x10000000
string_length = 12 ; ¤«¨­  áâப¨
wnd_x_size = 105 ; è¨à¨­  ®ª­ 
header_pos = 23 shl 16 + 7
end if
 
;*******************************
;******** ˆ‘“…Œ ŽŠŽ ********
;*******************************
 
draw_window:
 
mov eax,12 ; ­ ç¨­ ¥¬ "à¨á®¢ âì"
mov ebx,1
int 0x40
 
mov eax,[curx1] ; ⥪ã騥 ª®®à¤¨­ âë ªãàá®à 
mov [curx],eax ; § ¯¨è¥¬ ¢ ª®®à¤¨­ âë ®ª­ 
mov eax,[cury1]
mov [cury],eax
 
; ⥯¥àì ¡ã¤¥¬ áç¨â âì ª®®à¤¨­ âë ®ª­ , çâ®¡ë ®­® §  ªà © íªà ­  ­¥ ¢ë«¥§«®
mov eax,14 ; ¯®«ã稬 à §¬¥à íªà ­ 
int 0x40
mov ebx,eax
shr eax,16 ; ¢ eax - x_screen
and ebx,0xffff ; ¢ ebx - y_screen
add eax,-wnd_x_size ; eax = [x_screen - è¨à¨­  ®ª­ ]
add ebx,-_BTNS_*15-21 ; ebx = [y_screen - ¢ëá®â  ®ª­ ]
 
cmp eax,[curx]
jg .okx ; ¥á«¨ ®ª­® ᫨誮¬ ¡«¨§ª® ª ¯à ¢®¬ã ªà î,
add [curx],-wnd_x_size ; ᤢ¨­¥¬ ¥£® ¢«¥¢® ­  100
.okx:
 
cmp ebx, [cury]
jg .oky ; ¯® ¢¥à⨪ «¨ â®ç­® â ª¦¥
add [cury], -_BTNS_*15-21
.oky:
 
mov eax, 48 ; ¯®«ãç¨âì á¨á⥬­ë¥ 梥â 
mov ebx, 3
mov ecx, sc ;  ¤à¥á áâàãªâãàë
mov edx, sizeof.system_colors ; ¨ ¥¥ à §¬¥à
int 0x40
 
xor eax, eax ; äã­ªæ¨ï 0 - ᮧ¤ âì ®ª­®
mov ebx, [curx] ; ebx = [ª®®à¤¨­ â  ¯® x] shl 16 + [è¨à¨­ ]
shl ebx, 16
add ebx, wnd_x_size
mov ecx, [cury] ; ecx = [ª®®à¤¨­ â  ¯® y] shl 16 + [¢ëá®â ]
shl ecx, 16
add ecx, _BTNS_*15+21
mov edx, [sc.work] ; 梥â à ¡®ç¥© ®¡« áâ¨
mov esi, [sc.grab] ; 梥⠧ £®«®¢ª 
or esi, 0x81000000
mov edi, [sc.frame] ; 梥â à ¬ª¨
int 0x40
 
mov eax, 4 ; § £®«®¢®ª
mov ebx, header_pos ; [x] shl 16 + [y]
mov ecx, [sc.grab_text]; èà¨äâ ¨ 梥â (á¥àë©)
add ecx, -0x333333
or ecx, 0x10000000
mov edx, header ;  ¤à¥á § £®«®¢ª 
mov esi, header.size ; ¤«¨­  § £®«®¢ª  ("M E N U")
int 0x40
add ecx, 0x333333 ; 梥⠡¥«ë©
add ebx, 1 shl 16 ; ᤢ¨­¥¬ ¢¯à ¢® ­  1
int 0x40
 
mov ebx, 1*65536+wnd_x_size-2 ; ­ ç¨­ ¥¬ ¤¥« âì ª­®¯ª¨
mov ecx, 20*65536+15
mov edx, 10 or 0x40000000 ; ¡¨â 30 ãáâ ­®¢«¥­ => ª­®¯ª  ­¥ à¨áã¥âáï
 
mov edi,_BTNS_ ; ª®«¨ç¥á⢮ ª­®¯®ª (áçñâ稪)
 
newbtn: ; ­ ç «® 横« 
mov eax,8 ; ᮧ¤ ñ¬ ª­®¯ªã
int 0x40
 
; ¯¨è¥¬ ⥪áâ ­  ª­®¯ª¥
pushad ; ᯠᠥ¬ ॣ¨áâàë
shr ecx, 16
and ebx, 0xffff0000
add ebx, ecx ; ebx = [x] shl 16 + [y];
add ebx, 10*65536+4 ; ebx += ᬥ饭¨¥ ®â­®á¨â¥«ì­® ªà ï ª­®¯ª¨;
mov ecx, [sc.work_text] ; èà¨äâ ¨ 梥â
or ecx, font
add edx, -10 ; edx = ­®¬¥à ª­®¯ª¨;
imul edx, string_length ; edx *= ¤«¨­  áâப¨;
add edx, text ; edx += text; ⥯¥àì ¢ edx  ¤à¥á áâப¨
mov esi, string_length ; ¢ esi - ¤«¨­  áâப¨
mov eax, 4 ; äã­ªæ¨ï 4 - ¢ë¢®¤ ⥪áâ 
int 0x40
popad
 
inc edx ; ­®¬¥à ª­®¯ª¨++;
add ecx,15*65536 ; 㢥«¨ç¨¬ ᬥ饭¨¥ ¯® y
dec edi ; 㬥­ì訬 áçñâ稪
jnz newbtn ; ¥á«¨ ­¥ ­®«ì, ¯®¢â®à¨¬ ¢áñ ¥éñ à §
 
mov eax,12 ; § ª®­ç¨«¨ "à¨á®¢ âì"
mov ebx,2
int 0x40
 
ret ; ¢®§¢à â
 
 
 
; „€›… Žƒ€ŒŒ›
DATA
 
macro strtbl name, [string]
{
common
label name dword
forward
local str
dd str
forward
str db string
}
 
strtbl startapps ,\
<"/RD/1/PIC4",0> ,\
<"/RD/1/DESKTOP",0> ,\
<"/RD/1/MV",0> ,\
<"/RD/1/JPEGVIEW",0> ,\
<"/RD/1/CPU",0> ,\
<"/RD/1/SPANEL",0> ,\
<"/RD/1/ICONMNGR",0> ,\
<"/RD/1/VRR",0>
 
; header: ; § £®«®¢®ª
; db 'M E N U'
; header_len = $ - header
 
; text: ; ⥪áâ ­  ª­®¯ª å
; db 'Background '; 12
; db 'Colors '
; db 'MeView '
; db 'Processes '
; db 'Panel setup '
; db 'Icon manager'
 
sz header, "MenuetOS"
 
lsz text,\
en, 'Background ',\
en, 'Colors ',\
en, 'MeView ',\
en, 'JpegView ',\
en, 'Processes ',\
en, 'Panel setup ',\
en, 'Icon manager',\
en, 'VRR ',\
\
ru, 'ƒ¥­¥à â®à ®¡®¥¢ ',\
ru, '‘¨á⥬­ë¥ æ¢¥â  ',\
ru, 'à®á¬®âà BMP ',\
ru, 'à®á¬®âà JPEG ',\
ru, 'à®æ¥ááë ',\
ru, ' áâனª  ¯ ­¥«¨ ',\
ru, '“¯à ¢«¥­¨¥ ¨ª®­ª ¬¨ ',\
ru, ' áâனª  ¬®­¨â®à  '
 
 
 
; …ˆˆ–ˆ€‹ˆ‡ˆŽ‚€›… „€›…
UDATA
processes dd ? ; ª®«¨ç¥á⢮ ¯à®æ¥áᮢ ¢ á¨á⥬¥
curx1 dd ? ; ª®®à¤¨­ âë ªãàá®à 
cury1 dd ?
curx dd ? ; ª®®à¤¨­ âë ®ª­  ¬¥­î
cury dd ?
 
menu_opened db ? ; ®âªàëâ® ¬¥­î ¨«¨ ­¥â? (1-¤ , 0-­¥â)
 
align 32
start_info:
.mode dd ?
dd ?
.params dd ?
dd ?
.workarea dd ?
.path:
rb 256
 
 
sc system_colors ; á¨á⥬­ë¥ 梥â 
procinfo process_information ; ¨­ä®à¬ æ¨ï ® ¯à®æ¥áá¥
 
work_area:
rb 0x1000
 
rb 1024 ; áâíª ¤«ï ®ª­  ¬¥­î - 墠â¨â ¨ 1 Š¡
align 32
stack_wnd:
 
 
MEOS_APP_END
; ŠŽ…– Žƒ€ŒŒ›
/programs/system/rb/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm @rb.asm @rb
@pause
/programs/system/rb/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm @rb.asm @rb
@pause
/programs/system/rb/trunk/macros.inc
0,0 → 1,267
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/rd2fd/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm rd2fd.asm rd2fd
@pause
/programs/system/rd2fd/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm rd2fd.asm rd2fd
@pause
/programs/system/rd2fd/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/rd2fd/trunk/rd2fd.asm
0,0 → 1,228
;WARNING! Spaghetti code, size optimized
 
use32
org 0x0
 
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x1000 ; memory for app
dd 0x1000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include "lang.inc"
include "macros.inc" ; - 30 bytes !!!
 
 
START:
red: ; redraw
call draw_window
 
still:
 
mov eax,10 ; wait here for event
int 0x40
 
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
 
; jmp still
key: ; key
; just read it and ignore
int 0x40
jmp still
 
button: ; button
mov eax,17 ; get id
int 0x40
cmp ah,1 ; button id=1 ?
je close
cmp ah,2
je ramdiskcopy
cmp ah,3
je ramdiskupdate
jmp togglewrite
close:
or eax,-1 ; close this program
jmp callsys
ramdiskcopy:
mov eax,16
xor ebx,ebx
inc ebx
jmp callsys
ramdiskupdate:
mov eax,16
xor ebx,ebx
inc ebx
inc ebx
jmp callsys
togglewrite:
call togglefdcwrite
callsys:
int 0x40
jmp still
 
; get fdc settings for writing & invert them.
togglefdcwrite:
mov eax,16
mov ebx,4
int 0x40
xchg ecx,eax
xor ecx,1
mov eax,16
dec ebx
int 0x40
 
mov [esp], dword still ; change return address !
;run trough drawwindow :]
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
 
mov eax,12 ; function 12:tell os about windowdraw
xor ebx,ebx ; 1, start of draw
inc ebx
int 0x40
 
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw win
mov ebx,100*65536+250 ; [x start] *65536 + [x size]
mov ecx,100*65536+120 ; [y start] *65536 + [y size]
mov edx,0x03ffffff ; color of work area RRGGBB,8->color gl
int 0x40
 
;The important part, the buttons & text.
 
mov ebx,9*65536+36
mov ecx,41*65536+14
xor edx,edx
inc edx
inc edx
;mov edx,2
call clickbox
 
mov ebx,67*65536+49
inc edx
call clickbox
 
mov ebx,12*65536+12
mov ecx,81*65536+12
inc edx
call clickbox
 
mov ecx,96*65536+12
xor edx,edx
call clickbox
 
mov edi,0x10000000
mov edx,titlebar
mov ebx,9*65536+9
mov ecx,0x10ffffff
call print
 
; mov edx,h1
mov ebx,11*65536+28
mov ecx,0x10808080
call print
 
; mov edx,comtext
add ebx,15
xchg ecx,edi
call print
 
; mov edx,h2
add ebx,25
xchg ecx,edi
call print
 
; mov edx,setwrite
add ebx,15
xchg ecx,edi
call print
 
; mov edx,setread
add ebx,15
xchg ecx,edi
call print
 
mov eax,16
mov ebx,4
int 0x40
test al,1
je nowritex
; mov edx,xsign
mov ebx,14*65536+83
xchg ecx,edi
call print
nowritex:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
ret
 
clickbox:
pusha
mov edi,edx
cmp edx, 0
je .disabledbox
mov eax,8 ; function 8 : define and draw button
int 0x40
.disabledbox:
inc ecx
inc ebx
mov eax,13
mov edx, 0x808080
int 0x40
cmp edi,0
je .grayed
mov edx,0x80
.grayed:
sub ebx,65536
sub ecx,65536
int 0x40
add ebx,65534
add ecx,65534
mov edx,0xffffff
int 0x40
popa
ret
 
print:
mov eax,edx
xor esi,esi
addchar:
inc eax
inc esi
cmp [eax],byte 0
jne addchar
mov eax,4
int 0x40
add edx,esi
inc edx
ret
 
 
; DATA AREA
 
titlebar: db 'RD2FD',0
h1: db 'Commands',0
comtext: db 'Copy or Update ramdisk to floppy',0
h2: db 'Settings',0
setwrite: db ' Write directly to floppy',0
setread: db ' Read directly from floppy',0
xsign: db 'X',0
I_END:
 
 
 
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/rd2hd/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm rd2hd.asm rd2hd
@pause
/programs/system/rd2hd/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm rd2hd.asm rd2hd
@pause
/programs/system/rd2hd/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/rd2hd/trunk/rd2hd.asm
0,0 → 1,161
;
; Save Ramdisk to HD
;
; Compile with FASM for Menuet
;
 
include 'lang.inc'
include 'macros.inc'
 
use32
org 0x0
 
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x1000 ; memory for app
dd 0x1000 ; esp
dd 0x0 ; , 0x0 ; I_Param , I_Icon
 
 
;******************************************************************************
 
 
START: ; start of execution
xor eax,eax
mov edi,bootpath
mov ecx,128
rep stosd
 
mcall 6,filename,0,-1,bootpath
 
mov esi,bootpath+1
mov cx,512
start_search:
lodsb
cmp al,"'"
jz set_end_path
dec cx
cmp cx,0
ja start_search
set_end_path:
mov [esi-1],byte 0
 
mov eax,40
mov ebx,101b
int 0x40
 
red:
call draw_window
 
still:
mov eax, 10 ; wait here for event
int 0x40
 
dec eax ; redraw request ?
je red
; dec eax
; dec eax ; button in buffer ?
; je button
 
 
button: ; button
mov eax,17 ; get id
int 0x40
cmp ah,2
jne ah_3
mcall 18,6,1
jmp red
ah_3:
cmp ah,3
jne ah_4
mcall 18,6,2
jmp red
ah_4:
cmp ah,4
jne ah_1
mcall 18,6,3,bootpath+1
jmp red
ah_1:
cmp ah,1
je exit
jmp still
 
exit:
or eax,-1 ; close this program
int 0x40
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
draw_window:
 
mov eax, 12 ; function 12:tell os about windowdraw
mov ebx, 1 ; 1, start of draw
int 0x40
; DRAW WINDOW
mov eax, 0 ; function 0 : define and draw window
mov ebx, 200*65536+220 ; [x start] *65536 + [x size]
mov ecx, 200*65536+150 ; [y start] *65536 + [y size]
mov edx, 0x03ccddee ; color of work area RRGGBB,8->color gl
int 0x40
; WINDOW LABEL
mov eax, 4 ; function 4 : write text to window
mov ebx, 8*65536+8 ; [x start] *65536 + [y start]
mov ecx, 0x10ffffff ; font 1 & color ( 0xF0RRGGBB )
mov edx, header ; pointer to text beginning
mov esi, header.size ; text length
int 0x40
 
xor edx,edx
mcall 13,<15,20>,<30,20>
mcall 13, ,<60,20>
mcall 13, ,<90,20>
 
mcall 8,<16,17>,<31,17>,2,0xdd7700
inc edx
mcall 8, ,<61,17>, ,0xbb00
inc edx
mcall 8, ,<91,17>, ,0xcc5555
 
mcall 4,<22,36>,0x10ffffff,text_123,1
add bx,30
add edx,1
mcall 4
add bx,30
add edx,1
mcall 4
 
mcall 4,<45,36>,0,text_1,text_1.size
add bx,30
mcall 4, ,0,text_2,text_2.size
add bx,30
mcall 4, ,0,text_3,text_3.size
mcall 4,<20,120>,0,text_4,text_4.size
mcall 4,<40,130>,0,text_5,text_5.size
 
mcall 4,<40,46>,0,text_6,text_6.size
mcall 4,<40,106>,0,text_6,text_6.size
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
ret
 
 
 
 
sz header, "RD2HD á®åà ­¨âì IMG>HD"
text_123 db '123'
sz text_1, '‚ ¯ ¯ªã /KOLIBRI'
sz text_2, '‚ ª®à¥­ì ¤¨áª '
sz text_3, 'ãâì ¢ ä ©«¥ RD2HD.TXT'
sz text_4, '¯.3 ¤«ï १¥à¢­®£® á®åà ­¥­¨ï,'
sz text_5, 'â.ª. ¢ ï¤à¥ ¥£® ­¥â.'
sz text_6, '(¯ ¯ª  ¤®«¦­  ¯à¨áãâá⢮¢ âì)'
filename db 'RD2HD TXT'
I_END:
bootpath:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/run/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm run.asm run
@pause
/programs/system/run/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm run.asm run
@pause
/programs/system/run/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/run/trunk/run.asm
0,0 → 1,198
; <--- description --->
; compiler: FASM 1.54
; name: MenuetOS RUN
; version: 0.02
; last update: 28/09/2004
; written by: Ivan Poddubny
; e-mail: ivan-yar@bk.ru
 
 
; <--- include all MeOS stuff --->
include "lang.inc"
include "macros.inc"
;;;lang fix en
 
 
; <--- start of MenuetOS application --->
MEOS_APP_START
 
;include "DEBUG.INC"
 
; <--- start of code --->
CODE
call draw_window ; at first create and draw the window
 
wait_event: ; main cycle
mcall 10
 
cmp eax, 1 ; if event == 1
je redraw ; jump to redraw handler
cmp eax, 2 ; else if event == 2
je key ; jump to key handler
cmp eax, 3 ; else if event == 3
je button ; jump to button handler
 
jmp wait_event ; else return to the start of main cycle
 
 
redraw: ; redraw event handler
call draw_window
jmp wait_event
 
 
key: ; key event handler
mcall 2
 
cmp ah, 13
je _run
cmp ah, 8
je .backspace
 
mov bl, ah
mov eax, [position]
mov [filename + eax], bl
inc [position]
call draw_string
 
jmp wait_event
 
.backspace:
xor eax, eax
cmp [position], eax
je wait_event
dec [position]
call draw_string
jmp wait_event
 
 
button: ; button event handler
mcall 17
 
cmp ah, 10
je _run
 
dec ah
jne wait_event ; return if button id != 1
 
_exit:
or eax, -1 ; exit application
int 0x40
 
 
_run:
mcall 58, fileinfo
; dps "58th function returned "
; dpd eax
; newline
jmp _exit
 
 
draw_window:
mcall 12, 1
 
mcall 14
and eax, 0xFFFF
sub eax, 100
shl eax, 16
add eax, 80
mov ecx, eax
 
mov ebx, 148*65536+400 ; (window_cx)*65536+(window_sx)
mov edx, 0x03DDDDDD ; work area color & window type 3
mcall 0
 
mov ebx, 8*65536+8 ; coordinates
mov ecx, 0x10ffffff ; color & font N1
mov edx, header ; address of text
mov esi, header.size ; length of text
mcall 4
 
mpack ebx, 10, 26
mov ecx, 0
mov edx, message
mov esi, message.size
mcall
 
mpack ebx, 385-(runbtn.size*6), runbtn.size*6+4
mpack ecx, 56, 14
mov edx, 10
mov esi, 0xa0a0a0
mcall 8
 
; mpack ebx, 385-runbtn.size*6-findbtn.size*6-8, findbtn.size*6+4
; inc edx
; mcall 8
 
; mpack ebx, 388-runbtn.size*6-findbtn.size*6-7, 59
; mov ecx, 0
; mov edx, findbtn
; mov esi, findbtn.size
; mcall 4
 
mpack ebx, 388-runbtn.size*6, 59
mov ecx, 0
mov edx, runbtn
mov esi, runbtn.size
mcall 4
 
call draw_string
 
mcall 12, 2
ret
 
 
draw_string:
mpack ebx, 10, 380
mpack ecx, 38, 14
mov edx, 0xA0A0A0
mcall 13
 
mpack ebx, 14, 41
mov ecx, 0
mov edx, filename
mov esi, [position]
mcall 4
ret
 
 
 
; <--- initialised data --->
DATA
 
position dd filename.size
 
lsz header,\
ru, "‡ ¯ã᪠¯à®£à ¬¬ë",\
en, "Start program"
 
lsz message,\
ru, "‚¢¥¤¨â¥ ¯ãâì ª ä ©«ã:",\
en, "Enter path to file:"
 
; lsz findbtn,\
; ru, " ©â¨...",\
; en, "Find..."
 
lsz runbtn,\
ru, "‡ ¯ãáâ¨âì",\
en, "Run"
 
 
fileinfo:
.mode dd 16
dd 0
.param dd 0
dd 0
.workarea dd workarea
 
sz filename, "/rd/1/"
rb 122
 
 
; <--- uninitialised data --->
UDATA
workarea rb 4096
 
 
MEOS_APP_END
; <--- end of MenuetOS application --->
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/setup/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm setup.asm setup
@pause
/programs/system/setup/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm setup.asm setup
@pause
/programs/system/setup/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/setup/trunk/setup.asm
0,0 → 1,1649
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; DEVICE SETUP ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
; Authors: Ville - original version
; A. Ivushkin - autostart (w launcher)
; M. Lisovin - added many feauters (apply all, save all, set time...)
; I. Poddubny - fixed russian keymap
 
;******************************************************************************
use32
org 0x0
db 'MENUET01' ; 8 byte identifier
dd 0x01 ; header version
dd START ; pointer to program start
dd I_END ; size of image
dd 0x4000 ; reguired amount of memory
dd 0x4000 ; stack pointer (esp)
dd I_PARAM,0 ; parameters, reserved
include 'lang.inc'
include 'macros.inc'
;******************************************************************************
 
LLL equ (56+3)
BBB equ 25
 
;******************************************************************************
apply_all:
 
mov eax,6 ; load saved settings from SETUP.DAT
mov ebx,filename
xor ecx,ecx
or edx,-1
mov esi,keyboard
int 0x40
 
call _midibase ;1
call _sound_dma ;10
call _pci_acc ;12
call _sb16 ;4
call _wssp ;6
call _syslang ;5
call _keyboard ;2
 
call get_disk_info
cmp [cd],0
jne no_cd
call _cdbase ;3
no_cd:
cmp [hd],0
jne no_hd
call _lba_read ;11
call _hdbase ;7
call _f32p ;8
no_hd:
ret
;-------------------------------------------------------------------------------
get_disk_info:
mov [hd],1
mov [cd],1
mov [hdbase],0
mov [cdbase],0
mcall 18,11,1,table_area
 
ide_0:
mov al,[table_area+1]
shr al,6
cmp al,0
je ide_1
cmp al,01b
jnz ide_0_cd
mov [hdbase],1
mov [hd],0
jmp ide_1
 
ide_0_cd:
cmp al,10b
jnz ide_1
mov [cdbase],1
mov [cd],0
cmp [hd],0
je all_device
 
ide_1:
mov al,[table_area+1]
shl al,2
shr al,6
cmp al,0
je ide_2
cmp al,01b
jnz ide_1_cd
cmp [hd],0
je ide_11
mov [hdbase],2
mov [hd],0
ide_11:
cmp [cd],0
je all_device
jmp ide_2
 
ide_1_cd:
cmp al,10b
jnz ide_2
cmp [cd],0
je ide_11_cd
mov [cdbase],2
mov [cd],0
ide_11_cd:
cmp [hd],0
je all_device
 
ide_2:
mov al,[table_area+1]
shl al,4
shr al,6
cmp al,0
je ide_3
cmp al,01b
jnz ide_2_cd
cmp [hd],0
je ide_21
mov [hdbase],3
mov [hd],0
ide_21:
cmp [cd],0
je all_device
jmp ide_3
 
ide_2_cd:
cmp al,10b
jnz ide_3
cmp [cd],0
je ide_21_cd
mov [cdbase],3
mov [cd],0
ide_21_cd:
cmp [hd],0
je all_device
 
ide_3:
mov al,[table_area+1]
shl al,6
shr al,6
cmp al,0
je not_device
cmp al,01b
jnz ide_3_cd
cmp [hd],0
je ide_31
mov [hdbase],4
mov [hd],0
ide_31:
cmp [cd],0
jmp all_device
 
ide_3_cd:
cmp al,10b
jnz not_device
cmp [cd],0
je all_device
mov [cdbase],4
mov [cd],0
 
all_device:
not_device:
ret
 
hd db 0
cd db 0
;******************************************************************************
apply_all_and_exit:
call apply_all
jmp close
 
;******************************************************************************
set_language_and_exit:
mov eax,26
mov ebx,2
mov ecx,9
int 0x40
; cmp eax,5
; jne @f
; xor eax,eax
;@@: mov [keyboard],eax
cmp eax,1
je russian
xor eax,eax
set_lang_now:
mov [keyboard],eax
call _keyboard
jmp close
russian:
mov eax,3
jmp set_lang_now
 
set_syslanguage_and_exit:
mov eax,26
mov ebx,5
; mov ecx,9
int 0x40
cmp eax,4
jne temp ;@f
xor eax,eax
;@@: inc eax
temp: inc eax
mov [syslang],eax
call _syslang
jmp close
 
get_setup_values:
mcall 26,1
mov [midibase],eax
mcall 26,2,9
dec eax
mov [keyboard],eax
mcall 26,3
mov [cdbase],eax
mcall 26,4
mov [sb16],eax
mcall 26,5
mov [syslang],eax
mcall 26,6
cmp eax,0x530
jne s_wss_2
mov eax,1
jmp get_other
s_wss_2:
cmp eax,0x608
jne s_wss_3
mov eax,2
jmp get_other
s_wss_3:
cmp eax,0xe80
jne s_wss_4
mov eax,3
jmp get_other
s_wss_4:
mov eax,4
get_other:
mov [wss],eax
mcall 26,7
mov [hdbase],eax
mcall 26,8
mov [f32p],eax
mcall 26,10
mov [sound_dma],eax
mcall 26,11
mov [lba_read],eax
mcall 26,12
mov [pci_acc],eax
ret
 
;******************************************************************************
 
START:
cmp [I_PARAM], 'SLAN'
je set_syslanguage_and_exit
 
cmp [I_PARAM], 'LANG'
je set_language_and_exit
 
; mov eax,6 ; load saved settings from SETUP.DAT
; mov ebx,filename
; xor ecx,ecx
; or edx,-1
; mov esi,keyboard
; int 0x40
 
cmp [I_PARAM], 'BOOT'
je apply_all_and_exit
 
call loadtxt
call get_setup_values
red:
call draw_window
 
still:
 
cmp word [blinkpar],0
jne blinker
mov eax,29 ;get system date
int 0x40
cmp eax,[date]
je gettime
mov [date],eax
gettime:
mov eax,3 ;get system time
int 0x40
cmp ax,[time]
je sysevent
mov [time],ax
call drawtime
 
sysevent:
mov eax,23
mov ebx,8 ; wait here for event with timeout
int 0x40
 
cmp eax,1
jz red
cmp eax,2
jz key
cmp eax,3
jz button
 
jmp still
 
blinker:
cmp byte [count],6
jb noblink
btc dword [blinkpar],16
mov byte [count],0
call drawtime
noblink:
inc byte [count]
jmp sysevent
 
incdectime:
cmp byte [blinkpar],0
je still
mov esi,time
mov bl,0x23 ;border
cmp byte [blinkpar],1
je hours
mov bl,0x59 ;minutes
inc esi
hours:
mov al,byte [esi]
cmp ah,112
je dectime
cmp al,bl
je noinctime
inc al
daa
jmp incdectime1
noinctime:
xor al,al
incdectime1:
mov byte [esi],al
jmp still
dectime:
cmp al,0
je nodectime
dec al
das
jmp incdectime1
nodectime:
mov al,bl
jmp incdectime1
 
incdecdate:
cmp byte [blinkpar+1],0
je still
mov esi,date
mov bl,0 ;border of years
cmp byte [blinkpar+1],1
jne days
mov bl,0x12 ;months
inc esi
days:
cmp byte [blinkpar+1],2
jne nodays
mov bl,0x31
add esi,2
nodays:
mov al,byte [esi]
cmp ah,122
je decdate
cmp al,bl
je noincdate
inc al ;add al,1
daa
jmp incdecdate1
noincdate:
mov al,1
incdecdate1:
mov byte [esi],al
jmp still
decdate:
cmp al,1
je nodecdate
dec al
das
jmp incdecdate1
nodecdate:
mov al,bl
jmp incdecdate1
 
 
key:
;mov eax,2
int 0x40
cmp ah,27
jne still
mov dword [blinkpar],0
call drawtime
jmp still
 
button:
 
mov eax,17
int 0x40
 
cmp ah,112
je incdectime
cmp ah,113
je incdectime
cmp ah,122
je incdecdate
cmp ah,123
je incdecdate
cmp ah,111
jne noseltime
mov al, [blinkpar]
cmp al,2
jae seltime
inc al
jmp seltime1
seltime:
xor al,al
seltime1:
mov [blinkpar],al
call drawtime
jmp still
noseltime:
cmp ah,121
jne noseldate
mov al,byte [blinkpar+1]
cmp al,3
jae seldate
inc al
jmp seldate1
seldate:
xor al,al
seldate1:
mov [blinkpar+1],al
call drawtime
jmp still
noseldate:
cmp ah,99
jne nosaveall
mov eax,33
mov ebx,filename
mov ecx,keyboard
mov edx,48
xor esi,esi
int 0x40
call settime
mov dword [blinkpar],0
call drawtime
jmp still
nosaveall:
cmp ah,100
jne no_apply_all
call apply_all
jmp still
no_apply_all:
 
cmp ah,1 ; CLOSE APPLICATION
jne no_close
close:
or eax,-1
int 0x40
no_close:
 
cmp ah,11 ; SET MIDI BASE
jnz nosetbase1
call _midibase
nosetbase1:
cmp ah,12
jnz nomm
sub [midibase],2
call draw_infotext
nomm:
cmp ah,13
jnz nomp
add [midibase],2
call draw_infotext
nomp:
 
 
cmp ah,4 ; SET KEYBOARD
jnz nokm
mov eax,[keyboard]
test eax,eax
je downuplbl
dec eax
jmp nodownup
downuplbl:
mov eax,4
nodownup:
mov [keyboard],eax
call draw_infotext
nokm:
cmp ah,5
jnz nokp
mov eax,[keyboard]
cmp eax,4
je updownlbl
inc eax
jmp noupdown
updownlbl:
xor eax,eax
noupdown:
mov [keyboard],eax
call draw_infotext
nokp:
 
 
cmp ah,22 ; SET CD BASE
jnz nocm
mov eax,[cdbase]
sub eax,2
and eax,3
inc eax
mov [cdbase],eax
call draw_infotext
nocm:
cmp ah,23
jnz nocp
mov eax,[cdbase]
and eax,3
inc eax
mov [cdbase],eax
call draw_infotext
nocp:
cmp ah,21
jnz nocs
call _cdbase
nocs:
 
cmp ah,62 ; SET HD BASE
jnz hnocm
mov eax,[hdbase]
sub eax,2
and eax,3
inc eax
mov [hdbase],eax
call draw_infotext
hnocm:
cmp ah,63
jnz hnocp
mov eax,[hdbase]
and eax,3
inc eax
mov [hdbase],eax
call draw_infotext
hnocp:
cmp ah,61
jnz hnocs
call _hdbase
hnocs:
 
cmp ah,82 ; SET SOUND DMA
jne no_sdma_d
mov eax,[sound_dma]
dec eax
sdmal:
and eax,3
mov [sound_dma],eax
call draw_infotext
jmp still
no_sdma_d:
cmp ah,83
jne no_sdma_i
mov eax,[sound_dma]
inc eax
jmp sdmal
no_sdma_i:
cmp ah,81
jne no_set_sound_dma
call _sound_dma
jmp still
no_set_sound_dma:
 
cmp ah,92 ; SET LBA READ
jne no_lba_d
slbal:
btc [lba_read],0
call draw_infotext
jmp still
no_lba_d:
cmp ah,93
jne no_lba_i
jmp slbal
no_lba_i:
cmp ah,91
jne no_set_lba_read
call _lba_read
jmp still
no_set_lba_read:
 
 
cmp ah,102 ; SET PCI ACCESS
jne no_pci_d
pcip:
btc [pci_acc],0
call draw_infotext
jmp still
no_pci_d:
cmp ah,103
jne no_pci_i
jmp pcip
no_pci_i:
cmp ah,101
jne no_set_pci_acc
call _pci_acc
jmp still
no_set_pci_acc:
 
 
set_partition:
cmp ah,72 ; SET FAT32 PARTITION
jnz .nominus
mov eax,[f32p]
sub eax,2
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
cmp eax,15
jb @f
mov eax,14
@@:
inc eax
mov [f32p],eax
call draw_infotext
.nominus:
cmp ah,73
jnz .noplus
mov eax,[f32p]
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
cmp eax,15
jb @f
mov eax,0
@@:
inc eax
mov [f32p],eax
call draw_infotext
.noplus:
cmp ah,71
jnz .noapply
call _f32p
.noapply:
 
cmp ah,32 ; SET SOUND BLASTER 16 BASE
jnz nosbm
sub [sb16],2
call draw_infotext
nosbm:
cmp ah,33
jnz nosbp
add [sb16],2
call draw_infotext
nosbp:
cmp ah,31
jnz nosbs
call _sb16
nosbs:
 
cmp ah,52 ; SET WINDOWS SOUND SYSTEM BASE
jnz nowssm
mov eax,[wss]
sub eax,2
and eax,3
inc eax
mov [wss],eax
call draw_infotext
nowssm:
cmp ah,53
jnz nowssp
mov eax,[wss]
and eax,3
inc eax
mov [wss],eax
call draw_infotext
nowssp:
cmp ah,51
jnz nowsss
call _wssp
nowsss:
 
cmp ah,42 ; SET SYSTEM LANGUAGE BASE
jnz nosysm
mov eax,[syslang]
dec eax
jz still
mov [syslang],eax
call draw_infotext
nosysm:
cmp ah,43
jnz nosysp
mov eax,[syslang]
cmp eax,4
je nosysp
inc eax
mov [syslang],eax
call draw_infotext
nosysp:
cmp ah,41
jnz nosyss
call _syslang
call cleantxt
call loadtxt
call draw_window
call drawtime
nosyss:
 
cmp ah,3 ; SET KEYMAP
jne still
call _keyboard
jmp still
 
_keyboard:
cmp [keyboard],0
jnz nosetkeyle
mov eax,21 ; english
mov ebx,2
mov ecx,1
mov edx,en_keymap
int 0x40
mov eax,21
inc ecx
mov edx,en_keymap_shift
int 0x40
mov eax,21
mov ecx,9
mov edx,1
int 0x40
call alt_gen
nosetkeyle:
cmp [keyboard],1
jnz nosetkeylfi
mov eax,21 ; finnish
mov ebx,2
mov ecx,1
mov edx,fi_keymap
int 0x40
mov eax,21
inc ecx
mov edx,fi_keymap_shift
int 0x40
mov eax,21
mov ecx,9
mov edx,2
int 0x40
call alt_gen
nosetkeylfi:
cmp [keyboard],2
jnz nosetkeylge
mov eax,21 ; german
mov ebx,2
mov ecx,1
mov edx,ge_keymap
int 0x40
mov eax,21
inc ecx
mov edx,ge_keymap_shift
int 0x40
mov eax,21
mov ecx,9
mov edx,3
int 0x40
call alt_gen
nosetkeylge:
cmp [keyboard],3
jnz nosetkeylru
mov eax,21 ; russian
mov ebx,2
mov ecx,1
mov edx,ru_keymap
int 0x40
mov eax,21
inc ecx
mov edx,ru_keymap_shift
int 0x40
call alt_gen
mov eax,21
mov ecx,9
mov edx,4
int 0x40
nosetkeylru:
cmp [keyboard],4 ;french
jnz nosetkeylfr
mov eax,21
mov ebx,2
mov ecx,1
mov edx,fr_keymap
int 0x40
mov eax,21
inc ecx
mov edx,fr_keymap_shift
int 0x40
mov eax,21
inc ecx
mov edx,fr_keymap_alt_gr
int 0x40
mov eax,21
mov ecx,9
mov edx,5
int 0x40
nosetkeylfr:
ret
 
alt_gen:
mov eax,21
mov ecx,3
mov edx,alt_general
int 0x40
ret
 
 
 
draw_buttons:
 
pusha
 
shl ecx,16
add ecx,12
mov ebx,(350-50)*65536+46+BBB
 
mov eax,8
int 0x40
 
mov ebx,(350-79)*65536+9
inc edx
int 0x40
 
mov ebx,(350-67)*65536+9
inc edx
int 0x40
 
popa
ret
 
 
 
; ********************************************
; ******* WINDOW DEFINITIONS AND DRAW *******
; ********************************************
 
 
draw_window:
 
pusha
 
mov eax,12
mov ebx,1
int 0x40
 
xor eax,eax ; DRAW WINDOW
mov ebx,40*65536+355+BBB
mov ecx,40*65536+300
mov edx,0x82111199
mov esi,0x805588dd
mov edi,0x005588dd
int 0x40
 
mov eax,4
mov ebx,8*65536+8
mov ecx,0x10ffffff
mov edx,labelt
cmp [syslang],4
je ruslabel
add edx,20
ruslabel:
mov esi,26
int 0x40
 
mov eax,8 ; CLOSE BUTTON
mov ebx,(355+BBB-19)*65536+12
mov ecx,5*65536+12
mov edx,1
mov esi,0x005588dd
int 0x40
; APPLY ALL
mov ebx,(350-79)*65536+100
mov ecx,251*65536+12
mov edx,100
int 0x40
add ecx,16*65536 ; SAVE ALL
dec edx
int 0x40
 
mov esi,0x5580c0
 
mov edx,11
mov ecx,43
call draw_buttons
 
mov edx,41
mov ecx,43+8*8
call draw_buttons
 
mov edx,21
mov ecx,43+4*8
call draw_buttons
 
mov edx,31
mov ecx,43+2*8
call draw_buttons
 
mov edx,3
mov ecx,43+10*8
call draw_buttons
 
mov edx,51
mov ecx,43+12*8
call draw_buttons
 
mov edx,61
mov ecx,43+6*8
call draw_buttons
 
mov edx,91
mov ecx,43+18*8
call draw_buttons
 
mov edx,71
mov ecx,43+14*8
call draw_buttons
 
mov edx,81
mov ecx,43+16*8
call draw_buttons
 
mov edx,101
mov ecx,43+20*8
call draw_buttons
 
mov edx,111
mov ecx,43+22*8 ; 22
call draw_buttons
 
mov edx,121
mov ecx,43+24*8 ; 24
call draw_buttons
 
call draw_infotext
 
mov eax,12
mov ebx,2
int 0x40
 
popa
ret
 
 
 
draw_infotext:
 
pusha
 
mov eax,[keyboard] ; KEYBOARD
test eax,eax
jnz noen
mov [text00+LLL*10+28],dword 'ENGL'
mov [text00+LLL*10+32],dword 'ISH '
noen:
cmp eax,1
jnz nofi
mov [text00+LLL*10+28],dword 'FINN'
mov [text00+LLL*10+32],dword 'ISH '
nofi:
cmp eax,2
jnz noge
mov [text00+LLL*10+28],dword 'GERM'
mov [text00+LLL*10+32],dword 'AN '
noge:
cmp eax,3
jnz nogr
mov [text00+LLL*10+28],dword 'RUSS'
mov [text00+LLL*10+32],dword 'IAN '
nogr:
cmp eax,4
jnz nofr
mov [text00+LLL*10+28],dword 'FREN'
mov [text00+LLL*10+32],dword 'CH '
nofr:
 
 
mov eax,[syslang] ; SYSTEM LANGUAGE
dec eax
test eax,eax
jnz noen5
mov [text00+LLL*8+28],dword 'ENGL'
mov [text00+LLL*8+32],dword 'ISH '
noen5:
cmp eax,1
jnz nofi5
mov [text00+LLL*8+28],dword 'FINN'
mov [text00+LLL*8+32],dword 'ISH '
nofi5:
cmp eax,2
jnz noge5
mov [text00+LLL*8+28],dword 'GERM'
mov [text00+LLL*8+32],dword 'AN '
noge5:
cmp eax,3
jnz nogr5
mov [text00+LLL*8+28],dword 'RUSS'
mov [text00+LLL*8+32],dword 'IAN '
nogr5:
cmp eax,4
jne nofr5
mov [text00+LLL*8+28],dword 'FREN'
mov [text00+LLL*8+32],dword 'CH '
nofr5:
 
 
mov eax,[midibase]
mov esi,text00+LLL*0+32
call hexconvert ; MIDI BASE
 
 
mov eax,[sb16] ; SB16 BASE
mov esi,text00+LLL*2+32
call hexconvert
 
 
mov eax,[wss] ; WSS BASE
cmp eax,1
jnz nowss1
mov [wssp],dword 0x530
nowss1:
cmp eax,2
jnz nowss2
mov [wssp],dword 0x608
nowss2:
cmp eax,3
jnz nowss3
mov [wssp],dword 0xe80
nowss3:
cmp eax,4
jnz nowss4
mov [wssp],dword 0xf40
nowss4:
 
mov eax,[wssp]
mov esi,text00+LLL*12+32
call hexconvert
 
mov eax,[cdbase] ; CD BASE
cmp eax,1
jnz noe1
mov [text00+LLL*4+28],dword 'PRI.'
mov [text00+LLL*4+32],dword 'MAST'
mov [text00+LLL*4+36],dword 'ER '
noe1:
cmp eax,2
jnz nof1
mov [text00+LLL*4+28],dword 'PRI.'
mov [text00+LLL*4+32],dword 'SLAV'
mov [text00+LLL*4+36],dword 'E '
nof1:
cmp eax,3
jnz nog1
mov [text00+LLL*4+28],dword 'SEC.'
mov [text00+LLL*4+32],dword 'MAST'
mov [text00+LLL*4+36],dword 'ER '
nog1:
cmp eax,4
jnz nog2
mov [text00+LLL*4+28],dword 'SEC.'
mov [text00+LLL*4+32],dword 'SLAV'
mov [text00+LLL*4+36],dword 'E '
nog2:
 
 
mov eax,[hdbase] ; HD BASE
cmp eax,1
jnz hnoe1
mov [text00+LLL*6+28],dword 'PRI.'
mov [text00+LLL*6+32],dword 'MAST'
mov [text00+LLL*6+36],dword 'ER '
hnoe1:
cmp eax,2
jnz hnof1
mov [text00+LLL*6+28],dword 'PRI.'
mov [text00+LLL*6+32],dword 'SLAV'
mov [text00+LLL*6+36],dword 'E '
hnof1:
cmp eax,3
jnz hnog1
mov [text00+LLL*6+28],dword 'SEC.'
mov [text00+LLL*6+32],dword 'MAST'
mov [text00+LLL*6+36],dword 'ER '
hnog1:
cmp eax,4
jnz hnog2
mov [text00+LLL*6+28],dword 'SEC.'
mov [text00+LLL*6+32],dword 'SLAV'
mov [text00+LLL*6+36],dword 'E '
hnog2:
 
 
mov eax,[f32p] ; FAT32 PARTITION
add al,48
mov [text00+LLL*14+28],al
 
mov eax,[sound_dma] ; SOUND DMA
add eax,48
mov [text00+LLL*16+28],al
 
mov eax,[lba_read]
call onoff ; LBA READ
mov [text00+LLL*18+28],ebx
 
mov eax,[pci_acc]
call onoff ; PCI ACCESS
mov [text00+LLL*20+28],ebx
 
mov eax,13
mov ebx,175*65536+85
mov ecx,40*65536+205
mov edx,0x80111199-19
int 0x40
 
mov edx,text00
mov ebx,10*65536+45
mov eax,4
mov ecx,0xffffff
mov esi,LLL
newline:
int 0x40
add ebx,8
add edx,LLL
cmp [edx],byte 'x'
jnz newline
 
popa
ret
 
drawtime:
mov ax,[time] ;hours 22
mov cl,1
call unpacktime
mov [text00+LLL*22+28],word bx
mov al,ah ;minutes
inc cl
call unpacktime
mov [text00+LLL*22+31],word bx
mov eax,[date]
mov ch,3
call unpackdate
mov [text00+LLL*24+34],word bx ;year 24
mov al,ah
mov ch,1
call unpackdate
mov [text00+LLL*24+28],word bx ;month
bswap eax
mov al,ah
inc ch
call unpackdate
mov [text00+LLL*24+31],word bx ;day
 
mov eax,13
mov ebx,175*65536+85
mov ecx,40*65536+205
mov edx,0x80111199-19
int 0x40
 
mov edx,text00
mov ebx,10*65536+45
mov eax,4
mov ecx,0xffffff
mov esi,LLL
newline1:
int 0x40
add ebx,8
add edx,LLL
cmp [edx],byte 'x'
jnz newline1
ret
 
unpacktime:
cmp byte [blinkpar],cl ;translate packed number to ascii
jne unpack1
chkblink:
bt dword [blinkpar],16
jnc unpack1
xor bx,bx
ret
unpackdate:
cmp byte [blinkpar+1],ch
je chkblink
unpack1:
xor bx,bx
mov bh,al
mov bl,al
and bh,0x0f
shr bl,4
add bx,0x3030
ret
 
hexconvert: ;converting dec to hex in ascii
xor ebx,ebx
mov bl,al
and bl,15
add ebx,hex
mov cl,[ebx]
mov [esi],cl
shr eax,4
xor ebx,ebx
mov bl,al
and bl,15
add ebx,hex
mov cl,[ebx]
dec esi
mov [esi],cl
shr eax,4
xor ebx,ebx
mov bl,al
and bl,15
add ebx,hex
mov cl,[ebx]
dec esi
mov [esi],cl
ret
 
onoff:
cmp [syslang],4
jne norus1
mov ebx,'„€ '
cmp eax,1
je exitsub
mov ebx,'…’ '
ret
norus1:
mov ebx,'ON '
cmp eax,1
je exitsub
mov ebx,'OFF '
exitsub:
ret
 
_midibase:
mov eax,21
mov ebx,1
mov ecx,[midibase]
int 0x40
ret
 
_cdbase:
mov eax,21
mov ebx,3
mov ecx,[cdbase]
int 0x40
ret
 
_hdbase:
mov eax,21
mov ebx,7
mov ecx,[hdbase]
int 0x40
ret
 
_sound_dma:
mov eax,21
mov ebx,10
mov ecx,[sound_dma]
int 0x40
ret
 
_lba_read:
mov eax,21
mov ebx,11
mov ecx,[lba_read]
int 0x40
ret
 
_pci_acc:
mov eax,21
mov ebx,12
mov ecx,[pci_acc]
int 0x40
ret
 
_f32p:
mov eax,21
mov ebx,8
mov ecx,[f32p]
int 0x40
ret
 
_sb16:
mov eax,21
mov ebx,4
mov ecx,[sb16]
int 0x40
ret
 
_wssp:
mov eax,21
mov ebx,6
mov ecx,[wssp]
int 0x40
ret
 
_syslang:
mov eax,21
mov ebx,5
mov ecx,[syslang]
int 0x40
ret
 
loadtxt:
cld
mov edi,text00
mov ecx,428
cmp [syslang],4
jne norus
mov esi,textrus
jmp sload
norus:
mov esi,texteng
sload:
rep movsd
ret
 
cleantxt:
xor eax,eax
mov ecx,428
cld
mov edi,text00
rep stosd
mov [text00+1711],byte 'x'
ret
 
settime:
mov dx,0x70
call startstopclk
dec dx
mov al,2 ;set minutes
out dx,al
inc dx
mov al,byte [time+1]
out dx,al
dec dx
mov al,4 ;set hours
out dx,al
inc dx
mov al,byte [time]
out dx,al
dec dx
mov al,7 ;set day
out dx,al
inc dx
mov al,byte [date+2]
out dx,al
dec dx
mov al,8 ;set month
out dx,al
inc dx
mov al,byte [date+1]
out dx,al
dec dx
mov al,9 ;set year
out dx,al
inc dx
mov al,byte [date]
out dx,al
dec dx
call startstopclk
ret
 
startstopclk:
mov al,0x0b
out dx,al
inc dx
in al,dx
btc ax,7
out dx,al
ret
 
; DATA AREA
count: db 0x0
blinkpar: dd 0x0
time: dw 0x0
date: dd 0x0
 
filename: db 'SETUP DAT',0
 
textrus:
 
db ' §  MIDI ROLAND MPU-401 : 0x320 - + à¨¬¥­¨âì'
db ' '
db ' §  SoundBlaster 16 : 0x240 - + à¨¬¥­¨âì'
db ' '
db ' §  CD-ROM  : PRI.SLAVE - + à¨¬¥­¨âì'
db ' '
db ' §  †„-1 : PRI.MASTER - + à¨¬¥­¨âì'
db ' '
db 'Ÿ§ëª á¨á⥬ë : ENGLISH - + à¨¬¥­¨âì'
db ' '
db ' áª« ¤ª  ª« ¢¨ âãàë : ENGLISH - + à¨¬¥­¨âì'
db ' '
db ' §  WSS : 0x200 - + à¨¬¥­¨âì'
db ' '
db ' §¤¥« FAT32 ­  †„-1 : 1 - + à¨¬¥­¨âì'
db ' '
db '‡¢ãª®¢®© ª ­ « DMA : 1 - + à¨¬¥­¨âì'
db ' '
db '‚ª«îç¨âì LBA : OFF - + à¨¬¥­¨âì'
db ' '
db '„®áâ㯠ª 設¥ PCI : OFF - + à¨¬¥­¨âì'
db ' '
db '‘¨á⥬­®¥ ¢à¥¬ï : 0:00 - + ‚ë¡®à '
db ' '
db '‘¨á⥬­ ï ¤ â  (¬,¤,£) : 00/00/00 - + ‚ë¡®à '
db ' '
db '‚ˆŒ€ˆ…: à¨¬¥­¨âì ¢á¥ '
db 'ˆ‘Ž‹œ‡“‰’… „Ž‘’“ Š FAT-32 Ž‘’ŽŽ†Ž! '
db '… ‡€“„œ’… ‘Ž•€ˆ’œ €‘’Ž‰Šˆ ‘®åà ­¨âì ¢á¥ '
db 'x'
 
texteng:
 
db 'MIDI: ROLAND MPU-401 BASE : 0x320 - + APPLY '
db ' '
db 'SOUND: SB16 BASE : 0x240 - + APPLY '
db ' '
db 'CD-ROM BASE : PRI.SLAVE - + APPLY '
db ' '
db 'HARDDISK-1 BASE : PRI.MASTER - + APPLY '
db ' '
db 'SYSTEM LANGUAGE : ENGLISH - + APPLY '
db ' '
db 'KEYBOARD LAYOUT : ENGLISH - + APPLY '
db ' '
db 'WINDOWS SOUND SYSTEM BASE : 0x200 - + APPLY '
db ' '
db 'FAT32-1 PARTITION IN HD-1 : 1 - + APPLY '
db ' '
db 'SOUND DMA CHANNEL : 1 - + APPLY '
db ' '
db 'LBA READ ENABLED : OFF - + APPLY '
db ' '
db 'PCI ACCESS FOR APPL. : OFF - + APPLY '
db ' '
db 'SYSTEM TIME : 0:00 - + SELECT '
db ' '
db 'SYSTEM DATE (M,D,Y) : 00/00/00 - + SELECT '
db ' '
db 'NOTE: APPLY ALL '
db 'TEST FAT32 FUNCTIONS WITH EXTREME CARE '
db 'SAVE YOUR SETTINGS BEFORE QUIT MENUET SAVE ALL '
db 'x'
 
labelt:
db '€‘’Ž‰Š€ “‘’Ž‰‘’‚ MENUET DEVICE SETUP '
 
hex db '0123456789ABCDEF'
 
alt_general:
 
; db ' ',27
; db ' @ $ {[]}\ ',8,9
; db ' ',13
; db ' ',0,' ',0,'4',0,' '
; db ' ',180,178,184,'6',176,'7'
; db 179,'8',181,177,183,185,182
; db 'ABCD',255,'FGHIJKLMNOPQRSTUVWXYZ'
; db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
; db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
; db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
en_keymap:
 
db '6',27
db '1234567890-=',8,9
db 'qwertyuiop[]',13
db '~asdfghjkl;',39,96,0,'\zxcvbnm,./',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
en_keymap_shift:
 
db '6',27
db '!@#$%^&*()_+',8,9
db 'QWERTYUIOP{}',13
db '~ASDFGHJKL:"~',0,'|ZXCVBNM<>?',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
fr_keymap:
 
db '6',27
db '&Ž"',39,'(-_“)=',8,9
db 'azertyuiop^$',13
db '~qsdfghjklm’',0,0,'*wxcvbn,;:!',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
 
fr_keymap_shift:
 
 
db '6',27
db '1234567890+',8,9
db 'AZERTYUIOP•”',13
db '~QSDFGHJKLM%',0,'–WXCVBN?./',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
fr_keymap_alt_gr:
 
 
db '6',27
db 28,'~#{[|˜\^@]}',8,9
db 'azertyuiop^$',13
db '~qsdfghjklm’',0,0,'*wxcvbn,;:!',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
 
 
fi_keymap:
 
db '6',27
db '1234567890+[',8,9
db 'qwertyuiop',192,'~',13
db '~asdfghjkl',194,193,'1',0,39,'zxcvbnm,.-',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
fi_keymap_shift:
 
db '6',27
db '!"#%&/()=?]',8,9
db 'QWERTYUIOP',200,'~',13
db '~ASDFGHJKL',202,201,'1',0,'*ZXCVBNM;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
 
ge_keymap:
 
db '6',27
db '1234567890?[',8,9
db 'qwertzuiop',203,'~',13
db '~asdfghjkl',194,193,'1',0,39,'yxcvbnm,.-',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
ge_keymap_shift:
 
db '6',27
db '!"#$%&/()=',197,']',8,9
db 'QWERTZUIOP',195,'~',13
db '~ASDFGHJKL',202,201,'1',0,'*YXCVBNM;:_',0,'45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
ru_keymap:
 
db '6',27
db '1234567890-=',8,9
db '©æ㪥­£èé§åê',13
db 0,"ä뢠¯à®«¤¦í"
db 0xf1, '-/'
db "ïçᬨâì¡î",'.-','45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB<D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
 
ru_keymap_shift:
 
db '6',27
db '!"N;%:?*()_+',8,0
db "‰–“Š…ƒ˜™‡•š",13
db 0,"”›‚€Ž‹„†"
db 0xf0, '-\'
db "Ÿ—‘Œˆ’œž",',-','45 '
db '@234567890123',180,178,184,'6',176,'7'
db 179,'8',181,177,183,185,182
db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
I_PARAM dd 0
 
keyboard dd 0x0
midibase dd 0x320
cdbase dd 0x2
sb16 dd 0x220
syslang dd 0x1
wss dd 0x1
wssp dd 0x0
hdbase dd 0x1
f32p dd 0x1
sound_dma dd 0x1
lba_read dd 0x1
pci_acc dd 0x1
 
text00:
 
I_END:
table_area:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/sysmeter/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm sysmeter.asm sysmeter
@pause
/programs/system/sysmeter/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm sysmeter.asm sysmeter
@pause
/programs/system/sysmeter/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/sysmeter/trunk/sysmeter.asm
0,0 → 1,197
;
; CPU USAGE for MenuetOS - Compile with FASM 1.30+
;
 
use32
 
org 0x0
db 'MENUET00' ; 8 byte id
dd 38 ; required os version
dd START ; program start
dd I_END ; program image size
dd 0x1000 ; reguired amount of memory
dd 0x1000
dd 0x00000000 ; reserved=no extended header
 
include 'lang.inc'
include 'macros.inc'
START:
 
call set_variables
 
call draw_window
 
mov edi,0
 
still:
 
mov eax,23
mov ebx,10
int 0x40
 
cmp eax,1
je red
cmp eax,2
je key
cmp eax,3
je button
 
inc edi
cmp edi,10
jb still
 
mov edi,0
call draw_usage
 
jmp still
 
red:
call draw_window
jmp still
 
key:
mov eax,2
int 0x40
jmp still
 
button:
mov eax,17
int 0x40
cmp al,byte 0
jnz still
mov eax,-1
int 0x40
 
 
set_variables:
 
pusha
 
mov ecx,190
mov edi,pros
mov eax,100
cld
rep stosb
 
popa
ret
 
 
draw_window:
 
pusha
 
mov eax,12 ; tell os about redraw
mov ebx,1
int 0x40
 
mov eax,0 ; define and draw window
mov ebx,50*65536+207
mov ecx,50*65536+127
mov edx,0x03000000
mov esi,0x806688aa
 
mov edi,0x0088ccee
int 0x40
 
mov eax,4 ; 'CPU USAGE'
mov ebx,8*65536+8
mov ecx,dword 0x00ffffff
mov edx,text
mov esi,textlen-text
int 0x40
 
mov eax,12 ; tell os about redraw end
mov ebx,2
int 0x40
 
popa
ret
 
 
 
draw_usage:
 
pusha ; CPU usage
 
cld
mov eax,18 ; TSC / SEC
mov ebx,5
int 0x40
shr eax,20
push eax
 
mov eax,18 ; IDLE / SEC
mov ebx,4
int 0x40
shr eax,20
xor edx,edx
mov ebx,100
mul ebx
 
xor edx,edx
pop ebx
add ebx,1
div ebx
push eax
 
mov esi,pros+1
mov edi,pros
mov ecx,195
cld
rep movsb
 
pop eax
mov [pros+99],al
 
mov eax,13
mov ebx,5*65536+1
mov esi,pros
mov edi,pros+99
 
newpros:
 
add esi,1
 
xor eax,eax ; up
mov al,[esi]
add eax,1
mov ecx,22*65536
mov cx,ax
mov eax,13
mov edx,0x0
int 0x40
 
pusha ; down
xor eax,eax
mov al,[esi]
mov ecx,22
add ecx,eax
shl ecx,16
mov cx,101
sub cx,ax
mov eax,13
mov edx,0xdddddd
int 0x40
popa
 
add ebx,2*65536
 
cmp esi,edi
jb newpros
 
popa
ret
 
 
; DATA AREA
 
text: db 'CPU LOAD HISTORY '
textlen:
 
pros:
 
I_END:
 
 
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/systrace/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm systrace.asm systrace
@pause
/programs/system/systrace/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm systrace.asm systrace
@pause
/programs/system/systrace/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/systrace/trunk/systrace.asm
0,0 → 1,211
;
; SYSTEM CALL TRACE , V.Turjanmaa
;
; 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 0x1000 ; memory for app
dd 0x1000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include 'macros.inc'
 
START: ; start of execution
 
call draw_window ; at first, draw the window
 
still:
 
mov eax,23 ; wait here for event
mov ebx,50
int 0x40
 
call display_calls
 
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
 
jmp still
 
red: ; redraw
call draw_window
jmp still
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
jmp still
 
button: ; button
mov eax,17 ; get id
int 0x40
 
cmp ah,1 ; button id=1 ?
jne noclose
mov eax,-1 ; close this program
int 0x40
noclose:
 
jmp still
 
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
 
 
draw_window:
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+465 ; [x start] *65536 + [x size]
mov ecx,50*65536+265 ; [y start] *65536 + [y size]
mov edx,0x03ffffff ; color of work area RRGGBB,8->color gl
mov esi,0x808899ff ; color of grab bar RRGGBB,8->color gl
mov edi,0x008899ff ; color of frames RRGGBB
int 0x40
 
; WINDOW LABEL
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
mov ecx,0x00ddeeff ; color of text RRGGBB
mov edx,labelt ; pointer to text beginning
mov esi,labellen-labelt ; text length
int 0x40
 
mov eax,4
mov ebx,15*65536+55
mov ecx,0x0
mov edx,text
mov esi,70
int 0x40
 
; CLOSE BUTTON
mov eax,8 ; function 8 : define and draw button
mov ebx,(465-19)*65536+12 ; [x start] *65536 + [x size]
mov ecx,5*65536+12 ; [y start] *65536 + [y size]
mov edx,1 ; button id
mov esi,0x6677cc ; button color RRGGBB
; int 0x40
 
call display_calls
 
mov eax,12
mov ebx,2
int 0x40
 
ret
 
 
 
display_calls:
 
 
pusha
 
mov eax,13
mov ebx,15*65536+70
mov ecx,35*65536+10
mov edx,0xffffff
int 0x40
 
mov eax,59
mov ebx,0
mov ecx,I_END
mov edx,64*16
int 0x40
 
mov ecx,eax
mov eax,47
mov ebx,10*65536
mov edx,15*65536+35
mov esi,0
int 0x40
 
 
mov ebx,75
mov edx,I_END
newline:
 
push ebx
push edx
 
mov edi,0
 
new_x:
 
mov eax,13
mov ebx,edi
shl ebx,6+16
add ebx,15*65536
mov bx,6*8
mov ecx,[esp+4]
shl ecx,16
mov cx,10
mov edx,0xffffff
int 0x40
 
mov eax,47
mov ebx,1+1*256+8*65536
 
mov ecx,[pos+edi*4]
shl ecx,2
add ecx,[esp+0]
 
mov edx,edi
shl edx,6+16
mov dx,[esp+4]
or edx,15*65536
mov esi,0x0
int 0x40
 
inc edi
 
cmp edi,7
jb new_x
 
pop edx
pop ebx
 
add ebx,10
add edx,64
 
cmp edx,I_END+16*64
jb newline
 
popa
ret
 
 
 
 
; DATA AREA
 
pos dd 0,15,12,14,13,9,8
 
text:
db ' PID EAX EBX ECX EDX ESI EDI '
 
 
labelt:
db 'SYSTEM CALL TRACE'
labellen:
 
I_END:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/vrr/trunk/vrr.asm
0,0 → 1,1140
;
; Vertical Refresh Rate programm
;
; Author: Trans <<< 13 >>>
; Date: February-May 2003 (09.05.2003)
; Version: 2.0
; Last Modification: 30.07.2003
; 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 0x5000 ; memory for app
dd 0x4ff0 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc'
include 'macros.inc'
START: ; start of execution
mov eax,14
int 40h
mov ebx,eax
shr ebx,16
mov [oldX],ebx
shl eax,16
shr eax,16
mov [oldY],eax
; Test on installed video driver
mov eax,21
mov ebx,13
mov ecx,1
mov edx,drvinfo
int 40h
cmp eax,0FFFFFFFFh ; = -1 - error or not installed
jne vrr_00
call warning_info
retn
;
vrr_00:
call get_vert_rate
mov eax,[currvm]
mov [oldvm],eax
call get_pid
call draw_window ; at first, draw the window
still:
mov eax,10 ; check here for event
int 0x40
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
call get_pid
jmp still
red: ; redraw
call draw_window
jmp still
key: ; key
mov eax,2 ; just read it
int 0x40
cmp ah,'1'
jne key_loc_00
call safekey
jmp still
key_loc_00:
cmp ah,'2'
jne key_loc_01
call safekey
jmp still
key_loc_01:
cmp ah,'3'
jne key_loc_02
call safekey
jmp still
key_loc_02:
cmp ah,'4'
jne key_loc_03
call safekey
jmp still
key_loc_03:
cmp ah,'5'
jne key_loc_04
call safekey
jmp still
key_loc_04:
cmp ah,'-'
jne key_loc_05
xor eax,eax
call inc_dec_rate
jmp still
key_loc_05:
cmp ah,'+'
jne key_loc_06
xor eax,eax
inc eax
call inc_dec_rate
jmp still
key_loc_06:
cmp ah,'r' ;Return in last stable mode
jne key_loc_07
call restore_mode
jmp red
key_loc_07:
cmp ah,13 ;Apply select mode
jne still
xor eax,eax
mov ax,[vmselect]
cmp al,0
je still
xor ebx,ebx
mov bl,al
dec bl
shl bx,1 ; ebx=(ebx-1)*2
xor edx,edx
mov dx,[vidmode+ebx]
mov ecx,ebx
shl ebx,2
add ebx,ecx ; ebx=ebx*5
shr ax,8
dec ax
shl ax,1
add ebx,eax
ror edx,16
mov dx,[_m1+ebx]
rol edx,16
call set_my_mode
call protect_and_return
xor ax,ax
mov [vmselect],ax
jmp red
button: ; button
mov eax,17 ; get id
int 0x40
cmp ah,1 ; button id=1 ?
jne noclose
mov eax,-1 ; close this program
int 0x40
noclose:
cmp ah,2 ;'+' screen width
jne button_loc_01
xor eax,eax
inc eax
call inc_dec_rate
jmp still
button_loc_01:
cmp ah,3 ;'-' screen width
jne button_loc_02
xor eax,eax
call inc_dec_rate
jmp still
button_loc_02:
cmp ah,4 ; Ok
jne button_loc_03
mov ah,13
jmp key_loc_07
button_loc_03:
cmp ah,5 ; Cancel
jne button_loc_04
mov [vmselect],word 00h
jmp red
button_loc_04:
cmp ah,6 ; Return
jne button_loc_05
mov ah,'r'
jmp key_loc_06
button_loc_05:
cmp ah,7 ; Default
jne button_loc_06
call restore_mode
button_loc_06:
jmp still
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
dw_continue:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+400 ; [x start] *65536 + [x size]
mov ecx,100*65536+200 ; [y start] *65536 + [y size]
mov edx,0x030020C0;0x00000040 ; color of work area RRGGBB,8->color glide
mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color glide
mov edi,0x00ffffff ; color of frames RRGGBB
int 0x40
; WINDOW LABEL
call print_my_title
; BUTTONS
xor eax,eax
mov edx,eax
mov al,8
mov ebx,330*65536+20
mov ecx,84*65536+48
mov dl,2
int 40h ; Button '+'Width
add ebx,30*65536
mov dl,3
int 40h ; Button '-'Width
mov ebx,22*65536+85
mov ecx,170*65536+15
inc dl ;dl=4
int 40h ; Button 'Ok'
add ebx,90*65536
inc dl ;dl=5
int 40h ; Button 'Cancel'
add ebx,90*65536
inc dl ;dl=6
int 40h ; Button 'Return'
add ebx,90*65536
inc dl ;dl=7
int 40h ; Button 'Default'
call draw_face
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
ret
;------------Subfunctions-----------
restore_mode:
push eax
push ebx
push edx
mov eax,21
mov ebx,13
mov ecx,4
int 40h
pop edx
pop ecx
pop eax
retn
; IN: edx = RefRate*65536+No.VideoMode
set_my_mode:
push ecx
push ebx
push edx
mov eax,[currvm]
mov [oldvm],eax
mov [currvm],edx
pop edx
push edx
mov eax,21
mov ebx,13
mov ecx,3
int 40h
mcall 5,50
mcall 15,3
pop edx
pop ebx
pop ecx
retn
; IN: eax = 0/1 - -/+ 1Hz
inc_dec_rate:
push ebx
push ecx
push edx
mov edx,eax
mov eax,21
mov ebx,13
mov ecx,5
int 40h
pop edx
pop ecx
pop ebx
retn
get_pid:
mov eax,9
mov ebx,buffer
xor ecx,ecx
dec ecx
int 40h
mov [totp],eax
mov eax,[ebx+30]
mov [mypid],eax
mov ax,[ebx+4]
mov [mypno],ax
retn
get_vert_rate:
xor eax,eax
mov ebx,eax
mov ecx,eax
mov al,21
mov bl,13
mov cl,2
int 40h
mov [initrr],ebx
mov [refrate],ebx
ror ecx,16
mov cx,bx
rol ecx,16
mov [currvm],ecx
retn
get_initial_videomode:
retn
draw_table:
mov eax,13
mov ebx,9*65536+303
mov ecx,59*65536+87
xor edx,edx
int 40h
mov ebx,10*65536+300
mov ecx,60*65536+24
mov edx,00FF00FFh
int 40h
mov ebx,10*65536+36
mov ecx,72*65536+72
mov edx,0000FFFFh
int 40h
mov eax,38
mov edx,00FFFFFFh
mov ebx,10*65536+310
mov edi,60*65536+60
mov esi,12*65536+12
xor ecx,ecx
mov cl,8
dt_loc_hor_line:
push ecx
mov ecx,edi
int 40h
add edi,esi
pop ecx
loop dt_loc_hor_line
mov ebx,10*65536+10
mov edi,60*65536+144
mov esi,66*65536+66
mov ecx,edi
int 40h
add ebx,36*65536+36
xor ecx,ecx
mov cl,5
dt_loc_vert_line:
push ecx
mov ecx,edi
int 40h
add ebx,esi
pop ecx
loop dt_loc_vert_line
mov eax,4
mov ebx,52*65536+75
mov ecx,000000FFh
mov edx,_m1280x1024
mov esi,9
int 40h
add edx,9
add ebx,66*65536
int 40h
add edx,9
add ebx,66*65536
int 40h
add edx,9
add ebx,66*65536
int 40h
xor eax,eax
mov ebx,eax
mov ecx,eax
mov al,47
inc ebx
shl ebx,16
inc ecx
mov edi,ecx
mov edx,22*65536+86
mov esi,00FF0000h
mov ecx,5
dt_loc_00:
push ecx
mov ecx,edi
int 40h
inc edi
add dx,12
pop ecx
loop dt_loc_00
xor ecx,ecx
inc ecx
mov edi,ecx
mov edx,76*65536+63
mov esi,000000FFh
mov ecx,4
dt_loc_01:
push ecx
mov ecx,edi
int 40h
inc edi
add edx,66*65536
pop ecx
loop dt_loc_01
mov eax,4
mov ebx,16*65536+63
mov ecx,000000FFh
mov edx,_mk
mov esi,4
int 40h
shl ecx,16
add bx,12
add edx,4
int 40h
retn
;IN: ah=keycode
safekey:
sub ah,30h
push bx
mov bx,word [vmselect]
cmp bx,0
jnz sk_loc_00
cmp ah,5
je sk_loc_01
mov bl,ah
mov [vmselect],bx
jmp sk_loc_01
sk_loc_00:
push esi
push edx
push ecx
push eax
mov bh,ah
xor edx,edx
mov esi,_m1
mov al,bl
dec al
xor ah,ah
mov cx,10
mul cx
xor ecx,ecx
mov cx,ax
xor ax,ax
mov al,bh
dec al
shl ax,1
add cx,ax
add esi,ecx
lodsw
cmp ax,0
jnz sk_loc_02
xor eax,eax
mov bh,ah
sk_loc_02:
mov [vmselect],bx
pop eax
pop ecx
pop edx
pop esi
sk_loc_01:
call draw_window
pop bx
retn
; IN: ebx=Xstart*65536+Xend
; ecx=Ystart*65536+Yend
; edx=color
draw_rect:
push eax
push ebx
push ecx
push edx
push edi
xor eax,eax
mov al,38
push ecx
mov edi,ecx
shr edi,16
mov cx,di
int 40h
pop ecx
push ecx
mov edi,ecx
ror ecx,16
mov cx,di
int 40h
pop ecx
push ebx
mov edi,ebx
shr edi,16
mov bx,di
int 40h
pop ebx
mov edi,ebx
ror ebx,16
mov bx,di
int 40h
pop edi
pop edx
pop ecx
pop ebx
pop eax
retn
;
; OUT: eax = 0 - no event
protect_and_return:
push ebx
push ecx
xor eax,eax
mov al,5
xor ebx,ebx
mov bx,300
int 40h
call get_pid
xor eax,eax
mov ebx,eax
mov ecx,eax
mov al,18
mov ebx,3
mov cx,[mypno]
int 40h
pop ecx
pusha
call draw_window
popa
xor eax,eax
mov al,5
xor ebx,ebx
mov bx,300
int 40h
xor eax,eax
mov al,11
int 40h
cmp eax,1
jne par_loc_00
pusha
call draw_window
popa
par_loc_00:
xor eax,eax
mov ebx,eax
mov al,23
mov bx,700
int 40h
cmp eax,0
jnz par_loc_02
; mov [ftr_eax],eax
mov edx,[oldvm]
call set_my_mode
par_loc_02:
pop ebx
retn
debug_ftr:
; xor eax,eax
; mov ebx,eax
; mov al,47
; mov bl,8
; shl ebx,16
; mov bh,1
; mov ecx,[ftr_eax]
; mov edx,20*65536+180
; mov esi,00FFFFFFh
; int 40h
; mov ecx,[ftr_ebx]
; add edx,54*65536
; int 40h
retn
print_cur_vm:
mov eax,4
mov ebx,20*65536+40
mov ecx,0000FF00h
mov edx,curmode
mov esi,cmlen
int 40h
mov al,14
int 40h
mov esi,00FFFFFFh
mov edi,eax
shr eax,16
xor ecx,ecx
mov cx,ax
inc ecx
xor ebx,ebx
mov bl,4
shl ebx,16
mov edx,104*65536+40
mov eax,47
int 40h
add edx,30*65536
mov cx,di
inc ecx
int 40h
add edx,30*65536
mov ecx,[initrr]
sub ebx,1*65536
int 40h
mov al,4
mov ebx,200*65536+40
mov ecx,0000FF00h
mov edx,selmode
mov esi,cmlen
int 40h
mov ax,[vmselect]
cmp ax,0
jz pcv_loc_00
push eax
xor eax,eax
mov al,13
mov ebx,284*65536+54
mov ecx,40*65536+10
mov edx,000020C0h
int 40h
pop eax
push eax
xor ecx,ecx
dec al
mov cl,al
shl cx,3
add cl,al ; cx=(al-1)*9
mov edx,_m1280x1024
add edx,ecx
xor eax,eax
mov al,4
mov esi,9
mov ebx,284*65536+40
mov ecx,00ff0000h
int 40h
pop eax
cmp ah,0
jz pcv_loc_00
push esi
push edx
push ecx
push eax
xor eax,eax
mov al,13
mov ebx,344*65536+18
mov ecx,40*65536+10
mov edx,000020C0h
int 40h
pop eax
push eax
mov bx,ax
xor edx,edx
mov esi,_m1
mov al,bl
dec al
xor ah,ah
mov cx,10
mul cx
xor ecx,ecx
mov cx,ax
xor ax,ax
mov al,bh
dec al
shl ax,1
add cx,ax
add esi,ecx
lodsw
xor ecx,ecx
mov cx,ax
xor ebx,ebx
mov bl,3
shl ebx,16
mov edx,344*65536+40
xor eax,eax
mov al,47
mov esi,00ff0000h
int 40h
pop eax
pop ecx
pop edx
pop esi
pcv_loc_00:
retn
print_all_herz:
push esi
push edi
push eax
push ebx
push ecx
push edx
cld
mov esi,_m1
mov ebx,(10+36+26)*65536+86
mov edx,66*65536
xor ecx,ecx
mov cl,4
pah_loc_00:
push ecx
push edx
push ebx
mov cl,5
xor edx,edx
mov dl,12
pah_loc_01:
lodsw
cmp ax,00h
jnz pah_loc_02
call print_noherz
jmp pah_loc_03
pah_loc_02:
call print_herz
pah_loc_03:
add ebx,edx
loop pah_loc_01
pop ebx
pop edx
add ebx,edx
pop ecx
loop pah_loc_00
pop edx
pop ecx
pop ebx
pop eax
pop edi
pop esi
retn
; IN: ebx=X*65536+Y - coordinate
print_noherz:
push eax
push ebx
push ecx
push edx
push esi
xor eax,eax
mov al,4
mov ecx,00FFFFFFh
mov edx,noherz
xor esi,esi
mov si,3
int 40h
pop esi
pop edx
pop ecx
pop ebx
pop eax
retn
; IN: eax=numer_of_herz
; ebx=X*65536+Y
print_herz:
push eax
push ebx
push ecx
push edx
push esi
mov edx,ebx
xor ebx,ebx
mov bl,3
shl ebx,16
mov ecx,eax
mov esi,00FFFFFFh
xor eax,eax
mov al,47
int 40h
pop esi
pop edx
pop ecx
pop ebx
pop eax
retn
get_pixelclock:
retn
; light version of function
calc_refrate:
retn
rect_select:
mov ax,[vmselect]
; mov [ftr_ebx],eax
cmp ax,00h
je rs_loc_00
cmp ah,0
jne rs_loc_01
dec al
mov cx,66
mul cx
add ax,46
mov bx,ax
shl ebx,16
add ax,66
mov bx,ax
mov ecx,60*65536+144
mov edx,00ff0000h
call draw_rect
retn
rs_loc_01:
push ax
xor ah,ah
dec al
xor ebx,ebx
mov bx,66
mul bx
add ax,46
mov bx,ax
shl ebx,16
add ax,66
mov bx,ax
pop ax
xchg ah,al
xor ah,ah
dec al
xor ecx,ecx
mov cx,12
mul cx
add ax,84
mov cx,ax
shl ecx,16
add ax,12
mov cx,ax
mov edx,00ff0000h
call draw_rect
rs_loc_00:
retn
print_my_title:
pusha
xor eax,eax
mov ecx,eax
mov cl,labellen-labelt
mov al,4
mov edx,labelt
mov ebx,8*65536+8
mov edi,00ff0000h
xor esi,esi
inc esi
pmt_loc_00:
push ecx
mov ecx,edi
int 40h
inc edx
sub edi,4*65536
add edi,4*256
add ebx,6*65536
pop ecx
loop pmt_loc_00
popa
retn
draw_face:
call draw_table
;
;
mov ebx,320*65536+390
mov ecx,66*65536+144
mov edx,0000FF00h
call draw_rect
mov ebx,10*65536+390
mov ecx,27*65536+55
call draw_rect
add ebx,2*65536
sub bx,2
add ecx,2*65536
sub cx,2
call draw_rect
mov ebx,10*65536+390
mov ecx,155*65536+193
call draw_rect
add ebx,2*65536
sub bx,2
add ecx,2*65536
sub cx,2
call draw_rect
xor eax,eax
mov al,13
mov ebx,182*65536+36
mov ecx,26*65536+5
mov edx,000020C0h
int 40h
mov ebx,173*65536+54
mov ecx,153*65536+7
int 40h
mov ebx,337*65536+36
mov ecx,62*65536+10
int 40h
mov al,4
shr ecx,16
mov bx,cx
add ebx,3*65536
mov ecx,00FF0000h
mov edx,width
mov esi,5
int 40h
xor ecx,ecx
add edx,5
xor esi,esi
inc esi
mov ebx,335*65536+104
int 40h
add ebx,36*65536
inc edx
int 40h
mov edx,tmode
mov ecx,00FF0000h
mov ebx,182*65536+24
mov esi,6
int 40h
mov edx,actions
mov ebx,173*65536+152
mov esi,9
int 40h
xor ecx,ecx
mov edx,button1
mov ebx,59*65536+174
mov esi,2
int 40h
add edx,esi
mov esi,6
add ebx,78*65536
int 40h
add edx,esi
add ebx,90*65536
int 40h
add edx,esi
mov esi,7
add ebx,87*65536
int 40h
call rect_select
; call debug_ftr
call print_cur_vm
call print_all_herz
retn
warning_info:
call warning_window
call warning_loop
retn
warning_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
; DRAW WARNING WINDOW
mov eax,0 ; function 0 : define and draw window
; mov ebx,100*65536+400 ; [x start] *65536 + [x size]
mov ebx,[oldX]
shr ebx,1
sub ebx,200
shl ebx,16
mov bx,400
; mov ecx,100*65536+200 ; [y start] *65536 + [y size]
mov ecx,[oldY]
shr ecx,1
sub ecx,100
shl ecx,16
mov cx,200
mov edx,0x02808080 ; color of work area RRGGBB,8->color glide
mov esi,0x40300010 ; color of grab bar RRGGBB,8->color glide
mov edi,0x00ff0000 ; color of frames RRGGBB
int 0x40
; WARNING WINDOW LABEL
call print_my_title
; CLOSE BUTTON
mov eax,8 ; function 8 : define and draw button
mov ebx,(200-36)*65536+72 ; [x start] *65536 + [x size]
mov ecx,(160-9)*65536+18 ; [y start] *65536 + [y size]
mov edx,1 ; button id
mov esi,0x00800010 ; button color RRGGBB
int 0x40
; WARNING TEXT
mov eax,4 ; function 4 : write text to window
mov ebx,(200-(len_warn00/2)*6)*65536+60 ; [x start] *65536 + [y
;]
mov ecx,0xf0ff0000 ; color of text RRGGBB
mov edx,warn00 ; pointer to text beginning
mov esi,len_warn00 ; text length
; int 0x40
; inc ebx
int 40h
add ebx,1*65536
int 40h
mov ebx,(200-(len_warn01/2)*6)*65536+100
mov edx,warn01
mov esi,len_warn01
int 40h
mov edx,button1
add ecx,0ffffh
mov ebx,(200-6)*65536+(160-4)
mov esi,2
int 40h
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
retn
warning_loop:
mov eax,5
mov ebx,10
int 0x40
mov eax,11
int 40h
cmp eax,1 ; redraw request ?
je warning_red
cmp eax,2 ; key in buffer ?
je warning_key
cmp eax,3 ; button in buffer ?
je warning_button
mov eax,4
mov ebx,(200-(len_warn01/2)*6)*65536+100
mov ecx,[blinkcol]
sub cl,12
dec cl
dec cl
dec cl
dec cl
mov [blinkcol],ecx
mov ch,0f0h
shl ecx,16
mov edx,warn01
mov esi,len_warn01
int 40h
sub ebx,1*65536
int 40h
jmp warning_loop
warning_red: ; redraw
call warning_window
jmp warning_loop
warning_key: ; key
mov eax,2 ; read key
int 0x40
cmp ah,01h
jne warning_loop
xor eax,eax
dec eax ; Terminate application
int 40h
jmp warning_loop
warning_button: ; button
mov eax,17 ; get id
int 0x40
cmp ah,1 ; button id=1 ?
jne warning_loop
xor eax,eax
dec eax ; close this program
int 0x40
jmp warning_loop
retn
;------------DATA AREA---------------
oldX dd ?
oldY dd ?
initvm dd ?
currvm dd 0
oldvm dd 0
refrate dd 0
initrr dd 0
mypid dd ?
mypno dw ?
totp dd ?
vmselect dw 0
ftr_eax dd ?
ftr_ebx dd ?
blinkcol dd 0ffh
; db 0,0,0,0,0,0,0,0
;_m1 dw 0,0,0,0,0
;_m2 dw 0,0,0,0,0
;_m3 dw 0,0,0,0,0
;_m4 dw 0,0,0,0,0
labelt:
db 'Vertical Refresh Rate, ver.2.0, Copileft 2003 ;) TRANS'
labellen:
_m1280x1024 db '1280x1024'
_m1024x768 db '1024x768 '
_m800x600 db ' 800x600 '
_m640x480 db ' 640x480 '
_mk db 'Key1Key2'
curmode db 'Current mode: '
db ' x x Hz'
cmlen=$-curmode
selmode db ' Select mode: '
selcans db '----x----x---Hz'
noherz db '---'
width db 'Width',11h,10h
tmode db ' Mode '
actions db ' Actions '
button1 db 'Ok' ;len=2
button2 db 'Cancel' ;len=6
button3 db 'Return' ;len=6
button4 db 'Default' ;len=7
strt db 'LAUNCHER '
warn00 db ' W A R N I N G ! '
len_warn00=$-warn00
warn01 db 'V i d e o D r i v e r N O T I n s t a l l e d'
len_warn01=$-warn01
drvinfo: ; 512 bytes driver info area
; +0 - Full driver name
; +32 - Driver version
; +64 - Word List of support video modes (max 32 positions)
; +128 - 5 words list of support vertical rate to each present mode
org $+32
drvver:
org $+32
vidmode:
org $+64
_m1:
org drvinfo+200h
buffer:
I_END:
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/vrr/trunk/Warning.txt
0,0 → 1,7
 
Warning!
~~~~~~~~~~~~
 
This version requared of MeOS with supports driver model. Also for coorect work your system requared
video driver VMODE.MDR
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/vrr/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm vrr.asm vrr
@pause
/programs/system/vrr/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm vrr.asm vrr
@pause
/programs/system/vrr/trunk/infoform.txt
0,0 → 1,25
Vertical Refresh Rate v.2.0
Information Card.
 
 
Monitor (Screen size, Vendor, trademark):
 
VideoCard (Vendor, trademark, Memory Size):
 
 
Mode 1280x1024 (Enable/Disable):
Enable refresh rate:
Notes:
 
Mode 1024x768 (Enable/Disable):
Enable refresh rate:
Notes:
 
Mode 800x600 (Enable/Disable):
Enable refresh rate:
Notes:
 
Mode 640x480 (Enable/Disable):
Enable refresh rate:
Notes:
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/vrr/trunk/vrr_eng.txt
0,0 → 1,104
Vertical Refresh Rater
 
Version 2.0
 
Copyright (C) 2003, Trans
 
 
Text Version 1.1 (02.08.03)
 
Win text (cp1251). (DOS codepage text - see down.)
-------------------------------------------------------------------------------
 
Contents:
1. Why it need?
2. Installation.
3. Using.
4. FAQ.
5. Support.
 
1. Why it need?
---------------------
The problem of "60 Hz" is falling stand before of users of MeOS in modern condisions.
As a rule, most modern computers consist of 17" monitor (all written later is not actual
for owners of LCD monitors). If on 14" or 15" monitors the problem of "60 Hz" not a
main, but with 17" monitor it's a most pantfull. And with more size monitors I have no
words for discusion: it's a slade-show. Of couse, all of the upper correlated with
standart interface of VESA. As for VESA 3.0 - yes, interface have more rich features,
but it have no possiblity of change videomode in protect mode (the Virtual86 not realized
in MeOS !!!!!).
 
The MeOS not known as a detected devices on boot, it setting of standard VESA videomode
with 60 Hz vertical refrash rate !
 
This programm is a FreeWare. And distribute "AS IS ...". Author not
carreing responsibility for probable damage :) .
 
!!!!!_Warning_!!!!!:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! On this time programm have a EXPERIMENTAL status (!). And this reason you have a !
! chance destroy own device (monitor). Espesialy this taking attantionall users with !
! monitor without of rate protection. !
! If you decide using this util I have a suggestion: fill of information form and !
! send me. !
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
2. Installation.
-----------------
Extract file VRR (it's ordinary executed MeOS file) from archive and situated it on
C:\ root or MeOS floppy. In main, VRR may situated on any directory (you must have
possibility run this file under MeOS).
 
 
3. Using.
----------
The VRR is a standard executed file of Menuet Operation System. You may send on
execute this file by SYSTREE or MASH.
 
After redraw of programm window will be present of current vertical refrash rate
and table with possibiling videoregimes. It's sorrably, table have VERY small
videomode (the programm is experimental).
 
Change of videomode
~~~~~~~~~~~~~~~~~~~~~
You may select interesting videomode using _ONLY_ numerical keys: 1,2,3,4 and 5.
In a first step you must select resolution of videoregime. In a second step - need
select of vertical refresh rate. All changes are indicated on screen in a the
programm window. After select videomode, to set mode you must press "Enter" or
button "Ok". Notification: in this time all executing MeOS programs will be
killing. It this needed for minimize artefacts of the screen. After change videomode
you have a two way. First way: you can not any doing and after 13 seconds waiting
return last videomode. Second way: press two-three time any key or some time mouse
click on artefacts of VRR (or this plase) and fixing selected mode. Also you have
possibility modification of horizontal screen size by button "Left"\"Right" or keys
"+\-". For correcting your select you may use button "Cancel".
 
Also in programm realized return at initial videomode with 60 Hz vertical refresh
by button "Default". And you may return in last videomode by button "Return" or
key "r"
 
Note:
~~~~~~
In this time programm may change vertical refresh rate _ONLY_ by lowing screen
resolution, because this method will be using at most part videocard
(VGA, SVGA or modern)
 
Example:
If you have videomode 1024x768x60Hz and if you want select 800x600x95Hz, you must
press key "3" and key "1". After that key "Enter" or button "Ok". And after redraw
screen two time click on last program window position. If need using button
"Left\Right" for correcting horizontal size.
 
4. FAQ.
----------
 
5. Supports.
----------------
All questions, notes and wishs you may send to author by following e-mail:
 
transafe@rambler.ru
transafe@chat.ru
trans397@yahoo.com
 
Using with enjoy!
Trans.
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/vrr/trunk/vrr_rus.txt
0,0 → 1,218
Vertical Refresh Rater
 
Âåðñèÿ 2.0
 
Copyright (C) 2003, Trans
 
 
Text Version 1.1 (02.08.03)
 
Win text (cp1251). (DOS codepage text - see down.)
-------------------------------------------------------------------------------
 
Ñîäåðæàíèå:
1. Çà÷åì ýòî íàäî?
2. Óñòàíîâêà.
3. Èñïîëüçîâàíèå.
4. Âîïðîñû è îòâåòû.
5. Ïîääåðæêà.
 
1. Çà÷åì ýòî íàäî?
---------------------
Ïðîáëåìà "60 Ãö" î÷åíü îñòðî âñòàåò ïåðåä ïîëüçîâàòåëÿìè MeOS â ñîâðåìåííûõ óñëîâèÿõ.
Êàê ïðàâèëî, áîëüøèíñòâî ñîâðåìåííûõ êîìïüòåðîâ êîìïëåêòóåòñÿ 17 äþéìîâûìè
ìîíèòîðàìè (âñå ÷òî íàïèñàíî íèæå êðàéíå íå àêòóàëüíî äëÿ âëàäåëüöåâ ÆÊ ìîíèòîðîâ).
Åñëè íà 14 èëè 15 äþéìîâîì ìîíèòîðå åùå ìîæíî êàê òî ñìðèòüñÿ ñ ÷àñòîòîé âåðòèêàëüíîé
ðàçâåðòêè 60 Ãö, òî óæå ïðè 17 äþéìîâîì ìîíèòîðå ýòî ïðåâðàùàåòñÿ â ïûòêó. À ïðî
áîëüøèõ ðàçìåðîâ ìîíèòîðû âîîáùå ãîâîðèòü íå õî÷åòñÿ, ò.ê. ýòî ïðåâðàùàåòñÿ ïî÷òè
â ñëàéä-øîó. Êîíå÷íî æå âñå âûøå ñêàçàííîå îòíîñèòñÿ ê ñòàíäàðòíîìó èíòåðôåéñó
VESA. Ñðàçó õî÷ó ïðåäóïðåäèòü âîïðîñû ïî ïîâîäó VESA 3.0 - äà, èíòåðôåéñ áîëåå
áîãàòûé ïî âîçìîæíîñòÿì, íî è â íåì íåò ñïîñîáà ïðåêëþ÷åíèÿ âèäåîðåæèìà ïðè
ðàáîòå ïðîöåññîðà â çàùèùåííîì ðåæèìå (ðåæèì V86 â MeOS íå ðåàëèçîâàí !!!).
 
 ñâÿçè ñ òåì, ÷òî MeOS íå óìååò (åùå íå íàó÷èëè :) ) äåòåêòèðîâàòü îáîðóäîâàíèå
êîìïüþòåðà ïðè çàãðóçêå, óñòàíàâëèâàåìûé ãðàôè÷åñêèé âèäåîðåæèì èìååò ñòàíäàðòíóþ
÷àñòîòó âåðòèêàëüíîé ðàçâåðòêè ðàâíóþ 60 Ãö (!!!!!)
Ïðîãðàììà ÿâëÿåòñÿ ñâîáîäíî ðàñïðîñòðàíÿåìîé (FreeWare) è ïîñòàâëÿåòñÿ "Êàê åñòü...".
Àâòîð íå íåñåò îòâåòñòâåííîñòè çà âîçìîæíûé ïðè÷èíåííûé óùåðá ( :) ).
 
!!!!!_Ïðåäóïðåæäåíèå_!!!!!:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Íà òåêóùèé ìîìåíò ïðîãðàììà íîñèò ÝÊÑÏÅÐÈÌÅÍÒÀËÜÍÛÉ (!) õàðàêòåð, ïîýòîìó âñåãäà !
! îñòàåòñÿ âåðîÿòíîñòü ïîð÷è îáîðóäîâàíèÿ (ò.å. ìîíèòîðà). Îñîáåííî ýòî êàñàåòñÿ âñåõ !
! òåõ, ÷åé ìîíèòîð íå èìååò çàùèòû îò ïåðåãðóçîê ïî ÷àñòîòå. !
! Äëÿ âñåõ ðèñêíóâøèõ - ïðîñüáà -> Çàïîëíèòü ïðèëàãàþùóþñÿ èíôîðìàöèîííóþ ôîðìó !
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
2. Óñòàíîâêà.
---------------
Èçâëå÷ü ôàéë VRR (èñïîëíÿåìûé ôàéë MeOS) èç àðõèâà è ïîìåñòèòü â êîðíåâîé êàòàëîã
äèñêà C:\ (Fat32.  ïðèíöèïå, ìîæåò áûòü ëþáîé êàòîëîã) èëè íà çàãðóçî÷íóþ äèñêåòó
MeOS.
 
 
3. Èñïîëüçîâàíèå.
--------------------
Ôàéë VRR ÿâëÿåòñÿ ñòàíäàðíûì èñïîëíÿåìûì ôàéëîì îïåðàöèîííîé ñèñòåìû MeOS, êîòîðûé
ìîæíî çàïóñòèòü íà èñïîëíåíèå, íàïðèìåð, ÷åðåç SYSTREE èëè MASH.
 
Ïîñëå ïîÿâëåíèÿ îêíà ïðîãðàììû, áóäåò îòîáðàæåíî òåêóùåå ðàçðåøåíèå è òàáëèöà
âîçìîæíûõ ðåæèìîâ è ÷àñòîò âåðòèêàëüíîé ðàçâåðòêè äëÿ íèõ. Ê ñîæàëåíèþ, ðàçâåðòîê
ïîêà î÷åíü ìàëî (ïîõîæå íà òî, ýòî î÷åíü êðóòîé ñåêðåò èëè æå ýòèì íèêòî â ñåðüåç
íå çàíèìàëñÿ ââèäó îòïóãèâàþùåé ñëîæíîñòè. Âî âñÿêîì ñëó÷àå â ñåòè êðàéíå ìàëî
èíôîðìàöèè ïî ýòîìó ïîâîäó è ïî áîëüøåé ÷àñòè ïðèõîäèòñÿ äîãàäûâàòüñÿ î ïîëîæåíèè
äåë).
 
Âûáîð è óñòàíîâêà âèäîðåæèìà
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Âèäîåðåæèì ñ èíòåðåñóþùåé ÷àñòîòîé ìîæíî âûáðàòü _òîëüêî_ (!!!!!) ñ ïîìîùüþ
öèôðîâûõ êëàâèø: 1, 2, 3, 4, 5. Ñíà÷àëî íóæíî âûáðàòü ðàçðåøåíèå, à çàòåì
÷àñòîòó. Êàæäûé âûáîð ñîïðîâîæäàåòñÿ èíäèêàöèåé íà ýêðàíå. Äëÿ óñòàíîâëåíèÿ
âûáðàííîãî âèäåîðåæèìà íóæíî íàæàòü êëàâèøó 'Enter' èëè êíîïêó 'Ok'. Ïîñëå ïåðåõîäà
â âûáðàííûé âèäåîðåæèì ó âàñ åñòü 13 ñåêóíä âûáîðà. Ìîæíî íè÷åãî íå äåëàòü è
÷åðåç ýòî âðåìÿ âåðíåòåñü â èñõîäíûé âèäåîðåæèì, à ìîæíî íàæàòü ïàðó ðàç êàêóþ-
-íèáóäü êëàâèøó èëè êëèêíóòü ïàðó ðàç ïî "îñòàòêàì" (àðòåôàêòàì) èñõîäíîãî îêíà
ïðîãðàììû è çàôèêñèðîâàòü âûáîð. Ðàçìåðû îêíà ïî ãîðèçîòàëè ìîæíî ðåãóëèðîâàòü
êíîïêàìè "Ïðàâî\Ëåâî" èëè êëàâèøàìè "+\-".
Äëÿ êîððåêòèðîâêè âûáîðà èñïîëüçóéòå êíîïêó "Cancel".
 
 ïðîãðàììå ðåàëèçîâàíî ïðèíóäèòåëüíîå âîçâðàùåíèå â èñõîäíûé âèäåîðåæèì ñ ÷àñòîòîé
60 Ãö ñ ïîìîùüþ êíîïêè "Default". À òàê æå ìîæåòå âåðíóòüñÿ â ïîñëåäíèé ðàáî÷èé
ðåæèì ñ ïîìîùüþ êíîïêè "Return" èëè êëàâèøè 'r'.
 
Ïðèìåð:
Óñòàíîâëåí ðåæèì 1024õ768 ïðè 60 Ãö. Íóæíî 800õ600 ïðè 95 Ãö.
Äåéñòâèÿ: íàæàòü '3', çàòåì '1' è äàëåå êëàâèøó "Enter" èëè êíîïêó "Ok". Ïîñëå ïåðåõîäà
â âûáðàííûé âèäåîðåæèì êëèêàåì ïàðó ðàç íà "îñòàòêà" (èëè òîì ìåñòå ãäå áûëî) îêíà.
Äàëåå ïðè íåîáõîäèìîñòè êîððåêòèðóåì ðàçìåð ýêðàíà ïî ãîðèçîíòàëè ñ ïîìîùüþ êíîïîê
"Ïðàâî\Ëåâî"
 
 
4. Âîïðîñû è îòâåòû.
------------------------
 
5. Ïîääåðæêà.
----------------
Âñå âîïðîñû, çàìå÷àíèÿ è ïîæåëàíèÿ Âû ìîæåòå íàïðàâèòü àâòîðó ïî ñëåäóþùèì àäðåñàì:
 
transafe@rambler.ru
transafe@chat.ru
trans397@yahoo.com
 
Ïîëüçóéòåñü íà çäîðîâüå!
Trans.
 
 
 
 
 
DOS codepage text:
_______________________________________________________________________________
 
Vertical Refresh Rater
 
‚¥àá¨ï 2.0
 
Copyright (C) 2003, Trans
 
 
Text Version 1.1 (02.08.03)
 
Win text (cp1251). (DOS codepage text - see down.)
-------------------------------------------------------------------------------
 
‘®¤¥à¦ ­¨¥:
1. ‡ ç¥¬ íâ® ­ ¤®?
2. “áâ ­®¢ª .
3. ˆá¯®«ì§®¢ ­¨¥.
4. ‚®¯à®áë ¨ ®â¢¥âë.
5. ®¤¤¥à¦ª .
 
1. ‡ ç¥¬ íâ® ­ ¤®?
---------------------
à®¡«¥¬  "60 ƒæ" ®ç¥­ì ®áâà® ¢á⠥⠯¥à¥¤ ¯®«ì§®¢ â¥«ï¬¨ MeOS ¢ ᮢ६¥­­ëå
ãá«®¢¨ïå. Š ª ¯à ¢¨«®, ¡®«ì設á⢮ ᮢ६¥­­ëå ª®¬¯ìâ¥à®¢ ª®¬¯«¥ªâã¥âáï 17
¤î©¬®¢ë¬¨ ¬®­¨â®à ¬¨ (¢á¥ çâ® ­ ¯¨á ­® ­¨¦¥ ªà ©­¥ ­¥  ªâã «ì­® ¤«ï ¢« ¤¥«ì楢
†Š ¬®­¨â®à®¢). …᫨ ­  14 ¨«¨ 15 ¤î©¬®¢®¬ ¬®­¨â®à¥ ¥é¥ ¬®¦­® ª ª â® á¬à¨âìáï á
ç áâ®â®© ¢¥à⨪ «ì­®© à §¢¥à⪨ 60 ƒæ, ⮠㦥 ¯à¨ 17 ¤î©¬®¢®¬ ¬®­¨â®à¥ íâ®
¯à¥¢à é ¥âáï ¢ ¯ëâªã. € ¯à® ¡®«ìè¨å à §¬¥à®¢ ¬®­¨â®àë ¢®®¡é¥ £®¢®à¨âì ­¥
å®ç¥âáï, â.ª. íâ® ¯à¥¢à é ¥âáï ¯®ç⨠¢ á« ©¤-è®ã. Š®­¥ç­® ¦¥ ¢á¥ ¢ëè¥ áª § ­­®¥
®â­®á¨âáï ª áâ ­¤ àâ­®¬ã ¨­â¥à䥩áã VESA. ‘à §ã å®ç㠯।ã¯à¥¤¨âì ¢®¯à®áë ¯®
¯®¢®¤ã VESA 3.0 - ¤ , ¨­â¥àä¥©á ¡®«¥¥ ¡®£ âë© ¯® ¢®§¬®¦­®áâï¬, ­® ¨ ¢ ­¥¬ ­¥â
ᯮᮡ  ¯à¥ª«î祭¨ï ¢¨¤¥®à¥¦¨¬  ¯à¨ à ¡®â¥ ¯à®æ¥áá®à  ¢ § é¨é¥­­®¬ ०¨¬¥
(०¨¬ V86 ¢ MeOS ­¥ ॠ«¨§®¢ ­ !!!).
 
‚ á¢ï§¨ á ⥬, çâ® MeOS ­¥ 㬥¥â (¥é¥ ­¥ ­ ã稫¨ :) ) ¤¥â¥ªâ¨à®¢ âì ®¡®à㤮¢ ­¨¥
ª®¬¯ìîâ¥à  ¯à¨ § £à㧪¥, ãáâ ­ ¢«¨¢ ¥¬ë© £à ä¨ç¥áª¨© ¢¨¤¥®à¥¦¨¬ ¨¬¥¥â
áâ ­¤ àâ­ãî ç áâ®âã ¢¥à⨪ «ì­®© à §¢¥à⪨ à ¢­ãî 60 ƒæ (!!!!!)
à®£à ¬¬  ï¥âáï ᢮¡®¤­® à á¯à®áâ࠭塞®© (FreeWare) ¨ ¯®áâ ¢«ï¥âáï
"Š ª ¥áâì...". €¢â®à ­¥ ­¥á¥â ®â¢¥âá⢥­­®á⨠§  ¢®§¬®¦­ë© ¯à¨ç¨­¥­­ë©
ãé¥à¡ ( :) ).
 
!!!!!_à¥¤ã¯à¥¦¤¥­¨¥_!!!!!:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!   ⥪ã騩 ¬®¬¥­â ¯à®£à ¬¬  ­®á¨â Š‘…ˆŒ…’€‹œ›‰ (!) å à ªâ¥à, ¯®í⮬ã !
! ¢á¥£¤  ®áâ ¥âáï ¢¥à®ïâ­®áâì ¯®àç¨ ®¡®à㤮¢ ­¨ï (â.¥. ¬®­¨â®à ). Žá®¡¥­­® íâ®!
! ª á ¥âáï ¢á¥å â¥å, 祩 ¬®­¨â®à ­¥ ¨¬¥¥â § é¨âë ®â ¯¥à¥£à㧮ª ¯® ç áâ®â¥. !
! „«ï ¢á¥å à¨áª­ã¢è¨å - ¯à®áì¡  -> ‡ ¯®«­¨âì ¯à¨« £ îéãîáï ¨­ä®à¬ æ¨®­­ãî ä®à¬ã! !
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
2. “áâ ­®¢ª .
---------------
ˆ§¢«¥çì ä ©« VRR (¨á¯®«­ï¥¬ë© ä ©« MeOS) ¨§  à娢  ¨ ¯®¬¥áâ¨âì ¢ ª®à­¥¢®©
ª â «®£ ¤¨áª  C:\ (Fat32. ‚ ¯à¨­æ¨¯¥, ¬®¦¥â ¡ëâì «î¡®© ª â®«®£) ¨«¨ ­ 
§ £à㧮ç­ãî ¤¨áª¥âã MeOS.
 
 
3. ˆá¯®«ì§®¢ ­¨¥.
--------------------
” ©« VRR ï¥âáï áâ ­¤ à­ë¬ ¨á¯®«­ï¥¬ë¬ ä ©«®¬ ®¯¥à æ¨®­­®© á¨á⥬ë MeOS,
ª®â®àë© ¬®¦­® § ¯ãáâ¨âì ­  ¨á¯®«­¥­¨¥, ­ ¯à¨¬¥à, ç¥à¥§ SYSTREE ¨«¨ MASH.
 
®á«¥ ¯®ï¢«¥­¨ï ®ª­  ¯à®£à ¬¬ë, ¡ã¤¥â ®â®¡à ¦¥­® ⥪ã饥 à §à¥è¥­¨¥ ¨ â ¡«¨æ 
¢®§¬®¦­ëå ०¨¬®¢ ¨ ç áâ®â ¢¥à⨪ «ì­®© à §¢¥à⪨ ¤«ï ­¨å. Š ᮦ «¥­¨î,
à §¢¥à⮪ ¯®ª  ®ç¥­ì ¬ «® (¯®å®¦¥ ­  â®, íâ® ®ç¥­ì ªàã⮩ ᥪà¥â ¨«¨ ¦¥ í⨬
­¨ªâ® ¢ á¥à쥧 ­¥ § ­¨¬ «áï ¢¢¨¤ã ®â¯ã£¨¢ î饩 á«®¦­®áâ¨. ‚® ¢á类¬ á«ãç ¥ ¢
á¥â¨ ªà ©­¥ ¬ «® ¨­ä®à¬ æ¨¨ ¯® í⮬㠯®¢®¤ã ¨ ¯® ¡®«ì襩 ç á⨠¯à¨å®¤¨âáï
¤®£ ¤ë¢ âìáï ® ¯®«®¦¥­¨¨ ¤¥«).
 
‚ë¡®à ¨ ãáâ ­®¢ª  ¢¨¤®à¥¦¨¬ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
‚¨¤®¥à¥¦¨¬ á ¨­â¥à¥áãî饩 ç áâ®â®© ¬®¦­® ¢ë¡à âì _⮫쪮_ (!!!!!) á ¯®¬®éìî
æ¨ä஢ëå ª« ¢¨è: 1, 2, 3, 4, 5. ‘­ ç «® ­ã¦­® ¢ë¡à âì à §à¥è¥­¨¥,   § â¥¬
ç áâ®âã. Š ¦¤ë© ¢ë¡®à ᮯ஢®¦¤ ¥âáï ¨­¤¨ª æ¨¥© ­  íªà ­¥. „«ï ãáâ ­®¢«¥­¨ï
¢ë¡à ­­®£® ¢¨¤¥®à¥¦¨¬  ­ã¦­® ­ ¦ âì ª« ¢¨èã 'Enter' ¨«¨ ª­®¯ªã 'Ok'. ®á«¥
¯¥à¥å®¤  ¢ ¢ë¡à ­­ë© ¢¨¤¥®à¥¦¨¬ ã ¢ á ¥áâì 13 ᥪ㭤 ¢ë¡®à . Œ®¦­® ­¨ç¥£® ­¥
¤¥« âì ¨ ç¥à¥§ íâ® ¢à¥¬ï ¢¥à­¥â¥áì ¢ ¨á室­ë© ¢¨¤¥®à¥¦¨¬,   ¬®¦­® ­ ¦ âì ¯ àã
à § ª ªãî-­¨¡ã¤ì ª« ¢¨èã ¨«¨ ª«¨ª­ãâì ¯ àã à § ¯® "®áâ âª ¬" ( àâ¥ä ªâ ¬)
¨á室­®£® ®ª­  ¯à®£à ¬¬ë ¨ § ä¨ªá¨à®¢ âì ¢ë¡®à.  §¬¥àë ®ª­  ¯® £®à¨§®â «¨
¬®¦­® ॣ㫨஢ âì ª­®¯ª ¬¨ "à ¢®\‹¥¢®" ¨«¨ ª« ¢¨è ¬¨ "+\-".
„«ï ª®à४â¨à®¢ª¨ ¢ë¡®à  ¨á¯®«ì§ã©â¥ ª­®¯ªã "Cancel".
 
‚ ¯à®£à ¬¬¥ ॠ«¨§®¢ ­® ¯à¨­ã¤¨â¥«ì­®¥ ¢®§¢à é¥­¨¥ ¢ ¨á室­ë© ¢¨¤¥®à¥¦¨¬ á
ç áâ®â®© 60 ƒæ á ¯®¬®éìî ª­®¯ª¨ "Default". € â ª ¦¥ ¬®¦¥â¥ ¢¥à­ãâìáï ¢
¯®á«¥¤­¨© à ¡®ç¨© ०¨¬ á ¯®¬®éìî ª­®¯ª¨ "Return" ¨«¨ ª« ¢¨è¨ 'r'.
 
à¨¬¥à:
“áâ ­®¢«¥­ ०¨¬ 1024å768 ¯à¨ 60 ƒæ. ã¦­® 800å600 ¯à¨ 95 ƒæ.
„¥©á⢨ï: ­ ¦ âì '3', § â¥¬ '1' ¨ ¤ «¥¥ ª« ¢¨èã "Enter" ¨«¨ ª­®¯ªã "Ok".
®á«¥ ¯¥à¥å®¤  ¢ ¢ë¡à ­­ë© ¢¨¤¥®à¥¦¨¬ ª«¨ª ¥¬ ¯ àã à § ­  "®áâ âª " (¨«¨ ⮬
¬¥á⥠£¤¥ ¡ë«®) ®ª­ . „ «¥¥ ¯à¨ ­¥®¡å®¤¨¬®á⨠ª®à४â¨à㥬 à §¬¥à íªà ­  ¯®
£®à¨§®­â «¨ á ¯®¬®éìî ª­®¯®ª "à ¢®\‹¥¢®"
 
 
4. ‚®¯à®áë ¨ ®â¢¥âë.
------------------------
 
5. ®¤¤¥à¦ª .
----------------
‚ᥠ¢®¯à®áë, § ¬¥ç ­¨ï ¨ ¯®¦¥« ­¨ï ‚ë ¬®¦¥â¥ ­ ¯à ¢¨âì  ¢â®àã ¯® á«¥¤ãî騬  ¤à¥á ¬:
 
transafe@rambler.ru
transafe@chat.ru
trans397@yahoo.com
 
®«ì§ã©â¥áì ­  §¤®à®¢ì¥!
Trans.
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/vrr_m/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm vrr_m.asm vrr_m
@pause
/programs/system/vrr_m/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm vrr_m.asm vrr_m
@pause
/programs/system/vrr_m/trunk/macros.inc
0,0 → 1,266
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a { ; mike.dld
if ~a eq
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
; language for programs
lang fix ru ; ru en fr ge fi
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/system/vrr_m/trunk/vrr_m.asm
0,0 → 1,108
;
; à¨¬¥à ¯à®£à ¬¬ë ¤«ï MenuetOS
; ®§¢ã稢 ¥â ª®¤ ­ ¦ â®© ª« ¢¨è¨ ;)
;
; Š®¬¯¨«¨à®¢ âì FASM'®¬
;
; ‘¬. â ª¦¥:
; template.asm - ¯à¨¬¥à ¯à®á⥩襩 ¯à®£à ¬¬ë (­®¢ë©!)
; rb.asm - ª®­â¥ªáâ­®¥ ¬¥­î à ¡®ç¥£® á⮫ 
; example2.asm - ¯à¨¬¥à ¬¥­î ¨ ¤®¯®«­¨â¥«ì­ëå ®ª®­
; example3.asm - ¯à¨¬¥à ¬¥­î, ॠ«¨§®¢ ­­®£® ¯®-¤à㣮¬ã
;---------------------------------------------------------------------
 
use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
org 0x0 ;  ¤à¥á æ¨ï á ­ã«ï
 
db 'MENUET01' ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
dd START ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
dd I_END ; à §¬¥à ¯à®£à ¬¬ë
dd 0x1000 ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd 0x1000 ;  ¤à¥á ¢¥à設ë áâíª 
dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
dd 0x0 ; § à¥§¥à¢¨à®¢ ­®
 
include 'lang.inc'
include 'macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢!
 
;---------------------------------------------------------------------
;--- €—€‹Ž Žƒ€ŒŒ› ----------------------------------------------
;---------------------------------------------------------------------
 
START:
; mcall 5,10
mcall 21,13,1,drvinfo
; jmp run_launcher
 
mcall 21,13,2
cmp eax,-1
je run_launcher
; cmp ecx,280
; je change_vrr
; cmp ecx,277
; je change_vrr
; cmp ecx,6
; je change_vrr
; cmp ecx,7
; je change_vrr
; jmp run_launcher
change_vrr:
; mov ax,cx
; dec cx
; shl cx,1
; xor edx,edx
; mov dx,[vidmode+ecx]
; mov ebx,ecx
; shl ebx,2
; add ebx,ecx ; ebx=ebx*5
; shr ax,8
; dec ax
; shl ax,1
; add ebx,eax
; ror edx,16
; mov dx,[_m1+ebx]
; rol edx,16
;mov eax,ecx
xor eax,eax
sub ecx,3
mov dx,cx
cmp cx,274
je yes_274
cmp cx,277
je yes_277
jmp yes_280
yes_274:
add al,10
yes_277:
add al,10
yes_280:
add al,10
ror edx,16
mov dx,[_m1+eax]
rol edx,16
; mov dx,bx
; shl edx,16
; mov dx,cx
mcall 21,13,3
; mcall 5,300
run_launcher:
mcall 19,launcher,0
; mcall 33,text,drvinfo,512,0
mcall -1
launcher db 'LAUNCHER '
;text db 'TEXT '
drvinfo: ; 512 bytes driver info area
; +0 - Full driver name
; +32 - Driver version
; +64 - Word List of support video modes (max 32 positions)
; +128 - 5 words list of support vertical rate to each present mode
org $+32
drvver:
org $+32
vidmode:
org $+64
_m1:
org drvinfo+200h
 
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property