*Cpuid 2.19 - client-relative drawing, title with Fn0

*Pic4 - client-relative drawing, title with Fn0, system colors
*rdsave, run, scrshoot - fixes for current editbox
*vrr_m - fixed header

git-svn-id: svn://kolibrios.org@451 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron 2007-04-05 01:51:58 +00:00
parent 76f2b62b94
commit 948040d206
9 changed files with 429 additions and 441 deletions

View File

@ -7,7 +7,7 @@
dd 0x01 ; version
dd START ; program start
dd I_END ; image size
dd 0x80000 ; reguired amount of memory
dd 0x80000 ; reguired amount of memory
dd 0x80000 ; stack pointer
dd I_Param,0
@ -15,6 +15,11 @@
include 'macros.inc'
START:
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
call check_parameters
call draw_window
@ -22,6 +27,7 @@ START:
call load_texture
call draw_image
still:
mov eax,10 ; wait here for event
@ -285,8 +291,6 @@ gentexture:
ylup:
mov ebx,0
; call precalcbar
xlup:
push edi
mov edi, 0
@ -294,7 +298,6 @@ gentexture:
pixlup:
push esi
; add edi,4
mov eax,ebx ; evaluate first distance
sub eax, [ebp+edi] ; x-x1
call wrappit
@ -319,11 +322,6 @@ gentexture:
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
@ -353,22 +351,6 @@ wrappit:
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 *********
; *********************************************
@ -379,92 +361,84 @@ draw_image:
mov eax,7
mov ebx,0x40000
mov ecx,256*65536+255
mov edx,19*65536+65;55
mov edx,14*65536+40;55
int 0x40
ret
y_add equ 44 ; 30
y_add equ 19 ; 30
y_s equ 13
y_add2 equ 340 ;325
y_add2 equ 315 ;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
xor eax, eax ; define and draw window
mov ebx, 220*65536+293
mov ecx, 50*65536+408
mov edx, wnd_color
mov edx, [sc.work]
or edx, 0x33000000
mov edi, header
int 0x40
call draw_image
mov eax,8 ; Blue button
mov ebx,(set+195+27)*65536+17
mov ebx,(set+190+27)*65536+17
mov ecx,y_add*65536+y_s
mov edx,11
mov esi,0x004444cc
mov esi,0x005555bb
int 0x40
mov eax,8 ; Red button
mov ebx,(set+213+27)*65536+17
;mov eax,8 ; Red button
mov ebx,(set+208+27)*65536+17
mov edx,12
mov esi,0x00cc4444
mov esi,0x00bb5555
int 0x40
mov eax,8 ; Green button
mov ebx,(set+258)*65536+17
;mov eax,8 ; Green button
mov ebx,(set+253)*65536+17
mov edx,13
mov esi,0x0044cc44
mov esi,0x0055bb55
int 0x40
mov eax, 8 ; tiled
mov ebx, 96*65536+63
;mov eax, 8 ; tiled
mov ebx, 90*65536+63
mov ecx, y_add*65536+y_s
mov edx, 101
mov esi, button_color
mov esi, [sc.work_button]
int 0x40
mov eax, 8 ; stretch
mov ebx, 160*65536+61
;mov eax, 8 ; stretch
mov ebx, 154*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 eax, 4
mov ebx, 215*65536+5
mov ecx, [sc.work_text]
mov edx, apply_text
mov esi, apply_text.size
int 0x40
mov ebx, 19*65536+326
mov ebx, 14*65536+301
mov edx, image_buttons_text
mov esi, image_buttons_text.size
int 0x40
mov ebx, 19*65536+(y_add2+27)
mov ebx, 14*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 ebx, (13)*65536+25
mov edx, 121
mov esi, button_color
mov esi, [sc.work_button]
mov edi, 9
mov eax, 8
@@:
@ -478,7 +452,7 @@ draw_window:
mov edx, 34+4
mov edi, 4
mov eax, 8
mov ebx, 18*65536+18
mov ebx, 13*65536+18
mov ecx, y_add*65536+y_s
@@:
int 0x40
@ -489,8 +463,8 @@ draw_window:
;-----------------------
mov edx,14 ; button number
mov ebx,(18)*65536+17 ; button start x & size
mov edx,14 ; button number
mov ebx,(13)*65536+17 ; button start x & size
mov ecx,(y_add2+40)*65536+14 ; button start y & size
newcb:
@ -508,8 +482,8 @@ draw_window:
;-----------------------
mov eax, 4
mov ebx, 8*65536+4+y_add
mov ecx, 0
mov ebx, 94*65536+4+y_add
mov ecx, [sc.work_button_text]
mov edx, la2
mov esi, la2.size
int 0x40
@ -524,9 +498,11 @@ draw_window:
; DATA SECTION
lsz header,\
ru, "ƒ¥­¥à â®à ä®­  à ¡®ç¥£® á⮫ ",\
en, "BACKGROUND"
if lang eq ru
header db 'ƒ¥­¥à â®à ä®­  à ¡®ç¥£® á⮫ ',0
else
header db 'Background',0
end if
lsz apply_text,\
ru, "<22>ਬ¥­¨âì:",\
@ -541,8 +517,8 @@ lsz simple_text,\
en, "Single-color background:"
lsz la2,\
ru, " ‡€ŒŽ‘’ˆ’œ <20>Ÿ<E28099>œ",\
en, " TILED STRETCH"
ru, "‡€ŒŽ‘’ˆ’œ <20>Ÿ<E28099>œ",\
en, " TILED STRETCH"
xx db 'x'
@ -670,10 +646,10 @@ ptarray9:
dd 0,248,64,128,128,64,196,48,160,160,94,224,240,96,5,5,777
I_Param:
image:
I_END:
I_END:
sc system_colors

