home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / commercialdemos / warpup-warpos2 / warprace / modsrc / contextswitch / call68k.s < prev    next >
Text File  |  1997-09-24  |  3KB  |  93 lines

  1.                 incdir  include:
  2.                 incdir  lvo:
  3.                 incdir  powerasm:source/powerpc_lib/warprace/
  4.  
  5. **      '(C) Copyright 1997 Haage & Partner Computer GmbH'
  6. **           All Rights Reserved
  7.  
  8.                 include intuition/intuition.i
  9.                 include powerpc/powerpc.i
  10.                 include warprace.i
  11.  
  12.                 include exec_lib.i
  13.                 include intuition_lib.i
  14.                 include graphics_lib.i
  15.                 include powerpc_lib.i
  16.  
  17.                 xref    PPCMain
  18.                 xref    _LinkerDB
  19.  
  20.                 xdef    Empty68K
  21.                 xdef    _PowerPCBase
  22.  
  23.  
  24. VERSION         =       1
  25. REVISION        =       0
  26. REVISIONCOUNT   =       1
  27.  
  28.                 mc68020
  29.  
  30.                 section "",code
  31. start
  32.                 movem.l d1-a6,-(sp)
  33.                 lea     _LinkerDB,a4
  34.                 cmp.l   #WR_ID,d0
  35.                 bne.b   .leave
  36.                 tst     WRI_68K(a0)
  37.                 beq.b   .go
  38. .leave
  39.                 movem.l (sp)+,d1-a6
  40.                 moveq   #0,d0
  41.                 rts
  42. .go
  43.                 move.l  a0,a2
  44.                 move.l  WRI_POWERPCBASE(a2),_PowerPCBase
  45.                 move.l  a2,a0
  46.                 RUNPOWERPC      PPCMain
  47.                 move.l  d0,Result
  48.                 divul.l #1000,d1:d0
  49.                 move.l  d0,ResultParams
  50.                 move.l  d1,ResultParams+4
  51.                 move.l  #STATUS_SUCCESS,Status
  52.                 move.l  #WRO,d0
  53.                 movem.l (sp)+,d1-a6
  54.                 rts
  55.  
  56. Empty68K
  57.                 rts
  58.  
  59.                 section "",data
  60. WRO
  61.                 dc.l    ModName
  62.                 dc.l    Short
  63.                 dc.l    Description
  64.                 dc.l    Author
  65.                 dc.l    VERSION
  66.                 dc.l    REVISION
  67.                 dc.l    REVISIONCOUNT
  68.                 dc.l    0
  69. Result
  70.                 dc.l    0
  71.                 dc.l    RES_MICROSECS
  72.                 dc.l    ResultString
  73.                 dc.l    ResultParams
  74. Status
  75.                 dc.l    0
  76. ErrStr
  77.                 dc.l    0
  78.                 dc.l    0
  79.                 dc.l    0
  80.  
  81. ModName         dc.b    "Call68K",0
  82. Short           dc.b    "CPU context switch test program",0
  83. Description     dc.b    "This program measures the performance of the CPU context\n"
  84.                 dc.b    "switches. An empty 68K function is called many times from\n"
  85.                 dc.b    "PPC side and the average overhead time is evaluated",0
  86. Author          dc.b    "Sam Jordan",0
  87. ResultString    dc.b    "Average overhead time: %ld.%03ld ms",0
  88.  
  89.                 section "",bss
  90. _SysBase        ds.l    1
  91. _PowerPCBase    ds.l    1
  92. ResultParams    ds.l    2
  93.