Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BITS 32
- GLOBAL _asm_main
- EXTERN _printf
- SECTION .data
- row1 dd 5,7,3,1
- matrixB dd 4,9,3,1
- timestamp resb 16
- SECTION .text
- _asm_main:
- ENTER 0,0
- ; initialize the code here
- ; ReaD TimeStamp Counter
- RDTSC
- ; Save initial timestamp
- MOV [timestamp], EAX
- MOV [timestamp+8], EDX
- ; push EAX and EDX to stack
- PUSH EAX
- PUSH EDX
- ; Do the code now
- ; [START]
- ; [END]
- ;
- ; pop EAX and EDX from stack
- POP EAX
- POP EDX
- ; get difference of two timestamps
- SUB EAX, [timestamp]
- SUB EDX, [timestamp + 8]
- LEAVE
- RET
Advertisement
Add Comment
Please, Sign In to add comment