Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 340 → Rev 485

/programs/demos/3dcube2/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/3dcube2/trunk/3DCUBE2.ASM
24,20 → 24,17
SCREEN_Y equ 200
 
include 'lang.inc'
include '..\..\..\macros.inc'
include 'ascl.inc'
include 'ascgl.inc'
include 'macros.inc'
 
START:
call draw_window
call init_sin_cos
 
still:
; mov eax,23 ; wait for system event with 10 ms timeout
; mov ebx,1 ; wait 10 ms, then continue
; int 0x40
 
mov eax,11
int 0x40
mcall
 
dec eax
; cmp eax,1 ; window redraw request ?
84,36 → 81,36
jmp still
key:
mov eax,2
int 0x40
mcall
jmp still
button:
mov eax,17
int 0x40
mcall
cmp ah,1
jne still
exit:
mov eax,-1
int 0x40
mcall
 
;Draw window
draw_window:
mov eax,12 ;Start
mov ebx,1
int 0x40
mcall
 
mov eax,0 ;Draw window
mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size
mov ecx,100*65536+(SCREEN_Y+26) ;y start*65536+y size
mov edx,0x13000000 ;0x03 use skinned window
mov edi,header
int 0x40
mov edi,title
mcall
 
mov eax,12 ;End
mov ebx,2
int 0x40
mcall
ret
 
header db '3D TEST SAMPLE FOR MENUETOS',0
title db '3D TEST SAMPLE FOR MENUETOS',0
 
 
; Draw faces procedure
182,7 → 179,7
mov ecx,SCREEN_X*65536+SCREEN_Y
mov edx,5*65536+22
mov ax,7
int 0x40
mcall
 
;White background
mov edi,scrbuf
578,7 → 575,7
pushad
mov eax,37
mov ebx,1
int 0x40
mcall
mov ebx,eax
shr eax,16
and ebx,0xffff
/programs/demos/3dcube2/trunk/ascgl.inc
33,7 → 33,7
add ecx,ys
mov edx,color
mov eax,13
int 0x40
mcall
}
 
; FPS - Set Frame Per Second Display
50,7 → 50,7
spdat:
get_time:
mov eax,3
int 0x40
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
69,7 → 69,7
mov ecx,y*65536+7
mov edx,delcolor
mov eax,13
int 0x40
mcall
end if
mov dword [ttt],fps_show_frequency
mov eax,47
78,7 → 78,7
mov edx,x*65536+y
mov esi,color
mov ecx,[fps]
int 0x40
mcall
no_out_fps:
}
 
153,7 → 153,7
shl edx,16
add edx,arg2
end if
int 0x40
mcall
nodi:
}
 
173,7 → 173,7
shl edx,16
add edx,arg2
end if
int 0x40
mcall
}
 
;Not optimiz
451,7 → 451,7
mov dword [fileinfo+8],1 ; how many blocks to read (1)
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
mov eax,[bmp_load_area+2]
shr eax,9 ; ¯®¤¥«¨¬ ­  512 ¨ ¯à¨¡ ¢¨¬ 1 - ¯®«ã稬 ç¨á«® ¡«®ª®¢
inc eax
458,7 → 458,7
mov dword [fileinfo+8],eax
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
 
; jmp qwe
;bmpfn db bmp_file_name
469,7 → 469,7
; mov edx,0xFFFFFF
; mov esi,bmp_load_area
; mov edi,0
; int 0x40
; mcall
 
; convert:
movzx eax,word [bmp_load_area+28]
/programs/demos/3dcube2/trunk/ascl.inc
36,9 → 36,9
mov eax,6
mov ebx,clip_file
mov ecx,0
mov edx,-1
or edx,-1
mov esi,path
int 0x40
mcall
cmp byte [clip_file+7],'Z'
je erroff
cmp eax,0xffffffff
54,12 → 54,12
mov edx,100
mov esi,0
mov eax,33
int 0x40
mcall
 
mov ebx,dlg_file
mov ecx,clip_file
mov eax,19
int 0x40
mcall
 
still:
scevent red,key,button
72,7 → 72,7
mov ecx,0
mov edx,-1
mov esi,path
int 0x40
mcall
cmp eax,0xffffffff
je erroff ;errexit
mov dword [redwait],0
84,19 → 84,19
file_is_open:
mov eax,32
mov ebx,clip_file
int 0x40
mcall
jmp openoff
 
key: ; key
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp still
button: ; button
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne still
mov eax,-1 ; close this program
int 0x40
mcall
 
red:
call redproc
127,7 → 127,7
mov ecx,0
mov edx,-1
mov esi,path
int 0x40
mcall
cmp byte [clip_file+7],'Z'
je erroff
cmp eax,0xffffffff
143,12 → 143,12
mov edx,100
mov esi,0
mov eax,33
int 0x40
mcall
 
mov ebx,dlg_file
mov ecx,clip_file
mov eax,19
int 0x40
mcall
 
still:
scevent red,key,button
161,7 → 161,7
mov ecx,0
mov edx,-1
mov esi,path
int 0x40
mcall
cmp eax,0xffffffff
je erroff ;errexit
mov dword [redwait],0
173,19 → 173,19
file_is_open:
mov eax,32
mov ebx,clip_file
int 0x40
mcall
jmp openoff
 
key: ; key
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp still
button: ; button
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne still
mov eax,-1 ; close this program
int 0x40
mcall
 
red:
call redproc
272,7 → 272,7
macro scank
{
mov eax,10
int 0x40
mcall
}
 
macro putpix x,y,color
281,7 → 281,7
mov ecx,y
mov edx,color
mov eax,1
int 0x40
mcall
}
 
macro puttxt x,y,offs,size,color
293,7 → 293,7
mov edx,offs
mov esi,size
mov eax,4
int 0x40
mcall
}
 
;_ equ '____'
306,7 → 306,7
; mov ecx,y
; mov edx,color
; mov eax,1
; int 0x40
; mcall
;}
 
 
318,7 → 318,7
mov edx,x*65536+y
mov esi,color
mov eax,47
int 0x40
mcall
}
 
; SCEVENT - Scan event
326,7 → 326,7
macro scevent red,key,but
{
mov eax,11
int 0x40
mcall
dec eax
jz red
dec eax
340,7 → 340,7
macro wtevent red,key,but
{
mov eax,10
int 0x40
mcall
dec eax
jz red
dec eax
355,7 → 355,7
{
mov eax,23
mov ebx,xfps
int 0x40
mcall
cmp eax,0
je noevent
dec eax
372,7 → 372,7
macro close
{
mov eax,-1
int 0x40
mcall
}
 
; DELAY - Create delay 1/100 sec
383,7 → 383,7
{
mov eax,5
mov ebx,arg1
int 0x40
mcall
}
 
; WINDOW - Draw window
396,7 → 396,7
mov ecx,arg2*65536+arg4
mov edx,arg5
mov eax,0
int 0x40
mcall
}
 
macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7
407,7 → 407,7
mov esi,arg6
mov edi,arg7
mov eax,0
int 0x40
mcall
}
 
 
417,7 → 417,7
{
mov eax,12
mov ebx,1
int 0x40
mcall
}
 
; ENDWD - End window draw
426,7 → 426,7
{
mov eax,12
mov ebx,2
int 0x40
mcall
}
 
; LABEL - Put text to frame
446,7 → 446,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
int 0x40
mcall
}
 
;Key's
/programs/demos/3dcube2/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@pause
/programs/demos/3dcube2/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@pause
/programs/demos/3detx60b/trunk/3DETX60B.ASM
61,6 → 61,7
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include '..\..\..\macros.inc'
include 'ascgl.inc'
include 'ascl.inc'
 
271,13 → 272,13
mov eax,66
mov ebx,1
mov ecx,1
int 0x40
mcall
 
mov eax,26
mov ebx,2
mov ecx,1
mov edx,keymap+100
int 0x40
mcall
 
;Build triangle matrix
mov esi,points
384,7 → 385,7
;Main loop
still: ; ®á­®¢­®© 横«
mov eax,11 ; ¯à®¢¥àª  á®áâ®ï­¨ï ®ª­ 
int 0x40
mcall
 
cmp eax,1 ; ®ª­® ᤢ¨­ã«¨ ¥£® ­ã¦­® ¯¥à¥à¨á®¢ âì
je red
490,16 → 491,16
mov ecx,0x0000ff00 ; font 1 & color ( 0xF0RRGGBB )
mov edx,keymap ; pointer to text beginning
mov esi,100 ; text length
int 0x40
mcall
add edx,100
add ebx,10
mov esi,60 ; text length
mov ecx,0x00dddddd ; font 1 & color ( 0xF0RRGGBB )
int 0x40
mcall
mov edx,usemap
mov esi,60 ; text length
mov ecx,0x0000ff00
int 0x40
mcall
jmp rx
;01234567890123456789012345678901234567890123456789
usemap db ' E wer u [] asd zxc '
721,7 → 722,7
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
mcall
 
shr eax,8
and eax,0xff
747,14 → 748,14
 
button: ; button
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1
jz exit
jmp cycle
 
exit:
mov eax,-1
int 0x40
or eax,-1
mcall
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
763,7 → 764,7
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,0*65536+SCREEN_X-1 ; [x start] *65536 + [x size]
771,7 → 772,7
mov edx,0x03ffffff ; color of work area RRGGBB,8->color gl
mov esi,0x005080d0 ; color of grab bar RRGGBB,8->color gl
mov edi,0x005080d0 ; color of frames RRGGBB
int 0x40
mcall
; WINDOW LABEL
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
778,11 → 779,11
mov ecx,0x10ddeeff ; font 1 & color ( 0xF0RRGGBB )
mov edx,labelt ; pointer to text beginning
mov esi,labellen-labelt ; text length
int 0x40
mcall
 
mov eax,12
mov ebx,2
int 0x40
mcall
ret
 
dispimg:
790,7 → 791,7
mov ebx,I_END ;zbuffer
mov ecx,SCREEN_X*65536+SCREEN_Y
xor edx,edx ;0*65536+0
int 0x40
mcall
; ret
 
mov eax,8
798,7 → 799,7
mov ecx,10*65536+20
mov edx,1
mov esi,0x0000aa00
int 0x40
mcall
ret
 
