| ??? 08/06/01 15:43 Read: times |
#13862 - RE: Intel ASM51 and RL51 Help!!!!!!! |
Hi Sanjeev,
I'm really confused, you tell _distance was a function, but you declare it as data (EXTRN DATA) ??? Following the generates assembler code of X.C51 and Y.C51. X.C51 use an external function and external data, which both are given from Y.C51
================================
; X.SRC generated from: X.C51
NAME X
?PR?test?X SEGMENT CODE
EXTRN CODE (ext_func)
EXTRN DATA (ext_val)
PUBLIC test
; #pragma src
;
; extern char data ext_val;
;
; extern void ext_func(void);
;
;
; void test( void )
RSEG ?PR?test?X
USING 0
test:
; SOURCE LINE # 8
; {
; SOURCE LINE # 9
; ext_func();
; SOURCE LINE # 10
LCALL ext_func
; ext_val++;
; SOURCE LINE # 11
INC ext_val
; }
; SOURCE LINE # 12
RET
; END OF test
END
===========================
; Y.SRC generated from: Y.C51
NAME Y
?PR?ext_func?Y SEGMENT CODE
?DT?Y SEGMENT DATA
PUBLIC ext_val
PUBLIC ext_func
RSEG ?DT?Y
ext_val: DS 1
; #pragma src
;
; char data ext_val;
;
; void ext_func(void)
RSEG ?PR?ext_func?Y
USING 0
ext_func:
; SOURCE LINE # 5
; {
; SOURCE LINE # 6
; ext_val++;
; SOURCE LINE # 7
INC ext_val
; }
; SOURCE LINE # 8
RET
; END OF ext_func
END
============================
Peter |
| Topic | Author | Date |
| Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
| RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 | |
RE: Intel ASM51 and RL51 Help!!!!!!! | 01/01/70 00:00 |



