VOGONS


TEDIT v0.68 [OPTIMISATION, FEATURES & FIXES]

Topic actions

Reply 100 of 119, by Yoghoo

User metadata
Rank Oldbie
Rank
Oldbie
cookertron wrote on 2026-04-01, 17:02:
FIXED and released! […]
Show full quote
Yoghoo wrote on 2026-04-01, 15:23:
cookertron wrote on 2026-04-01, 14:48:
Version 0.64.0 Fixes: […]
Show full quote

Version 0.64.0 Fixes:

  • Shell-to-DOS Jemmex crash fix
  • BSS-to-segment migration: Moved shadow_buf (4 KB) and doc_table (3 KB) to separately-allocated DOS segments via INT 21h/48h, reclaiming 7 KB from the 64 KB COM segment

This version does not work at all for me (with or without adding a file name on the command line). I see only the mouse and nothing else.

FIXED and released!

Version 0.64 now works with 4DOS. All tests pass!
The issue was that 4DOS doesn't clear memory when allocating it out so the buffers contained garage data which corrupted specific tests. A better explanation is in the changelog if you're interested .😎

NOW, here's a question for everyone... how would you feel about a DOSBox-X host shared clipboard? This means you can copy text from the host system (Win/Linux) directly into TEDIT and vice versa. I'd love to hear your opinions.

Sorry but it's not fixed here. Still the same problem.

Regarding host shared clipboard it's not really for me. I only use Dosbox-X to quickly test or compile something. The rest I do on real retro pc's. 😀

Reply 101 of 119, by cookertron

User metadata
Rank Member
Rank
Member
Yoghoo wrote on 2026-04-01, 17:15:
cookertron wrote on 2026-04-01, 17:02:
FIXED and released! […]
Show full quote
Yoghoo wrote on 2026-04-01, 15:23:

This version does not work at all for me (with or without adding a file name on the command line). I see only the mouse and nothing else.

FIXED and released!

Version 0.64 now works with 4DOS. All tests pass!
The issue was that 4DOS doesn't clear memory when allocating it out so the buffers contained garage data which corrupted specific tests. A better explanation is in the changelog if you're interested .😎

NOW, here's a question for everyone... how would you feel about a DOSBox-X host shared clipboard? This means you can copy text from the host system (Win/Linux) directly into TEDIT and vice versa. I'd love to hear your opinions.

Sorry but it's not fixed here. Still the same problem.

Regarding host shared clipboard it's not really for me. I only use Dosbox-X to quickly test or compile something. The rest I do on real retro pc's. 😀

I'm really sorry, I didn't commit the new fix to GitHub. I've done it now 😔

Asus P5A v1.06, Gigabyte GA-6BXDS, Soyo SY-5EMA (faulty), Viglen 486, Asus SP97-V

Reply 102 of 119, by Yoghoo

User metadata
Rank Oldbie
Rank
Oldbie
cookertron wrote on 2026-04-01, 17:32:
Yoghoo wrote on 2026-04-01, 17:15:
cookertron wrote on 2026-04-01, 17:02:
FIXED and released! […]
Show full quote

FIXED and released!

Version 0.64 now works with 4DOS. All tests pass!
The issue was that 4DOS doesn't clear memory when allocating it out so the buffers contained garage data which corrupted specific tests. A better explanation is in the changelog if you're interested .😎

NOW, here's a question for everyone... how would you feel about a DOSBox-X host shared clipboard? This means you can copy text from the host system (Win/Linux) directly into TEDIT and vice versa. I'd love to hear your opinions.

Sorry but it's not fixed here. Still the same problem.

Regarding host shared clipboard it's not really for me. I only use Dosbox-X to quickly test or compile something. The rest I do on real retro pc's. 😀

I'm really sorry, I didn't commit the new fix to GitHub. I've done it now 😔

No worries. Issues are indeed fixed. Only it uses almost 280KB of memory when I do a dos shell. Seems a bit excessive but further than that it works fine.

Reply 103 of 119, by aVd

User metadata
Rank Member
Rank
Member

A 4DOS compatibility... Wow! The latest TEDIT version 0.64 is really good 😀 Also the new Agent86 0.20.1 works fine even with the older code.

Just a few minor bugs: for me <Ctrl>+<Alt>+<S> ("Close all...") and <Ctrl>+<Alt>+<S> ("Save all...") keyboard shortcuts do not work at all. And <Ctrl>+<Shift>+<W> combo works as <Ctrl>+<W> ("Close") - probably not really a bug. But <Shift>+<Tab> now works fine.

And why not some <Fn> or key combo assigned for "Shell to DOS and some shortcuts for "Load project..." and "Save project..."?

For the DOSBox-X clipboard sharing - I'm not sure, if you have to use the freed bits for such a functionality. I use DOSBox and DOSBox-X for quick tests and DOS compile/build only.

@cookertron, do you mind, if I keep tinkering with the old 0.57 version source code?

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 104 of 119, by cookertron

User metadata
Rank Member
Rank
Member
aVd wrote on 2026-04-01, 18:59:

Just a few minor bugs: for me <Ctrl>+<Alt>+<S> ("Close all...") and <Ctrl>+<Alt>+<S> ("Save all...") keyboard shortcuts do not work at all. And <Ctrl>+<Shift>+<W> combo works as <Ctrl>+<W> ("Close") - probably not really a bug.

I'll look in to that, thanks.

aVd wrote on 2026-04-01, 18:59:

And why not some <Fn> or key combo assigned for "Shell to DOS and some shortcuts for "Load project..." and "Save project..."?

Good point but not sure which key combo to assign - any thoughts?

aVd wrote on 2026-04-01, 18:59:

For the DOSBox-X clipboard sharing - I'm not sure, if you have to use the freed bits for such a functionality. I use DOSBox and DOSBox-X for quick tests and DOS compile/build only.

Thanks for feedback.

aVd wrote on 2026-04-01, 18:59:

@cookertron, do you mind, if I keep tinkering with the old 0.57 version source code?

Absolutely not! You do whatever you like with it 😀

Asus P5A v1.06, Gigabyte GA-6BXDS, Soyo SY-5EMA (faulty), Viglen 486, Asus SP97-V

Reply 105 of 119, by igully

User metadata
Rank Member
Rank
Member

@cookertron

Thank you for this new build v0.64 which fixed the JEMMEX issue when shelling.

If I may, can I ask you to please add a small feature? A Unix/Amiga (LF) to Windows/DOS (CR+LF) line ending conversion (back and forth). It would of course, require that when opening a text file to detect and indicate somewhere the current line ending present.

For what it is worth, I am not a DOSBOX user. I use either a real machine, VirtualBox and 86Box and may try any other "complete" x86 PC emulator eventually.

Thanks again for your continued development.

Reply 106 of 119, by aVd

User metadata
Rank Member
Rank
Member
cookertron wrote on 2026-04-01, 19:21:
aVd wrote on 2026-04-01, 18:59:

And why not some <Fn> or key combo assigned for "Shell to DOS and some shortcuts for "Load project..." and "Save project..."?

Good point but not sure which key combo to assign - any thoughts?

I have no idea about the "shelling". We may look in some of the countless Norton Commander's clones - most of them (if not all of them) have "start command interpreter" option. Or maybe Ignacio can suggest some suitable keyboard shortcut. As for the project's shortcuts - some popular DOS IDE may be of help too. Old Borland C++ DOS IDE, RHIDE...?

cookertron wrote on 2026-04-01, 19:21:
aVd wrote on 2026-04-01, 18:59:

For the DOSBox-X clipboard sharing - I'm not sure, if you have to use the freed bits for such a functionality. I use DOSBox and DOSBox-X for quick tests and DOS compile/build only.

Thanks for feedback.

