|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
|
Thread Tools |
9th Jan 2023, 9:58 pm | #1 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
SC/MP disassembler
A small update, this is a really simple SC/MP disassembler, no frills but has proven useful:
http://www.mccrash-racing.co.uk/philg/files/discmp.zip (Right click, save as, you may have to select 'keep' as my site doesnt do https) Cheers Phil |
10th Jan 2023, 7:17 pm | #2 |
Hexode
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 318
|
Re: SC/MP disassembler
That sounds great. I shall download and try it later this evening.
|
12th Jan 2023, 6:57 pm | #3 |
Hexode
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 318
|
Re: SC/MP disassembler
Finally got round to trying the disassembler. It works really well (running on my XP laptop). I particularly like the way it annotates the actual addresses of relative jump instructions. Takes all the pain out of counting backwards , e.g.
Code:
043E C4 02 LDI $02 0440 35 XPAH P1 0441 C4 00 LDI $00 0443 31 XPAL P1 0444 C4 20 LDI $20 0446 CD 01 ST @+$01(P1) 0448 35 XPAH P1 0449 E4 04 XRI $04 044B 98 05 JZ +$05 ; to $0452 044D E4 04 XRI $04 044F 35 XPAH P1 0450 90 F2 JMP -$0E ; to $0444 0452 C4 02 LDI $02 0454 35 XPAH P1 0455 C4 20 LDI $20 0457 31 XPAL P1 |
12th Jan 2023, 7:02 pm | #4 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,575
|
Re: SC/MP disassembler
The next step would be to allow the user to define to-from address ranges, sometimes more than one, as 'data' areas which the disassembler should disassemble into .DB statements rather than executable code.
|
12th Jan 2023, 9:09 pm | #5 | |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: SC/MP disassembler
Thanks Realtime
Quote:
but the SC/MP disassembler project kinda stalled once it was working and completed the job I needed it for One day I'll revisit it... |
|
15th Jan 2023, 6:20 pm | #6 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
|
Re: SC/MP disassembler
Thanks for uploading this.
I've just tried running it under WinXP's Command Prompt - As I've run various Borland C 'DOS' programs I've written in the past in the Command Shell window of Win NT/2k/XO etc Mostly OK (Although H/W access to LPT ports etc could be a bit flaky if you didn't access these the right way). And can also put a simple .bat file on desktop, to call .exe with any required command line parameters, to save need to type anything each time if frequently needing to disassemble the same filename. When I typed 'Cmd' at Start->Run, to get to the Cmd Shell easily, and then typed Discmp I noticed an unusual 'Cannot load VDM IPX/SPX Support' error message, I'd never seen before - Although it did still seem to run OK. But Googling that error, found this useful article at: http://ksho-star.blogspot.com/2011/0...dm-ipxspx.html Editing Autoexex.nt, commenting the mentioned two lines out, removed that error message without even needing to restart Cmd shell. And just typing 'Discmp.exe Invader2.bin' produced a disassembly listing to the command shell window OK. |
15th Jan 2023, 8:04 pm | #7 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: SC/MP disassembler
Thanks Owen, all good info as I've only run it under dosbox, one day I might set up an XP (or preferably DOS) machine. I'm a failed windows programmer but was perfectly happy with MASM under DOS!
Cheers Phil |
15th Jan 2023, 11:29 pm | #8 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
|
Re: SC/MP disassembler
Well I thought it should also run directly under Windows 7 - 10 etc.
- But when I just tried it on Windows 7 (64bit), I discovered it doesn't work because it's 16bit (like all DOS Programs). Annoyingly, it seems that whilst 32bit Windows still supported 16bit (DOS) programs, 64bit Windows only directly supports 32bit (Windows) legacy programs. And so need to use a VM (Such as DOSBOX) to run 16bit DOS programs: https://www.pcworld.com/article/4782...windows_7.html I too only ever wrote PC programs for DOS, keeping older copies of MSVC 1.52 and Borland C(++) 4,5, which IIRC were about the last versions that allowed you to generate DOS executables, without having to get into Windows API's / use slower MS Visual BASIC and get it to do the GUI etc. These days, I'd probably be tempted to do something in Python to try and make it cross-platform. But was rather disappointed to discover that the later versions of Python >=3.9 have oddly required a minimum of Windows 8.1 (Even though MS are totally ditching support for that, not offering the extra 3years paid-for updates to Windows-7 that also ends at the same time) for the last two years - Even though slightly-older Python <=3.8 versions are still having updates released concurrently. I found this out, after trying to install KiCAD 6.x on a Win 7 PC, as it seems they decided to use the later versions of Python (or the installer was generated using something that deliberately won't generate Win-7 compatible installations). So have to go back to KiCAD 5.x / work out how to compile the 6.x open-source yourself to be able to install on Win-7. Or switch to Linux, as it is available for >10 different versions of that. |
17th Jan 2023, 12:47 am | #9 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: SC/MP disassembler
My problem was that one of the many BT courses was Windows c++ which was held in the very early days before any libraries were available and everything had to be done explicitly , every window had to be allocated space then manually constructed, so unwieldy it just put me off completely and at the time a comprehensive DOS app was preferable to a badly written windows effort, so my windows programming never took off. I loved the DOS programming platform as it was very familiar being CP/M derived, but i hated windows. Python doesnt appeal, I dislike the whitespace imposition and interpreters in general But I do acknowledge this is my own failing and python is the 'in thing'
|
23rd Mar 2023, 10:01 pm | #10 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: SC/MP disassembler
I've just started to play with the free lcc-win32 compiler, which is the one Herb Johnson uses for his A68, AZ80, A18 cross-assemblers etc.
Very first project was to run my simple SC/MP disassembler through it, and the resulting exe appears to work fine on my Windows 10 laptop, better than messing about with dosbox! (Its run from a cmd box of course) Remember the disassembler eats binaries, not intel hex, included is an old original nat semis kitbug.bin to play with. HxD is great for converting between bin & hex. Tempted to add the symbol table handling now! Cheese Pies Last edited by Paul Stenning; 24th Mar 2023 at 11:58 am. Reason: Attachment with malware removed |
24th Mar 2023, 12:07 am | #11 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: SC/MP disassembler
Another binary file to play with - my VCS Christmas competition star:
|
24th Mar 2023, 11:57 am | #12 |
Administrator
Join Date: Dec 2002
Location: Cardiff
Posts: 9,072
|
Re: SC/MP disassembler
The server malware scanner has detected Trojan.IRCBot-568 in the attachment in post #10 so I have removed it.
Please ensure all uploaded files are clean. |
24th Mar 2023, 12:22 pm | #13 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: SC/MP disassembler
Its clean Paul, I built it myself, must be a false positive.
The compiler itself scans clean too. I use MS Defender which is aware of that malware but reports clean. Should I post it again? my update is a bit pointless otherwise. Cheers Phil Last edited by Phil__G; 24th Mar 2023 at 12:46 pm. |
24th Mar 2023, 1:19 pm | #14 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: SC/MP disassembler
Paul - a friend has scanned it with TotalAV and no issues.
|
24th Mar 2023, 2:18 pm | #15 |
Administrator
Join Date: Dec 2002
Location: Cardiff
Posts: 9,072
|
Re: SC/MP disassembler
It does sound like a false positive then.
Put it in a password protected ZIP file and include the password in the post. Otherwise the malware scanner will just detect and remove it again. |
24th Mar 2023, 4:22 pm | #16 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: SC/MP disassembler
Thanks Paul, I do appreciate that you have to be careful, sorry to have caused you any hassle.
The file is hosted on the PICL/SC/MP page of http://philg.uk Its in the "Some useful files, docs & links" towards the bottom of the page. Theres the original DOS version and the Win32 version. Several people have scanned it now with different AVs and it is clean, but I would always advise scanning anything you download as a matter of course Cheers Phil |