Mercurial > lcfOS
comparison cos/kernel/asmcode.asm @ 32:3a6a9b929db0
Added initial ramdisk and some virtual file system functions
author | windel |
---|---|
date | Fri, 13 Jan 2012 18:18:17 +0100 |
parents | 88590c42320f |
children | d8185ddb6c7b |
comparison
equal
deleted
inserted
replaced
31:88590c42320f | 32:3a6a9b929db0 |
---|---|
1 ; The default interrupt handlers. | 1 ; The default interrupt handlers. |
2 ; from 20 - 31 are reserved vectors. | 2 ; from 20 - 31 are reserved vectors. |
3 ; below are the custom ones! | 3 ; below are the custom ones! |
4 | |
5 ; Calling convention AMD64 ABI: | |
6 ; parameters in: rdi, rsi, rdx, rcx .... | |
4 | 7 |
5 section .text | 8 section .text |
6 align 4 | 9 align 4 |
7 | 10 |
8 ; Function to read the current instruction pointer value: | 11 ; Function to read the current instruction pointer value: |
15 loadIDT: | 18 loadIDT: |
16 extern idtP | 19 extern idtP |
17 ; TODO: make this pointer thing more insightfull: | 20 ; TODO: make this pointer thing more insightfull: |
18 lidt [idtP] | 21 lidt [idtP] |
19 ret | 22 ret |
23 | |
24 global setCR3 | |
25 setCR3: | |
26 mov cr3, rdi ; Load cr3 | |
27 ret | |
20 | 28 |
21 ; ISR related assembler wrappers: | 29 ; ISR related assembler wrappers: |
22 | 30 |
23 %macro ISR_NOERRCODE 1 | 31 %macro ISR_NOERRCODE 1 |
24 global INT%1 | 32 global INT%1 |