projects
/
bootcensus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
switch video mode hack by dropping to real mode to call the video bios works!
[bootcensus]
/
src
/
startup.s
diff --git
a/src/startup.s
b/src/startup.s
index
42e4b21
..
8041c13
100644
(file)
--- a/
src/startup.s
+++ b/
src/startup.s
@@
-15,18
+15,32
@@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
.code32
# along with this program. If not, see <https://www.gnu.org/licenses/>.
.code32
- .section .startup
+ .section .startup,"ax"
.extern _bss_start
.extern _bss_end
.extern _bss_start
.extern _bss_end
+ .extern pcboot_main
+ # move the stack to the top of the conventional memory
+ movl $0x80000, %esp
+
+ # zero the BSS section
xor %eax, %eax
xor %eax, %eax
- mov _bss_start, %edi
- mov _bss_size, %ecx
+ mov $_bss_start, %edi
+ mov $_bss_size, %ecx
+ cmp $0, %ecx
+ jz skip_bss_zero
shr $4, %ecx
rep stosl
shr $4, %ecx
rep stosl
+skip_bss_zero:
+ call pcboot_main
+ # pcboot_main never returns
+0: cli
+ hlt
+ jmp 0b
+ .global logohack
logohack:
# copy palette
mov $logo_pal, %esi
logohack:
# copy palette
mov $logo_pal, %esi
@@
-131,8
+145,6
@@
xval: .long 0
yval: .long 0
frameno: .long 0
yval: .long 0
frameno: .long 0
-numbuf: .space 16
-
logo_pal:
.incbin "logo.pal"
logo_pal:
.incbin "logo.pal"