blob: a0602c87826bb6b303c7a5d4ef03cb6904c3a7c1 [file] [log] [blame] [raw]
/*
* Example dynamic extension for kme
*/
#define NULL 0
extern unsigned char *mem;
typedef unsigned long ulong;
char *
format(ulong * addrp, int arg)
{
ulong faddr = *addrp;
ulong zaddr;
static char fmt[32];
for (;;)
{
if (!getmem(1))
return " \"????\" ";
if (*mem == 0)
break;
(*addrp)++;
}
zaddr = *addrp;
*addrp = faddr;
sprintf(fmt, "%d a 1+\n", zaddr - faddr);
return (fmt);
}
void
_init(void)
{
add_format("asciiz", NULL, &format, 0);
}