Changeset 287 in xtideuniversalbios for trunk/Assembly_Library/Src/Time
- Timestamp:
- Mar 2, 2012, 12:31:39 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Time/SystemTimer.asm
r256 r287 29 29 ; 2. Use START_PRECISE_EVENT_TIMER macro to start timer 30 30 ; 3. Use STOP_PRECISE_EVENT_TIMER to stop timer (optional) 31 ; 4. Call SystemTimer_ ReadNanosecsToDXAXfromPreciseEventTimerto get event duration31 ; 4. Call SystemTimer_GetPreciseEventTimerTicksToAX to get event duration 32 32 ; 33 ; SystemTimer_ ReadNanosecsToDXAXfromPreciseEventTimer33 ; SystemTimer_GetPreciseEventTimerTicksToAX 34 34 ; Parameters: 35 35 ; Nothing 36 36 ; Returns: 37 ; DX:AX: Event duration in nanosecs37 ; AX: Event duration in timer ticks 38 38 ; Corrupts registers: 39 39 ; Nothing 40 40 ;-------------------------------------------------------------------- 41 41 ALIGN JUMP_ALIGN 42 SystemTimer_ ReadNanosecsToDXAXfromPreciseEventTimer:42 SystemTimer_GetPreciseEventTimerTicksToAX: 43 43 OUTPUT_COUNTER_COMMAND_TO TIMER_2, LATCH, MODE_0_SINGLE_TIMEOUT, BINARY_COUNTER 44 44 READ_COUNT_TO_AX_FROM TIMER_2 45 45 neg ax ; 0 - count (Mode 0 counts toward zero) 46 mov dx, TIMER_CYCLE_TIME47 mul dx48 46 ret
Note:
See TracChangeset
for help on using the changeset viewer.