Seems like Ignacio's suggestion for CR to LF, CR (and backwards) line break convertor will be more useful for me.

cookertron wrote on 2026-04-01, 19:21:
aVd wrote on 2026-04-01, 18:59:

@cookertron, do you mind, if I keep tinkering with the old 0.57 version source code?

Absolutely not! You do whatever you like with it 😀

Thank you! It will be only cosmetic work - like rearranging the menu items. And don't worry, I have only basic knowledge in assembly, so I'll not do anything deeper to break your original code entirely 😉

P.S. I think, I found another bug.

After unsuccessful tryout to open some big file and the error message "Out of memory" I got something like empty file in the opened file list:

The attachment after_out_of_memory_error.jpg is no longer available

Wouldn't it be more proper behavior to not open "empty file" at all after this "Out of memory" error?

Also, I'm not sure what to chose as a response for this message:

The attachment unclear_question.jpg is no longer available

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 107 of 119, by Yoghoo

User metadata
Rank Oldbie
Rank
Oldbie

Just a FYI for someone who wants to change ALT-Q to ALT-X. These lines need to be changed:

Change line 135: DB 'Quit', 0	To:  DB 'Exit', 0
Change line 143: DB 'Alt+Q', 0 To: DB 'Alt+X', 0
Change line 332: DB 0, 'Q' To: DB 1, 'X'
Change line 334: DB 10h, 0 To: DB 2Dh, 0

This is for version 0.64 so line numbers can change in upcoming versions. 😀

Reply 108 of 119, by aVd

User metadata
Rank Member
Rank
Member

Made a newer old single-file edit TEDIT version 0.57.2 with new "Search" menu. Now "Edit" and "Search" menus look like this:

The attachment edit_menu.jpg is no longer available
The attachment search_menu.jpg is no longer available

Attachment with the modified source code and the compiled com-executable:

The attachment TEDIT_0572_mod.zip is no longer available

Unfortunately I stll can't figure out how to make <Shift>+<Tab> combo to work in dialog boxes in reversed direction.

EDIT: <Shift>+<Tab> problem solved by @cookertron. The latest update for the 0.57.x variant of TEDIT is here.

Last edited by aVd on 2026-04-02, 13:52. Edited 1 time in total.

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 109 of 119, by cookertron

User metadata
Rank Member
Rank
Member

Release v0.65 - https://github.com/cookertron/TEDIT:

  • Menu item 'Quit' renamed to 'Exit' with shortcut changed to ALT-X
  • Large document invokes 'Out of Memory' and a ghost document in side panel - fixed. Drops back to previous document.
  • Exiting TEDIT with modified documents invokes confusing save dialog. Now says 'Discard unsaved changes?' with options 'Yes|No'
  • Shell to DOS shortcut is F8
  • All menu shortcuts should now work but this isn't guaranteed 😁

I couldn't work out which shortcut to use for projects so just left it empty. Maybe someone will get inspired 🤷

Before doing anything else I'm going to explore removing the original document from memory altogether. When edits are made to a document the original file isn't touched, it's only when the document is saved. TEDIT walks through the piece table and makes the changes that have accumulated. That's why if you make a lot of changes you'll eventually be prompted to save your work to free up the piece table. It also means the original file doesn't need loading into the memory at all, the text can be read directly from the disk. That's the theory anyway. Let's see how it goes!

Asus P5A v1.06, Gigabyte GA-6BXDS, Soyo SY-5EMA (faulty), Viglen 486, Asus SP97-V

Reply 110 of 119, by aVd

User metadata
Rank Member
Rank
Member
aVd wrote on Yesterday, 10:40:

Unfortunately I stll can't figure out how to make <Shift>+<Tab> combo to work in dialog boxes in reversed direction.

By replacing some TUI source code, @cookertron fixed <Shift>+<Tab> navigation problem. So, this 0.57.3 version seems like the final one of the single-file edit TEDIT 0.57.x updates:

