Back
Close

Computing with Data

elgeish
585.7K views
Previous: The Log-Scale Trick Next: Bash - Introduction

Use of Assembly Language in High-Level Languages

This example simply executes the RDTSC assembly instruction, which reads the CPU's timestamp counter, then stores the higher 32 bits into the EDX register and the lower ones into the EAX register. The value of EAX is then assigned to the timeStampCounter variable in C++ and printed out:

Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io