clrscr: ; clear screen buffer
/programs/demos/3detx60b/trunk/ascgl.inc
20,8 → 20,8
;0.07 convbmp ~13.05.2004
;0.08 fps ~14.05.2004
;0.09 drawfbox ~03.06.2004
;0.10 all macros optimized by Halyavin A., add at ~07.06.2004
;0.11 many macros optimized by Halyavin A., add at ~30.08.2004
;0.10 all macros optimized by halyavin, add at ~07.06.2004
;0.11 many macros optimized by halyavin, add at ~30.08.2004
;0.12 bmptoimg ~07.09.2004
;0.13 imgtoimg ~08.09.2004
;0.14 imgtoimg modify not brake bmp pict! ~09.09.2004
369,11 → 369,11
;DrawBox
macro drawfbox x,y,xs,ys,color
{
words2reg ebx,x,xs ;x*65536+xs
words2reg ecx,y,ys ;y*65536+ys
wordstoreg ebx,x,xs ;x*65536+xs
wordstoreg ecx,y,ys ;y*65536+ys
mov edx,color
mov eax,13
int 0x40
mcall
}
 
; FPS - Set Frame Per Second Display
390,7 → 390,7
spdat:
get_time:
mov eax,3
int 0x40
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
405,20 → 405,20
mov [fps_cntr],0
out_fps:
if ~(delcolor eq )
mov ebx,x*65536+36
mov ebx,x*65536+30
mov ecx,y*65536+7
mov edx,delcolor
mov eax,13
int 0x40
mcall
end if
mov dword [ttt],fps_show_frequency
mov eax,47
mov ebx,6*65536
mov ebx,5*65536
; mov bl,0
mov edx,x*65536+y
mov esi,color
mov ecx,[fps]
int 0x40
mcall
no_out_fps:
}
 
495,8 → 495,8
shl ecx,16
add cx,[arg3+4]
; wordstoreg ecx,[arg3],[arg3+4]
words2reg edx, x , y ;arg1*65536+arg2
int 0x40
wordstoreg edx, x , y ;arg1*65536+arg2
mcall
}
 
macro setframe x , y ,arg3
504,10 → 504,10
mov eax,7
mov ebx,arg3
add ebx,8
words2reg edx, x , y ;arg1*65536+arg2
wordstoreg edx, x , y ;arg1*65536+arg2
add edx,dword [arg3]
mov ecx,dword [arg3+4]
int 0x40
mcall
}
 
 
1101,7 → 1101,7
local Gif_get_sym, shift, nextbl, noblock, loop1, exx
local Gif_output, next, loop2
 
_null equ 0x1000 ; 0x1000
_null fix 0x1000 ; 0x1000
 
mov esi,gifsrc ;“ª § â¥«ì ­  ƒˆ” ä ¨« ¢ ¯ ¬ïâ¨
mov edi,imgsrc ;“ª § â¥«ì ­  ᯨ᮪ ª à⨭®ª
/programs/demos/3detx60b/trunk/ascl.inc
27,13 → 27,11
;0.12 open/save dialog ~13.09.2004
;0.13 dialogs bugs deleted
;0.14 drawlbut ~03.10.2004
;0.15 extendet label!
 
; LOADFILE
; (SYNTAX) LOADFILE 'full_path_to_file',file_load_area,file_temp_area
; (SAMPLE) LOADFILE '/rd/1/clock.bmp',load_area,temp_area
 
 
macro loadfile file_name,file_load_area,file_temp_area
{
local open,fileinfo,string
50,7 → 48,7
mov dword [fileinfo+8],1 ; how many blocks to read (1)
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
mov eax,[file_load_area+2]
shr eax,9 ; ¯®¤¥«¨¬ ­  512 ¨ ¯à¨¡ ¢¨¬ 1 - ¯®«ã稬 ç¨á«® ¡«®ª®¢
inc eax
57,79 → 55,29
mov dword [fileinfo+8],eax
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
}
 
 
;macro wordstoreg reg,hiword,loword
;{
;if hiword eqtype 0 & loword eqtype 0
; mov reg,dword hiword*65536+loword
;else if hiword eqtype 12 & loword eqtype eax
; mov reg,dword hiword*65536
; add reg,dword loword
;else if hiword eqtype 12 & loword eqtype [123]
; mov reg,dword hiword*65536
; add reg,dword loword
;else
; mov reg,dword hiword
; shl reg,16
; add reg,dword loword
;end if
;}
 
macro dword2reg reg,doubleword
macro wordstoreg reg,hiword,loword
{
if doubleword eq
; not changes
if hiword eqtype 0 & loword eqtype 0
mov reg,(hiword)*65536+(loword)
else if hiword eqtype 12 & loword eqtype eax
mov reg,(hiword)*65536
add reg,loword
else if hiword eqtype 0 & loword eqtype [123]
mov reg,(hiword)*65536
add reg,loword
else if (hiword eq ) & (loword eq )
else
mov reg,dword doubleword
end if
}
 
macro words2reg reg,hiword,lowword
{
if hiword eq
if lowword eq
; not changes
else
if lowword eqtype 12
and reg,dword 0xffff0000
add reg,dword lowword
else
and reg,dword 0xffff0000
add reg,dword lowword
end if
end if
else
if lowword eq
if hiword eqtype 12
and reg,dword 0x0000ffff
add reg,dword hiword*65536
else
mov reg,hiword
shl reg,16
add reg,dword hiword
ror reg,16
add reg,loword
end if
else
if lowword eqtype 12 & hiword eqtype 12
if lowword eq 0 & hiword eq 0
xor reg,reg
else
mov reg,dword hiword*65536+lowword
end if
else
mov reg,dword hiword
shl reg,16
add reg,dword lowword
end if
end if
end if
}
 
 
 
 
; DRAW BUTTON with label
 
macro drawlbut x,y,xs,ys,text,id,bcolor,tcolor
138,12 → 86,12
jmp asd
lab db text ;arg label
asd:
words2reg ebx,x,xs
words2reg ecx,y,ys
wordstoreg ebx,x,xs
wordstoreg ecx,y,ys
mov edx,id
mov esi,bcolor
mov eax,8
int 0x40
mcall
 
mov eax,asd-lab ;calc size
mov ebx,6
168,7 → 116,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
int 0x40
mcall
}
 
 
197,7 → 145,7
mov eax,9
mov ebx,procinfo
mov ecx,-1
int 0x40
mcall
 
; convert eax bin to param dec
mov eax,dword [procinfo+30] ;offset of myPID
231,12 → 179,12
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,150 ; size 150 bytes
int 0x40
mcall
 
; change wanted events list 7-bit IPC event
mov eax,40
mov ebx,01000111b
int 0x40
mcall
 
;
; STEP 3 run SYSTEM XTREE with parameters
244,7 → 192,7
 
mov eax,58
mov ebx,run_fileinfo
int 0x40
mcall
 
call redproc
 
252,7 → 200,7
getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
int 0x40
mcall
 
cmp eax,1
je mred
267,7 → 215,7
mov ebx,procinfo
mov ecx,-1
mov eax,9
int 0x40
mcall
mov ebp,eax
 
loox:
274,7 → 222,7
mov eax,9
mov ebx,procinfo
mov ecx,ebp
int 0x40
mcall
mov eax,[DLGPID]
cmp [procinfo+30],eax ;IF Dialog find
je dlg_is_work ;jmp to dlg_is_work
299,15 → 247,15
jmp getmesloop
mkey:
mov eax,2
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp getmesloop
mbutton:
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne getmesloop
mov eax,-1 ; close this program
int 0x40
mcall
mgetmes:
 
; If dlg_pid_get then second message get jmp to still
380,7 → 328,7
db '/RD/1/SYSXTREE',0
 
procinfo:
times 1024 db 0
times 256 db 0
}
 
 
409,7 → 357,7
mov eax,9
mov ebx,procinfo
mov ecx,-1
int 0x40
mcall
 
; convert eax bin to param dec
mov eax,dword [procinfo+30] ;offset of myPID
442,13 → 390,13
mov eax,60
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,150 ; size 150 bytes
int 0x40
mov edx,120 ; size 150 bytes
mcall
 
; change wanted events list 7-bit IPC event
mov eax,40
mov ebx,01000111b
int 0x40
mcall
 
;
; STEP 3 run SYSTEM XTREE with parameters
456,7 → 404,7
 
mov eax,58
mov ebx,run_fileinfo
int 0x40
mcall
 
call redproc
 
464,7 → 412,7
getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
int 0x40
mcall
 
cmp eax,1
je mred
479,7 → 427,7
mov ebx,procinfo
mov ecx,-1
mov eax,9
int 0x40
mcall
mov ebp,eax
 
loox:
486,7 → 434,7
mov eax,9
mov ebx,procinfo
mov ecx,ebp
int 0x40
mcall
mov eax,[DLGPID]
cmp [procinfo+30],eax ;IF Dialog find
je dlg_is_work ;jmp to dlg_is_work
510,16 → 458,15
call redproc
jmp getmesloop
mkey:
mov eax,2
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp getmesloop
mbutton:
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne getmesloop
mov eax,-1 ; close this program
int 0x40
mcall
mgetmes:
 
; If dlg_pid_get then second message get jmp to still
579,8 → 526,8
DLGPID dd 0
 
param:
dd 0 ; My dec PID
dd 0,0 ; Type of dialog
rb 4 ; My dec PID
rb 6 ; Type of dialog
 
run_fileinfo:
dd 16
588,11 → 535,11
dd param
dd 0
dd procinfo
;run_filepath:
run_filepath:
db '/RD/1/SYSXTREE',0
 
procinfo:
times 1024 db 0
times 256 db 0
}
 
 
671,7 → 618,7
macro scank
{
mov eax,10
int 0x40
mcall
}
 
macro putpix x,y,color
680,7 → 627,7
mov ecx,y
mov edx,color
mov eax,1
int 0x40
mcall
}
 
macro puttxt x,y,offs,size,color
688,17 → 635,12
; mov ebx,x
; shl ebx,16
; add ebx,y
words2reg ebx,x,y
 
dword2reg ecx,color
dword2reg edx,offs
dword2reg esi,size
 
; mov ecx,color
; mov edx,offs
; mov esi,size
wordstoreg ebx,x,y
mov ecx,color
mov edx,offs
mov esi,size
mov eax,4
int 0x40
mcall
}
 
macro outcount data, x, y, color, numtype
707,10 → 649,10
mov ebx,numtype
mov bl,0
; mov edx,x*65536+y
words2reg edx,x,y
wordstoreg edx,x,y
mov esi,color
mov eax,47
int 0x40
mcall
}
 
