Fixed ARM build
[ZeXOS.git] / kernel / arch / i386 / paging_i486.s
blob896fd8bf08654bbbd3d550e0518eed6b0f9853ae
1 ; ZeX/OS
2 ; Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
4 ; This program is free software: you can redistribute it and/or modify
5 ; it under the terms of the GNU General Public License as published by
6 ; the Free Software Foundation, either version 3 of the License, or
7 ; (at your option) any later version.
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU General Public License for more details.
14 ; You should have received a copy of the GNU General Public License
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
18 %macro IMP 1
19 %ifdef UNDERBARS
20 EXTERN _%1
21 %define %1 _%1
22 %else
23 EXTERN %1
24 %endif
25 %endmacro
27 %macro EXP 1
28 GLOBAL $_%1
29 $_%1:
30 GLOBAL $%1
31 $%1:
32 %endmacro
34 EXP read_cr0
35 mov eax, cr0
36 retn
38 EXP write_cr0
39 push ebp
40 mov ebp, esp
41 mov eax, [ebp+8]
42 mov cr0, eax
43 pop ebp
44 retn
46 EXP read_cr3
47 mov eax, cr3
48 retn
50 EXP write_cr3
51 push ebp
52 mov ebp, esp
53 mov eax, [ebp+8]
54 mov cr3, eax
55 pop ebp
56 retn