[1] PBASIC was created to bring ease of use to the microcontroller and embedded processor world.
In the Stamp Editor, the PBASIC integrated development environment (IDE) running on a (Windows) PC, the programmer has to select 1 of 7 different basic stamps, BS1, BS2, BS2E, BS2SX, BS2P, BS2PE, and BS2PX, which is done by using one of these commands: The programmer must also select which PBASIC version to use, which he or she may express with commands such as these: An example of a program using HIGH and LOW to make an LED blink, along with a DO...LOOP would be: An example of a program using HIGH and LOW along with the FOR NEXT loop would be: Comments in the code are preceded by an apostrophe (').
The microcontroller ignores the rest of the line and continues to the next each time it encounters a comment.
PBASIC codes can be simply a list of statements: If the programmer selects 'Run' from the IDE's menu, the program is tokenized and uploaded to the Basic Stamp through an RS232 or USB cable and stored in the stamp's EEPROM as Huffman compressed non-byte-aligned variable-length tokens, and immediately executed.
Because statements are non-byte-aligned, a subroutine can start on any bit in any byte in the EEPROM.