Rev 357 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 357 | Rev 358 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | .text |
35 | .text |
36 | 36 | ||
37 | .global paging_on |
37 | .global paging_on |
38 | .global enable_l_apic_in_msr |
38 | .global enable_l_apic_in_msr |
39 | .global interrupt_handlers |
39 | .global interrupt_handlers |
40 | .global memcpy |
- | |
41 | .global memsetb |
40 | .global memsetb |
42 | .global memsetw |
41 | .global memsetw |
43 | .global memcmp |
42 | .global memcmp |
44 | 43 | ||
45 | 44 | ||
Line 152... | Line 151... | ||
152 | # handler 128 192 |
151 | # handler 128 192 |
153 | # handler 192 256 |
152 | # handler 192 256 |
154 | h_end: |
153 | h_end: |
155 | 154 | ||
156 | 155 | ||
157 | ## Copy memory |
- | |
158 | # |
- | |
159 | # Copy a given number of bytes (3rd argument) |
- | |
160 | # from the memory location defined by 2nd argument |
- | |
161 | # to the memory location defined by 1st argument. |
- | |
162 | # The memory areas cannot overlap. |
- | |
163 | # |
- | |
164 | SRC=16 |
- | |
165 | DST=12 |
- | |
166 | CNT=20 |
- | |
167 | memcpy: |
- | |
168 | push %esi |
- | |
169 | push %edi |
- | |
170 | - | ||
171 | movl CNT(%esp),%ecx |
- | |
172 | movl DST(%esp),%edi |
- | |
173 | movl SRC(%esp),%esi |
- | |
174 | - | ||
175 | rep movsb %ds:(%esi),%es:(%edi) |
- | |
176 | - | ||
177 | pop %edi |
- | |
178 | pop %esi |
- | |
179 | ret |
- | |
180 | - | ||
181 | - | ||
182 | ## Fill memory with bytes |
156 | ## Fill memory with bytes |
183 | # |
157 | # |
184 | # Fill a given number of bytes (2nd argument) |
158 | # Fill a given number of bytes (2nd argument) |
185 | # at memory defined by 1st argument with the |
159 | # at memory defined by 1st argument with the |
186 | # byte value defined by 3rd argument. |
160 | # byte value defined by 3rd argument. |