; SCEVENT - Scan event
718,7 → 660,7
macro scevent red,key,but
{
mov eax,11
int 0x40
mcall
dec eax
jz red
dec eax
732,7 → 674,7
macro wtevent red,key,but
{
mov eax,10
int 0x40
mcall
dec eax
jz red
dec eax
747,7 → 689,7
{
mov eax,23
mov ebx,xfps
int 0x40
mcall
cmp eax,0
je noevent
dec eax
764,7 → 706,7
macro close
{
mov eax,-1
int 0x40
mcall
}
 
; DELAY - Create delay 1/100 sec
775,7 → 717,7
{
mov eax,5
mov ebx,arg1
int 0x40
mcall
}
 
; WINDOW - Draw window
786,11 → 728,11
{
; mov ebx,arg1*65536+arg3
; mov ecx,arg2*65536+arg4
words2reg ebx,arg1,arg3
words2reg ecx,arg2,arg4
wordstoreg ebx,arg1,arg3
wordstoreg ecx,arg2,arg4
mov edx,arg5
mov eax,0
int 0x40
mcall
}
 
macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7
801,7 → 743,7
mov esi,arg6
mov edi,arg7
mov eax,0
int 0x40
mcall
}
 
 
811,7 → 753,7
{
mov eax,12
mov ebx,1
int 0x40
mcall
}
 
; ENDWD - End window draw
820,7 → 762,7
{
mov eax,12
mov ebx,2
int 0x40
mcall
}
 
; LABEL - Put text to frame
836,15 → 778,14
; mov ebx,arg1 ;arg1=y arg2=x
; shl ebx,16
; add ebx,arg2
 
words2reg ebx,arg1,arg2
 
dword2reg ecx,arg4
 
wordstoreg ebx,arg1,arg2
if ~(arg4 eq )
mov ecx,arg4 ;arg4 color
end if
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
int 0x40
mcall
}
 
;Key's
/programs/demos/3detx60b/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm 3detx60b.asm 3detx60b
@erase lang.inc
@pause
/programs/demos/3detx60b/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm 3detx60b.asm 3detx60b
@erase lang.inc
@pause
/programs/demos/3dtcub10/trunk/3DTCUB10.ASM
20,6 → 20,7
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include '..\..\..\macros.inc'
MAX_DEGS equ 512 ;quantity of angels 2^n.Minimize for speedup
MAX_POINTS equ 8 ;quantity of points
MAX_FACES equ 6 ;quantity of points
33,10 → 34,10
still:
mov eax,23 ; wait for system event with 2 ms timeout
mov ebx,2 ; wait 2 ms, then continue
int 0x40
mcall
 
; mov eax,11 ;If you want maximum speed! :)
; int 0x40
; mcall
 
dec eax ; window redraw request ?
je red
86,30 → 87,30
jmp exit
button:
mov eax,17
int 0x40
mcall
cmp ah,1
jne still
exit:
mov eax,-1
int 0x40
mcall
 
;Draw window
draw_window:
mov eax,12 ;Start
mov ebx,1
int 0x40
mcall
 
mov eax,0 ;Draw window
mov ebx,0*65536+(799) ;x start*65536+x size
mov ecx,0*65536+(599) ;y start*65536+y size
mov edx,0x00000000 ;0x03 use skinned window
int 0x40
mcall
 
call clear_screen
 
mov eax,12 ;End
mov ebx,2
int 0x40
mcall
ret
 
head_label: db "3D TEXTURED CUBE THE LITTLE SCREEN SAVER FOR MENUETOS. USE "
163,7 → 164,7
mov ebx,0*65536+800
mov ecx,0*65536+600
mov edx,0
int 40h
mcall
 
mov eax,4 ;Out Text
mov ebx,8*65536+8 ;x start*65536+y start
170,7 → 171,7
mov ecx,0x00ffffff ;color White
mov edx,head_label
mov esi,hl_end-head_label
int 0x40
mcall
ret
 
clear_screen_buffer:
178,7 → 179,7
mov ecx,800*65536+(600-40) ;sub 40 for antiflickering title
mov edx,0*65536+40
mov eax,7
int 0x40
mcall
 
mov eax,4 ;Out Text
mov ebx,8*65536+580 ;x start*65536+y start
189,7 → 190,7
mov edx,move_text
add edx,[step]
mov esi,130 ;mt_end-move_text
int 0x40
mcall
 
inc [n_step]
cmp [n_step],6
/programs/demos/3dtcub10/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm 3dtcub10.asm 3dtcub10
@erase lang.inc
@pause
/programs/demos/3dtcub10/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm 3dtcub10.asm 3dtcub10
@erase lang.inc
@pause
/programs/demos/bcdclk/bcdclk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/bcdclk/bcdclk/bcdclk.asm
18,7 → 18,7
dd 0x0 , 0x0
 
include "lang.inc"
include "macros.inc"
include "..\..\..\macros.inc"
 
 
START:
30,7 → 30,7
 
mov eax,23 ; wait for timeout
mov ebx,50
int 0x40
mcall
 
cmp eax,1 ; redraw ?
je red
44,12 → 44,12
button:
mov al,17 ; get id
int 0x40
mcall
 
cmp ah,1 ; button id=1 ?
jne noclose
or eax,-1 ; close this program
int 0x40
mcall
noclose:
 
jmp still
57,7 → 57,7
drawclock:
 
mov eax,3 ; get time
int 0x40
mcall
bswap eax
shr eax,8
mov edi,dg1
82,7 → 82,7
mov edx,0x00ff0000
nobit:
mov eax,13 ; plot 8,4,2,1
int 0x40
mcall
add ecx,12*65536
shl byte[edi],1
inc esi
91,7 → 91,7
shr byte[edi],4
mov edx,0x00880040
mov eax,13 ; draw digit box
int 0x40
mcall
pusha
mov edx,ebx
and edx,0xffff0000
102,7 → 102,7
mov ecx,[edi]
mov esi,0x00ffffff
mov eax,47 ; display decimal
int 0x40
mcall
popa
sub ebx,12*65536
inc edi
116,23 → 116,23
 
mov eax,12
mov ebx,1 ; start redraw
int 0x40
mcall
 
xor eax,eax ; window
mov ebx,100*65536+107
mov ecx,100*65536+105
mov edx,0x33400088
mov edi,header
int 0x40
mov edi,title
mcall
 
call drawclock
 
mov eax,12
mov ebx,2 ; end redraw
int 0x40
mcall
 
ret
 
header db 'BCD Clock',0
title db 'BCD Clock',0
I_END:
dg1: db ?
/programs/demos/bcdclk/bcdclk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm bcdclk.asm bcdclk
@erase lang.inc
@pause
/programs/demos/bcdclk/bcdclk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm bcdclk.asm bcdclk
@erase lang.inc
@pause
/programs/demos/bgitest/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/bgitest/trunk/bgifont.inc
239,7 → 239,7
if ~ BGI_LEVEL eq KERNEL
mov eax, 70
mov ebx, .fontattr
int 0x40
mcall
test eax, eax
jnz .fail
dps2 '1'
247,7 → 247,7
mov [.fsize], eax
mov ebx,.fontinfo
mov eax,70
int 0x40 ; ebx - file size
mcall ; ebx - file size
else
push edi esi edx
mov eax,.font
454,7 → 454,7
mov eax,9
mov ebx,BGI_PRC_INFO
mov ecx,-1
int 0x40
mcall
popa
end if
end if
587,7 → 587,7
and edx, 0xFFFFFF
; \end{diamond}[18.08.2006]
mov eax,38
int 0x40
mcall
test ebp,BGI_BOLD
jz .nobold
test ebp,BGI_FREE
594,7 → 594,7
jnz .free5
.free5:
add ebx,1 shl 16+1
int 0x40
mcall
.nobold:
pop eax
else
/programs/demos/bgitest/trunk/bgitest.asm
69,7 → 69,7
not1strun dd 0x0
 
include 'lang.inc'
include 'macros.inc'
include '..\..\..\macros.inc'
;include 'debug.inc'
include 'bgifont.inc'
 
101,7 → 101,7
still:
 
mov eax,10
int 0x40
mcall
 
cmp eax,1
je red
114,19 → 114,19
 
button:
mov eax,17
int 0x40
mcall
cmp ah,1
jnz noclose
close:
xor eax,eax
dec eax
int 0x40
mcall
noclose:
jmp still
 
key:
mov eax,2
int 0x40
mcall
shr eax,8
cmp al,27 ; esc - close
je close
228,11 → 228,11
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
int 0x40
mcall
 
mov eax,12
mov ebx,1
int 0x40
mcall
 
xor eax,eax
mov ebx,10*65536+_X*2+30
240,7 → 240,7
mov edx,0x03261212
mov esi,0x805080d0
mov edi,0x005080d0
int 0x40
mcall
 
mov eax,4
mov ebx,8*65536+8
252,7 → 252,7
je .int
sub esi,12
.int:
int 0x40
mcall
 
cmp [help],0
jnz .help
282,16 → 282,16
mov edx,0x4b331a
mov ebx,[edi]
mov ecx,[edi+4]
int 0x40
mcall
mov ebx,[edi+8]
mov ecx,[edi+12]
int 0x40
mcall
mov ebx,freetest
BGIfont_Freetext
.eod:
mov eax,12
mov ebx,2
int 0x40
mcall
ret
 
Print: ; eax-pointer to _txt struc
326,7 → 326,7
and esi,0xfff
push ecx
mov ecx,[ebp+8]
int 0x40
mcall
pop ecx
lea edx,[esi+edx+4]
add ebx,[ebp+4]
/programs/demos/bgitest/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm bgitest.asm bgitest
@erase lang.inc
@pause
/programs/demos/bgitest/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm bgitest.asm bgitest
@erase lang.inc
@pause
/programs/demos/colorref/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm colorref.asm colorref
@erase lang.inc
@pause
/programs/demos/colorref/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm colorref.asm colorref
@erase lang.inc
@pause
/programs/demos/colorref/trunk/colorref.asm
15,6 → 15,7
dd 0x0,0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include '..\..\..\macros.inc'
wide: dd 0 ; screen pixels width
mouse: dd 0 ; 1=right,2=left [mouse click]
 
22,7 → 23,7
start:
 
