View Single Post
Old 03 December 2004, 21:15   #6
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.

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...

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.06233 seconds with 11 queries