Close

Compiler - "Text Editor"

A project log for PIC MCUs Based Homebrew Computer

The goal: to make a working computer, with a keyboard input, LCD Display output, a compiler and to have fun all the way. NEWBIE ALERT

davedave 05/11/2015 at 20:092 Comments

So, my last log was about implementing a compiler for my project. Today it was time to prepare a stage for my compiler, meaning making some sort of text editor.

I am making a single line text editor . First I will compile each line on the fly, which has a bad side to it -> you can't really go back and fix something in your code. You make a mistake, you start all over again. Later, when all commands will be implemented, I will change that.

Today I had a couple of hours of thinking and searching to do, before finnaly figuring out how to make a backspace functionality for my LCD display. But it is working now. I also started outlining the finished prototype, since the compiler (or better to say op code) is what connects all the parts of my computer together. So the plan is to have a two state computer.

STATES:

1. programming (editor, compiler, compiler output target)

2. Execution (not executing code directly from a target, but executing some built in functions, among which is a a method to call an assembled code from ROM).

Please, any thoughts on that?

I am pretty lost, so I'm just trying to make it as simple as possible, so to have something to build on. The main problem is that I don't have an exact idea of what the end thing will look like and work like.

Thanks.

Discussions

jaromir.sukuba wrote 05/11/2015 at 20:16 point

You may want to look at my project #PP04 - Camel computer Editor, assembler, programmer and in-circuit debugger of PIC18 MCU running on PIC32 - this seems to be related to point 1 of your list. It also contains BASIC and BrainFuck interpreter (regarding point 2).

  Are you sure? yes | no

dave wrote 05/11/2015 at 20:31 point

Thank you very much for your comment. I am going to check it out - tomorrow - now I have to go to bed. BASIC compiler :S.. you're way way ahead of me. Whenever I get stuck with my project I'm thinking "Why didn't I go for something simpler, like a switch based programming thing". But I'll make it, it won't be as cool as your project, but it will be alright for my first project. I'll check it out tomorrow. Have a nice day!

  Are you sure? yes | no