diff options
-rw-r--r-- | emma.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -619,7 +619,9 @@ static void DoLabel(int no, const char *arg[]) if (no<2) { - Log("Missing arguments\n"); + for(f=0;label && label[f].label;f++) + printf("%-20.20s = %8.8x\n",label[f].label,label[f].address); + return; } @@ -894,7 +896,7 @@ static void Run(char *cmd) int use_last=FALSE; int no; - if (cmd[0]!='\n') + if (cmd[0] && cmd[0]!='\n') { strcpy(buff,cmd); } @@ -1120,12 +1122,14 @@ int main(int argc, char *argv[]) if ((line=readline("EMMA> "))) { + Run(line); + if (line[0]) { - Run(line); add_history(line); - free(line); } + + free(line); } else { |