Modify the userspace task
This commit is contained in:
parent
63e2b84370
commit
6c036dfe99
@ -9,10 +9,16 @@ global _userspace
|
|||||||
_userspace:
|
_userspace:
|
||||||
mov rdi, 4000 ; 4000 ms / 4 seconds
|
mov rdi, 4000 ; 4000 ms / 4 seconds
|
||||||
int 33h ; Sleep
|
int 33h ; Sleep
|
||||||
|
mov rcx, 10
|
||||||
|
.loop:
|
||||||
|
dec rcx
|
||||||
mov rdi, .message
|
mov rdi, .message
|
||||||
int 32h ; Print string
|
int 32h ; Print string
|
||||||
mov rdi, 2000 ; 2000 ms / 2 seconds
|
mov rdi, 200 ; 200 ms / 0.2 seconds
|
||||||
int 33h ; Sleep
|
int 33h ; Sleep
|
||||||
|
cmp rcx, 0
|
||||||
|
jne .loop
|
||||||
|
cli ; WE ARE IN RING 3!! So this should GPF and the kernel should exit us as "misbehaved"
|
||||||
int 31h ; Exit current task
|
int 31h ; Exit current task
|
||||||
.message:
|
.message:
|
||||||
db "hello from userspace!", 0xA, 0
|
db "hello from userspace!", 0xA, 0
|
Loading…
Reference in New Issue
Block a user