Some of you may have heard about Assemblex, which will be the best Z80 Disassembler out there when released.

Features:
> Type Hex and Convert to Assembly in almost real-time
> Save the Hex file as .txt or .hex
> Save the Assembly code as .asm
> Save both the Hex and Assembly as .txt
> Open .txt Hex files
> Edit functions: (Select All, Undo, Redo, Cut, Copy Paste, Clear)
> Tools (Hex to Decimal, Decimal to Hex, String to Hex, Hex to String)
> About box
> Displays errors such as invalid number of bytes and non-hexadecimal characters.
> Supports all opcodes for all Assembly Instructions, official and unofficial

To do:
> Support for reading .8xp files
> Support for BCall's

What I need help with:
> Support for reading .8xp files


This is a Python project, using wxPython.

Here's are the latest screenshots:

https://img.ourl.ca/rfg/Screenshot0005.png

https://img.ourl.ca/rfg/Screenshot0004.png



I will not release another version until I figure out how to read .8xp files with python. So, is there anybody who can help me with this? I'd be delighted!
Didn't we teach you how to do it on IRC yesterday...? I'm probably thinking of another discussion. Smile If you coded all the Pytohn for this, including the GUI, then congrats!
KermMartian wrote:
Didn't we teach you how to do it on IRC yesterday...? I'm probably thinking of another discussion. Smile If you coded all the Pytohn for this, including the GUI, then congrats!


Of course I coded the 600 lines of code of this program, I don't really steal code ... Very Happy All by myself, with some help on Assembly.

EDIT: I just made a .8xp reader, code of my own, I decided to start something from scratch.

Now, my doubt its, which bytes correspond to title, size and the program itself?


Code:
2a2a54493833462a
1a0a0046696c6520
67656e6572617465
6420627920576162
6269745369676e00
0000000000000000
00000000001b000d
000a000653494d50
4c45000000000a00
0800bb6d21140023
23c96504


This code stands for this program:


Code:
#include "ti83plus.inc"
.org 40339
.db t2ByteTok, tAsmCmp

   ld hl,20
   INC hl
   INC hl
   ret


Any ideas of what in the first code is size, name and data? Thanks.
This can tell you the structure of a .8xp file.
It's not stealing if you use others' code for reference, as long as you credit the original author(s) properly, just as you did in some of your explorations with tokenization. Smile
@souvik, thanks much! Everything is in there Very HappyVery Happy

@Kerm: Yeah, I read merth's XML files and ti83plus.inc to find out more about Tokenization Smile
ScoutDavid wrote:
@souvik, thanks much! Everything is in there Very HappyVery Happy

@Kerm: Yeah, I read merth's XML files and ti83plus.inc to find out more about Tokenization Smile
You had also found various fragments of tokenization code out on the internet and tried to apply them though, no? Also, Souvik beat me to the informational link I wanted to share. Smile
Good news: I have successfully disassembled a .8xp file!!!!!

However, for debugging stuff, I need to know what the correct header of an assembly file is... I was using this:


Code:
#include "ti83plus.inc"
.org 40339
.db t2ByteTok, tAsmCmp
Oh god, that stupid .org 40339. Protip: Assembly labels/memory locations are almost ALWAYS in hexadecimal. It's $9d93, or $9D93, or $9D95-2 to be perfectly accurate. We also usually write it as .db $BB,$6D, but that line is fine. And yes, that's more or less the correct header for most circumstances.

Code:

nolist
include "ti83plus.inc"
list

db BBh, 6Dh
Start:
 
  ret


This?
Don't forget the .org statement if you are actually writing the program. It would be better as:
Code:
nolist
include "dcs7.inc"
list

.org 9D93h
Start:

 ret
Wink
dcs7.inc excludes the need of ti83plus.inc?
I was just kidding, use whatever you want. I think to use both it's:
Code:
nolist
include "ti83plus.inc"
include "dcs7.inc"
list
That is only if you are going for DCS though, so it's your choice.
_player1537 wrote:
I was just kidding, use whatever you want. I think to use both it's:
Code:
nolist
include "ti83plus.inc"
include "dcs7.inc"
list
That is only if you are going for DCS though, so it's your choice.
You want both, because dcs7.inc, for the sake of simplicity, relies on some of the definitions in ti83plus.inc instead of trying to redefine everything in ti83plus.inc. Smile
We were talking in IRC about bcalls and .db statements. Bcalls are really "rst 28h \ .dw Adress". So that if you "bcall 1", in hexadecimal, it is EF0100. And my thoughts in regards to the .db statements are this: have a seperate tab for the completely final code, and then you show the original two tabs you have and people highlight and copy the parts they want so that when you copy it to the main code, it removes it from both the hexadecimal side and the ASM side. That way you can choose which parts should be data and which should be actual code. ScoutDavid is, of course, able to choose what he wants to do, and I'm not forcing him Smile
www.davidgom.co.cc/Assemblex0003.zip

Well, here it is, the third build!

Features:
> Disassembles a .8xp file (pre-beta stage, working more or less)
> You can type Hexadecimal code and it'll be converted to Assembly code in almost real time
> Convert decimal to hexadecimal
> Convert hexadecimal to decimal

> Edit menu:
>> Select All
>> Undo
>> Redo
>> Copy
>> Cut
>> Paste
>> Clear
>> Number of Words
>> Find and Replace

> New Menu
>> New
>> Open a hex file (.txt, .hex)
>> Save Asm (.txt, .asm)
>> Save HeX (.txt, .hex)
>> Save Asm and Hex (.txt)
>> Exit


> Convert Menu
>> Convert
>> Disassemble File

> Tools Menu
>> Decimal to hexadecimal
>> Hexadecimal to decimal

> Help Menu
>> About



Please download and tell me what you think, it's a 5 MB .zip folder, and will be 15mb folder when unzipped. It's not large, very small actually.


The file is Assemblex.exe, but you need to unzip all of the files.

The bold things are the new things since the last build
Would I be correct in assuming that the bolded things are the features that are complete? Also, it shouldn't be 15MB, you've definitely packaged in something that you don't need to.
KermMartian wrote:
Would I be correct in assuming that the bolded things are the features that are complete? Also, it shouldn't be 15MB, you've definitely packaged in something that you don't need to.


It's a .exe, made with py2exe, and py2exe adds a few stuff, so it's what py2exe adds, the .py file is 48KB, though.

The bold things are the new things since the last build

Anybody already tried?
Why py2exe it, then? I didn't bother doing that for BinPac8x because of how wasteful it would be.
Kerm: Not all of us have Python. And not everybody who has python has wxPython...

Kerm, have you tried it?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page 1, 2, 3, 4, 5, 6  Next
» View previous topic :: View next topic  
Page 1 of 6
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement