mailto: blog -at- heyrick -dot- eu

Navi: Previous entry Display calendar Next entry
Switch to desktop version

FYI! Last read at 12:02 on 2024/05/05.

REdit v0.03

I've made some modifications to my simple little text editor for RISC OS.

redit_003alpha.zip (14.4KiB)

 

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)

 

 

Your comments:

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.

Add a comment (v0.11) [help?]
Your name:

 
Your email (optional):

 
Validation:
Please type 57797 backwards.

 
Your comment:

 

Navi: Previous entry Display calendar Next entry
Switch to desktop version

Search:

See the rest of HeyRick :-)