View File

@ -620,6 +620,10 @@ sign_n_input:
app_ipc ipc_buffer 32
mouse_flag: dd 0x0
structure_of_potock:
rb 100
cur_number dd ?
sign_n db ?

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,8 @@
; compability: probably some functions would work in MenuetOS 32 and MenuetOS 64, may be even in Miraculix;
; CPUID works in MS Windows by means of emulator KlbrInWin from Diamond (http://diamondz.land.ru)
; compiler: flat assembler 1.67.21
; version: 2.18
; last update: 1st April 2007
; version: 2.2
; last update: 5st April 2007
; maintained by: Sergey Kuzmin aka Wildwest
; e-mail: kuzmin_serg@list.ru
; site: http://coolthemes.narod.ru/files.html
@ -49,6 +49,8 @@
; (++) more info about caches for VIA and Transmeta;
; (+) added detection of DCA, SSSE3, VMX technologies for Intel;
; (+) updated multiplier detection for AMD and Intel (thanks a lot to Ghost);
; (+) client-relative drawing, title with function 0
; It means end of capability with MenuetOS!
;Known issues: Sempron marked as AthlonXP
; second window doesn't closed when you close main window
;-----------------------------------------------------------------------------

View File

@ -180,7 +180,7 @@ je cnnn1
rr:
mov byte [brand], bl ;
Text 275,210,0x00000000,abrand00, abrand00len-abrand00
Text 270,190,0x00000000,abrand00, abrand00len-abrand00
jmp B000
;jmp comppp
@ -202,15 +202,15 @@ jae res3
res1:
Text 275,210,0x00000000,abrand0, abrand0len-abrand0
Text 270,190,0x00000000,abrand0, abrand0len-abrand0
jmp B000
res2:
Text 275,210,0x00000000,abrand1, abrand1len-abrand1
Text 270,190,0x00000000,abrand1, abrand1len-abrand1
jmp B000
res3:
Text 275,210,0x00000000,abrand2, abrand2len-abrand2
Text 270,190,0x00000000,abrand2, abrand2len-abrand2
jmp B000
;;;;;;;;;;;;;;;;;;;;; intel brand
intel_br:
@ -306,18 +306,18 @@ jne Bi00
;------------------
Bi00:
mov byte [brand], bl ;00h
Text 65,270,0x00000000,brand0, brand0len-brand0
;Number 275,200,1*256,2,dword [brand],0x000000 was in v. 1.11
Text 60,250,0x00000000,brand0, brand0len-brand0
;Number 270,180,1*256,2,dword [brand],0x000000 was in v. 1.11
jmp B000
Bi01:
mov [brand], 01h
Text 65,270,0x00000000,brand01, brand01len-brand01
Text 60,250,0x00000000,brand01, brand01len-brand01
jmp B000
Bi02:
mov [brand], 02h
Text 65,270,0x00000000,brand02, brand02len-brand02
Text 60,250,0x00000000,brand02, brand02len-brand02
jmp B000
Bi03:
@ -325,40 +325,40 @@ mov [brand], 03h
cmp [m], 8
je E3
Text 65,270,0x00000000,brand03, brand03len-brand03
Text 60,250,0x00000000,brand03, brand03len-brand03
jmp B000
E3:
Text 65,270,0x00000000,brand03d, brand03dlen-brand03d
Text 60,250,0x00000000,brand03d, brand03dlen-brand03d
jmp B000
Bi04:
mov [brand], 04h
Text 65,270,0x00000000,brand04, brand04len-brand04
Text 60,250,0x00000000,brand04, brand04len-brand04
jmp B000
Bi06:
mov [brand], 06h
Text 65,270,0x00000000,brand06, brand06len-brand06
Text 60,250,0x00000000,brand06, brand06len-brand06
jmp B000
Bi07:
mov [brand], 07h
Text 65,270,0x00000000,brand07, brand07len-brand07
Text 60,250,0x00000000,brand07, brand07len-brand07
jmp B000
Bi08:
mov [brand], 08h
Text 65,270,0x00000000,brand08, brand08len-brand08
Text 60,250,0x00000000,brand08, brand08len-brand08
jmp B000
Bi09:
mov [brand], 09h
Text 65,270,0x00000000,brand09, brand09len-brand09
Text 60,250,0x00000000,brand09, brand09len-brand09
jmp B000
Bi0A:
mov [brand], 0Ah
Text 65,270,0x00000000,brand0A, brand0Alen-brand0A
Text 60,250,0x00000000,brand0A, brand0Alen-brand0A
jmp B000
Bi0B:
@ -366,15 +366,15 @@ mov [brand], 0Bh
cmp [m], 13
jl Eb
Text 65,270,0x00000000,brand0B, brand0Blen-brand0B
Text 60,250,0x00000000,brand0B, brand0Blen-brand0B
jmp B000
Eb:
Text 65,270,0x00000000,brand0Bd, brand0Bdlen-brand0Bd
Text 60,250,0x00000000,brand0Bd, brand0Bdlen-brand0Bd
jmp B000
Bi0C:
mov [brand], 0Ch
Text 65,270,0x00000000,brand0C, brand0Clen-brand0C
Text 60,250,0x00000000,brand0C, brand0Clen-brand0C
jmp B000
Bi0E:
@ -382,50 +382,50 @@ mov [brand], 0Eh
cmp [m], 13
jl Ed
Text 65,270,0x00000000,brand0E, brand0Elen-brand0E
Text 60,250,0x00000000,brand0E, brand0Elen-brand0E
jmp B000
Ed:
Text 65,270,0x00000000,brand0Ed, brand0Edlen-brand0Ed
Text 60,250,0x00000000,brand0Ed, brand0Edlen-brand0Ed
jmp B000
Bi0F:
mov [brand], 0Fh
Text 65,270,0x00000000,brand0F, brand0Flen-brand0F
Text 60,250,0x00000000,brand0F, brand0Flen-brand0F
jmp B000
Bi11:
mov [brand], 11h
Text 65,270,0x00000000,brand11, brand11len-brand11
Text 60,250,0x00000000,brand11, brand11len-brand11
jmp B000
Bi12:
mov [brand], 12h
Text 65,270,0x00000000,brand12, brand12len-brand12
Text 60,250,0x00000000,brand12, brand12len-brand12
jmp B000
Bi13:
mov [brand], 13h
Text 65,270,0x00000000,brand13, brand13len-brand13
Text 60,250,0x00000000,brand13, brand13len-brand13
jmp B000
Bi14:
mov [brand], 14h
Text 65,270,0x00000000,brand14, brand14len-brand14
Text 60,250,0x00000000,brand14, brand14len-brand14
jmp B000
Bi15:
mov [brand], 15h
Text 65,270,0x00000000,brand15, brand15len-brand15
Text 60,250,0x00000000,brand15, brand15len-brand15
jmp B000
Bi16:
mov [brand], 16h
Text 65,270,0x00000000,brand16, brand16len-brand16
Text 60,250,0x00000000,brand16, brand16len-brand16
jmp B000
Bi17:
mov [brand], 17h
Text 65,270,0x00000000,brand17, brand17len-brand17
Text 60,250,0x00000000,brand17, brand17len-brand17
jmp B000
B000:

View File

@ -328,6 +328,9 @@ error11 db 'Device error',0
end if
mouse_flag: dd 0x0
structure_of_potock:
rb 100
;---------------------------------------------------------------------
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë

View File

@ -253,6 +253,7 @@ grab_text db 'RUN',0
run_but_text db 'RUN',0
end if
mouse_flag: dd 0x0
status dd hello
@ -265,6 +266,9 @@ dd 0,0
flags dw ?
structure_of_potock:
rb 100
fn rb 512
sc sys_color_table

View File

@ -1,14 +1,18 @@
;
; <20>ਬ¥à ¯à®£à ¬¬ë ¤«ï MenuetOS
; ®§¢ã稢 ¥â ª®¤ ­ ¦ â®© ª« ¢¨è¨ ;)
; ‘¨á⥬­ ï ¯à®£à ¬¬  ¤«ï ãáâ ­®¢ª¨ ¯®¢ë襭­ëå (>60 Hz) ç áâ®â ®¡­®¢«¥­¨ï
; íªà ­  §  áç¥â á­¨¦¥­¨ï à §à¥è¥­¨ï
; (¤«ï ¯¥à¥å®¤®¢: 1024å768-->800å600
; 800å600-->640å480)
;
; Š®¬¯¨«¨à®¢ âì FASM'®¬
;
; ‘¬. â ª¦¥:
; template.asm - ¯à¨¬¥à ¯à®á⥩襩 ¯à®£à ¬¬ë (­®¢ë©!)
; rb.asm - ª®­â¥ªáâ­®¥ ¬¥­î à ¡®ç¥£® á⮫ 
; example2.asm - ¯à¨¬¥à ¬¥­î ¨ ¤®¯®«­¨â¥«ì­ëå ®ª®­
; example3.asm - ¯à¨¬¥à ¬¥­î, ॠ«¨§®¢ ­­®£® ¯®-¤à㣮¬ã
; !!!!!_<>।ã¯à¥¦¤¥­¨¥_!!!!!:
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;! <20>  ⥪ã騩 ¬®¬¥­â ¯à®£à ¬¬  ­®á¨â <20>Š<C5A0><EFBFBD>ˆŒ…<C592>œ<E280B9>‰ (!) å à ªâ¥à, ¯®í⮬㠢ᥣ¤  !
;! ®áâ ¥âáï ¢¥à®ïâ­®áâì ¯®àç¨ ®¡®à㤮¢ ­¨ï (â.¥. ¬®­¨â®à ). Žá®¡¥­­® íâ® ª á ¥âáï ¢á¥å!
;! â¥å, 祩 ¬®­¨â®à ­¥ ¨¬¥¥â § é¨âë ®â ¯¥à¥£à㧮ª ¯® ç áâ®â¥. !
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
;---------------------------------------------------------------------
use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à