__main__.py 1.1 KB

12345678910111213141516171819202122232425262728
  1. """
  2. Copyright (c) 2015-2017, 2020-2021, 2024 by Rocky Bernstein
  3. Copyright (c) 2000 by hartmut Goebel <h.goebel@crazy-compilers.com>
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  15. NB. This is not a masterpiece of software, but became more like a hack.
  16. Probably a complete rewrite would be sensefull. hG/2000-12-27
  17. """
  18. import sys
  19. from xdis.disasm import disassemble_file
  20. if __name__ == "__main__" and len(sys.argv) > 1:
  21. for path in sys.argv[1:]:
  22. disassemble_file(path, sys.stdout)