English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 19 May 2010, 14:41   #1
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
Proper startupcode in asm?

Is there such a thing as a 100% proper startupcode that makes your programs work both from shell/Workbench?
I've seen a few during the years and the current one I'm using is working the best. However, it locks asm-one when I run the code so I can only use it when I'm compiling exe's.

Are there better ways of doing this? I've attached the startupcode I'm using (don't know where I got it, it was along time ago)..
Attached Files
File Type: s ProperStartup_01.s (1.3 KB, 203 views)
oRBIT is offline  
Old 19 May 2010, 15:19   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by oRBIT View Post
However, it locks asm-one when I run the code so I can only use it when I'm compiling exe's.
Use a newer ASM-One version (or ASM-Pro) and you won't have this problem any longer.
StingRay is offline  
Old 19 May 2010, 15:24   #3
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
Just tried with 1.49RC2 but still same issue.
oRBIT is offline  
Old 19 May 2010, 15:28   #4
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Tried it with ASM-One 1.48 and ASM-Pro 1.16d, no problems. Only tried it with my very own "RunWB" code though but I don't think yours will be much different. Will check later.

Edit: checked your code and as expected it is not much different to mine. I checked my ASM-One/Pro settings now, I have the "Parameters" checkbox ticked, I guess this is what did the trick. Try if that helps.
StingRay is offline  
Old 19 May 2010, 16:08   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
Quote:
Code:
		jsr	-378(a6)		;_LVOReplyMsg(a6)
					        ; ***** This line was missing from
  	                                        ; previous articles!!!! **********
		jsr	-138(a6)		;_LVOPermit(a6)
Does the note mean Permit() or ReplyMsg()? AFAIK missing Permit() is correct because it prevents WB from doing any deallocations too early (before task is completely killed by exec).
Toni Wilen is offline  
Old 19 May 2010, 16:16   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
I don't call Permit in my own WB startup for that reason, and it's exactly what Commodore state in their docs.
Leffmann is offline  
Old 19 May 2010, 16:20   #7
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
Quote:
AFAIK missing Permit() is correct because it prevents WB from doing any deallocations too early (before task is completely killed by exec).
Yes, Permit must not be called after reply of the message, because Workbench will free resources which are still used by the task. After ReplyMsg the program should just fall through to the end of the task.

I think I posted proper startup code here: http://eab.abime.net/showpost.php?p=664723&postcount=18
thomas is offline  
Old 19 May 2010, 18:36   #8
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
My "Parameters" was already checked.
oRBIT is offline  
Old 19 May 2010, 18:53   #9
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
Quote:
Originally Posted by oRBIT View Post
However, it locks asm-one when I run the code so I can only use it when I'm compiling exe's.
When you run a program from Asm-one, it probably runs in the context (process) of Asm-one. This means you need to run Asm-one from the shell, because if you run it from Workbench, your program checks whether the process was created by Workbench and then Wait()s for a message which never appears (the message has already been received by Asm-one).
thomas is offline  
Old 19 May 2010, 20:16   #10
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
If that's the problem, how come Stingray could run it?
Photon is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the proper configuration for The Bard's Tale? Lotus Gramarye support.WinUAE 4 27 April 2012 15:18
Proper HD and WinUAE Macca support.WinUAE 54 14 August 2007 07:43
cdtv proper configuration truestep New to Emulation or Amiga scene 5 19 July 2007 15:54
KICK OFF 2 v1.4e - A proper crack manicx Games images which need to be WHDified 0 07 December 2002 15:52
Proper crack of One step beyond Drake1009 request.Old Rare Games 6 04 March 2002 14:27

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:54.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12034 seconds with 16 queries