Author Topic: [Project]Assemblex  (Read 18792 times)

0 Members and 1 Guest are viewing this topic.

SirCmpwn

  • Guest
Re: [Project]Disassembler in Python
« Reply #15 on: December 28, 2010, 02:07:13 pm »
Could its functionality be exported to a library, where it takes hex input in a method and spits out asm?
« Last Edit: December 28, 2010, 02:07:51 pm by SirCmpwn »

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: [Project]Disassembler in Python
« Reply #16 on: December 28, 2010, 02:08:13 pm »
Ah.

I actually have some Python code that should retrieve the data from an .8x* variable:

Code: [Select]
def get8xdata(filename):
"""Opens a TI-8x data variable and returns a tuple of its internal name and of its data"""
try:
file = open(filename, 'rb')
except:
print "Can't open file: ", filename
raise IOError

output = file.read()
file.close()
end = len(output) - 2
data = output[72:end]
name = output[60:68]
return data, name

Not entirely certain if the data retrieval works (the name retrieval does), but the data should begin at index 72. (If it doesn't you can just change that number).



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Project]Disassembler in Python
« Reply #17 on: December 28, 2010, 02:08:24 pm »
Yup, but in C# you mean, right?

SirCmpwn

  • Guest
Re: [Project]Disassembler in Python
« Reply #18 on: December 28, 2010, 02:10:41 pm »
Or VB, I guess.

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: [Project]Disassembler in Python
« Reply #19 on: December 28, 2010, 02:12:18 pm »
What about IronPython?

http://ironpython.net/

It's Python integrated with the .NET framework. You can use a Python module (script/library) from a C#/VB program using IronPython.



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Project]Disassembler in Python
« Reply #20 on: December 28, 2010, 02:12:19 pm »

SirCmpwn

  • Guest
Re: [Project]Disassembler in Python
« Reply #21 on: December 28, 2010, 02:13:47 pm »
Vb does suck :P but if IronPython compiles to CIL and doesn't require python on the user's machine, go for it.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Project]Disassembler in Python
« Reply #22 on: December 29, 2010, 01:54:24 am »
I already made all instructions in primary table work. I am only having issues with other tables :S

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Project]Disassembler in Python
« Reply #23 on: December 29, 2010, 07:39:56 pm »
It's too bad that I have to double post, this is not getting that much attention.

Maybe that's because there was something called... lack of program?

Here it is, a beta  :w00t: :w00t: :w00t: :w00t: :w00t:

Features:
> ALL instructions, all of them, official and unoffical, all those: www.davidgom.co.cc/z80table.html;
> 2 Errors as message boxes: "Invalid input byte numbers" and "Non-Hexadecimal Characters";
> It's a fast program, opened by a .exe;
> 2 text controls, multiline, one for input and one for output, output can be edited;
> Got a name, Assemblex!

To do (in order of priority):
> Accept more than one line in the input text control as for now all HEX needs to be in one line;
> Make opcodes with no associated instruction return 'nop';
> GUI Updates;
> Bug fixes that I hope you guys find.

The program is 5 megabytes and will always be 5 megabytes, even if I add 1000 lines of code  ;D


What I need you to do:
> Play with this for a while and report all bugs!
> Suggest ideas;
> Write a one sentence review to let me know how it is.




My new userbar :)

DOWNLOAD


EDIT:Just found a very problematic bug with the ED table. Fixing it, sorry.
EDIT 2: Bug Fixed

« Last Edit: December 29, 2010, 07:59:03 pm by ScoutDavid »

souvik1997

  • Guest
Re: [Project]Disassembler in Python
« Reply #24 on: December 29, 2010, 08:08:35 pm »
It is functional, but can you add an option to open a *.8xp file? Other than that, the only other thing I would like to see is that you can see the disassembly without clicking on the disassembly's text box.

Edit: Also, entering stuff like "C39D95" (jp $9D95) causes the disassembly to be "jp 38301". Could you add an option to make this hexadecimal instead of decimal?
« Last Edit: December 29, 2010, 08:10:52 pm by souvik1997 »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Project]Disassembler in Python
« Reply #25 on: December 30, 2010, 08:39:17 am »
souvik, just press TAB twice and you'll be fine, but don't worry, that'll be changed when I manage to accept multiline input.

New Update :)

www.davidgom.co.cc/Assemblex.zip

A few small bugs and added 'nop' to all instructions with no specific opcode :)

Offline Silver Shadow

  • Beta Tester
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +27/-7
    • View Profile
Re: [Project]Disassembler in Python
« Reply #26 on: December 30, 2010, 11:57:12 am »
You asked me to -1 your first post, so here you go... :P
Former Coder of Tomorrow


Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Project]Disassembler in Python
« Reply #27 on: December 30, 2010, 11:58:38 am »
YAY Thanks much, I hope I get a +10 in the next release to compensate for this :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Project]Disassembler in Python
« Reply #28 on: December 30, 2010, 11:37:26 pm »
YAY Thanks much, I hope I get a +10 in the next release to compensate for this :P
I can easily change it to -666. :P

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Project]Disassembler in Python
« Reply #29 on: December 31, 2010, 02:55:17 pm »
It is functional, but can you add an option to open a *.8xp file? Other than that, the only other thing I would like to see is that you can see the disassembly without clicking on the disassembly's text box.

Edit: Also, entering stuff like "C39D95" (jp $9D95) causes the disassembly to be "jp 38301". Could you add an option to make this hexadecimal instead of decimal?

I see, I can indeed easily add an option. I just need to know which commands (jp, for example) require that :)