Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep printing last instruction #1

Open
rapiz1 opened this issue Oct 5, 2021 · 1 comment
Open

Keep printing last instruction #1

rapiz1 opened this issue Oct 5, 2021 · 1 comment

Comments

@rapiz1
Copy link

rapiz1 commented Oct 5, 2021

I ran the program with redirection like ./disasm < 1. It looks like the program won't recognize EOF and just keep printing the last instruction.

@AhsanAliUet
Copy link

I think this scenario is not covered by disasm.exe file. But you can stop printing last instruction by writing some junk line at the end of in file. For example, the in file has the following contents:

00000011
abcasjdk

By running the command ./disasm.exe < in, you will have the following:

$ ./disasm.exe < in
      13 :: nop
      11 :: addi    zero, zero, 4
    abca :: c.fsdsp (args unknown)

You can see that program has stopped at the last line. This way you can stop its execution and get your results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants