X16 Edit - a text editor

Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: X16 Edit - a text editor

Post by Stefan »

ahenry3068 wrote: Mon Dec 18, 2023 11:09 pm So is there an updated ROM somewhere ?

(also with BASLOAD :) )..
MooinLemur asked me a week ago if the editor master branch was ready to be pulled into the Kernal. I think it is now. I don’t know when he has time to look at this though.
As to BASLOAD, it’s getting to a point where we could at least think about merging it into the Kernal. But I have no ETA on when to expect it. I need to discuss that with MooingLemur as well.
User avatar
ahenry3068
Posts: 1147
Joined: Tue Apr 04, 2023 9:57 pm

Re: X16 Edit - a text editor

Post by ahenry3068 »

Stefan wrote: Tue Dec 19, 2023 5:53 am
ahenry3068 wrote: Mon Dec 18, 2023 11:09 pm So is there an updated ROM somewhere ?

(also with BASLOAD :) )..
MooinLemur asked me a week ago if the editor master branch was ready to be pulled into the Kernal. I think it is now. I don’t know when he has time to look at this though.
As to BASLOAD, it’s getting to a point where we could at least think about merging it into the Kernal. But I have no ETA on when to expect it. I need to discuss that with MooingLemur as well.
Do you have a trial build then ?
Martin Schmalenbach
Posts: 140
Joined: Tue Jul 21, 2020 10:08 pm

Re: X16 Edit - a text editor

Post by Martin Schmalenbach »

ahenry3068 wrote: Tue Dec 19, 2023 7:44 am Do you have a trial build then ?
Good question - I for one would love to help test it.

My pascal compiler is not trivial code in terms of size or complexity, and is in sore need of making use of all the rumoured features of the latest version of BASLOAD!
Martin Schmalenbach
Posts: 140
Joined: Tue Jul 21, 2020 10:08 pm

Re: X16 Edit - a text editor

Post by Martin Schmalenbach »

Stefan wrote: Tue Dec 19, 2023 5:43 am
Martin Schmalenbach wrote: Mon Dec 18, 2023 10:30 pm As I understand it, invoking the editor from outside the editor is now quite easy to do - looking forward to experimenting with it!
Yes, it’s pretty easy. Just let me know if you run into problems.
Is there a way to open a file in the editor at a specific line? It would be a nice feature to go from a compiler error message straight to the offending line of source code - it would be more like a simple integrated development environment.

I guess syntax highlighting is too much to ask for right now? :D
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: X16 Edit - a text editor

Post by Stefan »

Martin Schmalenbach wrote: Mon Dec 18, 2023 10:30 pm
Is there a way to open a file in the editor at a specific line? It would be a nice feature to go from a compiler error message straight to the offending line of source code - it would be more like a simple integrated development environment.

I guess syntax highlighting is too much to ask for right now? :D
There is currently no way to go to a specific line when you start the editor. But it would be quite easy to do. I’ll keep that in mind.

Syntax highlighting would require a lot of redesign. The program was not at all built with that in mind.
Martin Schmalenbach
Posts: 140
Joined: Tue Jul 21, 2020 10:08 pm

Re: X16 Edit - a text editor

Post by Martin Schmalenbach »

Stefan wrote: Tue Dec 19, 2023 5:33 pm
Martin Schmalenbach wrote: Mon Dec 18, 2023 10:30 pm
Is there a way to open a file in the editor at a specific line? It would be a nice feature to go from a compiler error message straight to the offending line of source code - it would be more like a simple integrated development environment.

I guess syntax highlighting is too much to ask for right now? :D
There is currently no way to go to a specific line when you start the editor. But it would be quite easy to do. I’ll keep that in mind.

Syntax highlighting would require a lot of redesign. The program was not at all built with that in mind.
Hi Stefan

Thanks for the update. I thought syntax highlighting would be too much of an ask!
I am interested though in being able to start the editor at a particular line in a file - I shall look forward to it in time, and realise this may not be a high priority for you just yet!
Karl Hultland
Posts: 9
Joined: Mon Feb 08, 2021 12:23 am

Re: X16 Edit - a text editor

Post by Karl Hultland »

I saw mentioned in a thread that the X16 Edit used parts of the Zero page memory but I found no more info what addresses I should keep out of if I want to use the editor from my own code.
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: X16 Edit - a text editor

Post by Stefan »

Hi,

The short answer is that you should not need to think about that.

The long answer is that the editor uses the following address ranges:
  • 0x22 to 0x35
  • 0x400 to 0x7ff
  • The next version also 0x9c00 to 0x9eff
These memory locations are copied to banked RAM on startup and restored when you exit the editor. The memory restore routine is, however, not executed if you exit the editor with Ctrl+Alt+Del.

The editor uses the part of banked RAM that is assigned when it's started. The EDIT command assigns banks 10 to 255. If you're integrating the editor with your own program, you can freely decide what RAM banks the editor is allowed to use.
unartic
Posts: 145
Joined: Sat Oct 28, 2023 3:26 pm

Re: X16 Edit - a text editor

Post by unartic »

Hi Stefan!

I have found a sort-of bug.

I'm calling the rom based version from assembly.

If I have the filename to be edited at $0444 and call x16edit, I get an error that the file is not found. Looking at memory it seems x16edit is using the $04xx region aswell and probably first uses it, before reading or copying the filename.

I think this is somehting you might want to address as probably many application wil use de $04xx region in the future and some might store the filename in $04xx before calling x16edit.
TomXP411
Posts: 1785
Joined: Tue May 19, 2020 8:49 pm

Re: X16 Edit - a text editor

Post by TomXP411 »

unartic wrote: Mon Feb 05, 2024 3:40 pm Hi Stefan!

I have found a sort-of bug.

I'm calling the rom based version from assembly.

If I have the filename to be edited at $0444 and call x16edit, I get an error that the file is not found. Looking at memory it seems x16edit is using the $04xx region aswell and probably first uses it, before reading or copying the filename.

I think this is somehting you might want to address as probably many application will use de $04xx region in the future and some might store the filename in $04xx before calling x16edit.
I don't think this is something that needs "fixing", so much as better documentation. I'll add a note to our Docs Issues to not just ad EDIT and BASLOAD to the docs, but to note the parts of memory that EDIT will hammer when it starts. (It's got to work somewhere, after all...)
Post Reply