Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Using RDTSC in PL/I for Windows (RDz)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1072
Location: Oostende, Belgium

PostPosted: Thu Jun 10, 2010 9:42 pm    Post subject: Using RDTSC in PL/I for Windows (RDz)
Reply with quote

I posted the following to news://comp.lang.pl1. It might be useful if you want to get more accurate timings than can be obtained by using the TIME() or DATETIME() builtins:

Quote:
OK, so I downloaded FASM and assembled this, rdtsc.asm

Code:
format coff
public _rdtsc@0
_rdtsc@0:
  rdtsc
  ret

into this rdtsc.obj (in HEX), if anyone else needs it:
Code:
000000  4C 01 01 00 C8 0C 11 4C 3F 00 00 00 02 00 00 00
000010  00 00 04 01 2E 66 6C 61 74 00 00 00 00 00 00 00
000020  00 00 00 00 03 00 00 00 3C 00 00 00 00 00 00 00
000030  00 00 00 00 00 00 00 00 60 00 00 00 0F 31 C3 2E
000040  66 6C 61 74 00 00 00 00 00 00 00 01 00 00 00 03
000050  00 5F 72 64 74 73 63 40 30 00 00 00 00 01 00 00
000060  00 02 00 04 00 00 00

and using this declare
Code:
dcl rdtsc entry() ext('rdtsc')
    returns(fixed bin(63) byvalue) options(linkage(stdcall));

and this compile directive
Code:
limits(fixedbin(31,63)

I got myself cycle-accurate (Oh yeah... - No, you can forget that! ) timings.
Back to top
View user's profile Send private message

View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts FTP from windows server into Mainfram... sathyajes All Other Mainframe Topics 24 Wed Jul 20, 2016 1:33 pm
No new posts problem on data conversion from windo... hkalhor2 Java & MQSeries 3 Tue May 17, 2016 12:10 pm
No new posts force windows ftp client user to defa... meykh2014 All Other Mainframe Topics 0 Sun Feb 14, 2016 12:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us