mov eax,14 ; get screen size
int 0x40
mcall
shr eax,16 ; get width into AX
inc eax ; not 0 based
mov [wide],eax
32,7 → 33,7
still:
mov eax,23 ; wait for event w/timeout
mov ebx,5 ; delay in hundredths
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
jne s1
46,7 → 47,7
s3: mov eax,9 ; process info function
mov ebx,stat_table ; return data table
mov ecx,-1 ; who am i
int 0x40
mcall
cmp ax,[stat_table+4] ; are we active?
je active ; yep
jmp still
54,7 → 55,7
active:
mov eax,37 ; mouse info function
mov ebx,2 ; get buttons
int 0x40
mcall
cmp eax,0 ; mouse click?
jne click
jmp still
62,7 → 63,7
mov [mouse],eax ; save mouse click
mov eax,37 ; mouse info
xor ebx,ebx ; get screen pos for mouse
int 0x40 ; into EAX
mcall ; into EAX
xor ebx,ebx
mov bx,ax ; BX=y screen position
shr eax,16 ; AX=x screen position
72,7 → 73,7
mul ecx
add ebx,eax ; add x
mov eax,35 ; get mouse pos pixel
int 0x40 ; EAX=mouse pixel color
mcall ; EAX=mouse pixel color
mov ebx,eax ; EBX has color
mov esi,colors ; color table
mov ecx,72 ; total colors
110,7 → 111,7
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
mcall
cmp al,0 ; key in buffer?
je k1 ; yep
jmp still
124,7 → 125,7
 
button: ; button
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
je close
jmp still
131,7 → 132,7
 
close:
mov eax,-1 ; close this program
int 0x40
mcall
 
 
; *********************************************
143,20 → 144,20
 
mov eax,12 ; tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
 
mov eax,0 ; DRAW WINDOW
mov ebx,1*65536+200 ; [x start] *65536 + [x size]
mov ecx,200*65536+240 ; [y start] *65536 + [y size]
mov edx,0x13000000 ; work area color (type II)
mov edi,header ; frame color
int 0x40
mov edi,title ; frame color
mcall
call palette ; display color palette
 
mov eax,12 ; tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
 
ret
 
178,7 → 179,7
mov ecx,edx ; y coord
mov edx,[ebp] ; color
mov eax,13 ; draw bar function
int 0x40
mcall
pop edx
pop ecx
add ebx,19*65536 ; next column
197,7 → 198,7
mov ecx,188*65536+42 ; draw y and depth
mov edx,0xc0c0c0 ; color grey
mov eax,13 ; draw bar function
int 0x40
mcall
mov eax,[picks] ; first picked color
mov esi,22*65536+196 ; print at x and y
call do_hex ; print color number
232,7 → 233,7
mov edx,esi ; copy color
mov esi,0xe1e1e1 ; use white
mov eax,47 ; print number function
int 0x40
mcall
 
ret
 
245,7 → 246,7
mov edx,[edi] ; color
mov ecx,esi ; recover y an depth
mov eax,13 ; draw bar function
int 0x40
mcall
 
ret
 
258,7 → 259,7
mov ecx,0xe1e1e1 ; color
mov esi,15
mov eax,4 ; print text function
int 0x40
mcall
 
ret
 
267,12 → 268,12
mov ecx,196*65536+26 ; y and depth
mov edx,0x000000 ; color
mov eax,13 ; draw bar funx
int 0x40
mcall
mov ebx,96*65536+90 ; x and width
mov ecx,196*65536+26 ; y and depth
mov edx,0x000000 ; color
mov eax,13 ; draw bar funx
int 0x40
mcall
 
ret
 
281,7 → 282,7
mov ecx,20*65536+216 ; y and depth
mov edx,0x465e8f ; dark denim color
mov eax,13 ; write text funx
int 0x40
mcall
mov ebx,20*65536+40 ; starting x and y
mov edx,text ; start of text
mov esi,27 ; width of text
290,25 → 291,25
h1: push ecx
sub ebx,65537 ; drop shadow x and y
mov ecx,0x000000 ; black shadow
int 0x40
mcall
add ebx,65537 ; original x and y
mov ecx,0xefefef ; white text
int 0x40
mcall
add edx,27 ; next line of text
add bx,12 ; next row
pop ecx
loop h1
mov eax,10 ; wait on event
int 0x40
mcall
cmp eax,2 ; got a key?
jne h2 ; nope
mov eax,2 ; yep, burn it
int 0x40
mcall
h2: mov ebx,4*65536+192 ; y and width
mov ecx,20*65536+216 ; x and depth
mov edx,0x00000 ; restore black bkg
mov eax,13 ; draw bar funx
int 0x40
mcall
call palette ; redraw color palette
 
ret
318,7 → 319,7
; ********** DATA DEFINITIONS AREA ***********
; *********************************************
 
header db 'COLOR REFERENCE H>HELP',0
title db 'COLOR REFERENCE H>HELP',0
 
picks:
dd 31,2 ; selected top/bot colors
/programs/demos/crownscr/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/crownscr/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm crownscr.asm crownscr
@erase lang.inc
@pause
/programs/demos/crownscr/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm crownscr.asm crownscr
@erase lang.inc
@pause
/programs/demos/crownscr/trunk/crownscr.asm
33,7 → 33,7
 
include "lang.inc"
include "figuresi.inc"
include "macros.inc"
include "..\..\..\macros.inc"
start:
cld
finit
46,7 → 46,7
cmp [flscr],0
jz nofullscreen
mov eax,14
int 0x40
mcall
 
mov [maxy],ax
sub ax,480
80,7 → 80,7
still:
mov eax,23
mov ebx,delay
int 0x40 ; wait here for event
mcall ; wait here for event
 
cmp eax,1 ; redraw request ?
je red
95,12 → 95,12
mov ecx,[outsize] ; ecx=image position in window [x]*65536+[y]
mov ebx,scr ; ebx pointer to image in memory
mov eax,07 ; putimage
int 0x40
mcall
jmp still
 
key:
mov eax,2
int 0x40
mcall
 
cmp al,1 ; is key in buffer ?
jz still
110,7 → 110,7
 
button: ; button
mov eax,17 ; get id
int 0x40
mcall
 
; cmp ah,1 ; button id=1 ?
; jne still
117,7 → 117,7
 
close:
mov eax,-1 ; close this program
int 0x40
mcall
 
 
; *********************************************
128,7 → 128,7
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
 
cmp [flscr],0
jnz m2
138,7 → 138,7
mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl
mov edi,0x005080d0 ; color of frames RRGGBB
xor eax,eax ; function 0 : define and draw window
int 0x40
mcall
 
; WINDOW LABEL
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
146,7 → 146,7
mov edx,copyright ; pointer to text beginning
mov esi,copyrightlen-copyright; text length
mov eax,4 ; function 4 : write text to window
int 0x40
mcall
 
; CLOSE BUTTON
mov ebx,(640-19)*65536+12 ; [x start] *65536 + [x size]
154,7 → 154,7
mov edx,1 ; button id
mov esi,0x6688dd ; button color RRGGBB
mov eax,8 ; function 8 : define and draw button
int 0x40
mcall
jmp m3
m2:
movzx ebx,[maxx] ; [x start] *65536 + [x size]
164,17 → 164,17
mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl
mov edi,0x005080d0 ; color of frames RRGGBB
xor eax,eax ; function 0 : define and draw window
int 0x40
mcall
 
inc bx
inc cx
mov eax,13 ; functiom 13 : draw bar
int 0x40
mcall
m3:
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
ret
 
 
332,7 → 332,7
filling_alfbet:
; Initialize RND
mov eax,3
int 40h
mcall
; eax - fist random number
 
mov ecx,n_points
/programs/demos/cslide/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm cslide.asm cslide
@erase lang.inc
@pause
/programs/demos/cslide/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm cslide.asm cslide
@erase lang.inc
@pause
/programs/demos/cslide/trunk/cslide.asm
20,6 → 20,7
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
29,7 → 30,7
 
mov eax,23
mov ebx,2
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
je red
46,12 → 47,12
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
mcall
jmp still
 
button: ; button
mov eax,17 ; get id
int 0x40
mcall
 
shr eax,8
 
58,7 → 59,7
cmp eax,1 ; button id=1 ?
jne noclose
mov eax,-1 ; close this program
int 0x40
mcall
noclose:
 
 
74,14 → 75,14
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
; 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+200 ; [y start] *65536 + [y size]
mov edx,0x13ffffff ; color of work area RRGGBB,8->color gl
mov edi,header ; WINDOW LABEL
int 0x40
mov edi,title ; WINDOW LABEL
mcall
 
call draw_slider_info
 
98,7 → 99,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
 
ret
 
113,12 → 114,12
mouse_info:
mov eax, 37 ;get mouse cordinates
mov ebx, 1 ;
int 0x40 ;
mcall ;
mov ecx, eax ;
push ecx ;
mov eax, 37 ;get mouse buttons
mov ebx, 2 ;
int 0x40 ;
mcall ;
cmp [mouseb], eax ;compare old mouse states to new states
jne redraw_mouse_info ;
cmp [mousey], cx ;
174,7 → 175,7
mov ebx, 0x00960028
mov ecx, 0x00240010
mov edx, 0x00ffffff
int 0x40
mcall
;Draw Color Box
xor edx, edx
movzx ecx,word [slider_1+12]
187,7 → 188,7
mov ebx, 0x00860035
mov ecx, 0x00590040
mov eax, 13
int 0x40
mcall
;draw current value of slider
mov ecx, edx
mov eax, 47
194,7 → 195,7
mov ebx, 0x00060100
mov esi, 0
mov edx, 0x009A0029
int 0x40
mcall
ret
 
 
267,7 → 268,7
mov ebx, [ebp] ;x start/width
mov ecx, [ebp+4] ;y start/height
mov edx, 0x002288DD ;color
int 0x40 ;draw bar
mcall ;draw bar
;Draw line for slide rail
mov eax, 38 ;draw vertical slide line
movzx ebx,word [ebp] ;x
281,7 → 282,7
add ecx, [ebp+6] ;y start
sub ecx, 10 ;
mov edx, 0x00 ;color
int 0x40 ;
mcall ;
;Draw slider box
movzx eax,word [ebp+4] ;height
sub eax, 20 ;
301,7 → 302,7
mov cx, [box_h] ;height
mov eax, 13 ;draw bar sys function
mov edx, 0x00 ;color
int 0x40 ;draw slider box
mcall ;draw slider box
pop edx
pop ecx
pop ebx
374,5 → 375,5
;**************************************************
 
; DATA AREA
header db 'Color Slider',0
title db 'Color Slider',0
I_END:
/programs/demos/eyes/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/eyes/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm eyes.asm eyes
@erase lang.inc
@pause
/programs/demos/eyes/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm eyes.asm eyes
@erase lang.inc
@pause
/programs/demos/eyes/trunk/eyes.asm
26,7 → 26,7
dd 0x0
dd 0x0
 
include 'macros.inc'
include '..\..\..\macros.inc'
ENTRANCE: ; start of code
 
; ==== main ====
41,7 → 41,7
 
mov eax,23 ; wait for event with timeout
mov ebx,TIMEOUT
int 0x40
mcall
 
cmp eax,1 ; redraw ?
jnz no_draw
60,12 → 60,12
 
