summaryrefslogtreecommitdiff
path: root/kernel/boot.s
diff options
context:
space:
mode:
authorJake Mannens <jakem_5@hotmail.com>2020-08-02 08:27:25 +1000
committerJake Mannens <jakem_5@hotmail.com>2020-08-02 08:27:25 +1000
commit5d29745034c854886fb5988fca65cc3757f69a3e (patch)
tree445acaa25ee13b0f2e5dbba1acee6c39aa8c4d0f /kernel/boot.s
parent4d6fe1c317f0a541922f4cf945365fd31e608e10 (diff)
Modified assembly routines to use x86's advanced addressing modes.HEADmaster
Diffstat (limited to 'kernel/boot.s')
-rw-r--r--kernel/boot.s6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/boot.s b/kernel/boot.s
index 4db2cf7..e844c5b 100644
--- a/kernel/boot.s
+++ b/kernel/boot.s
@@ -186,8 +186,7 @@ register_isr:
push ebp
mov ebp, esp
mov edx, [ebp+8]
- shl edx, 3
- add edx, idt
+ lea edx, [edx*8+idt]
mov eax, [ebp+16]
mov [edx], ax
shr eax, 16
@@ -206,8 +205,7 @@ register_trap:
push ebp
mov ebp, esp
mov edx, [ebp+8]
- shl edx, 3
- add edx, idt
+ lea edx, [edx*8+idt]
mov eax, [ebp+16]
mov [edx], ax
shr eax, 16