IDE Interface

Previous 

 

An application can communicate with the MyBASIC2 IDE using a pipe and a simple protocol with a few commands.  The basic protocol is:

 

1.Create a Pipe named "\\\\.\\pipe\\mybasic2ide".  You can use the define MB_IDE_PIPE_NAME.
2.Start the IDE application with
3.Connect to Pipe and wait for IDE to establish link
4.Wait for Command.  Read any parameters.
5.Verify Command and Command Parameters.  Send ACK/NAK.

Command ACKs:




'+'

Success (ACK)



'!'

Error (NAK)

6.Execute Command

Commands:




'?'

Status Request.  Always respond with ACK ('+')



'E'

Go to Step 8 and Exit IDE Mode



'R'

Run Script supplied with the 'F' or 'S' command.



'F'<name>

Script File Name as a zero terminated string.



'L'<length>

Script Buffer or FileName Length.  Length is an 4 byte integer.  Length includes the '\0' string termination.  This command will be followed by 'F' or 'S' command. 



'S'<script>

Script Buffer as a zero terminated string.



'D'<0/1>

Debugger ON/OFF.  1 Byte boolean parameter.  Type of debugger is defined locally.



'X'<options>

Run/eXecute with Options.  1 Byte unsigned load/run option flags.  See MB_LOAD_xxx for defined flags.

7.Go to step 4
8.Close Pipe