We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, A C function tries to call a assembly function via the interfacing way of c programs-to-assemnly interface. Founded it's failed and can't use step-into to watch the status of assembly function. The codes is as follows. Please give some comments for the issue. Tks!
The codes in C.
BYTE show1[3] ={0x0ff,0x02,0x03}; BYTE t_dat[3]; #pragma NOREGPARMS int wrxdata( BYTE *pDs, /* R1-R3*/ BYTE *pSr /*Fixed memory*/ ); main(){ wrxdata(&t_dat[0], &show1[0]); }
The assembly function.
NAME LB_LIBRARY ?PR?_WRXDATA?LB_LIBRARY SEGMENT CODE ?PD?_WRXDATA?LB_LIBRARY SEGMENT DATA OVERLAYABLE PUBLIC _WRXDATA, ?_WRXDATA?BYTE RSEG ?PD?_WRXDATA?LB_LIBRARY ; Segment for local variables ?_WRXDATA?BYTE: ; Start of the parameter passing seg pSr: DS 2 ; byte pointer variable: pSr pDs: DS 2 ; Additional local variables from 'function' RSEG ?PR?_WRXDATA?LB_LIBRARY ; Program segment _wrxdata: MOV DPTR,#?_WRXDATA?BYTE+0 MOVX A,@DPTR MOV DPTR,#?_WRXDATA?BYTE+2 MOVX @DPTR,A RET ; Return END
"Founded it's failed and can't use step-into to watch the status of assembly function"
'Step-into' is a good debugging tool implemented to figure out what is happening in the program, thats alllright, as long as you dont need an excuse to step-into.
Tks,