Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
781eab06
authored
Sep 07, 2015
by
malcolm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
More attempted fixes
parent
ed95d5f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
3 deletions
boot.asm
boot.asm
View file @
781eab06
...
...
@@ -114,7 +114,21 @@ Main: ;main section
int
0x15
;; now to try protected mode...
cli
lgdt
[gdt]
gdtr
:
dw
0
dd
0
setGdt
:
xor
eax
,
eax
mov
ax
,
ds
shl
eax
,
4
add
eax
,
gdt
;jp $
mov
[
gdtr
+
2
]
,
eax
;jp $ ;
mov
eax
,
gdt_end
;jp $
sub
eax
,
gdt
mov
[gdtr],
ax
lgdt
[gdtr]
mov
eax
,
cr0
or
al
,
1
mov
cr0
,
eax
...
...
@@ -122,7 +136,6 @@ Main: ;main section
jmp
08
h
:
PMain
gdt
:
times
16
db
0
dw
0xffff
; segment limit
.
src
:
...
...
@@ -137,8 +150,30 @@ gdt:
db
0x93
; data access rights
dw
0
times
16
db
0
gdt_end
:
;; .null: times 8 db 0
;; .code: dw 0x0400 ; limit (4MiB)
;; dw 0x0000 ; base 0-15
;; db 0x00 ; base 16-23
;; db 0x9A ; access byte
;; db 0xC0 ; flags/limit 16-19
;; db 0x04 ; base 24-31
;; .data: dw 0x0400
;; dw 0x0000
;; db 0x00
;; db 0x92
;; db 0xC0
;; db 0x08
;; .tss: dw 0x0400
;; dw 0x0000
;; db 0x00
;; db 0x89
;; db 0xC0
;; db 0x0C
PMain
:
mov
si
,
str1
call
PrintStr
nop
nop
hlt
jp
$
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment