@@ 7,6 7,7 @@ Channel* clk;
enum {
Lclk,
Lpc,
+ Ltext,
};
typedef struct Lfid Lfid;
@@ 55,6 56,9 @@ fsread(Req *r)
case Lpc:
readstr(r, smprint("%x\n",reg[R_PC]));
break;
+ case Ltext:
+ readbuf(r, memory, sizeof(u16int) * MEMORY_MAX);
+ break;
}
respond(r, nil);
return;
@@ 90,5 94,6 @@ newfs(void)
fs.tree = tree;
createfile(tree->root, "clk", nil, 0644, lfidgen(Lclk));
createfile(tree->root, "pc", nil, 0644, lfidgen(Lpc));
+ createfile(tree->root, "text", nil, 0644, lfidgen(Ltext));
threadpostmountsrv(&fs, "lc3fs", mtpt, MREPL | MCREATE);
}
@@ 252,7 252,6 @@ threadmain(int argc, char* argv[])
int running = 1;
while (running)
{
- print("%d\n", (int) steps);
if(mtpt && steps == 0)
steps += recvul(clk);
// fetch instruction