Subversion Repositories Kolibri OS

Rev

Rev 3032 | Rev 3942 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3032 Rev 3618
Line 290... Line 290...
290
 
290
 
291
include 'config.inc'
291
include 'config.inc'
292
;__CPU_type equ p5
292
;__CPU_type equ p5
Line 293... Line 293...
293
SYSENTER_VAR    equ 0
293
SYSENTER_VAR    equ 0
-
 
294
 
294
 
295
macro mcall a,b,c,d,e,f {   ; mike.dld, updated by Ghost for Fast System Calls
295
macro mcall a,b,c,d,e,f {   ; mike.dld
296
 local  ..ret_point
296
 __mov eax,a
297
 __mov eax,a
297
 __mov ebx,b
298
 __mov ebx,b
298
 __mov ecx,c
299
 __mov ecx,c
299
 __mov edx,d
300
 __mov edx,d
Line -... Line 301...
-
 
301
 __mov esi,e
-
 
302
 __mov edi,f
-
 
303
 
-
 
304
 if __CPU_type eq p5
-
 
305
        int     0x40
-
 
306
 else
-
 
307
  if __CPU_type eq p6
-
 
308
        push    ebp
-
 
309
        mov     ebp, esp
-
 
310
        push    ..ret_point     ; it may be 2 or 5 byte
-
 
311
        sysenter
-
 
312
 ..ret_point:
-
 
313
        pop     edx
-
 
314
        pop     ecx
-
 
315
 
-
 
316
  else
-
 
317
   if __CPU_type eq k6
-
 
318
        push    ecx
-
 
319
        syscall
-
 
320
        pop     ecx
-
 
321
   else
300
 __mov esi,e
322
        display 'ERROR : unknown CPU type (set to p5)', 10, 13
-
 
323
        __CPU_type equ p5
-
 
324
        int     0x40
301
 __mov edi,f
325
   end if
Line 302... Line 326...
302
 
326
  end if
303
   int 0x40
327
 end if
Line 501... Line 525...
501
  DateAccess FILEDATE
525
  DateAccess FILEDATE
502
  DateModify FILEDATE
526
  DateModify FILEDATE
503
  Size       dq ?
527
  Size       dq ?
504
ends
528
ends
Line -... Line 529...
-
 
529
 
-
 
530
 
-
 
531
if __CPU_type eq p5             ; CMOVcc isnt supported on the P5
-
 
532
 
-
 
533
cmove   fix     cmovz
-
 
534
macro cmovz reg1, reg2 {
-
 
535
 
-
 
536
local   .jumpaddr
-
 
537
 
-
 
538
        jnz     .jumpaddr
-
 
539
        mov     reg1, reg2
-
 
540
       .jumpaddr:
-
 
541
}
-
 
542
 
-
 
543
cmovne  fix     cmovnz
-
 
544
macro cmovnz reg1, reg2 {
-
 
545
 
-
 
546
local   .jumpaddr
-
 
547
 
-
 
548
        jz      .jumpaddr
-
 
549
        mov     reg1, reg2
-
 
550
       .jumpaddr:
-
 
551
}
-
 
552
 
-
 
553
macro cmovg reg1, reg2 {
-
 
554
 
-
 
555
local   .jumpaddr
-
 
556
 
-
 
557
        jle     .jumpaddr
-
 
558
        mov     reg1, reg2
-
 
559
       .jumpaddr:
-
 
560
}
-
 
561
 
-
 
562
macro cmovl reg1, reg2 {
-
 
563
 
-
 
564
local   .jumpaddr
-
 
565
 
-
 
566
        jge     .jumpaddr
-
 
567
        mov     reg1, reg2
-
 
568
       .jumpaddr:
-
 
569
}
-
 
570
 
-
 
571
end if
505
 
572
 
Line 506... Line 573...
506
; constants
573
; constants
507
 
574
 
508
; events
575
; events
Line 516... Line 583...
516
EV_MOUSE       = 6
583
EV_MOUSE       = 6
517
EV_IPC         = 7
584
EV_IPC         = 7
518
EV_STACK       = 8
585
EV_STACK       = 8
Line 519... Line 586...
519
 
586
 
520
; event mask bits for function 40
587
; event mask bits for function 40
521
EVM_REDRAW     =        1b
588
EVM_REDRAW     =          1b
522
EVM_KEY        =       10b
589
EVM_KEY        =         10b
523
EVM_BUTTON     =      100b
590
EVM_BUTTON     =        100b
524
EVM_EXIT       =     1000b
591
EVM_EXIT       =       1000b
525
EVM_BACKGROUND =    10000b
592
EVM_BACKGROUND =      10000b
526
EVM_MOUSE      =   100000b
593
EVM_MOUSE      =     100000b
527
EVM_IPC        =  1000000b
594
EVM_IPC        =    1000000b
-
 
595
EVM_STACK      =   10000000b
-
 
596
EVM_DEBUG      =  100000000b