Thanks for that! I do not know why I keep put '{' instead of '(' when defining hash constants :-) That will create an unnamed hash inside the real one, so that's why you had that strange message -- I am not sure why was that ok for me. So it should work like this: use constant ( # states for loading INC files INC_NOTHING => '-nothing-', INC_REGFILES => 'RegFiles', ); Will change it anyway :-) 2. The recognition of retlw and goto tables are very good idea, will work on it. Forgot to mention how to use it but presumably you had been figured it out already: > unPIC.pl p16xxx.inc yourhexfile.hex > yourasmfile.asm So that if you choose the correct INC file it has a chance to determine register files. Are all the register files were reversed correctly? Thanks, Tamas On 14/07/06, Maarten Hofman wrote: > > 1) I had to change your code a bit, because it otherwise gave a strange > error message ([error] Constant name 'HASH(...)' has invalid characters). > I > changed the: > > use constant ({ INC_NOTHING => '-nothing-', > INC_REGFILES => 'RegFiles', > }) > > Into: > > use constant INC_NOTHING => '-nothing-'; > use constant INC_REGFILES => 'RegFiles'; > > And then it worked fine. > > 2) You should probably recognize a sequence of retlw statements as a > table, > the way it looks now, with a comment before each retlw, makes it difficult > to see what is actually happening. > > 3) Similar with a series of gotos: that would be a jumptable. You could > even > change the labels of that to read "jumptable_<>" if you want to. > > In general, I think it looks good... Not that my code becomes more > readable > with it, but it seems to do the job of disassembling. > > Greetings, > Maarten Hofman. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist