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
e61fb400
authored
Nov 09, 2015
by
malcolm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
removed some output
parent
63d7197e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
src/idt.c
src/term.c
src/idt.c
View file @
e61fb400
...
@@ -45,28 +45,14 @@ void load_error_handlers()
...
@@ -45,28 +45,14 @@ void load_error_handlers()
void
default_handler
(
struct
reg_state
reg
,
uint32_t
interrupt
,
uint32_t
error
,
struct
stack_state
stack
)
void
default_handler
(
struct
reg_state
reg
,
uint32_t
interrupt
,
uint32_t
error
,
struct
stack_state
stack
)
{
{
/*for(uint32_t i=stack.eip-16;i<=stack.eip+16;i+=4)
{
serial_hexword(i);
serial_writestring(": ");
serial_hexword(*((uint32_t*)(void*)i));
serial_writestring("\n");
}*/
if
(
interrupt
<
32
)
if
(
interrupt
<
32
)
stack
.
eip
+=
2
;
stack
.
eip
+=
2
;
//serial_writestring("int caught ");
//char f[20];
//char f[20];
//serial_val(interrupt);
//serial_val(interrupt);
//serial_hexword(error);serial_writestring(" ");
//serial_hexword(stack.eip);serial_writestring(" ");
//serial_val(stack.cd);
//serial_val(stack.eflags);
//serial_writestring("\n");
if
(
handlers
[
interrupt
]
!=
NULL
)
if
(
handlers
[
interrupt
]
!=
NULL
)
{
{
handlers
[
interrupt
](
error
);
handlers
[
interrupt
](
error
);
}
}
//asm("hlt");
return
;
return
;
}
}
...
...
src/term.c
View file @
e61fb400
...
@@ -99,6 +99,17 @@ void terminal_putchar(char c)
...
@@ -99,6 +99,17 @@ void terminal_putchar(char c)
update_csr
();
update_csr
();
}
}
const
char
*
hexcharss
=
"0123456789abcdef"
;
void
terminal_hexstring
(
void
*
s
,
uint32_t
n
)
{
char
*
d
=
(
char
*
)
s
;
for
(
uint32_t
i
=
0
;
i
<
n
;
i
++
)
{
terminal_putchar
(
hexcharss
[(
d
[
i
]
>>
4
)
&
0xf
]);
terminal_putchar
(
hexcharss
[
d
[
i
]
&
0xf
]);
}
}
void
terminal_writestring
(
const
char
*
data
)
void
terminal_writestring
(
const
char
*
data
)
{
{
size_t
datalen
=
strlen
(
data
);
size_t
datalen
=
strlen
(
data
);
...
...
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