English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 08 June 2009, 15:47   #1
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
AsmPro sources question(s)

Hi

Some days ago I looked into AsmPro sources ( v 1.17 ) and I find something which I don't understand. At lines 363-364 (ASMPro.s )there is

Code:
	move.l	4(sp),d0
	MOVE.L	D0,StackSize
Maybe someone can answer when/why (4,sp) contains "stack size".
As I know when program starts from CLI then I can obtain stack size from pr_StackSize. Maybe there is a bug in ASMPro.s ???

edit:
After analyzation of AsmPro.s I think that above sp point to sp obtained at begin of source. I think. Maybe it's kind of trick used in kick1.3 or something. I've no idea.
Regards

Last edited by Asman; 08 June 2009 at 15:53. Reason: update2
Asman is offline  
Old 08 June 2009, 16:02   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Asman View Post
Hi

Code:
    move.l    4(sp),d0
    MOVE.L    D0,StackSize
Maybe someone can answer when/why (4,sp) contains "stack size".
Stacksize is a commandline parameter so it probably just restores the parameter with the 4(sp),d0. Didn't check the source though.

Quote:
Originally Posted by Asman View Post
Maybe there is a bug in ASMPro.s ???
One bug? Make that "shitloads of bugs"!
StingRay is offline  
Old 08 June 2009, 16:15   #3
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Quote:
Originally Posted by StingRay View Post
Stacksize is a commandline parameter
Ohhh....Thanks a lot for that information I didn't know that.

Regards
Asman is offline  
Old 09 June 2009, 11:29   #4
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Quote:
Originally Posted by StingRay View Post
Stacksize is a commandline parameter so it probably just restores the parameter with the 4(sp),d0. Didn't check the source though.
Clarification.
I checked this again, with basm debugger and read docs ( AmigaDOSManual.guide ) about initial environment in assembler ( When you load a program under a Shell ) and .... (4,sp) contains size of the stack in bytes.

Regards

Last edited by Asman; 09 June 2009 at 12:12. Reason: update2
Asman is offline  
Old 09 June 2009, 11:47   #5
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Watcha Asman. Hope you're well.

Quote:
Originally Posted by Asman
(4,sp) contains size of the stack in bytes.
Good to know, cheers.
pmc is offline  
Old 09 June 2009, 12:18   #6
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Hi pmc,

For clarification. I talking about situation when you load a program under a Shell then (4,sp) contains size of the stack in bytes. I don't know what happen with sp when program started from WB.

cheers

Last edited by Asman; 09 June 2009 at 12:19. Reason: update2
Asman is offline  
Old 12 June 2009, 23:45   #7
Wepl
Moderator
 
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 873
there are more values (registers/stack) which have defined values when started from cli, most of them are required to run bcpl programs. also some compilers use them for their startup code (e.g. manx).
you can find infos in the guru book from ralph babel about this.
Wepl is offline  
Old 03 September 2010, 11:24   #8
CmdrVimes
Badge 177
 
CmdrVimes's Avatar
 
Join Date: Aug 2010
Location: Mirfield / UK
Posts: 77
Quote:
Originally Posted by StingRay View Post
SOne bug? Make that "shitloads of bugs"!
That's interesting. Can I ask which ASM dev apps you would recommend?
CmdrVimes is offline  
Old 03 September 2010, 11:35   #9
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Sting will only recommend AsmOne and AsmPro cos he knows what all the bugs are and how to work round them and loves the software.

I also think they're excellent in that they have very useful functions - especially for writing binaries and writing to disk etc. but I prefer Devpac for the actual assembling of my code.

I write the code in Ultraedit on PC though - can't be using Amiga assembler's editors now that I'm used to a more modern text editor I'm afraid.
pmc is offline  
Old 03 September 2010, 11:48   #10
CmdrVimes
Badge 177
 
CmdrVimes's Avatar
 
Join Date: Aug 2010
Location: Mirfield / UK
Posts: 77
@pmc
Yeah, I am just having a look at Devpac myself. It is probably worth me pointing out that I know sod all assembler. The last time I looked at any was back at university - we had a 68k module on the course and a lab full of Atari ST1040s to code on. That was far too many years ago though.

Please Note: I may ask some really stupid/obvious questions. You have been warned.
CmdrVimes is offline  
Old 03 September 2010, 11:50   #11
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
No worries man - there are no stupid questions.

The coding forums are here, so ask away.
pmc is offline  
Old 03 September 2010, 11:57   #12
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by CmdrVimes View Post
That's interesting. Can I ask which ASM dev apps you would recommend?
As PMC said, I'd recommend AsmOne/Pro since despite the bugs it's a very convenient package. Also, for a beginner it is perfect (IMHO of course) since it is very easy and fast to use. And it handles the "simple" things quite well, i.e. you'll only experience bugs when you start more complex stuff.
StingRay is offline  
Old 03 September 2010, 12:05   #13
CmdrVimes
Badge 177
 
CmdrVimes's Avatar
 
Join Date: Aug 2010
Location: Mirfield / UK
Posts: 77
@StingRay
Any input from you more experienced coders is welcome.

On a sort of slightly connected note, I wonder if one of you can point me in the right direction here. I am running my stuff on a WinUAE emulated A1200 and everything seems to be ok except that the keyboard mappings are a bit off.

I don't know if this is a problem with WinUAE, the setup of the A1200 or specific to AsmPro but it's a bit annoying pressing the ' # ' key and getting the ' | ' symbol.

If there is a proper thread for this then I apologise in advance - I'll quite happily move this if you can tell me where it should go.
CmdrVimes is offline  
Old 03 September 2010, 12:21   #14
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
I'm no Workbench expert but can't this be sorted with some kind of software keyboard map in the startup sequence or something...? Setmap is it...?
pmc 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
Simple way to display a pic with Asmpro ? Foul Coders. Asm / Hardware 13 21 November 2018 09:18
ASMPro info bar thingy bodhi Coders. Asm / Hardware 3 29 July 2013 10:43
AsmPro copse Coders. Asm / Hardware 4 25 April 2012 11:41
AsmPro CmdrVimes Coders. General 5 01 September 2010 12:40
Why nobody continue Asmone/AsmPro development ? kamelito Amiga scene 16 25 March 2007 15:08

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 22:02.

Top

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