+dhe Posted November 26, 2023 Share Posted November 26, 2023 And congratulations on taking up an instrument. I would like to do so also, if I make it to retirement age. Is testing against code ran on Classic99 acceptable? Quote Link to comment Share on other sites More sharing options...
+TheBF Posted November 26, 2023 Author Share Posted November 26, 2023 Oh Yes for the VDP/F18 version Classic99 is how I do things. Quote Link to comment Share on other sites More sharing options...
+dhe Posted November 26, 2023 Share Posted November 26, 2023 It's my understanding, VI was a modal editor in order to make it easier to port to multiple terminals, and to make it responsive on slow terminal connection (?). Would it be possible to re-factor the code and create an abstraction layer, so i/o could be done either via a keyboard/vdp or a terminal? Also, per your question what would be nice to have, I didn't see search and replace mentioned in the docs. I know things like regex is hard, but maybe a simple /string/replacement string/ ? Quote Link to comment Share on other sites More sharing options...
+TheBF Posted November 27, 2023 Author Share Posted November 27, 2023 15 hours ago, dhe said: It's my understanding, VI was a modal editor in order to make it easier to port to multiple terminals, and to make it responsive on slow terminal connection (?). Would it be possible to re-factor the code and create an abstraction layer, so i/o could be done either via a keyboard/vdp or a terminal? Also, per your question what would be nice to have, I didn't see search and replace mentioned in the docs. I know things like regex is hard, but maybe a simple /string/replacement string/ ? I believe you are correct about the modal "model" There is also some history written about it being built on top of some kind of IBM line editor that was not very nice and VI was designed to make the line editing look more WYSIWYG. You are reading my mind about how to do the port from the RS232 to F18. In fact Forth programs are just one abstraction layer upon abstraction layer. You can overwrite any function with a new one of the same name. The language is a chameleon. For example in the regular Camel99 Forth kernel the ISO Forth screen I/O words call a bunch of VDP assembler code. In the RS232 version of Camel99 Forth the screen control words emit VT100 escape strings. But they both can compile standard ISO programs. In theory... (he said nervously) I should be able to recompile the RS232 version on the VDP kernel and most things will just work. hahahhahaha I know that I made use of some VT100 features in the RS232 version for scrolling part of the screen that I might need to translate to VDP so there will be that extra work. Just starting to feel human again today so I might start getting some files organized. 2 1 1 Quote Link to comment Share on other sites More sharing options...
+dhe Posted November 27, 2023 Share Posted November 27, 2023 Any chance these could be mapped to the arrow keys via Classic99? Even on PC's running Linux, I never use those... Quote Link to comment Share on other sites More sharing options...
+TheBF Posted November 28, 2023 Author Share Posted November 28, 2023 On 11/27/2023 at 5:37 PM, dhe said: Any chance these could be mapped to the arrow keys via Classic99? Even on PC's running Linux, I never use those... Oh man. I thought you were an Orthodox user. I will put this on the list. I might need to make a keymap file that can be loaded on boot up to address all the user requests out there. 1 2 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 2, 2023 Author Share Posted December 2, 2023 Update on VI99 II for F18 80 columns. I have compiled the code for the RS232 version using function names from the VT100 library that run VDP code. It starts and much of it is working now. My emulation of the VT100 scrollup and scrolldown need a lot of work and a few other bugs but I think the potential for this version is to be much better than the previous version for F18. On the mend but still lacking full energy. 4 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted December 11, 2023 Share Posted December 11, 2023 (edited) On 11/27/2023 at 9:54 AM, TheBF said: I believe you are correct about the modal "model" There is also some history written about it being built on top of some kind of IBM line editor that was not very nice and VI was designed to make the line editing look more WYSIWYG. I was taught to use vi on DEC Ultrix in the 80s. It was indeed a thin layer atop the "ex" single line editor. The : key opened the ex prompt. Which had always been a :. ex was similar to ed, edlin, the old mailbox programs and even DOS offered some variant. It surely goes way back. I learned ed on KIS, a 1975 OS for PDP-11/05. My brother used PTERM and dialup from the 99/4A. PTERM had only CR/LF and FF control codes. But vi/ex accommodated that by starting over on a new line. Fast-Term on 99/4A had the same limitation, not quite adm3A. (FF and VT goofy.) Telco supported vi just fine with VT100. I recall FastTerm Geneve worked perfectly. h cursor left: backspace (better be non-erasing backspace) j down one line. backspace to cursor k up one line. when no upline supported, would print the whole previous line on a new line. Fun! l cursor right: echo the character under cursor Especially at 300 baud, you learned to used counts. 15x to delete 15 chars, 10k to go up ten lines. Try entering :ex in your favorite vi. To go back , you type vi. Some ex commands you already know are :w and :1,99d Edited December 16, 2023 by FarmerPotato Rewote keys section 3 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 11, 2023 Author Share Posted December 11, 2023 And that's the rest of the story. Thanks! 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 15, 2023 Author Share Posted December 15, 2023 (edited) So I finally got my head together to port the TTY version backwards onto the F18 80 column functionality. I found and fixed a bug that was in the TTY version where the editor cursor lost sync with the screen position. Changes: arrow keys and pageup/pagedown keys added to the valid key strokes for the 21st century VI users. When you enter editing mode the cursor changes from and underline to tall block I think this was missing in 1.43 of the f18 version. dw ( delete word/words) Next word (w) and previous word (b) commands Future: Now that this seems pretty stable, I have a search utility in development. It's pretty close. So that will add the / command. Replace might be a stretch but I will give it a try. The zip file just has the 3 binary program files (VI99II) and the manpage. Let me know what I broke. I have not spent enough time testing everything myself. Edited December 19, 2023 by TheBF Removed the buggy version or program 4 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 16, 2023 Author Share Posted December 16, 2023 Now if I was really smart, I would figure out how to compile this with my Forth re-compiler which removes all the text headers and would give back about 30% of the space for more features. hmm... that might take some work. 😊 2 Quote Link to comment Share on other sites More sharing options...
chris36 Posted December 17, 2023 Share Posted December 17, 2023 Still use vi in the form of vim as my goto text editor in Linux. Quote Link to comment Share on other sites More sharing options...
+mizapf Posted December 17, 2023 Share Posted December 17, 2023 11 minutes ago, chris36 said: Still use vi in the form of vim as my goto text editor in Linux. I would not have believed that 30 years ago, but this is also true for me. I usually say that before your fancy editor's splash screen has finished loading, I'm already done editing with vi. 2 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 17, 2023 Author Share Posted December 17, 2023 Oops! I found an error in my LIST code. It fails to display line 24 when the screen refreshes completely when loading a new file or page-up/page-down. (I think it worked on Terra Term OK, but I will have to test that as well) Very sorry. Here is a corrected version (0.93) I really suck at quality control without a boss. PS. Send in your bugs and I will do my best to clean them up. Standby.. fixed another thing. 1 Quote Link to comment Share on other sites More sharing options...
+dhe Posted December 17, 2023 Share Posted December 17, 2023 1 hour ago, TheBF said: PS. Send in your bugs and I will do my best to clean them up. Holiday break coming up, I will use the help pages as a guide to what is implemented. 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 19, 2023 Author Share Posted December 19, 2023 So once I tried to use V .92 it was pretty sad. This version is much better. line 24 reports file/editor information more consistently r command (read file) works for insert a file into a file at the cursor. dd dw yy report a text message more like vim. Overall seems more stable. Found a stack error in my putch code that I compensated for in the wrong place. Fixed. Let me know. I think I can see my way clear now to using this code base with VT100 codes by consolidating the VDP code into a file like the VT100 screen control. Known bug: When I try pasting a large file into the editor it hangs after a few lines. Don't have a reason for that yet. VI99II.93.zip 4 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted December 19, 2023 Share Posted December 19, 2023 Getting there What is the default baud rate? Can one pick the baud rate at program initiation or set a permanent default? Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 20, 2023 Author Share Posted December 20, 2023 8 hours ago, Vorticon said: Getting there What is the default baud rate? Can one pick the baud rate at program initiation or set a permanent default? This version is only for VDP/F18. I am tight on space as it is currently built so I don't think I can fit RS232 and VDP in the same program without blowing it out into SAMS. I want a solid editor before I go to SAMS. The latest version for RS232 is autobaud. It sets BPS after your first enter key is pressed. Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 20, 2023 Author Share Posted December 20, 2023 @Vorticon here is the last version of the RS232 version. I have one more bug to find on the VDP version and then I want build the RS232 version with this new code base because I think it's better. 1 1 Quote Link to comment Share on other sites More sharing options...
+dhe Posted December 25, 2023 Share Posted December 25, 2023 Today's Bug Report: vi to file gives error: DB OR db - returns error honk. 4j - goes down 4 lines, but only after you press a key, the cursor should move immediately. d$ - crashes system. write 3 lines. dw on word of middle line. you can no longer go down to last line with arrow keys. dd doesn't respect end of file. yy p combo. usually you can p as many times as you please. This version, you can only p once. 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 26, 2023 Author Share Posted December 26, 2023 There is no handler for d$ so that one doesn't surprise me. I need to look up what it means. (I will never duplicate the entire command set. Not enough space in a stock console) Quote Link to comment Share on other sites More sharing options...
+dhe Posted December 26, 2023 Share Posted December 26, 2023 From the manpage Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 27, 2023 Author Share Posted December 27, 2023 My mistake. I was adding commands faster than I realized. I have corrected d$ and will get to the paste function so it behaves as expected. I have created so many functions that I don't always remember how to use them correctly. Quote Link to comment Share on other sites More sharing options...
+dhe Posted December 27, 2023 Share Posted December 27, 2023 I printed the manpage you create for the release. I use it as a guide to what is fair game! 😃 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted December 27, 2023 Author Share Posted December 27, 2023 4 hours ago, dhe said: I printed the manpage you create for the release. I use it as a guide to what is fair game! 😃 Thank you for keeping me on track. I have been away from the code for a while and since I am not a real VI user, that is the only document that contains what I tried to get working. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.