Running Cport from Win1_

Anything QL Software or Programming Related.
User avatar
NormanDunbar
Forum Moderator
Posts: 2274
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Running Cport from Win1_

Post by NormanDunbar »

Martin_Head wrote:I have the DP Collection, so I should be able to find Cport. If I can find a bit of time to dig it out and have a go.
It's on Disc 3 with the manual, if necessary, on Disc 9. Hopefully that will save you a search!


I'll try and see if I can figure anything out in the meantime. I have the manual printed off and I'll take a look into the tech docs too.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: Running Cport from Win1_

Post by Martin_Head »

I have been having a look at the Cport file this afternoon.

I have attached an update zip file. It is just the files I have altered today. When you ran the program, and it stopped on you. All of those warnings at the top of the screen are relevant to the problem.

All of those "-1" entries signal a code routine in the compiled program that have not been identified. Also the first two 822E and 8240 are red herrings, miss-identified routines. They can just be deleted from the codes file.

I have identified some of the routines, and updated the library files. But there are 4 which I have not yet been able to identify. B27E, B2F0, BA6A, and BAB0

I need to spend more time trying to identify what these four routines actually do.

If you use the cport_codes file in the update zip then the decompiler will produce some code output. When it pauses on a problem, Press any key and it will try to continue. I get about four and a half thousand lines of code out of it before it completely falls over.

Don't run the disassembling first phase again, just run the turbodischarge1_bas program, and use the cport_codes file supplied.

I have also renamed the 'found' variable names.
Attachments
Update.zip
(103.2 KiB) Downloaded 76 times


stevepoole
Super Gold Card
Posts: 715
Joined: Mon Nov 24, 2014 2:03 pm

Re: Running Cport from Win1_

Post by stevepoole »

Hi,

A simple way to avoid name-table clashes is to type EXTRAS to get a list of names, before loading any suspect code...

So having a printed listing of the suspect code is handy !

This is of course a manual process, not an automatic one, but usually makes things clear... Anyone fancy writing a name checker ?

One of my favourite pitfalls in trigonometry is using : ax, bx, cx, dx , ex ....


Steve.


User avatar
NormanDunbar
Forum Moderator
Posts: 2274
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Running Cport from Win1_

Post by NormanDunbar »

stevepoole wrote:Anyone fancy writing a name checker ?
I might be able to do one! It might make an interesting article in the next exciting edition of the Assembly Language ePeriodical . (I need inspiratition!) :shock:

What did you have in mind? I did an article a while back about the name list, and printing it out ...... insert delay while I check the issue ..... Hmm, issue 2 had a small dive into the name list but nothing special.

Ok, what would you be after? What should the name checker do?


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
NormanDunbar
Forum Moderator
Posts: 2274
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Running Cport from Win1_

Post by NormanDunbar »

Martin_Head wrote:Don't run the disassembling first phase again, just run the turbodischarge1_bas program, and use the cport_codes file supplied.
Many thanks indeed Martin, that helped a lot. Using the codes file you supplied, and the updated version of the TurboDisCharge1_bas decompiler, I got about 14,500 lines of "interesting" SuperBASIC. You've done a fantastic job on this utility, well done. I do have a lot of lines with just a single colon in them, at the start of the output but I remember reading about those in the manual, so I can work with them -- when MrsD allows of course! ;)

Thanks again.


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
pjw
QL Wafer Drive
Posts: 1300
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Running Cport from Win1_

Post by pjw »

Steve, Norm, sorry for interupting this thread temporarily, but I dont understand the need for a "name checker". The system works as it should: If you load a S*BASIC program with a redefined name, the program stops at the offending line. So just load it into an editor and rename the offending variable or procedure, re-save and try again. Compiled programs are not affected anyway. I do it all the time, not least recently due to all the new common words commands introduced, like BELL, EXPLODE, SHOOT, PLAY, HOLD, RELEASE,.. I cant see a problem here.


Per
dont be happy. worry
- ?
stevepoole
Super Gold Card
Posts: 715
Joined: Mon Nov 24, 2014 2:03 pm

Re: Running Cport from Win1_

Post by stevepoole »

Hi per,

Whenever I get a name-table clash, it usually crashes QPC , taking loads of work-in-progress programs and RESPR'ed codes with it. Yeuch !

Luckily, I have most common 'clashes' in mind, so this happens less and less often.

But what about when you load up someone else's code, or offer your code for a different platform ? EXTRAS is only good on the platform you are using....

A comprehensive name-checker would need to be 'QL' multi-platform & multi-toolkit.

This is surely the goal we are all aiming for ?

Best wishes,
Steve.


User avatar
pjw
QL Wafer Drive
Posts: 1300
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Running Cport from Win1_

Post by pjw »

stevepoole wrote: Whenever I get a name-table clash, it usually crashes QPC , taking loads of work-in-progress programs and RESPR'ed codes with it. Yeuch !
Nope. Sorry. Never had that problem. For me it has always worked as previously advertised. Oh well, I leave you to it. Im sure it cant hurt :)


Per
dont be happy. worry
- ?
EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: Running Cport from Win1_

Post by EmmBee »

stevepoole wrote:Hi per,

Whenever I get a name-table clash, it usually crashes QPC , taking loads of work-in-progress programs and RESPR'ed codes with it. Yeuch !

Luckily, I have most common 'clashes' in mind, so this happens less and less often.

But what about when you load up someone else's code, or offer your code for a different platform ? EXTRAS is only good on the platform you are using....

A comprehensive name-checker would need to be 'QL' multi-platform & multi-toolkit.

This is surely the goal we are all aiming for ?

Best wishes,
Steve.
Hi Steve,

I so much agree.

What I would find extremely useful would be to have an alphabetically ordered list of EXTRAS, with each entry also detailing the Toolkit the name was loaded from. To actually do this I suppose there would have to be lists of Toolkits with there names, and then go through each looking for each EXTRAS entry.

EmmBee


User avatar
NormanDunbar
Forum Moderator
Posts: 2274
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Running Cport from Win1_

Post by NormanDunbar »

emmbee wrote:To actually do this I suppose there would have to be lists of Toolkits with there names
Like this?

https://superbasic-manual.readthedocs.i ... lkits.html

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Post Reply