The attachment TEDIT_0573_mod.zip is no longer available

Tnanks @cookertron!

Now it's time to test the newest and the coolest multi-file edit TEDIT version 0.65 😀

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 111 of 119, by Yoghoo

User metadata
Rank Oldbie
Rank
Oldbie
cookertron wrote on Yesterday, 11:51:
  • Menu item 'Quit' renamed to 'Exit' with shortcut changed to ALT-X

Good to see ALT-X by default. 😜

Nothing else to add as everything seems to work fine. But maybe look at the memory consumption when shelling to dos (230+KB without any documents open). Not really an issue for me but it could hinder pc's with limited (free) memory.

Reply 112 of 119, by aVd

User metadata
Rank Member
Rank
Member

I don't know how we missed this. It will be an easy fix, but the "File" menu needs some shortcut-letters rework:

The attachment file_menu_shortcut_letters_repeated.jpg is no longer available

"Edit" menu seems Ok.

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 113 of 119, by aVd

User metadata
Rank Member
Rank
Member

Just made a quick test fix for "File" menu partially inspired from BC++ DOS IDE. It looks like this:

The attachment file_menu_suggestion.jpg is no longer available
These are my code changes in "TEDIT.ASM"
m_file_entries:
; New
DW m_str_new, menu_new_handler
DB 0, 'N'
DW m_str_acc_cn
DB 0, 0

; Open...
DW m_str_open, menu_open_handler
DB 0, 'O'
DW m_str_acc_co
DB 0, 0

; Close
DW m_str_close, menu_close_handler
DB 0, 'C'
DW m_str_acc_cw
DB 0, 0

; Close All
DW m_str_closeall, menu_closeall_handler
DB 4, 'E' ; - CHANGED -
DW m_str_acc_caw
DB 0, 0

; ---- divider ----
DW 0, 0
DB 0, 0
DW 0
DB 0, 0

; Save
DW m_str_save, menu_save_handler
DB 0, 'S'
DW m_str_acc_cs
DB 0, 0

; Save As...
DW m_str_saveas, menu_saveas_handler
DB 1, 'A' ; - CHANGED -
DW m_str_acc_css
DB 0, 0

; Save All
DW m_str_saveall, menu_saveall_handler
DB 6, 'L' ; - CHANGED -
DW m_str_acc_cas
DB 0, 0

; ---- divider ----
DW 0, 0
DB 0, 0
DW 0
DB 0, 0

; Load Project...
DW m_str_loadprj, menu_loadprj_handler
DB 8, 'J' ; - CHANGED -
DW 0
DB 0, 0
Show last 31 lines

; Save Project...
DW m_str_saveprj, menu_saveprj_handler
DB 5, 'P'
DW 0
DB 0, 0

; ---- divider ----
DW 0, 0
DB 0, 0
DW 0
DB 0, 0

; Shell to DOS
DW m_str_shell, menu_shell_handler
DB 9, 'D' ; - CHANGED -
DW m_str_acc_f8
DB 42h, 0 ; accelkey=42h (F8 global dispatch)

; ---- divider ----
DW 0, 0
DB 0, 0
DW 0
DB 0, 0

; Exit
DW m_str_quit, menu_quit_handler
DB 1, 'X'
DW m_str_acc_ax
DB 2Dh, 0 ; accelkey=2Dh (Alt+X global dispatch)

This is just a suggestion. Someone may give a better idea for letter assignments in "File" menu.

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 114 of 119, by cookertron

User metadata
Rank Member
Rank
Member

Release v0.68 - https://github.com/cookertron/TEDIT

  • Files can be massive - tested with 1mb text file.
  • /d switch allows core memory buffers to be dumped to a swap file when shelling to DOS reducing memory footprint. Memory restored on re-entry. recovery using swap file on system failure. Thanks to yoghoo for repeatedly bringing it up 😁
  • FILE menu items now have unique keyboard shortcuts. Thanks to aVd for realising this 😎

