Dienstag, 24. März 2009

Alpha-Version finished

Nearly a week it's now since my last writing here. As you can imagine, the last days of finishing a product steal away all free time which is normally available every day.

I worked hard, but I made it. I worked on the connection to the underlying Forth Operating System, and I started with a helpful program I found somewhere as a useful example, and I really had to spend more than a day on that - five days it took to bring all the right things together, including making a sample application (which needed nearly a day, because it was connected with improvements of the redirect-files).

This little example program source "FileEmit.f" by Bertrand André Jacques was really helpful.
This program was to redirect the output to a file, and I first added the redirection to a Multiline TextBox, so I could compare what is visible on the MTxtBox and what is written into the file.
This way I could find out how the output to the screen worked. It took me more than two days, to do the adaptation in the right way, it was really tricky. The computer-screen and the Textbox have - as far as I found out - different rules.

I did not know about Row/Column-Addressing of the Textbox (I should have googled it, but I did not think that way), and the screen-output uses XY-addressing for every line and for each character when typed. With a lot of tricks I got it working. When finished, I removed the redirection to a file, I did not use it any more.

That was the easy part.

The next part was to redirect the input, i.e. to use PushButtons of a form instead of the normal keys of the computer keypad to connect to the operating system.

Both parts together that means, to use a Multiline TextBox and PushButtons of a form as Console to the Forth Operating System in an easy way, so that everybody can use it.

It needed as long as the first part, it works, but switching between keyboard and pushbutton array (remember the arrays I wrote about?) has a little hurdle, because - so I guess - the operating system is waiting for an input, still after the input is switched to the PushButton-Array. The result is: a last time before the switchover is in effect a key of the keyboard has to be pressed, and then it works properly.

I found if I start a program on the normal console which emits characters regularly, the switchover works fine. But I did not find out how to get it working with starting this program by another program. It should work somehow, I am sure of that, but I am not familiar enough with the internals of the operating system.

Thing is, most of these modules which have been written in machine language at times of DOS are now calls to the Windows-System, and there I have no chance to change that.

But behold, writing this, I remember I looked for input redirecting within Windows a while ago.

This is the second time now, that writing my Blog - telling the story to you - helps me to get some insight by myself. And now I remember I tried to find out input redirection, because I liked to insert a Barcode-Reader Converter Software Module into the keyboard input stream, and I did not find out how, not even with looking up on the Internet and not with looking at all my XP-Books. Finally I was happy to find a module on the Internet which just did the Barcode-Thing.

To type single characters using the Form-Pushbuttons works perfect, but one remaining part is to write complete words by pushing a single button. Here I am the first time to have to ask the experts. A few days from now is the first hands-on workshop for the Alpha-Version of visualFORTH, and next week I will ask experts and find out if they have a solution to fix this remaining problem.

Keine Kommentare:

Kommentar posten