1 ;; -----------------------------------------------------------------------
3 ;; Copyright 2009 Intel Corporation; author: H. Peter Anvin
5 ;; This program is free software; you can redistribute it and/or modify
6 ;; it under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
8 ;; Boston MA 02110-1301, USA; either version 2 of the License, or
9 ;; (at your option) any later version; incorporated herein by reference.
11 ;; -----------------------------------------------------------------------
16 ;; Very simple counting timer
18 ;; This lets us have a simple incrementing variable without worrying
19 ;; about the BIOS_timer variable wrapping around at "midnight" and other
27 mov eax,[BIOS_timer_hook]
28 mov [BIOS_timer_next],eax
29 mov dword [BIOS_timer_hook],timer_irq
34 mov eax,[BIOS_timer_next]
35 mov [BIOS_timer_hook],eax
39 inc dword [cs:__jiffies]
41 BIOS_timer_next equ $-4
46 __jiffies dd 0 ; The actual timer variable