key:
mov eax,2 ; just read and ignore
int 0x40
mcall
jmp still
 
button: ; analyze button
mov eax,-1 ; this is button 1 - we have only one button :-)
int 0x40
mcall
jmp still
 
; -====- declarations -====-
81,7 → 81,7
mov eax,50 ; set up shape reference area
mov ebx,0
mov ecx,winref
int 0x40
mcall
 
ret
 
91,7 → 91,7
 
mov eax,37
xor ebx,ebx
int 0x40
mcall
cmp dword [mouse],eax
jne redraw_ok
ret
102,7 → 102,7
 
mov eax,12
mov ebx,1
int 0x40
mcall
 
xor eax,eax ; define window
mov ebx,[win_ebx]
110,19 → 110,19
xor edx,edx
xor esi,esi
xor edi,edi
int 0x40
mcall
 
mov eax,8 ; define closebutton
mov ebx,60
mov ecx,45
mov edx,1
int 0x40
mcall
 
mov eax,7
mov ebx,skindata
mov ecx,60*65536+30
mov edx,15
int 0x40
mcall
 
mov eax,15
mov ebx,30
132,7 → 132,7
 
mov eax,12
mov ebx,2
int 0x40
mcall
 
ret
 
281,7 → 281,7
add ebx,4
mov eax,13
xor edx,edx
int 0x40
mcall
 
popa
ret
295,12 → 295,12
;mov ecx,0x00000000
;mov edx,0xFFFFFFFF
;mov esi,imagedata
;int 0x40
;mcall
;cmp eax,0xFFFFFFFF
;jnz filefound
 
;mov eax,-1 ; file not exists...
;int 0x40
;mcall
 
;filefound:
mov esi,imagedata+25 ; transform grayscale to putimage format
327,7 → 327,7
loop transform_loop
 
mov eax,14 ; calculating screen position
int 0x40
mcall
shr eax,1
mov ax,59
sub eax,30*65536
/programs/demos/fire/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/fire/trunk/fire.asm
13,7 → 13,7
dd mem_end
dd 0,0 ; no parameters, no path
 
include 'macros.inc'
include '..\..\..\macros.inc'
 
START:
 
27,7 → 27,7
 
mov eax,12 ; tell os about redraw
mov ebx,1
int 0x40
mcall
 
xor eax,eax ; define and draw window
mov ebx,100*65536+321
35,7 → 35,7
mov edx,0x00000000
mov esi,0x00000000
mov edi,0x00000000
int 0x40
mcall
 
mov al,4 ; 'FIRE FOR MENUET'
mov ebx,110*65536+8
42,7 → 42,7
mov ecx,dword 0x00FFFFFF
mov edx,text
mov esi,textlen-text
int 0x40
mcall
 
mov al,8
mov ebx,(321-19)*65536+12 ; button start x & size
49,23 → 49,23
mov ecx,5*65536+12 ; button start y & size
mov edx,1 ; button number
mov esi,0x009a0000
int 0x40
mcall
 
mov ebx,ecx ;5*65536+12
inc edx
int 0x40
mcall
 
mov ebx,18*65536+12
inc edx
int 0x40
mcall
 
mov ebx,31*65536+12
inc edx
int 0x40
mcall
 
mov al,12 ; tell os about redraw end
mov ebx,2
int 0x40
mcall
 
sta: ; calculate fire image
 
134,7 → 134,7
 
mov al, 5 ; in this moment always high 24 bits of eax are zero!
mov ebx,[delay]
int 0x40
mcall
 
inc [calc]
cmp [calc], byte 2
184,12 → 184,12
pop ebx
mov ecx,4*80*65536+200
mov edx,1*65536+22
int 0x40
mcall
 
nodrw:
 
mov eax,11 ; check if os wants to talk to us
int 0x40
mcall
dec eax
jz red
cmp al, 3-1
197,13 → 197,13
 
button: ; get button id
mov al,17
int 0x40
mcall
shr eax, 8
 
dec eax
jnz noclose
or eax,-1 ; close this program
int 0x40
mcall
noclose:
 
dec eax ; change fire type
/programs/demos/fire2/trunk/fire2.asm
1,3 → 1,4
include '..\..\..\macros.inc'
use32
org 0x0
 
17,7 → 18,7
rep stosd
 
mov al, 3
int 0x40
mcall
mov [curtime], eax
 
red:
25,7 → 26,7
pop eax
push 1
pop ebx
int 0x40
mcall
 
xor eax, eax
mov ebx, 200*65536+325
33,7 → 34,7
xor edx, edx
xor esi, esi
mov edi, 0x00100000
int 0x40
mcall
 
mov al, 8
mov ebx, (325-19)*65536+12
40,7 → 41,7
mov ecx, 5*65536+12
inc edx
mov esi, 0x00400000
int 0x40
mcall
 
mov al, 4
mov ebx, 8*65536+8
48,18 → 49,18
mov edx, fire_label
push len00
pop esi
int 0x40
mcall
 
mov al, 12
push 2
pop ebx
int 0x40
mcall
 
still:
 
push 11
pop eax
int 0x40
mcall
 
dec eax
jz red
71,7 → 72,7
call image
push 3
pop eax
int 0x40
mcall
cmp eax, [curtime]
jz still
mov [curtime], eax
81,7 → 82,7
mov ebx, (8+27*6)*65536+18
mov ecx, 8*65536+8
xor edx, edx
int 0x40
mcall
lea edx, [ebx-10]
mov al, 47
mov ebx, 30000h
88,18 → 89,18
xor ecx, ecx
xchg ecx, [fps]
mov esi, 0x00FFFFFF ;0x00400000
int 0x40
mcall
jmp still
 
key:
mov al, 2
int 0x40
mcall
cmp ah, 1Bh ;<Esc>
jne still
button:
; we have only one button, close
or eax, -1
int 0x40
mcall
 
image:
 
/programs/demos/free3d04/trunk/macros.inc
File deleted
\ No newline at end of file
/programs/demos/free3d04/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm free3d04.asm free3d04
@erase lang.inc
@pause
/programs/demos/free3d04/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm free3d04.asm free3d04
@erase lang.inc
@pause
/programs/demos/free3d04/trunk/free3d04.asm
35,7 → 35,7
dd APP_MEM;0x100000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc'
include 'macros.inc'
include '..\..\..\macros.inc'
COLOR_ORDER equ OTHER
include 'gif.inc'
 
63,12 → 63,12
; ******* MOUSE CHECK *******
; mov eax,37 ; check mouse (use mouse over window to navigate)
; mov ebx,2 ; check mousebuttons
; int 0x40
; mcall
; cmp eax,0 ; only use mouse when button down
; je noneed ; deactivated cause of disappear-bug etc.
mov eax,37
mov ebx,1 ; check mouseposition
int 0x40
mcall
 
mov ebx,eax
shr eax,16
99,7 → 99,7
; mov eax,23 ; wait for system event with 10 ms timeout
; mov ebx,1 ; thats max 100 FPS
mov eax,11 ; ask no wait for full speed
int 0x40
mcall
 
cmp eax,1 ; window redraw request ?
je red2
126,7 → 126,7
 
key2: ; key
mov eax,2
int 0x40
mcall
cmp al,1
je gamestart ; keybuffer empty
 
284,7 → 284,7
 
button2: ; button
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne gamestart
 
291,7 → 291,7
; eo GAME mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
finish:
mov eax,-1 ; close this program
int 0x40
mcall
 
 
; *********************************************
303,7 → 303,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
 
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
310,12 → 310,12
mov ebx,50*65536+649 ; [x start] *65536 + [x size]
mov ecx,50*65536+504 ; [y start] *65536 + [y size]
mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl
mov edi,header
int 0x40
mov edi,title
mcall
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
 
ret
 
811,7 → 811,7
mov ebx,0x80000
mov ecx,640*65536+480
xor edx,edx
int 0x40
mcall
 
ret
 
991,7 → 991,7
vpy:
dd 0x0001FFFF
 
header db 'FISHEYE RAYCASTING ENGINE ETC. FREE3D',0
title db 'FISHEYE RAYCASTING ENGINE ETC. FREE3D',0
 
sindegree dd 0.0
sininc dd 0.0017453292519943295769236907684886
/programs/demos/magnify/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/magnify/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm magnify.asm magnify
@erase lang.inc
@pause
/programs/demos/magnify/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm magnify.asm magnify
@erase lang.inc
@pause
/programs/demos/magnify/trunk/magnify.asm
16,7 → 16,7
dd 0x1000 ; esp
dd 0, 0 ; no parameters, no path
 
include 'macros.inc'
include '..\..\..\macros.inc'
delay equ 20
 
magnify_width = 40
30,7 → 30,7
wtevent:
mov eax, 23 ; wait here for event with timeout
mov ebx, delay
int 0x40
mcall
dec eax
js still
jz redraw
38,12 → 38,12
jnz button
; key in buffer
mov al, 2
int 0x40
mcall
jmp wtevent
button:
; we have only one button, close
or eax, -1
int 0x40
mcall
 
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
52,11 → 52,11
draw_window:
mov eax, 12 ; function 12:tell os about windowdraw
mov ebx, 1 ; 1, start of draw
int 0x40
mcall
 
mov al, 48 ; function 48 : graphics parameters
mov bl, 4 ; subfunction 4 : get skin height
int 0x40
mcall
 
; DRAW WINDOW
mov ebx, 100*65536 + 8*magnify_width + 8
64,12 → 64,12
mov edx, 0x33000000 ; color of work area RRGGBB
mov edi, labelt ; header
xor eax, eax ; function 0 : define and draw window
int 0x40
mcall
 
 
mov al, 12 ; function 12:tell os about windowdraw
mov ebx, 2 ; 2, end of draw
int 0x40
mcall
 
ret
 
76,7 → 76,7
draw_screen:
draw_magnify:
mov eax, 14
int 0x40 ; get screen size
mcall ; get screen size
movzx ecx, ax
inc ecx
mov [size_y], ecx
86,7 → 86,7
 
mov eax, 37
xor ebx, ebx
int 0x40 ; get mouse coordinates
mcall ; get mouse coordinates
mov ecx, eax
shr ecx, 16 ; ecx = x
movzx edx, ax ; edx = y
113,7 → 113,7
imul ebx, [size_x]
add ebx, ecx
mov eax, 35
int 0x40 ; read pixel
mcall ; read pixel
.nopix:
push ecx edx
sub ecx, [m_x]
126,7 → 126,7
mov cl, 7
mov edx, eax
mov eax, 13
int 0x40
mcall
pop edx ecx
inc ecx
cmp ecx, [m_xe]
/programs/demos/movback/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/movback/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm movback.asm movback
@erase lang.inc
@pause
/programs/demos/movback/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm movback.asm movback
@erase lang.inc
@pause
/programs/demos/movback/trunk/movback.asm
1,5 → 1,5
include "lang.inc"
include "macros.inc"
include "..\..\..\macros.inc"
 
