Keil™, An ARM® Company

Discussion Forum

Problem in interfacing C files withan assembly file in uVision2 IDE

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Reny Rymond
Posted
17-Jun-2006 04:16
Toolset
C51
New! Problem in interfacing C files withan assembly file in uVision2 IDE
I've tried to process the data obtained from the host(PC) (which is obtained using C code)using certain assembler functions to speed up the data transfer.I'm using CY68013A-FX2LP controller.
I did the following :

In C code(globally)
unsigned char d_low;
extern void write(void)

In assembly code
extrn DATA(d_low)
public write

cseg at 2000h

write:
mov dptr,#4000h
mov a,d_low
movx @dptr,a
ret
END

But the data I send couldn't read back correctly...Can anyone pls tell me the solution?
Read-Only
Author
Reinhard Keil
Posted
19-Jun-2006 01:00
Toolset
C51
New! RE: Problem in interfacing C files withan assembly file in uVision2 IDE
Your code looks OK to me. Remains the question: is there memory available at CODE 0x2000 / XDATA 0x4000.

Maybe this helps a bit:
http://www.keil.com/support/docs/1671.htm

Next Thread | Thread List | Previous Thread Start a Thread | Settings