u/strilkrill

My first program was a text editor

As the title says, My first program is a text editor. Well other that hello world.

------------BACK GROUND----------------

Im 19 now but a year ago I got really into old computers and laptops. And I like really love them they are all really cool. but i realized I don't really use them and they just sit there. So I decided to get myself used to MSDOS and everthing to know about using them for daily things.

oneday I was thinking about how id like to learn how to program. I tried before by making gamed with c# and unity when I was 10 but I didnt really get into it.

I decided I really wanted to learn but I was afraid that i would give up again so I tried to think about the best way to learn. Who could I learn from that was also really great at programming you know? I realized that it were the programmers from the 80's and 90's. They could do amazing things by just learning from books and had the discipline to write efficient code while being limited with memory.

I realized I could follow in their foot steps with the same computers that they would have used. which mine is running MS-DOS 5.0 and an 80386 CPU.

So I went on a hunt to find the physical copies of compilers of languages I want to learn from. I found Borland Turbo C/C++, MASM, Microsoft Fortran and cobol. As well as a couple books for C.

These last two months of March and april Ive read seven books on C. My favorite was "Pointers on C" by Kenneth A. Reek. after learning the basics from the first book I read I wrote hello world as Is mandatory. But before I started learning C I had a goal which was to write a text editor so I kept reading until I felt like I could start.

------------The Grit Text Editor-----------------

I have named It Grit.

currently It is at a bare Minimum. The arrow keys are used to traverse the file and is saved/closed with ESC.

one Issue that desperatly needs attention is how the text is displayed. Because It is meant for to be ran from the command line it was not made using and specialized graphics functions and the text is just written character by character.

One

This Issue is the fault of my current gap in C knowledge. The functions I used from conio.h that control where the cursor is, and clearing the screen are work but cause on screen blips. this is because these functions are wraps for system interupts that do things like moving the cursor and such. this works HOWEVER back then programmers would display things on screen by directly accessing the graphics in memory with pointers.

--------------HOW I PLAN TO FIX/IMPROVE-------------

This is what I plan on learning next. first Im going to reread a lot of my books and then Im going to learn Graphics and at the same time Assembler with MASM.

-------------------GIT HUB--------------------------------

https://github.com/thatoneproton/Grit.git

if you guys could, read over and give feedback

reddit.com
u/strilkrill — 3 days ago