WND_SIZE_X = 320
WND_SIZE_Y = 200
15,13 → 15,13
call init_palette
mov eax,40
mov ebx,101b
int 0x40
mcall
jmp .paint_window
 
.event_loop:
mov eax,23
mov ebx,1
int 0x40
mcall
 
test eax,eax
je .draw_screen
29,7 → 29,7
je .paint_window
 
or eax,-1
int 0x40
mcall
 
.draw_screen:
add word [ver_counter],VC_DELTA
39,30 → 39,30
mov ebx,virtual_screen_32
mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
xor edx,edx
int 0x40
mcall
jmp .event_loop
 
.paint_window:
mov eax,12
mov ebx,1
int 0x40
mcall
 
xor eax,eax
mov ebx,(100 shl 16)+(WND_SIZE_X+9)
mov ecx,(100 shl 16)+(WND_SIZE_Y+28)
mov edx,0x33000000
mov edi,header
int 0x40
mov edi,title
mcall
 
mov eax,7
mov ebx,virtual_screen_32
mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
xor edx,edx
int 0x40
mcall
 
mov eax,12
mov ebx,2
int 0x40
mcall
 
jmp .event_loop
 
160,7 → 160,7
delta_angle dd 0.0245436926066 ; pi/128
scale_sin dd 128.0
 
header db 'MoveBack',0
title db 'MoveBack',0
 
UDATA
ver_counter dd ?
/programs/demos/plasma/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/plasma/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm plasma.asm plasma
@erase lang.inc
@pause
/programs/demos/plasma/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm plasma.asm plasma
@erase lang.inc
@pause
/programs/demos/plasma/trunk/plasma.asm
1,6 → 1,6
; Originally written by Jarek Pelczar
include "lang.inc"
include "macros.inc"
include "..\..\..\macros.inc"
 
WND_SIZE_X = 320
WND_SIZE_Y = 200
10,7 → 10,7
fninit
mov al,40
mov bl,101b
int 0x40
mcall
call init_palette
call init_texture
jmp .paint_window
17,7 → 17,7
.event_loop:
mov al,23
mov ebx,1
int 0x40
mcall
test eax,eax
je .draw_screen
dec eax
24,7 → 24,7
je .paint_window
 
or eax,-1
int 0x40
mcall
 
.draw_screen:
call blit_8_to_32
32,7 → 32,7
mov ebx,virtual_screen_32
mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
xor edx,edx
int 0x40
mcall
call rotate_pal
jmp .event_loop
 
41,24 → 41,24
push eax
xor ebx,ebx
inc ebx
int 0x40
mcall
 
xor eax,eax
mov ebx,(100 shl 16)+(WND_SIZE_X+8)
mov ecx,(100 shl 16)+(WND_SIZE_Y+25)
mov edx,0x33000000
mov edi,header
int 0x40
mov edi,title
mcall
 
mov al,7
mov ebx,virtual_screen_32
mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
xor edx,edx
int 0x40
mcall
 
pop eax
and ebx,2 ; bit 1 is set
int 0x40
mcall
 
jmp .event_loop
 
161,7 → 161,7
DATA
_multiplier dd 63.5
 
header db 'Plasma',0
title db 'Plasma',0
 
UDATA
_fpom32 rd 1
/programs/demos/ss/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/ss/trunk/@SS.ASM
14,22 → 14,22
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include 'macros.inc'
include '..\..\..\macros.inc'
 
;include 'debug.inc'
 
START:
mov eax,14
int 0x40
mcall
and eax,0xFFFF0000
mov [top_right_corner],eax
 
mov eax,40 ; ãáâ ­®¢¨âì ¬ áªã ᮡë⨩
mov ebx,110010b ; ॠ£¨à㥬 ­  ª« ¢¨ âãàã, ¬ëèì, ®âà¨á®¢ªã ä®­ 
int 0x40
mcall
 
mov eax,14 ; ¯®«ã稬 à §¬¥àë íªà ­ 
int 0x40
mcall
mov [y_max],ax
shr eax,16
mov [x_max],ax
37,18 → 37,18
event: ; ®¡à ¡®â稪 ᮡë⨩ (¢á¥å)
mov eax,26
mov ebx,9
int 0x40 ; ¯®«ãç¨âì ¢à¥¬ï á¨á⥬ë
mcall ; ¯®«ãç¨âì ¢à¥¬ï á¨á⥬ë
; mov eax,3
; int 0x40
; mcall
mov [evtime],eax ; § ¯®¬­¨âì ¥£®
mov eax,37
mov ebx,2
int 0x40
mcall
cmp eax,3 ; ¯à®¤®«¦¨¬, ¥á«¨ ­ ¦ â  á।­ïï ª­®¯ª  ¬ëè¨
jne still
mov eax,37 ; ¯à®¢¥à¨¬ ª®®à¤¨­ âë
mov ebx,0
int 0x40
mcall
cmp [top_right_corner],eax
je create_setup ; ᮧ¤ ñ¬ ®ª­® ­ áâனª¨, ¥á«¨ ¬ëèì ¢ ¢¥àå­¥¬ ¯à ¢®¬
; 㣫ã íªà ­ 
59,7 → 59,7
 
mov eax,23 ; ¦¤ñ¬ ᮡëâ¨ï ¢ â¥ç¥­¨¥ 1 ᥪ㭤ë
mov ebx,100
int 0x40
mcall
 
bt dword [params],0 ; ssaver works?
jc event
75,7 → 75,7
 
mov eax,26
mov ebx,9
int 0x40
mcall
sub eax,[evtime]
xor edx,edx
mov ebx,60*100 ; ¯®¤¥«¨¬ ­  60*100, ¯®«ã稬 ¢à¥¬ï ¢ ¬¨­ãâ å
97,7 → 97,7
mov ebx,1
mov ecx,sthread
mov edx,0x3F000
int 0x40
mcall
bts dword [params],1
jmp still
 
106,7 → 106,7
mov ebx,1
mov ecx,thread
mov edx,0x3E000
int 0x40
mcall
bts dword [params],0
ret
 
113,10 → 113,10
thread:
mov eax,5
mov ebx,eax
int 0x40
mcall
mov eax,40
mov ebx,100010b
int 0x40
mcall
cmp dword [type],0
je drawsswin
cmp dword [type],24
135,7 → 135,7
mov dword [delay],25
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
asminit1:
mov eax,data_from_file
mov [stringstart],eax
152,14 → 152,14
inc ebx
inc ecx
mov edx,0x01000000
int 0x40
mcall
mov eax,13
xor edx,edx
int 0x40
mcall
tstill:
mov eax,23
mov ebx,[delay]
int 0x40
mcall
cmp eax,2
je thr_end
cmp eax,6
174,10 → 174,10
btr dword [params],0
mov eax,26
mov ebx,9
int 0x40
mcall
mov [evtime],eax
or eax,-1
int 0x40
mcall
 
drawssasm:
mov edi,[stringstart]
204,7 → 204,7
mov ecx,0x104ba010
mov edx,[stringstart]
mov esi,[stringlen]
int 0x40
mcall
inc dword [stringlen]
cmp byte [edi],byte ' '
je drawssasm
276,7 → 276,7
mov eax,38
mov edx,[lcolor]
and edx,0xffffff
int 0x40
mcall
 
dnol:
 
292,7 → 292,7
sstill:
 
mov eax,10 ; wait here for event
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
je sthread
305,7 → 305,7
 
sbutton: ; button
mov eax,17 ; get id
int 0x40
mcall
 
cmp ah,1 ; button id=1 ?
jne snoclose
312,7 → 312,7
 
btr dword [params],1
mov eax,-1 ; close this program
int 0x40
mcall
snoclose:
cmp ah,7
jne nosetfl
362,7 → 362,7
jne noshow
mov eax,5
mov ebx,150
int 0x40
mcall
call create_ss
jmp sstill
noshow:
387,7 → 387,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
 
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
394,7 → 394,8
mov ebx,100*65536+215 ; [x start] *65536 + [x size]
mov ecx,100*65536+70 ; [y start] *65536 + [y size]
mov edx,0x03400088 ; color of work area RRGGBB,8->color gl
int 0x40
mov edi,title
mcall
 
mov eax,8
mov ebx,47*65536+10
401,43 → 402,38
mov ecx,31*65536+10
mov edx,2
mov esi,0x702050
int 0x40
mcall
push ebx
add ebx,13*65536
mov edi,ebx
inc edx
int 0x40
mcall
pop ebx
add ecx,15*65536
inc edx
int 0x40
mcall
mov ebx,edi
inc edx
int 0x40
mcall
mov ebx,160*65536+40
mov ecx,28*65536+14
inc edx
int 0x40
; WINDOW LABEL
mcall
 
mov eax,4 ; function 4 : write text to window
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
mov ecx,0x10ddeeff ; font 1 & color ( 0xF0RRGGBB )
mov edx,labelt ; pointer to text beginning
mov esi,17 ; text length
int 0x40
add ebx,7*65536+25
mov ebx,15*65536+33 ; [x start] *65536 + [y start]
mov ecx,0xffffff
mov edx,setuptext
mov esi,9
int 0x40
mcall
add ebx,15
add edx,esi
mov esi,30
int 0x40
mcall
mov ebx,169*65536+32
mov edx,buttext
mov esi,4
int 0x40
mcall
 
call drawtype
call drawtime
445,7 → 441,7
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
 
ret
 
458,7 → 454,7
jnc noblue
mov edx,0x4e00e7
noblue:
int 0x40
mcall
mov eax,4
mov ebx,82*65536+32
xor ecx,ecx
465,7 → 461,7
mov edx,typetext
add edx,[type]
mov esi,12
int 0x40
mcall
ret
 
drawtime:
477,13 → 473,13
jnc noblue1
mov edx,0x4e00e7
noblue1:
int 0x40
mcall
mov eax,47
mov edx,82*65536+47
xor esi,esi
movzx ecx,byte [time]
mov ebx,0x00020000
int 0x40
mcall
ret
 
drawflag:
492,7 → 488,7
mov ecx,45*65536+10
mov edx,7
mov esi,0xe0e0e0
int 0x40
mcall
mov eax,4
mov ebx,153*65536+47
xor ecx,ecx
502,13 → 498,13
jc setf
inc edx
setf:
int 0x40
mcall
ret
 
