View previous topic :: View next topic
|
Author |
Message |
girishms
New User
Joined: 06 Jun 2008 Posts: 21 Location: chennai
|
|
|
|
Hi all...
here is my problem. I have a LE asm program, which attaches a LE driver. Each time this driver is attached i am passing diff parameter to it. This driver is a single program, which i am attaching 4 times continuously with diff parameter each time. But the problem is, after i do all attaches, the first attach waht i did is taking the parameter passed for the last attach. same is the case with the 2nd and third attaches. For ex.. for the first attach i want to pass a name T1, for 2nd attach T2 and so on... but after i continuously attach 4 times with diff paramater, each attached driver is taking parameter as T4, i mean the last one..
Can anybody help me out in this?? may be some problem with register values...
Thanks,
Girish |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi girishms !
Perhaps it would come out more clearly, what you want do to, if you just
put your coding here.
Normaly R15 is pointing to the EntryPointLocation of the SubProgramm, R14 is pointing to the next instruction after return of SubProgramm, and R1 has the adress of the adress of the ParameterList. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
As Gerry Carroll told in an other post about this handling:
Here 3 parameters are passed to a SubProgramm. The last parameter
has the HighOrderBit, so the called programm gets the correct end of the
ParameterList. Also as you could see, R1 has the adress of the adress of the Parameter.
L R1,=A(FIRST)
ST R1,PARM1
L R1,=A(SECOND)
ST R1,PARM2
L R1,=A(THIRD)
ST R1,PARM3
OI PARM3,X'80'
L R1,=A(PARMLIST)
CALL NEXTPROG
PARMLIST DS 0F
PARM1 DS F
PARM2 DS F
PARM3 DS F |
|
Back to top |
|
|
girishms
New User
Joined: 06 Jun 2008 Posts: 21 Location: chennai
|
|
|
|
Hi,
i am doing ATTACH.... not call... |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Oh f***, seams that i'm not really back on earth at this time, sorry.
So here's the link to an article which could help you.
Assembler Issue |
|
Back to top |
|
|
girishms
New User
Joined: 06 Jun 2008 Posts: 21 Location: chennai
|
|
|
|
Thanks |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
is there any business reason to do Your own private multitasking ??
seldom or rather never met one
IMWTK |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Sorry, the post was not totally clear to me, so this is sort of a guess...
The ATTACH creates an asynchronous task. The main routine keeps going while the attached program is started. It probably tries to attach another task before the first attached task completes.
When you attach a program, you pass in the address of a variable. When you attach a second program, you pass in the address of a variable.
Each attached program needs its own parameter variable! You cannot use the same variable for all subtasks because all they see is the address of the parameter, not the content. If the caller changes the content between the first and second attach, it affects them both (its is the same address). |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
FYI. I doubt you really want an ATTACH. I think you should use the LINK macro. |
|
Back to top |
|
|
|