Tuesday, January 18, 2011

Intelligent help in Virtual 8085

The intellisense feature of the Visual Studio IDE from Microsoft is one of the most talked feature that ensures easy and faster development of programs. When we gave an introductory presentation last Saturday, one of our college teachers suggested to include such feature in Virtual 8085. In my opinion, it is quite a difficult task to achieve. First of all, we have to scan whatever the user has entered, and then look up the instruction's help and load it. After about a day's work I gained some success regarding this.
(Intelligent Help showing help for the current line being edited)

I did not scan the whole text the user had input through the text box. What I did was just to scan the line the user is editing. When the line is scanned, we have to split it into three parts viz. Label, Mnemonic, Operands. If you know, an assembly language instruction may contain a label, a mnemonic, and operands. Now when the line is split into components, only the Mnemonic is of interest to us right now, because the help we will provide is only related to the mnemonic. We have another rich text box to show the help. We have to load the help file (.rtf) of that mnemonic into the rich text box. The name of the help file is the same as the mnemonic, like if the mnemonic is MOV then its help file would be MOV.rtf.

This made my task easy, I just had to load the file whose name is [MNEMONIC].rtf, if the file is not found then just clear the rich text box.
(Intelligent help code)
At some other time I will explain thoroughly how I achieved this.

No comments:

Post a Comment