Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 484 → Rev 485

/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