Compiled Versus Interpreted Code

Team-Fly    

 
eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications
By Chris Tacke, Timothy Bassett
Table of Contents
Chapter 2.  Introducing eMbedded Visual Basic


One of eMbedded Visual Basic's major differences to its desktop brother is that it doesn't provide a compiled binary executable. Instead, it produces an interpreted p-code file that must be run through an interpreter. This difference has several consequences:

  • eVB applications have slower performance. When an eVB application is run, the p-code must be interpreted at runtime, which requires processor cycles. This means that eVB isn't a great choice for lots of high-level mathematics, intensive graphics, and other processor-hungry applications.

  • eVB applications must be deployed with an interpreter, an application to run the p-code. eVB compiles applications to a file with a .vb extension. Because these must be run through the pvbload.exe interpreter, pvbload.exe must exist on the target device.

  • Pvbload.exe isn't the only thing you'll need to deploy. Pvbload.exe has its own dependencies and requirements. The base requirements for any eVB application are

    • Your .vb file

    • pvbload.exe

    • pvbform2.dll

    • pvbhost2.dll

    • vbscript.dll

    Also, if you add any controls or references to your project, you will have to deploy the necessary files for them. I'll cover those specifically when we use them in later chapters.

  • Because the application uses an interpreter, and .vb files are simply associated with the interpreter (clicking a .vb file automatically calls pvbload.exe), all eVB applications have the same icon, which is the pvbload.exe icon. Getting around this requires that you write a C++ launcher application with your desired icon, and that application must pvbload.exe with your .vb file as a command-line parameter.

On the positive side, because eVB applications are interpreted, you don't have to be concerned with the target device's processor type. With C++, when an application is compiled, the resulting binary is processor specific, and therefore multiple versions must be made for multiple processor types. This increases maintenance and deployment costs. With eVB, your final .vb file can be run on any processor without recompile.


Team-Fly    
Top
 


eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 108

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net