View Single Post
Old 03 December 2004, 20:15   #6
AmiGer
Registered User
AmiGer's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 349
Well, I assume that you decrunch the program to a fixed address and you don't want to return to the OS because you don't know what you're overwriting in the memory. So it would be better to disable all interrupts during decrunching to prevent a crash.
If you still want to use OS functions later in the code I would do a correct AllocMem and would decrunch the (hopefully relocatable) program to this address.

Quote:
Originally Posted by Photon
1) what if the decrunched program wants to have interrupts on, for example load a file of its own?.
decide at the beginning:
- use OS-functions and code the "official" (boring) way with AllocMem and so on...
- program the hardware directly like I do... and possibly make a custom disk loader...

Quote:
2) what if the decrunched program disables interrupts itself? I seem to remember two disables in a row would cause a Guru, but I may be wrong, please advise in that case..
Don't know. You could also disable/enable interrupts by tweaking the custom chip registers directly. Look at the other thread "Taking over the system"...
AmiGer is offline  
 
Page generated in 0.04077 seconds with 11 queries