* Fixes... it now builds and theorically should work, let's see...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23489 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
// when the drive reading fails for some reason, it will
|
// when the drive reading fails for some reason, it will
|
||||||
// retry this many times until it will report a failure
|
// retry this many times until it will report a failure
|
||||||
|
|
||||||
.text
|
//.text
|
||||||
|
|
||||||
/* main entry point, both from the floppy boot and .prg */
|
/* main entry point, both from the floppy boot and .prg */
|
||||||
bra real_entry
|
bra real_entry
|
||||||
@@ -49,7 +49,7 @@ real_entry:
|
|||||||
|
|
||||||
// first, determine if .prg (user) or bootsect (super)
|
// first, determine if .prg (user) or bootsect (super)
|
||||||
// Super()
|
// Super()
|
||||||
move.l SUP_INQUIRE,-(%sp)
|
move.l #SUP_INQUIRE,-(%sp)
|
||||||
move.w #0x20,%d0
|
move.w #0x20,%d0
|
||||||
trap #1
|
trap #1
|
||||||
addq.l #6,%sp
|
addq.l #6,%sp
|
||||||
@@ -65,17 +65,19 @@ floppy_start:
|
|||||||
move.l #ATARI_ZBEOS_STACK_BASE,%sp
|
move.l #ATARI_ZBEOS_STACK_BASE,%sp
|
||||||
//XXX: check for enough RAM
|
//XXX: check for enough RAM
|
||||||
// load the rest
|
// load the rest
|
||||||
move.w #sNumSectors,%d2
|
move.w sNumSectors,%d2
|
||||||
// load at base + this code.
|
// load at base + this code.
|
||||||
move.l #ATARI_ZBEOS_BASE+512,%a2
|
move.l #ATARI_ZBEOS_BASE+512,%a2
|
||||||
bsr load_sectors
|
bsr load_sectors
|
||||||
tst.l %d0
|
tst.l %d0
|
||||||
beq floppy_done
|
beq floppy_done
|
||||||
lea failure_string,%a0
|
lea failure_string,%a0
|
||||||
jsr puts
|
bsr puts
|
||||||
bra spin
|
bra spin
|
||||||
flopy_done:
|
floppy_done:
|
||||||
bra #ATARI_ZBEOS_BASE+512
|
jmp ATARI_ZBEOS_BASE+512
|
||||||
|
|
||||||
|
//rts
|
||||||
|
|
||||||
/** Loads %d2 sectors from floppy disk, starting at head XXX %dh, sector %cx.
|
/** Loads %d2 sectors from floppy disk, starting at head XXX %dh, sector %cx.
|
||||||
* The data is loaded to %a2.
|
* The data is loaded to %a2.
|
||||||
@@ -88,7 +90,7 @@ load_sectors:
|
|||||||
move.w #1,-(%sp) // 2nd sector
|
move.w #1,-(%sp) // 2nd sector
|
||||||
move.w %d2,-(%sp)
|
move.w %d2,-(%sp)
|
||||||
move.l %a2,-(%sp)
|
move.l %a2,-(%sp)
|
||||||
move.w RW_READ+RW_NOTRANSLATE,-(%sp)
|
move.w #RW_READ+RW_NOTRANSLATE,-(%sp)
|
||||||
move.w #4,-(%sp)
|
move.w #4,-(%sp)
|
||||||
trap #13
|
trap #13
|
||||||
add.l #14,%sp
|
add.l #14,%sp
|
||||||
@@ -113,7 +115,7 @@ failure_string:
|
|||||||
prg_start:
|
prg_start:
|
||||||
// .prg:
|
// .prg:
|
||||||
// we need to switch to supervisor mode anyway
|
// we need to switch to supervisor mode anyway
|
||||||
move.l SUP_SET,-(%sp)
|
move.l #SUP_SET,-(%sp)
|
||||||
move.w #0x20,%d0
|
move.w #0x20,%d0
|
||||||
trap #1
|
trap #1
|
||||||
addq.l #6,%sp
|
addq.l #6,%sp
|
||||||
@@ -125,8 +127,8 @@ spin:
|
|||||||
bra spin
|
bra spin
|
||||||
|
|
||||||
super_done:
|
super_done:
|
||||||
|
// XXX: copy the rest !
|
||||||
jsr _start
|
jmp ATARI_ZBEOS_BASE+512
|
||||||
|
|
||||||
saved_super_stack:
|
saved_super_stack:
|
||||||
.long 0
|
.long 0
|
||||||
@@ -179,7 +181,7 @@ unimpl:
|
|||||||
.string "Unimplemented."
|
.string "Unimplemented."
|
||||||
|
|
||||||
shell_end:
|
shell_end:
|
||||||
.skip 0x01fe - tmp_floppy_end
|
.fill 0x01fe - tmp_floppy_end, 1, 0x55
|
||||||
// .org 0x01fe
|
// .org 0x01fe
|
||||||
.word 0xaa55-1 // will be replaced by the one calculated by the build.
|
.word 0xaa55-1 // will be replaced by the one calculated by the build.
|
||||||
// we make sure we PCs don't try to execute it.
|
// we make sure we PCs don't try to execute it.
|
||||||
@@ -187,3 +189,4 @@ shell_end:
|
|||||||
// expected by the BFS boot loader, and also marks
|
// expected by the BFS boot loader, and also marks
|
||||||
// this block as valid boot block for the BIOS
|
// this block as valid boot block for the BIOS
|
||||||
// XXX: actually TOS wants a real checksum here so sum is 0x1234!
|
// XXX: actually TOS wants a real checksum here so sum is 0x1234!
|
||||||
|
tmp_floppy_end:
|
||||||
|
|||||||
Reference in New Issue
Block a user