03 March 2011, 20:04 | #1 |
Registered User
Join Date: Aug 2008
Location: Salisbury
Posts: 771
|
Boot block examples?
Was wondering if anyone had any boot block example code? I think the steps i need to do are...
1. Allocate memory 2. Use TrackDisk.Device to load a section off the disk into the allocated memory 3. Kill system 4. Jmp into the data loaded off the disk. Any pointers would be ACE Cheers in advance.. Edit - Also, with killing the system, as I'm going to be taking over all of the 1 meg chip ram on an a600 I figured will have to set the stack pointer somewhere else, or will it be at the top of the ram already? |
03 March 2011, 20:12 | #2 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
|
03 March 2011, 20:45 | #3 | ||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
Code:
BOOT dc.l "DOS"<<8 dc.l 0 dc.l "STR!" pea $60000 move.l (a7),a2 lea .BOOT(pc),a0 move.w #1024/4-1,d7 .copy move.l (a0)+,(a2)+ dbf d7,.copy rts .BOOT ; disable instruction cache cmp.w #36,$14(a6) bcs.b .nocache moveq #0,d0 moveq #1<<0,d1 move.l a1,a5 jsr -648(a6) move.l a5,a1 .nocache pea $30000 move.l (a7)+,$28(a1) move.l #1636*512,$2c(a1) move.l #74*512,$24(a1) jsr -456(a6) movem.l d0-a6,-(a7) jsr $30000 movem.l (a7)+,d0-a6 Quote:
Since you have complete control over the system you should set the stackpointer yourself to a safe location (preferably either very low or very high in mem). Last edited by StingRay; 03 March 2011 at 21:01. Reason: postion of the [/code] tag fixed |
||
04 March 2011, 16:44 | #4 |
Registered User
Join Date: Aug 2008
Location: Salisbury
Posts: 771
|
Wicked.. got the boot block working. The music disk engine wasn't working to start with, until I remembered it has all the OS saving calls it does before starting up. They aint gonna work if you destory memory are they!!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why can't I open the Topaz-font in a boot block? | Leffmann | Coders. General | 13 | 19 May 2010 21:52 |
Amiga - DOS versions - give me some examples | laffer | Retrogaming General Discussion | 77 | 18 January 2008 17:09 |
AGA programming with C examples/tutorials? | Calgor | Coders. General | 13 | 04 April 2007 18:53 |
Plasma examples anyone? | jobro | Coders. General | 5 | 27 November 2005 17:25 |
Block It! | sw2001 | request.Old Rare Games | 4 | 17 November 2004 21:11 |
|
|