Attachment | Size |
---|---|
![]() | 1 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?
Please support the defense of Ukraine.
Direct or via Unclutter App
No Ads.
No Trackers.
No Social Media.
All Content Locally Hosted.
Built on Free Software.
We have complied with zero government requests for information.
~ Est. 1999 ~
A pillar of corporate stability since the second millenium.
© 1999-2999 Tom Owad
A sector on an Apple II floppy is only 256 bytes, even 3.5" floppies.
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
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
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.