Pham@HI-MULTICS.ARPA (11/25/85)
I would like to write an assembly subroutine which can access globol variables declared in C subroutine. Ex: /* This is a C subroutine */ long int L1, L2; C_sub() { extern int A_sub(); L1 = 1; A_sub(L1, L2); } * This is an Assembly subroutine module A_sub entry.p A_sub * How to declared external L1 & L2 ??? * A_sub clr.l d0 cmp.l L1,d0 beq.s done move.l #100,L2 done rts end A_sub Thank you for your help Minh Pham
Pham@HI-MULTICS.ARPA (11/26/85)
Oops! Sorry . My previous message was filled by the sdm command.
I would like to write an assembly subroutine which can access
globol variables declared in C subroutine.
Ex:
/* This is a C subroutine */
long int L1, L2;
C_sub()
{
extern int A_sub();
L1 = 1;
A_sub(L1, L2);
}
* This is an Assembly subroutine
module A_sub
entry.p A_sub
* How to declared external L1 & L2 ???
*
A_sub
clr.l d0
cmp.l L1,d0
beq.s done
move.l #100,L2
done
rts
end A_sub
Thank you for your help
Minh Pham