Even though there are only 3 optimisations, features and fixes, removing the active document from memory was a huge undertaking. The core architecture of the piece table had to be re-written. Take a look at the changelog for more details

Going to look at the Amiga LF vs UNIX LF+CR conversion feature next. Not sure how to do this without adding an option somewhere, hmmm.

Asus P5A v1.06, Gigabyte GA-6BXDS, Soyo SY-5EMA (faulty), Viglen 486, Asus SP97-V

Reply 115 of 119, by aVd

User metadata
Rank Member
Rank
Member

Hi, @cookertron,
I was about to write, that in TEDIT 0.65 using the <F1> keyboard shortcut causing some troubles (TEDIT lock or exit to prompt with lock) when SHROOM is used with TEDIT and some files are opened directly from the command line ("SHROOM.COM TEDIT.EXE TEXT.TXT"), but now I see, that you've implemented a built-in SHROOM functionality (which is great) in the latest version 0.68.

After a quick first test of TEDIT version 0.68 (in DOSBox as usually), now it seems like now using the <F1> keyboard shortcut causes the same problem even if no file is opened from the command line.

P.S. Unix/Linux line break is "LF" and DOS/windows is "CR,LF" 😉

Last edited by aVd on 2026-04-03, 17:53. Edited 1 time in total.

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 116 of 119, by Yoghoo

User metadata
Rank Oldbie
Rank
Oldbie
cookertron wrote on Today, 17:05:
Release v0.68 - https://github.com/cookertron/TEDIT […]
Show full quote

Release v0.68 - https://github.com/cookertron/TEDIT

  • Files can be massive - tested with 1mb text file.
  • /d switch allows core memory buffers to be dumped to a swap file when shelling to DOS reducing memory footprint. Memory restored on re-entry. recovery using swap file on system failure. Thanks to yoghoo for repeatedly bringing it up 😁
  • FILE menu items now have unique keyboard shortcuts. Thanks to aVd for realising this 😎

Even though there are only 3 optimisations, features and fixes, removing the active document from memory was a huge undertaking. The core architecture of the piece table had to be re-written. Take a look at the changelog for more details

Going to look at the Amiga LF vs UNIX LF+CR conversion feature next. Not sure how to do this without adding an option somewhere, hmmm.

The /d switch reduced it from 289KB to 66KB memory usage. Nice reduction. Also the swap file is only 408 bytes so I wouldn't mind if this would be the default option.

One issue though. When running tedit /d and doing a dos shell and open a new tedit there (with or without /d) it will give an error when exiting and typing exit to go back to the first tedit:

FATAL: Cannot restore from swap file.
Your data may be in TEDTSHEL.SWP.

Also if you're going to add an option dialog in tedit (which I would really like) maybe add the /d option and the tab size there as well (that last one would make aVd very happy I guess 😜) .

Reply 117 of 119, by aVd

User metadata
Rank Member
Rank
Member

I like @Yoghoo's suggestion for default memory swapping while using DOS command interpreter, but seems like we will need some kind of protection against recursion.

Yoghoo wrote on Today, 17:51:

Also if you're going to add an option dialog in tedit (which I would really like) maybe add the /d option and the tab size there as well (that last one would make aVd very happy I guess 😜) .

Hey, @Yoghoo, this is good suggestion too. An "Options" menu with some TEDIT.INI or TEDIT.CFG file. If done, I will stop to recompile for default tab = 4 spaces 😁 I didn't suggested this, because the com-executable is only ~65KB in size.

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 118 of 119, by cookertron

User metadata
Rank Member
Rank
Member
aVd wrote on Today, 17:50:

After a quick first test of TEDIT version 0.68 (in DOSBox as usually), now it seems like now using the <F1> keyboard shortcut causes the same problem even if no file is opened from the command line.

Can you explain that issue a little more please?

aVd wrote on Today, 17:50:

