boot sector Help!

5 posts / 0 new
Last post
Offline
Last seen: 1 week 1 day ago
Joined: Jan 11 2025 - 14:57
Posts: 29
boot sector Help!
AttachmentSize
Binary Data Code1 KB

I have a code that weighs exactly 1kb and I need it to end up in the boot sector of an Apple IIgs disk, which is best for a 3.5-inch Floppy disk. Can someone tell me how to put this code in the boot sector?

Offline
Last seen: 4 hours 37 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2712
A sector on an Apple II

A sector on an Apple II floppy is only 256 bytes, even 3.5" floppies.

 

HZA
Offline
Last seen: 1 day 18 hours ago
Joined: Sep 29 2023 - 13:52
Posts: 2
boot greater than 256 bytes

Exactly the boot sector is sector 0 track 0 with 256 bytes but... in your case you must write sector 0 with the first byte= the number of sectors to load. Normaly if you look a standard disk you'll see 01, so  you write 04 (if  code is less than 1024 bytes and write sectors 0,1,2,3  with your datas

Warning if your boot is exactly 1024 bytes... you must use 5 sectors and write 05  as first byte. Let me know if it's ok for you

HZA
Offline
Last seen: 1 day 18 hours ago
Joined: Sep 29 2023 - 13:52
Posts: 2
just a complement

A small precision : As you use the first  byte to setup the number of sectors to load ,  don't forget that you must assemble your code at ORG $801...  because the  Bootstrap in ROM givehand to  you with a JMP $801

Offline
Last seen: 4 hours 37 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2712
HZA wrote:Exactly the boot
HZA wrote:

Exactly the boot sector is sector 0 track 0 with 256 bytes but... in your case you must write sector 0 with the first byte= the number of sectors to load. Normaly if you look a standard disk you'll see 01, so  you write 04 (if  code is less than 1024 bytes and write sectors 0,1,2,3  with your datas

Warning if your boot is exactly 1024 bytes... you must use 5 sectors and wri

 

That's really interesting!  All these years and I never knew about that!  Or maybe I totally forgot long ago...  but good thing to know.  It could come in handy some day.

 

Log in or register to post comments