Rev 1259 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1259 | Rev 1318 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | ;; GNU GENERAL PUBLIC LICENSE ;; |
15 | ;; GNU GENERAL PUBLIC LICENSE ;; |
16 | ;; Version 2, June 1991 ;; |
16 | ;; Version 2, June 1991 ;; |
17 | ;; ;; |
17 | ;; ;; |
18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 19... | Line 19... | ||
19 | 19 | ||
Line 20... | Line 20... | ||
20 | $Revision: 1259 $ |
20 | $Revision: 1318 $ |
21 | 21 | ||
22 | uglobal |
22 | uglobal |
23 | last_1sTick db ? |
23 | last_1sTick db ? |
Line 95... | Line 95... | ||
95 | add byte [reg + 1], cl |
95 | add byte [reg + 1], cl |
96 | adc byte [reg], ch |
96 | adc byte [reg], ch |
97 | rol ecx, 16 |
97 | rol ecx, 16 |
98 | } |
98 | } |
Line -... | Line 99... | ||
- | 99 | ||
- | 100 | ||
- | 101 | macro pseudo_random reg { |
|
- | 102 | ||
- | 103 | add reg, [esp] |
|
- | 104 | rol reg, 5 |
|
- | 105 | xor reg, [timer_ticks] |
|
- | 106 | imul reg, 214013 |
|
- | 107 | xor reg, 0xdeadbeef |
|
- | 108 | rol reg, 9 |
|
- | 109 | ||
- | 110 | pushd reg |
|
- | 111 | mov word [esp], 0x8080 ; kernel heap start addr (os_stack) |
|
- | 112 | xor reg, [esp] |
|
- | 113 | add esp, 4 |
|
- | 114 | ||
- | 115 | } |
|
99 | 116 | ||
100 | include "queue.inc" |
117 | include "queue.inc" |
101 | include "ARP.inc" |
118 | include "ARP.inc" |
102 | include "IPv4.inc" |
119 | include "IPv4.inc" |
103 | include "ethernet.inc" |
120 | include "ethernet.inc" |
Line 150... | Line 167... | ||
150 | stack_handler: |
167 | stack_handler: |
Line 151... | Line 168... | ||
151 | 168 | ||
152 | cmp [ETH_RUNNING], 0 |
169 | cmp [ETH_RUNNING], 0 |
Line 153... | Line 170... | ||
153 | je .exit |
170 | je .exit |
154 | 171 | ||
155 | ; Test for 1/100 s (10ms) tick |
172 | ; Test for 10ms tick |
156 | mov eax, [timer_ticks] |
173 | mov eax, [timer_ticks] |
Line 157... | Line 174... | ||
157 | cmp eax, [last_1hsTick] |
174 | cmp eax, [last_1hsTick] |