03 April 2010, 20:25 | #1 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
What is required of a resident application?
Obviously it has to be reentrant, but are there any other restrictions as far as hunk types, BSS space etc. go?
Also, do Kick 1.2 and 1.3 have the resident feature or is it for 2.0+ only? And how did Commodore intend for developers to mark their applications as pure? The pure-flag is not available when you show icon information in the Workbench, and I can't recall seeing any compiler or linker that can set the flag on its output. |
03 April 2010, 20:43 | #2 |
Registered User
Join Date: Dec 2007
Location: Oooh what a feeling yeaaah dancing on the ceiling
Posts: 314
|
Try the CLI (Protect +/- hsparwed).
Ed: oh, don't mark it Pure if it isn't, it won't help. Ed2: Pure code is pure code - no data. You can make things resident even if they aren't pure by using the FORCE keyword (there may be alternatives) which will strip the executable from any data hunks, and allows some things to be resident when they ordinarily wouldn't be. Someone else who really knows about this stuff should correct or continue here. Ed3: if you want to know if it's in wb1.3, look in the C: drawer. If Resident is present, then you should be able to use it. Ed4: I think DICE could create Pure executables, with the bit set, but I'm a little hazy on that. Last edited by meega; 03 April 2010 at 20:50. |
03 April 2010, 20:51 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
BSS space in re-entrant application does not make sense because it can't be used for storing data if you want to keep it re-entrant
|
03 April 2010, 21:17 | #4 | ||
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Quote:
Quote:
Anyway, is there any exhausting document on this? Maybe I've been looking in the wrong place, but the reason I posted here is because I haven't been able to find anything about this anywhere. Thanks |
||
03 April 2010, 21:30 | #5 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
Relocation is fine, program is loaded only once but program's hunk contents (whatever the type of hunk) must not be modified.
All data space must be allocated dynamically, usually single memory block is allocated with AllocMem() and stored to A4 or A5 and all data accesses are relative to A4/A5. Quote:
Last edited by Toni Wilen; 03 April 2010 at 21:42. |
|
03 April 2010, 21:47 | #6 |
Registered User
Join Date: Dec 2007
Location: Oooh what a feeling yeaaah dancing on the ceiling
Posts: 314
|
Offtopic: There are other uses for the protection bits than just the recomended ones. I used to mark text files as pure (protect blah:file.whatever +p) to show that I'd printed them.
|
03 April 2010, 22:50 | #7 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
Resident >NIL: Assign PURE This will speed up the startup-sequence and make scripts faster if you have the memory to spare. One note on making resident programs. It is ok to have data sections or data in your code sections but it can only be read and not written. The stack is commonly used for temporary storage as well as functions that allocate storage. Each program instance gets a new stack. Relocs are fine. All the relocations take place before any programs use the code. The relocs and the code locations do not change after loadseg. Last edited by matthey; 03 April 2010 at 22:56. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I'm looking for an application | Narf the Mouse | request.Apps | 33 | 27 May 2011 20:05 |
TruePub application | ami_junkie | support.Apps | 2 | 25 March 2010 04:53 |
An Hybrid application | amiga | request.UAE Wishlist | 1 | 19 January 2009 15:42 |
How about application software ? | HCF | HOL suggestions and feedback | 0 | 18 December 2004 16:25 |
WHDLoad and its application... | MethodGit | support.Apps | 42 | 26 August 2001 04:50 |
|
|