Change to 16-bit card ID register
This commit is contained in:
parent
5bb2733132
commit
82f3185f9c
@ -1,6 +1,6 @@
|
|||||||
.global _start
|
.global _start
|
||||||
_start:
|
_start:
|
||||||
move.b #0x4, d0
|
move.w #0x4, d0 | Find a storage card
|
||||||
bsr.w find_first_card
|
bsr.w find_first_card
|
||||||
| Load the header sector for the kernel binary
|
| Load the header sector for the kernel binary
|
||||||
move.l #0x200, a1 | Set the destination address to 0x200
|
move.l #0x200, a1 | Set the destination address to 0x200
|
||||||
@ -53,9 +53,9 @@ find_first_card:
|
|||||||
move.l #0xff0000, a0 | a0 holds the address of the current card
|
move.l #0xff0000, a0 | a0 holds the address of the current card
|
||||||
ffc_loop:
|
ffc_loop:
|
||||||
lea (0x100, a0), a0 | Move to the next card
|
lea (0x100, a0), a0 | Move to the next card
|
||||||
move.b (0xff, a0), d1 | Load the type of the card into d1
|
move.w (0xfe, a0), d1 | Load the type of the card into d1
|
||||||
beq.b ffc_done | If the type is 0 (empty slot), we have scanned all cards, so exit the loop
|
beq.b ffc_done | If the type is 0 (empty slot), we have scanned all cards, so exit the loop
|
||||||
cmp.b d0, d1 | If the card is the type we want, return with the address in a0
|
cmp.w d0, d1 | If the card is the type we want, return with the address in a0
|
||||||
beq.b ffc_done
|
beq.b ffc_done
|
||||||
bra.b ffc_loop | Loop back and check the next card
|
bra.b ffc_loop | Loop back and check the next card
|
||||||
ffc_done:
|
ffc_done:
|
||||||
|
Loading…
Reference in New Issue
Block a user