P.S. Unix/Linux line break is "LF" and DOS/windows is "CR,LF" 😉

Thanks for the correction 😀

Yoghoo wrote on Today, 17:51:

The /d switch reduced it from 289KB to 66KB memory usage. Nice reduction. Also the swap file is only 408 bytes so I wouldn't mind if this would be the default option.

The size of the swap does up up with open docs, editing, undo and clip.
I've been thinking about the options menu for a while and was putting it off because of the ini/cfg dependency. I will add it and you guys can be the judge.

Yoghoo wrote on Today, 17:51:

One issue though. When running tedit /d and doing a dos shell and open a new tedit there (with or without /d) it will give an error when exiting and typing exit to go back to the first tedit:

FATAL: Cannot restore from swap file.
Your data may be in TEDTSHEL.SWP.

This is a problem, thank you for bringing it to my attention. Why anyone would start a second instance of TEDIT is beyond me but I guess it can happen so we should prepare for that. The answer is to prevent a new instance of TEDIT from spawning similar to how a TSR prevents multiple versions of itself loading into memory. Either create a TEDIT.LCK file when dropping to DOS and check it exists on start up when the user tries to invoke new instance of TEDIT - if it exists then notify and terminate. The other method is to use INT 2Fh Multiplex Instance Detection, which is what the TSR's use. MDI basically allows programs in memory to talk to each other, TEDIT can talk to TEDIT and ask, "Are you here" - if nothing comes back then it's OK to start up.

Re-release v0.68 https://github.com/cookertron/TEDIT

  • Spawning a new instance of TEDIT after shelling to DOS results in detection, notification, termination. (see attached image)
The attachment command_006.png is no longer available

Asus P5A v1.06, Gigabyte GA-6BXDS, Soyo SY-5EMA (faulty), Viglen 486, Asus SP97-V

Reply 119 of 119, by aVd

User metadata
Rank Member
Rank
Member
cookertron wrote on Today, 19:06:
aVd wrote on Today, 17:50:

After a quick first test of TEDIT version 0.68 (in DOSBox as usually), now it seems like now using the <F1> keyboard shortcut causes the same problem even if no file is opened from the command line.

Can you explain that issue a little more please?

I just start DOSBox, go to TEDIT version 0.68 (the one without recursion protection) directory ("cd tedit"), start TEDIT 0.68 with no text file opened ("tedit"), then press <F1>, and get this with lock:

The attachment drop_to_prompt_with_lock_in_dosbox.jpg is no longer available

With DOSBox-X the lock happens a bit earlier, as I don't see the "colored prompt".

With the previous version 0.65 I got similar problems, but when I was using SHROOM and open at least one text file with TEDIT's start from the command prompt ("shroom tedit text.txt").

P.S. Just tried other key combo for the menu navigation with keyboard only: <Alt>+<V>, then <D> or <Enter> and the locking bug appears.

Forgot to mention - it happen often, but not on every tryout and only the mouse cursor can be moved after.

cookertron wrote on Today, 19:06:
The answer is to prevent a new instance of TEDIT from spawning similar to how a TSR prevents multiple versions of itself loading […]
Show full quote

The answer is to prevent a new instance of TEDIT from spawning similar to how a TSR prevents multiple versions of itself loading into memory. Either create a TEDIT.LCK file when dropping to DOS and check it exists on start up when the user tries to invoke new instance of TEDIT - if it exists then notify and terminate. The other method is to use INT 2Fh Multiplex Instance Detection, which is what the TSR's use. MDI basically allows programs in memory to talk to each other, TEDIT can talk to TEDIT and ask, "Are you here" - if nothing comes back then it's OK to start up.

Re-release v0.68 https://github.com/cookertron/TEDIT

  • Spawning a new instance of TEDIT after shelling to DOS results in detection, notification, termination. (see attached image)

Nice! I hope you're using the second method, so no more new temporary files are generated 😀

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?