From: SourceForge.net <no...@so...> - 2003-01-13 23:00:33
|
Bugs item #667458, was opened at 2003-01-14 00:02 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=667458&group_id=599 Category: ds390 target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bernhard Held (bernhardheld) Assigned to: Nobody/Anonymous (nobody) Summary: ds390: b destroyed while using dual-ptr Initial Comment: Model ds390: #include <stdarg.h> #include <stdio.h> static bit string_flag =0; static char * data str ; void printf_small (char * fmt, ... ) reentrant { char c; va_list ap ; va_start(ap,fmt); for (; *fmt ; fmt++ ) { if (*fmt == '%') { fmt++; if (string_flag) { str = va_arg(ap, char *); while (*str) *str++; continue ; } while ((c = *str++) != '\0') ; } else putchar(*fmt); } } ; b.c:14: for (; *fmt ; fmt++ ) ; genAssign mov a,_bpx clr c subb a,#0x08 mov b,a mov a,_bpx+1 subb a,#0x00 mov dpx,#0x40 mov dph,a mov dpl,b ; &fmt in dpx,dph,dpl ; genAssign: resultIsFar = FALSE movx a,@dptr mov r6,a inc dptr movx a,@dptr mov r7,a inc dptr movx a,@dptr mov r0,a inc dptr movx a,@dptr mov r1,a ; fmt in r1,r0,r7,r6 ; genPointerGet ; genGenPointerGet mov dpl,r6 mov dph,r7 mov dpx,r0 mov b,r1 ; fmt in b,dpx,dph,dpl mov a,_bpx ; temp. storage for *fmt ? clr c subb a,#0xF6 ; prepare &sloc2 mov b,a ; ####### destroy b ######## mov a,_bpx+1 subb a,#0xFF mov dpx1,#0x40 mov dph1,a mov dpl1,b ; &sloc2 in dpx1,dph1,dpl1 lcall __gptrget mov dps,#1 movx @dptr,a ; sloc2 = *fmt; mov dps,#0 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=667458&group_id=599 |