I've made some modifications to my simple little text editor for RISC OS.
- When you find text, not only will cursor move to the match line, it will also now move horizontally to position itself just before the actual match.
- Minor tweak so the information banner (the bottom line) works correctly (had redraw issues).
- Pressing F10 will write the current settings (that's Insert/Overwrite and Show Specials) to CMOS RAM.
- Default is no now NOT display special characters.
- Pressing Shift-F1 will pop up brief file information: Lines, words, characters. This is visible in the image above.
Something that might require a little bit of explanation is the unofficial hijacking of a CMOS RAM byte. In this very specific case, the CMOS RAM byte allocated to the Twin editor.
TWIN predates RISC OS, and while 32 bit versions may exist, it isn't something that is commonly used. As such, I have appropriated the CMOS RAM byte for REdit.
However, this process is not automatic. You must press
F10 to save the settings, and if the byte has not previously been used by REdit, you will be asked if you wish to save the settings to CMOS RAM.
Rationale for CMOS use: Because of how REdit was written and how it is expected to work, when it starts we only know two things for certain. We know that it's a version of RISC OS, and we know that there is some sort of filesystem. We know both of these because the editor was, in fact, loaded.
And, as it happens, that is all that we need. We cannot make further assumptions. We may be running before system boot. We may be running on Pico. We can't depend upon Choices even existing on the filesystem, never mind having been 'seen' by it.
Rationale for using TWIN byte: CMOS RAM bytes are in short supply. I simply wouldn't even ask for a CMOS RAM allocation, not for something "niche" like this. As TWIN is sort of along the same lines as REdit, only much older and much less likely to be in use, I felt that it was an ideal candidate for appropriation.
Disagree? Still use TWIN? The solution is simple - don't press F10! Then the settings won't be saved. REdit will always start with the most logical/sensible default settings, so if you're happy with Insert mode and Special Characters not visible, you don't need to save the settings, that's how it will start each time.
CMOS RAM use:
Byte 8: TWIN : Bit 0 : 0 = MODE 0
1 = MODE 3
Bits 1-2 : 0 = Plain view
1 = "Time" view
2 = "Keys" view
3 = "Description" view
Bits 3-7 : Undefined
REdit: Bit 0 : Overwrite (0) or Insert (1, default) mode
Bit 1 : Display special characters if set (default = 0)
Bits 2-6 : Undefined (zero)
Bit 7 : Guard bit (set to indicate REdit, not TWIN)
I've been asked about a DOS version. While such a thing is not impossible, it is extremely unlikely. Why? The code is very much tied to the RISC OS API, the BBC-style VDU system and keyboard handling, and there is frequent use of in-line assembler throughout. The
#ifdef sections for DOS or RISC OS would turn the source into a giant hulking mess. You might ask - why didn't I design the program with system specific parts in a separate bit of that could simply be replaced as necessary? It's a good question for a multi-platform executable, however REdit was, from the very first line of code, intended to be a RISC OS specific project, and absolutely no attention was paid towards making a light and simple editor that can work on other systems. There are, already, plenty of nice lightweight editors for DOS. I'm sure Google will help you find them...
(in case you hadn't guessed, that's a no)
Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.
|Rob, 29th June 2017, 20:57|
But will you do a version for a BBC Micro + 2P ?
I used to use Twin a lot, BITD. Having two things open at the same time (hence it's name) was pretty revolutionary!
|David Pilling, 30th June 2017, 02:23|
I was a Twin fan. Until it would no longer run because of the hardware - Iyonix I guess. Everything I wrote I did with Twin. It was written by Sophie Wilson, and I recall the live Micronet session where he answered questions and said he'd just written a new editor.
Anyway I would be interested if anyone has done a 32 bit version, because I was supposed to be doing that - no chance now. I passed the project on to someone but also no chance now.
|David Pilling, 30th June 2017, 02:26|
Sorry for not talking about the main event - Redit. I'd be surprised if other things had not taken over the Twin CMOS byte.
|« June 2017 »|
| || || ||1||2||3||4|
|26||27||28||29||30|| || |
Japanese Red Cross
Earthquake relief donations have closed.
Read about the JRC
Make a general donation
List all b.log entries
Return to the site index
PS: Don't try to be clever.
It's a simple substring match.
Last read at 00:36 on 2018/02/20.
© 2017 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.