Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bootloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
bootloader
Commits
bc43dbb6
Commit
bc43dbb6
authored
5 years ago
by
Jacob Lorentzon
Browse files
Options
Downloads
Patches
Plain Diff
Move the store function away from the bootsector.
parent
1a2af2cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
Support booting from MBR disks
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
x86_64/bootsector.asm
+0
-39
0 additions, 39 deletions
x86_64/bootsector.asm
x86_64/config.asm
+39
-0
39 additions, 0 deletions
x86_64/config.asm
with
39 additions
and
39 deletions
x86_64/bootsector.asm
+
0
−
39
View file @
bc43dbb6
...
...
@@ -86,45 +86,6 @@ load:
jc
error
ret
; store some sectors to disk from a buffer in memory
; buffer has to be below 1MiB
; IN
; ax: start sector
; bx: offset of buffer
; cx: number of sectors (512 Bytes each)
; dx: segment of buffer
; CLOBBER
; ax, bx, cx, dx, si
; TODO rewrite to (eventually) move larger parts at once
; if that is done increase buffer_size_sectors in startup-common to that (max 0x80000 - startup_end)
store:
cmp
cx
,
127
jbe
.good_size
pusha
mov
cx
,
127
call
store
popa
add
ax
,
127
add
dx
,
127
*
512
/
16
sub
cx
,
127
jmp
store
.good_size:
mov
[
DAPACK.addr
],
eax
mov
[
DAPACK.buf
],
bx
mov
[
DAPACK.count
],
cx
mov
[
DAPACK.seg
],
dx
call
print_dapack
mov
dl
,
[
di
sk
]
mov
si
,
DAPACK
mov
ah
,
0x43
int
0x13
jc
error
ret
print_dapack:
mov
al
,
13
call
print_char
...
...
This diff is collapsed.
Click to expand it.
x86_64/config.asm
+
39
−
0
View file @
bc43dbb6
...
...
@@ -16,3 +16,42 @@ save_config:
xor
dx
,
dx
call
store
ret
; store some sectors to disk from a buffer in memory
; buffer has to be below 1MiB
; IN
; ax: start sector
; bx: offset of buffer
; cx: number of sectors (512 Bytes each)
; dx: segment of buffer
; CLOBBER
; ax, bx, cx, dx, si
; TODO rewrite to (eventually) move larger parts at once
; if that is done increase buffer_size_sectors in startup-common to that (max 0x80000 - startup_end)
store:
cmp
cx
,
127
jbe
.good_size
pusha
mov
cx
,
127
call
store
popa
add
ax
,
127
add
dx
,
127
*
512
/
16
sub
cx
,
127
jmp
store
.good_size:
mov
[
DAPACK.addr
],
eax
mov
[
DAPACK.buf
],
bx
mov
[
DAPACK.count
],
cx
mov
[
DAPACK.seg
],
dx
call
print_dapack
mov
dl
,
[
di
sk
]
mov
si
,
DAPACK
mov
ah
,
0x43
int
0x13
jc
error
ret
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment