[HELP] Recover assembler code from .p file
[HELP] Recover assembler code from .p file
Hi everybody!
I am trying to recover the assembler code from a .p file.
I had tried with zxpclist pack,P2TXT.exe but it converts to BASIC CODE
Someone knows any application to achieve my goal???
Thanks!
Bye.
I am trying to recover the assembler code from a .p file.
I had tried with zxpclist pack,P2TXT.exe but it converts to BASIC CODE
Someone knows any application to achieve my goal???
Thanks!
Bye.
Re: [HELP] Recover assembler code from .p file
You should just be able to load the file into an emulator (EightyOne or No$ZX81) and use the debug option to list the assembler mnemonics.
But it won't be perfect, as it'll list data as assembler and also not list the code correctly if the commands are offset from where it thinks they start. Really you need to run the program and work through the disassembly extracting the code as you go.
But it won't be perfect, as it'll list data as assembler and also not list the code correctly if the commands are offset from where it thinks they start. Really you need to run the program and work through the disassembly extracting the code as you go.
Re: [HELP] Recover assembler code from .p file
I did the same with my lost sources where I had a .P
I imported the .P in ZXSPIN at 49161 (#C009), 32768 above normal loading. Then exported the disassembly to a TXT.
As stated by Bob, data is shown as code, but you can work it out.
I imported the .P in ZXSPIN at 49161 (#C009), 32768 above normal loading. Then exported the disassembly to a TXT.
As stated by Bob, data is shown as code, but you can work it out.
Re: [HELP] Recover assembler code from .p file
I have had a plan for a while now to add a disassemble on execute funtion to EO. As it executes it will build a file containing the code, and attempt to create labels for targets of jumps and calls. It will be able to work out where data areas lie as these addresses will be accessed by instructions but not themselves executed.
The only problems I can see are code paths which don't get executed very often and data which is rarely accessed. Self modifying code should be easy to spot as there will be multiple instructions located at a single address.
As with everything I post you'll have to realise that I load my plate far too heavily and rarely get time to work on things that I dream up, so this may never materialise
C
The only problems I can see are code paths which don't get executed very often and data which is rarely accessed. Self modifying code should be easy to spot as there will be multiple instructions located at a single address.
As with everything I post you'll have to realise that I load my plate far too heavily and rarely get time to work on things that I dream up, so this may never materialise
C
Re: [HELP] Recover assembler code from .p file
I think I know exactly what you mean.sirmorris wrote: As with everything I post you'll have to realise that I load my plate far too heavily and rarely get time to work on things that I dream up, so this may never materialise
C
Re: [HELP] Recover assembler code from .p file
Hi bobs!bobs wrote:You should just be able to load the file into an emulator (EightyOne or No$ZX81) and use the debug option to list the assembler mnemonics.
But it won't be perfect, as it'll list data as assembler and also not list the code correctly if the commands are offset from where it thinks they start. Really you need to run the program and work through the disassembly extracting the code as you go.
It is true, but the problem is the EightyOne shows the instruction list but It didn´t let you save it
I can not belive there not exist a Tool to save ALL memory segments in mnemonics
Hi dr beep!dr beep wrote:I did the same with my lost sources where I had a .P
I imported the .P in ZXSPIN at 49161 (#C009), 32768 above normal loading. Then exported the disassembly to a TXT.
As stated by Bob, data is shown as code, but you can work it out.
I didn´t know about the existence of ZXSPIN emulator. It seems to be the solution to my problems.
I spend time investigating it but I couldn´t open a .p file.
Can you tell me how can I do this?
Another question:
You use the option
"Tools-> Debugger..." and then "File->Save Disassembly..."
to recover the assembler code in a text file. Right?
Thanks!
Re: [HELP] Recover assembler code from .p file
Working on a tablet so I can't check it.
By heart:
On menu under file is a load binary file.
Use this to load and then export the file again.
BTW ZXspin is a spectrumemulator
By heart:
On menu under file is a load binary file.
Use this to load and then export the file again.
BTW ZXspin is a spectrumemulator
Re: [HELP] Recover assembler code from .p file
Now on a laptop. Above is OK for loading.dr beep wrote:Working on a tablet so I can't check it.
By heart:
On menu under file is a load binary file.
Use this to load and then export the file again.
BTW ZXspin is a spectrumemulator
Saving through
tools, debugger
then file, save disassembly and enter filename with start and length (length unknown, use 16384)
Re: [HELP] Recover assembler code from .p file
I had success with the Vb81_XuR.exe emulator
http://zx81.vb81.free.fr/
LOAD ""
Click Pause icon on Toolbar to Freeze CPU
Select .P file
Disassemble .P file that has not run in BASIC
LIST INFO FILE $4009 to End of .p file + $0F -> FILENAME.LIST.TXT
TAS FILE $4082 to End of .p file + $0F -> FILENAME.TAS.TXT
STRINGS FILE $4082 to End of .p file + $0F -> FILENAME.STRINGS.TAS.TXT
TAS DATA FILE $4082 to End of .p file + $0F -> FILENAME.DATA.TAS.TXT
Regards,
Derek
North Sydney, Australia
http://zx81.vb81.free.fr/
LOAD ""
Click Pause icon on Toolbar to Freeze CPU
Select .P file
Disassemble .P file that has not run in BASIC
LIST INFO FILE $4009 to End of .p file + $0F -> FILENAME.LIST.TXT
TAS FILE $4082 to End of .p file + $0F -> FILENAME.TAS.TXT
STRINGS FILE $4082 to End of .p file + $0F -> FILENAME.STRINGS.TAS.TXT
TAS DATA FILE $4082 to End of .p file + $0F -> FILENAME.DATA.TAS.TXT
Regards,
Derek
North Sydney, Australia
1985: ZX Spectrum+ 48K Interface 1 ZX81 16KB ASZMIC/SP ROM Philips 12" B/W TV Epson Dot Matrix Printer ZX Printer
Now: Late 2012 iMac 27" 3.4GHz i7 16GB RAM OS X 10.10.4 1TB Fusion Drive USB 3 HDs Ext iPad Air 32GB iPhone 6 64GB Apple TV v2
Now: Late 2012 iMac 27" 3.4GHz i7 16GB RAM OS X 10.10.4 1TB Fusion Drive USB 3 HDs Ext iPad Air 32GB iPhone 6 64GB Apple TV v2
Re: [HELP] Recover assembler code from .p file
Hi,
"I'm Happy !!!"
Or binary "*.BIN" the right icon "Load/Save/export binnary...", to export or import binary as is.
Only the selected code will be write (listview contant), select de good REM number in the line selector, or change and refresh the upper and lower address.
In a text format, just type SAVE"MYPR.TXT" in the ZX81 editor. (".TXT" will redirect the emulator to a text file, not to a 'P' file)
You can select a DECimal format too... (Basic tools frame)
It will write a text file using the Vb81 (ZxBASIC) text format.(in selected path, last selected P path)
1 REM [HEX:00,1F,3D,3D]
Note: the TXT file can be reloaded using the "Files selector" frame (As is)
Vb81 XUR updated to 29-02-14.
Have Fun.
"I'm Happy !!!"
Or binary "*.BIN" the right icon "Load/Save/export binnary...", to export or import binary as is.
Only the selected code will be write (listview contant), select de good REM number in the line selector, or change and refresh the upper and lower address.
In a text format, just type SAVE"MYPR.TXT" in the ZX81 editor. (".TXT" will redirect the emulator to a text file, not to a 'P' file)
You can select a DECimal format too... (Basic tools frame)
It will write a text file using the Vb81 (ZxBASIC) text format.(in selected path, last selected P path)
1 REM [HEX:00,1F,3D,3D]
Note: the TXT file can be reloaded using the "Files selector" frame (As is)
Vb81 XUR updated to 29-02-14.
Have Fun.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)