; DATA AREA
buttext db 'SHOW'
flag db 'V '
labelt db 'SCREENSAVER SETUP'
title db 'SCREENSAVER SETUP',0
setuptext db 'TYPE: < >TIME: < > MINUTES NEVER'
typetext db 'BLACK SCREENCOLOR LINES ASSEMBLER '
type dd 12
/programs/demos/ss/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm @ss.asm @ss
@erase lang.inc
@pause
/programs/demos/ss/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm @ss.asm @ss
@erase lang.inc
@pause
/programs/demos/timer/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/timer/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm timer.asm timer
@erase lang.inc
@pause
/programs/demos/timer/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm timer.asm timer
@erase lang.inc
@pause
/programs/demos/timer/trunk/timer.asm
17,12 → 17,12
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include 'macros.inc'
include '..\..\..\macros.inc'
 
START: ; start of execution
mov eax, 40
mov ebx, 101b
int 0x40
mcall
 
red:
call draw_window
31,7 → 31,7
 
mov eax,23 ; wait here for event
mov ebx,50
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
je red
45,7 → 45,7
 
button: ; button
or eax,-1 ; close this program
int 0x40
mcall
 
 
; *********************************************
56,7 → 56,7
 
mov eax, 26 ; get system counter
mov ebx, 9
int 0x40
mcall
 
cdq ;xor edx,edx
mov ebx,100
83,7 → 83,7
mov edi,[sc.work]
mov ebx,0x00020000
mov edx,15*65536+5
int 0x40
mcall
 
pop eax ; MM
imul ecx,ecx,60
91,7 → 91,7
mov ecx,eax
mov eax,47
add edx,20*65536
int 0x40
mcall
 
pop ecx
pop eax
102,7 → 102,7
mov ecx,eax ; SS
mov eax,47
add edx,20*65536
int 0x40
mcall
 
ret
 
111,11 → 111,11
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
int 0x40
mcall
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
 
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
123,14 → 123,14
mov ecx,100*65536+40 ; [y start] *65536 + [y size]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0x33000000
mov edi,header
int 0x40
mov edi,title
mcall
 
call draw_clock
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
 
ret
 
138,9 → 138,9
; DATA AREA
 
if lang eq ru
header db '’€‰Œ…',0
title db '’€‰Œ…',0
else
header db 'TIMER',0
title db 'TIMER',0
end if
 
 
/programs/demos/tinyfrac/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/tinyfrac/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm tinyfrac.asm tinyfrac
@erase lang.inc
@pause
/programs/demos/tinyfrac/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm tinyfrac.asm tinyfrac
@erase lang.inc
@pause
/programs/demos/tinyfrac/trunk/tinyfrac.asm
83,7 → 83,7
dd 0,0
 
include 'lang.inc'
include 'macros.inc'
include '..\..\..\macros.inc'
 
STARTX dd 200
STARTY dd 120
93,32 → 93,77
 
START:
 
red:
call draw_window
 
call draw_fractal
 
still:
 
mov eax,10
int 0x40
mcall
 
cmp eax,1
je red
cmp eax,2
je key
cmp eax,3
je button
dec eax
jz red
dec eax
jz key
 
button:
mov al,17
mcall
 
cmp ah,1
jne no_close
or eax,-1
mcall
no_close:
 
cmp ah,2
jne no_bgr
 
 
mov eax,15 ; bgr 512 x 256
mov ebx,1
mov ecx,512
mov edx,256
mcall
 
mov eax,15
mov ebx,5
mov ecx,0x1000
mov edx,0
mov esi,512*3*256
mcall
 
mov eax,15
mov ebx,3
mcall
 
jmp still
 
red:
call draw_window
call put_image
no_bgr:
 
cmp ah,3
jb no_color
cmp ah,5
jg no_color
shr eax,8
sub eax,3
imul eax,8
add eax,8
not eax
and eax,11000b
mov [shlc],al
call draw_fractal
jmp still
 
no_color:
 
jmp still
 
 
key:
mov eax,2
int 0x40
mov al,2
mcall
 
cmp ah,'e'
je cycle
179,61 → 224,6
call draw_fractal
jmp still
 
button:
mov eax,17
int 0x40
 
cmp ah,1
jne no_close
mov eax,-1
int 0x40
no_close:
 
cmp ah,2
jne no_bgr
 
mov eax,15 ; bgr 512 x 256
mov ebx,1
mov ecx,512
mov edx,256
int 0x40
 
mov eax,15
mov ebx,5
mov ecx,0x1000
mov edx,0
mov esi,512*3*256
int 0x40
 
mov eax,15
mov ebx,3
int 0x40
 
jmp still
 
no_bgr:
 
cmp ah,3
jb no_color
cmp ah,5
jg no_color
shr eax,8
sub eax,3
imul eax,8
add eax,8
not eax
and eax,11000b
; sub eax,8
mov [shlc],al
call draw_fractal
jmp still
 
no_color:
 
 
jmp still
 
 
color_cycle:
 
pusha
257,7 → 247,7
call put_image
mov eax,5
mov ebx,1
int 0x40
mcall
dec esi
jnz newcycle
 
287,11 → 277,10
 
pusha
mov eax,4
mov ebx,15*65536+35
mov ecx,0xffffff
mov ebx,10*65536+30
mov ecx,0x80ffffff
mov edx,calc
mov esi,calcl-calc
int 0x40
mcall
popa
pusha
 
309,12 → 298,6
 
push cx
 
; and cl,0x7
; cmp cl,0
; jne noim
; call put_image
; noim:
 
mov cx, PIXWIDTH -1 ; width of screen in pixels
 
sub bp,cx ;
369,9 → 352,9
 
mov eax,7
mov ebx,0x1000
mov ecx,512*65536+255
mov edx,10*65536+30
int 0x40
mov ecx,512*65536+256
mov edx,4*65536+21
mcall
 
popa
 
446,38 → 429,30
 
mov eax,12
mov ebx,1
int 0x40
mcall
 
mov eax,0
mov ebx,50*65536+531
mov ecx,100*65536+256+48
mov edx,0x02334455
mov esi,0x80778899
mov edi,0x00778899
int 0x40
xor eax,eax
mov ebx,50*65536+PIXWIDTH+8
mov ecx,100*65536+PIXHEIGHT+25
mov edx,0x13334455
mov edi,title
mcall
 
mov eax,8
mov ebx,(531-19)*65536+12
mov ebx,290*65536+112
mov ecx,5*65536+12
mov edx,1
mov esi,0x808080
int 0x40
 
mov eax,8
mov ebx,300*65536+112
mov ecx,5*65536+12
mov edx,2
mov esi,0x808080
int 0x40
mcall
 
mov ebx,430*65536+12
mov ebx,420*65536+12
mov ecx,5*65536+12
mov edx,3
mov esi,0xa00000
mov edi,3
;mov eax,8
newcolor:
mov eax,8
int 0x40
mcall
add ebx,13*65536
shr esi,8
inc edx
485,15 → 460,14
jnz newcolor
 
mov eax,4
mov ebx,8*65536+8
mov ecx,0xffffff
mov edx,l
mov esi,ll-l
int 0x40
mov ebx,300*65536+8
mov ecx,0x80ffffff
mov edx,button_txt
mcall
 
mov eax,12
mov ebx,2
int 0x40
mcall
 
popa
ret
505,15 → 479,9
;
 
 
l: db 'TINYFRAC - MOVE: ARROWS, ZOOM Q/W, CYCLE: E/R '
db 'SET AS WALLPAPER'
ll:
title db 'Tinyfrac - MOVE: ARROWS, ZOOM Q/W, CYCLE: E/R',0
button_txt db 'Set as wallpaper',0
 
calc db 'CALCULATING'
calcl:
calc db 'CALCULATING',0
 
I_END:
 
 
 
 
I_END:
/programs/demos/transp/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/transp/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm transp.asm transp
@erase lang.inc
@pause
/programs/demos/transp/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm transp.asm transp
@erase lang.inc
@pause
/programs/demos/transp/trunk/transp.asm
17,13 → 17,13
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include 'lang.inc'
include 'macros.inc'
include '..\..\..\macros.inc'
 
START: ; start of execution
mov [procinfo.x_start], 100
mov [procinfo.x_size], 200
mov [procinfo.y_start], 80
mov [procinfo.y_size], 300
mov [procinfo.box.left], 100
mov [procinfo.box.width], 200
mov [procinfo.box.top], 80
mov [procinfo.box.height], 300
call draw_window
red:
call get_transparent
32,7 → 32,7
still:
 
mov eax,10 ; wait here for event
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
je red
44,17 → 44,17
 
key: ; key
mov al,2 ; just read it and ignore
int 0x40
mcall
jmp still
 
button: ; button
mov al,17 ; get id
int 0x40
mcall
 
cmp ah,1 ; button id=1 ?
jne noclose
or eax,-1 ; close this program
int 0x40
mcall
noclose:
 
jmp still
69,24 → 69,24
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
int 0x40
mcall
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
mov ebx,[procinfo.x_start]
mov ebx,[procinfo.box.left]
shl ebx,16
add ebx,[procinfo.x_size]
mov ecx,[procinfo.y_start]
add ebx,[procinfo.box.width]
mov ecx,[procinfo.box.top]
shl ecx,16
add ecx,[procinfo.y_size]
add ecx,[procinfo.box.height]
mov edx,0x33000000 ; color of work area RRGGBB,8->color gl
mov edi,header ; WINDOW LABEL
int 0x40
mov edi,title ; WINDOW LABEL
mcall
 
call draw_transparent
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
int 0x40
mcall
 
ret
 
99,11 → 99,11
 
mov eax,7
mov ebx,0x1000
mov ecx,[procinfo.x_size]
mov ecx,[procinfo.box.width]
shl ecx,16
add ecx,[procinfo.y_size]
add ecx,[procinfo.box.height]
xor edx,edx
int 0x40
mcall
 
popa
ret
116,29 → 116,29
mov eax,9
mov ebx,I_END
mov ecx,-1
int 0x40
mcall
 
mov eax,14
int 0x40
mcall
 
shr eax,16
inc eax
mov [scx],eax
 
add [procinfo.x_start], 4
sub [procinfo.x_size], 4+4
add [procinfo.y_start], 22
sub [procinfo.y_size], 22+4
add [procinfo.box.left], 4
sub [procinfo.box.width], 4+4
add [procinfo.box.top], 22
sub [procinfo.box.height], 22+4
 
mov eax,[procinfo.x_start]
add eax,[procinfo.x_size]
mov eax,[procinfo.box.left]
add eax,[procinfo.box.width]
mov [x_end],eax
mov eax,[procinfo.y_start]
add eax,[procinfo.y_size]
mov eax,[procinfo.box.top]
add eax,[procinfo.box.height]
mov [y_end],eax
 
mov eax,[procinfo.x_start]
mov ebx,[procinfo.y_start]
mov eax,[procinfo.box.left]
mov ebx,[procinfo.box.top]
 
dtpl1:
 
148,15 → 148,15
imul ebx,[scx]
add ebx,eax
mov eax,35
int 0x40
mcall
 
or eax, 0x4e4e4e
 
mov ebx,[esp+4]
mov ecx,[esp]
sub ebx,[procinfo.x_start]
sub ecx,[procinfo.y_start]
imul ecx,[procinfo.x_size]
sub ebx,[procinfo.box.left]
sub ecx,[procinfo.box.top]
imul ecx,[procinfo.box.width]
imul ebx,3
imul ecx,3
add ebx,ecx
168,7 → 168,7
inc eax
cmp eax,[x_end]
jb dtpl1
mov eax,[procinfo.x_start]
mov eax,[procinfo.box.left]
inc ebx
cmp ebx,[y_end]
jb dtpl1
182,18 → 182,13
 
; DATA AREA
 
;x_start dd 100
;y_start dd 80
 
;x_size dd 160
;y_size dd 200
 
x_end dd 0
y_end dd 0
 
scx dd 640
 
header db 'Transparent',0
title db 'Transparent',0
 
I_END:
procinfo process_information
/programs/demos/trantest/trunk/ascgl.inc
373,7 → 373,7
wordstoreg ecx,y,ys ;y*65536+ys
mov edx,color
mov eax,13
int 0x40
mcall
}
 
; FPS - Set Frame Per Second Display
390,7 → 390,7
spdat:
get_time:
mov eax,3
int 0x40
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
409,7 → 409,7
mov ecx,y*65536+7
mov edx,delcolor
mov eax,13
int 0x40
mcall
end if
mov dword [ttt],fps_show_frequency
mov eax,47
418,7 → 418,7
mov edx,x*65536+y
mov esi,color
mov ecx,[fps]
int 0x40
mcall
no_out_fps:
}
 
496,7 → 496,7
add cx,[arg3+4]
; wordstoreg ecx,[arg3],[arg3+4]
wordstoreg edx, x , y ;arg1*65536+arg2
int 0x40
mcall
}
 
macro setframe x , y ,arg3
507,7 → 507,7
wordstoreg edx, x , y ;arg1*65536+arg2
add edx,dword [arg3]
mov ecx,dword [arg3+4]
int 0x40
mcall
}
 
 
/programs/demos/trantest/trunk/ascl.inc
48,7 → 48,7
mov dword [fileinfo+8],1 ; how many blocks to read (1)
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
mov eax,[file_load_area+2]
shr eax,9 ; ¯®¤¥«¨¬ ­  512 ¨ ¯à¨¡ ¢¨¬ 1 - ¯®«ã稬 ç¨á«® ¡«®ª®¢
inc eax
55,7 → 55,7
mov dword [fileinfo+8],eax
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
}
 
 
91,7 → 91,7
mov edx,id
mov esi,bcolor
mov eax,8
int 0x40
mcall
 
mov eax,asd-lab ;calc size
mov ebx,6
116,7 → 116,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
int 0x40
mcall
}
 
 
145,7 → 145,7
mov eax,9
mov ebx,procinfo
mov ecx,-1
int 0x40
mcall
 
; convert eax bin to param dec
mov eax,dword [procinfo+30] ;offset of myPID
179,12 → 179,12
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,150 ; size 150 bytes
int 0x40
mcall
 
; change wanted events list 7-bit IPC event
mov eax,40
mov ebx,01000111b
int 0x40
mcall
 
;
; STEP 3 run SYSTEM XTREE with parameters
192,7 → 192,7
 
mov eax,58
mov ebx,run_fileinfo
int 0x40
mcall
 
call redproc
 
200,7 → 200,7
getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
int 0x40
mcall
 
cmp eax,1
je mred
215,7 → 215,7
mov ebx,procinfo
mov ecx,-1
mov eax,9
int 0x40
mcall
mov ebp,eax
 
loox:
222,7 → 222,7
mov eax,9
mov ebx,procinfo
mov ecx,ebp
int 0x40
mcall
mov eax,[DLGPID]
cmp [procinfo+30],eax ;IF Dialog find
je dlg_is_work ;jmp to dlg_is_work
247,15 → 247,15
jmp getmesloop
mkey:
mov eax,2
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp getmesloop
mbutton:
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne getmesloop
mov eax,-1 ; close this program
int 0x40
mcall
mgetmes:
 
; If dlg_pid_get then second message get jmp to still
357,7 → 357,7
mov eax,9
mov ebx,procinfo
mov ecx,-1
int 0x40
mcall
 
; convert eax bin to param dec
mov eax,dword [procinfo+30] ;offset of myPID
391,12 → 391,12
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,120 ; size 150 bytes
int 0x40
mcall
 
; change wanted events list 7-bit IPC event
mov eax,40
mov ebx,01000111b
int 0x40
mcall
 
;
; STEP 3 run SYSTEM XTREE with parameters
404,7 → 404,7
 
mov eax,58
mov ebx,run_fileinfo
int 0x40
mcall
 
call redproc
 
412,7 → 412,7
getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
int 0x40
mcall
 
cmp eax,1
je mred
427,7 → 427,7
mov ebx,procinfo
mov ecx,-1
mov eax,9
int 0x40
mcall
mov ebp,eax
 
loox:
434,7 → 434,7
mov eax,9
mov ebx,procinfo
mov ecx,ebp
int 0x40
mcall
mov eax,[DLGPID]
cmp [procinfo+30],eax ;IF Dialog find
je dlg_is_work ;jmp to dlg_is_work
458,15 → 458,15
call redproc
jmp getmesloop
mkey:
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp getmesloop
mbutton:
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne getmesloop
mov eax,-1 ; close this program
int 0x40
mcall
mgetmes:
 
; If dlg_pid_get then second message get jmp to still
618,7 → 618,7
macro scank
{
mov eax,10
int 0x40
mcall
}
 
macro putpix x,y,color
627,7 → 627,7
mov ecx,y
mov edx,color
mov eax,1
int 0x40
mcall
}
 
macro puttxt x,y,offs,size,color
640,7 → 640,7
mov edx,offs
mov esi,size
mov eax,4
int 0x40
mcall
}
 
macro outcount data, x, y, color, numtype
652,7 → 652,7
wordstoreg edx,x,y
mov esi,color
mov eax,47
int 0x40
mcall
}
 
; SCEVENT - Scan event
660,7 → 660,7
macro scevent red,key,but
{
mov eax,11
int 0x40
mcall
dec eax
jz red
dec eax
674,7 → 674,7
macro wtevent red,key,but
{
mov eax,10
int 0x40
mcall
dec eax
jz red
dec eax
689,7 → 689,7
{
mov eax,23
mov ebx,xfps
int 0x40
mcall
cmp eax,0
je noevent
dec eax
706,7 → 706,7
macro close
{
mov eax,-1
int 0x40
mcall
}
 
; DELAY - Create delay 1/100 sec
717,7 → 717,7
{
mov eax,5
mov ebx,arg1
int 0x40
mcall
}
 
; WINDOW - Draw window
732,7 → 732,7
wordstoreg ecx,arg2,arg4
mov edx,arg5
mov eax,0
int 0x40
mcall
}
 
macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7
743,7 → 743,7
mov esi,arg6
mov edi,arg7
mov eax,0
int 0x40
mcall
}
 
 
753,7 → 753,7
{
mov eax,12
mov ebx,1
int 0x40
mcall
}
 
; ENDWD - End window draw
762,7 → 762,7
{
mov eax,12
mov ebx,2
int 0x40
mcall
}
 
; LABEL - Put text to frame
785,7 → 785,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
int 0x40
mcall
}
 
;Key's
/programs/demos/trantest/trunk/trantest.asm
19,6 → 19,7
SCREEN_X equ 320 ;800
SCREEN_Y equ 200 ;600
 
include '..\..\..\macros.inc'
include 'lang.inc'
include 'ascl.inc'
include 'ascgl.inc'
66,16 → 67,16
 
key:
mov eax,2
int 0x40
mcall
jmp still
button:
mov eax,17
int 0x40
mcall
cmp ah,1
jne still
exit:
mov eax,-1
int 0x40
mcall
 
;Draw window
draw_window:
82,21 → 83,21
mov eax,12 ;Start
mov ebx,1
int 0x40
mcall
 
xor eax,eax ;Draw window
mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size
mov ecx,100*65536+(SCREEN_Y+26) ;y start*65536+y size
mov edx,0x13000000 ;0x13 use skinned window
mov edi,header
int 0x40
mov edi,title
mcall
 
mov eax,12 ;End
mov ebx,2
int 0x40
mcall
ret
 
header db '3D TEST SAMPLE',0
title db '3D TEST SAMPLE',0
 
outscr:
 
105,7 → 106,7
mov ecx,SCREEN_X*65536+SCREEN_Y
mov edx,5*65536+22
mov ax,7
int 0x40
mcall
 
ret
 
/programs/demos/tube/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/demos/tube/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm tube.asm tube
@erase lang.inc
@pause
/programs/demos/tube/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm tube.asm tube
@erase lang.inc
@pause
/programs/demos/tube/trunk/tube.asm
18,7 → 18,7
dd 0x40000
dd 0,0
 
include 'macros.inc'
include '..\..\..\macros.inc'
 
START:
 
38,7 → 38,7
 
mov eax,23
mov ebx,1
int 0x40
mcall
 
cmp eax,1
jne no_red
50,9 → 50,8
je still
 
or eax,-1
int 0x40
mcall
 
 
SCREEN equ 160
PIXBUF equ 200h
EYE equ EYE_P-2
179,7 → 178,7
mov ecx,320*65536+160
xor edx,edx
mov ebx,0x10000
int 0x40
mcall
 
popa
ret
192,23 → 191,20
 
mov eax,12
mov ebx,1
int 0x40
 
mcall
xor eax,eax
mov ebx,100*65536+329
mov ecx,100*65536+186
mov edx,0x33000000
mov edi,header
int 0x40
 
mov edi,title
mcall
mov eax,12
mov ebx,2
int 0x40
 
mcall
popa
ret
 
header db appname,0
title db appname,0
 
db 41,0,0xC3,0x3C