Author Topic: What I have been working on...  (Read 1170 times)

0 Members and 1 Guest are viewing this topic.

Offline Ampera

  • Super Contributor
  • ***
  • Posts: 2508
  • Country: us
    • Ampera's Forums
What I have been working on...
« on: February 20, 2018, 08:24:33 am »
My C programming is getting stronger and stronger, and now that I am starting on Assembly programming, I thought I would put my C skills to the test and try to write myself a little tool.

There's a program called Emu8086 which is a stepping 8086 assembler and emulator that can run programs instruction by instruction. This is cool, but the program is I believe abandoned, and also paid, which are two things that don't go well together.

Either way, my current project, called Amp8086 out of a massive, unending ego, as well as a complete and total lack of any creativity on my part, is an MS-DOS oriented 8086 IDE, including a text editor with support for Unix and DOS line endings for easy use of files from both OS families, an MASM compatible 8086 assembler (MASM as that's what I've been learning currently), and a simple stepping 8086 emulator.

The program is in preliminary stages, with time being sporadically placed into it, but I hope to get text manipulation working in a week, including I/O.

It is written entirely in C, and will be tested to run in DOSBox, but the idea would be to use something like VMWare with a much faster system to get a much more capable program.

Why DOS? Because I got annoyed with setting up the one C display library that claimed to be simple, so I decided DOS it was. This will be released for completely free use, but I may or may not charge for private use of the source code.

I do have a picture of the text editing UI that I made:

Currently only basic text editing is working, but I've been reorganizing my thoughts, and I have some very basic buffer manipulation.

Here is a semi-mockup (Was done using the program, but the proper functionality isn't really in there yet) I made of what code might look like in the IDE:



My personal development environment has also changed. I am now using a RasPi 3 over SSH with X11 tunneling to use DOSBox. All text is edited in GNU Nano, and compiled using TC.
« Last Edit: February 20, 2018, 08:26:47 am by TwoOfFive »
C/C++/Java Programmer, Legacy hardware enthusiast, madman.
If it's broken, I probably did it.
EEVBlog IRC: irc.austnet.irc #eevblog
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 3025
  • Country: de
Re: What I have been working on...
« Reply #1 on: February 20, 2018, 08:53:02 am »
My personal development environment has also changed. I am now using a RasPi 3 over SSH with X11 tunneling to use DOSBox. All text is edited in GNU Nano, and compiled using TC.

Hey -- isn't the whole point of this vintage computing hobby to use an old 8086 machine, whirring floppy drives, clicky IBM keyboard and all? You are doing it wrong!  ;)
 

Offline Ampera

  • Super Contributor
  • ***
  • Posts: 2508
  • Country: us
    • Ampera's Forums
Re: What I have been working on...
« Reply #2 on: February 20, 2018, 08:57:15 am »
I wanted to run an SSH server using DOS, but it's Real hard to do that.
C/C++/Java Programmer, Legacy hardware enthusiast, madman.
If it's broken, I probably did it.
EEVBlog IRC: irc.austnet.irc #eevblog
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 5832
  • Country: us
Re: What I have been working on...
« Reply #3 on: February 21, 2018, 02:35:15 am »
Looks fancy.  Is the plan to try and simulate a PC?  BIOS and all?  It will be interesting to see how far you get with it. 
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
 

Offline Ampera

  • Super Contributor
  • ***
  • Posts: 2508
  • Country: us
    • Ampera's Forums
Re: What I have been working on...
« Reply #4 on: February 21, 2018, 03:34:19 am »
Looks fancy.  Is the plan to try and simulate a PC?  BIOS and all?  It will be interesting to see how far you get with it.

The plan for the moment is to do just a straight opcode interpreter with no BIOS. It just takes instructions, and shows what they would do when executed.
C/C++/Java Programmer, Legacy hardware enthusiast, madman.
If it's broken, I probably did it.
EEVBlog IRC: irc.austnet.irc #eevblog
 

Offline Ampera

  • Super Contributor
  • ***
  • Posts: 2508
  • Country: us
    • Ampera's Forums
Re: What I have been working on...
« Reply #5 on: February 23, 2018, 09:09:07 am »
Is it embarrassing that it took days of code redesign, and finally about 30-60 minutes just trying stuff with the watch tool to get a function that inserts a character into a string at a certain offset?

Here is some code, and it's probably definitely messy.

First off, I have a function to make lines. I use a char pointer array (an array of pointers) that point to strings (so essentially an array of pointers that point to arrays). I used this to store images in memory, it should work well here, and allow very powerful line by line modifications. The reason it's so big is because I am adding in support for both Unix and DOS line endings, and the line endings are stored with the array. However, now that I think about it, that's pretty not needed, and I can most definitely do without those and just add them when I save the file. Will fix that in a second. My brain has been clogging with this for too long, I'm getting off track.



Next up we have the code to insert text into the string. This is probably mostly final. Hopefully it fully works, I haven't extensively tested it (out of fear of breaking it), but it should work.



Most of my issues come from my inexperience with the intricacies of C. I know what I'm doing (or at least I hope and think I do), but small things that I just don't understand the minute nature of trips me up. Either way, this is intended to be a learning project, so at least I am learning.

Anyways, back to coding.
C/C++/Java Programmer, Legacy hardware enthusiast, madman.
If it's broken, I probably did it.
EEVBlog IRC: irc.austnet.irc #eevblog
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 5832
  • Country: us
Re: What I have been working on...
« Reply #6 on: February 23, 2018, 11:26:07 am »
This is a similar program I wrote way back to run an ICE I had designed.  It can assemble the code, then display the opcodes and number of clock cycles per instruction.  You can set break points and do single steps.   It looks like I was doing the color text in assembler back then.   
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf