Discussion in "Project Addition or Changes" started by    Utsavi    Jun 6, 2017.
Tue Jun 06 2017, 11:59 AM
#1
Hello,

I am using PXAG-49. I am using Tasking EDE which uses c166 compiler.

In project I have 2 different files one is in c and one is in assembly. The assembly code I placed on address 0F000H like., ORG 0F000H.

In c file i am running my mail program. On certain condition I want to jump on address 0F000H address. Can anybody tell me how to jump on this address in C.

I tried to write like.

#pragma asm
JMP 0F000H
#pragma endasm

with successfully compiled, on the otherside in asm program ,I placed debug point in my asm program that showing me program not jumping on this address.

Regards
Utsavi Bharuchwala


[ Edited Tue Jun 06 2017, 12:16 PM ]
Tue Jun 06 2017, 10:16 PM
#2
to jump from c its better to use function pointers e.g.

/* define a pointer */
void (*fptr)(void);
/* assign address */
fptr = 0xF000;
/* then jump */
fptr();
Wed Jun 07 2017, 05:47 AM
#3
Hi Ajay,

Thanks for reply. I tried your code. But that is not working for me.It seems like program is reseting itself.

Any other suggestions?

Regards
Utsavi Bharuchwala
Wed Jun 07 2017, 11:44 PM
#4
I suggest you write a very simple program.. just a few lines of C and assembly.
Then look at the lst file / map and see what code was actually created.
Is a jump what you want or a call ?

Thu Jun 08 2017, 05:44 PM
#5
I think what phil has suggested is correct, you need to first check if you code is getting linked properly or not. what IDE are you using?
Mon Jun 12 2017, 10:46 AM
#6
Hello

Thanks for quick reply.

Yes I am able to jump on absolute address using JMP instruction.

Problem is when I am merging my 2 files(.c ->main file, .asm->Work defined file) JMP is not working for this case.

Both files are compiled by Tasking EDE

Note that .asm file start at ORG 0F000H.

Why it is so?

Regards
Utsavi Bharuchwala

Mon Jun 12 2017, 09:43 PM
#7
Your 'c' file and your assembly file are created at different times then linked.
It may be that your assembly file is not actually being created.
The problem comes at the linking stage, it is often complicated and will
be different for each compiler/IDE.
I would avoid it like the plague !
Try to use in-line assembly or re-write your assembly code in 'c'.


[ Edited Tue Jun 13 2017, 05:41 PM ]

Get Social

Information

Powered by e107 Forum System

Conversation

ExperimenterUK
Wed Jul 26 2017, 07:51 PM
Please post questions in the forum, the chat box is for chat
msd007
Wed Jul 26 2017, 11:27 AM
i need code if any one have aduc706 interfacing lcd 16*2
msd007
Wed Jul 26 2017, 11:26 AM
pl help me how to write code of interfacing ADuc7026 controlleo lcd pl any one help me hoe to initializend configure the direction
rammichael
Wed Jul 26 2017, 06:04 AM
can you explain what is timer and how to use their modes ...
rammichael
Wed Jul 26 2017, 06:03 AM
ExperimenterUk thank you for your quick reply okay
ExperimenterUK
Wed Jul 26 2017, 01:43 AM
rammichael & Sarvn We will help,but mainly by answering questions about problems.
rammichael
Tue Jul 25 2017, 10:59 AM
i want few tips to learn to become an expert in embedded systems ...?anybody is there to help me?
Sharmi
Sun Jul 23 2017, 04:13 AM
Sir, I wants to make a digital clock with RTC using AT89C51 or AT89C2051 and seven segment led. Sir will u help me?
Sarvn
Sat Jul 22 2017, 11:42 AM
I wnt to learn embedded could anyone help me
Sarvn
Sat Jul 22 2017, 11:41 AM
Hi

Downloads

Comments

msd007
Wed Jul 26 2017, 11:23 AM
hmn16
Wed Jul 26 2017, 01:04 AM
rammichael
Tue Jul 25 2017, 07:12 AM
Rohanmore26
Tue Jul 25 2017, 04:26 AM
AlFaller
Mon Jul 24 2017, 02:31 PM
Sarvn
Sat Jul 22 2017, 11:34 AM
diablom
Fri Jul 21 2017, 01:44 PM
Alihaider.007
Thu Jul 20 2017, 03:07 PM

Online

Guests: 44, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37866
Newest member: msd007
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 26 2017, 07:35 PM
A byte such as 0xfa will not pass through the sys...
hmn16 Avatar
Posted By hmn16
Wed Jul 26 2017, 01:08 AM
Hello, I am current;y trying to send a hexadecimal...
Rohanmore26 Avatar
Posted By Rohanmore26
Tue Jul 25 2017, 04:29 AM
Hello I want to know How 3D stitching of 2 3D imag...
AlFaller Avatar
Posted By AlFaller
Mon Jul 24 2017, 02:40 PM
Here is a lot information about using virtual COM ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Jul 20 2017, 04:08 PM
can it be possible ?? Alihaider.007No.You will nee...
Alihaider.007 Avatar
Posted By Alihaider.007
Thu Jul 20 2017, 03:14 PM
Sir I am using AT89S8253 I have trying to use this...
Utsavi Avatar
Posted By Utsavi
Mon Jul 17 2017, 09:57 AM
Hello Ajay_Bhargav,Thanks for your reply. Yes, you...
ajay_bhargav Avatar
Posted By ajay_bhargav
Mon Jul 17 2017, 06:41 AM
I do not think it would be a good idea to kind of ...
ajay_bhargav Avatar
Posted By ajay_bhargav
Mon Jul 17 2017, 06:32 AM
Tasking EDE has linker script facility available y...
Ramweit Avatar
Posted By Ramweit
Thu Jul 13 2017, 06:58 AM
Thank you for response,Sim300 gsm Modem am using h...