Positron16 BASIC Compiler Manual
Compiler and documentation by Les Johnson.
Manual cover

Contents
The original topic hierarchy is retained. Additional topics and subsections found in the manual are marked Added.
- About this manual
- Introduction
- Original printed contents
- Positron16 Compiler Overview
- Identifiers
- Line Labels
- Commenting Lines of Code
- Ports and other SFRs
- Numeric Representations
- Quoted String of Characters
- Null Terminated Added
- Standard Variables
- Intuitive Variable Handling. Added
- RAM space required. Added
- Static Variables
- Global Variables
- Shared Variables
- Pin Variables
- 32-bit and 64-bit FloatIng Point Maths
- Aliases
- Symbols
- Creating and using Arrays
- Creating and using String variables
- Loading a String Indirectly Added
- Slicing a String. Added
- Procedures
- A Typical Procedural BASIC Program Layout
- A Typical Flat BASIC Program Layout
- General Format
- Line Continuation Character '_'
- Creating and using Flash Memory Tables
- String Comparisons
- Relational Operators
- Boolean Logic Operators
- Mathematic Operations and Functions
- Standard operators Added
- Add '+' Added
- Subtract '-' Added
- Multiply '*' Added
- Multiply High '**' Added
- Multiply Middle '*/' Added
- Divide '/' Added
- Remainder '//' Added
- Logical operators Added
- Logical and '&' Added
- Logical or '|' Added
- Logical Xor '^' Added
- Bitwise Shift Left '<<' Added
- Bitwise Shift Right '>>' Added
- Complement ‘~’ Added
- Positron16 operators Added
- Trigonometry functions Added
- Abs
- fAbs
- dAbs
- Acos
- dAcos
- Asin
- dAsin
- Atan
- dAtan
- Atan2
- dAtan2
- Ceil
- dCeil
- Cos
- dCos
- Dcd
- Dig '?'
- Exp
- dExp
- Floor
- dFloor
- fRound
- dRound
- ISin
- ICos
- Isqr
- Log
- dLog
- Log10
- dLog10
- Modf
- Modd
- Ncd
- Pow
- dPow
- Rev '@'
- Sin
- dSin
- Sqr
- dSqr
- Tan
- dTan
- Standard operators Added
- Compiler commands and directives — quick reference Added
- Compiler Commands and Directives Added
- Peripheral and Interfacing Commands Added
- LCD Commands Added
- Async Serial Commands Added
- Comparison and Loop Commands Added
- General BASIC Commands Added
- RAM String Variable Commands Added
- Non-Volatile Data Commands Added
- Directives Added
- Peripheral and Interfacing Commands
- ADin
- ADin Declares Added
- Bstart
- Bstop
- Brestart
- BusAck
- BusNack
- Busin
- Str modifier with Busin Added
- Busout
- Str modifier with Busout. Added
- Declares Added
- Button
- PinClear
- Counter
- DTMFout
- Freqout
- HbStart
- HbStop
- HbRestart
- HbusAck
- HbusNack
- Hbusin
- Hbusin Declares Added
- Str modifier with Hbusin Added
- Hbusout
- Hbusout Declares Added
- HbStart2
- HbStop2
- HbRestart2
- HbusAck2
- HbusNack2
- Hbusin2
- Hbusin2 Declares Added
- Str modifier with Hbusin2 Added
- Hbusout2
- Hbusout2 Declares Added
- Str modifier with Hbusout2. Added
- High (PinHigh)
- HPWM
- I2Cin
- Declares Added
- I2Cout
- Inkey
- Inkey Declare Added
- Input (PinInput)
- Low (PinLow)
- Output (PinOutput)
- Oread
- Dallas 1-Wire Protocol. Added
- Inline Oread Command. Added
- Owrite
- The Str Modifier Added
- PinGet (GetPin)
- PinMode
- Pot
- PulseIn
- PulseOut
- PWM
- RCin
- Servo
- PinSet
- Shin
- Inline Shin Command. Added
- Shout
- Sound
- Toggle
- ADin
- Async Serial Commands
- Hrsin, Hrsin2, Hrsin3, Hrsin4
- Hrsin Modifiers. Added
- Declares Added
- Hrsout, Hrsout2, Hrsout3, Hrsout4
- Declares Added
- For HRSout Added
- For HRsout2 Added
- For HRsout3 Added
- For HRsout4 Added
- HrsoutLn, Hrsout2Ln, Hrsout3Ln, Hrsout4Ln
- Declares Added
- Hserin, Hserin2, Hserin3, Hserin4
- Hserin Modifiers. Added
- Str modifier. Added
- Declares Added
- Hserout, Hserout2, Hserout3, Hserout4
- Declares Added
- HseroutLn, Hserout2Ln, Hserout3Ln, Hserout4Ln
- Declares Added
- HSerialx_ChangeBaud
- Rsin
- Declares Added
- Rsin Modifiers. Added
- Str modifier. Added
- Rsout
- Declares Added
- RsoutLn
- Declare Added
- Hrsin, Hrsin2, Hrsin3, Hrsin4
- LCD Commands
- Comparison and Loop Commands
- General BASIC Commands
- RAM String Variable Commands
- Flash Memory and EEPROM Commands
- Compiler Directives
- Asm..EndAsm
- Config
- Declare
- Misc Declares.
- ADin Declares.
- Busin - Busout Declares.
- Hbusin - Hbusout Declares.
- Hbusin2 – Hbusout2 Declares.
- USART1 Declares for Hserin, Hserout, Hrsin and Hrsout.
- USART2 Declares for use with Hrsin2, Hserin2, Hrsout2 and Hserout2.
- USART3 Declares for use with Hrsin3, Hserin3, Hrsout3 and Hserout3.
- USART4 Declares for use with Hrsin4, Hserin4, Hrsout4 and Hserout4.
- HPWM Declares.
- Alphanumeric (Hitachi HD44780) LCD Print Declares.
- Graphic LCD Declares.
- KS0108 Graphic LCD specific Declares.
- Toshiba T6963C Graphic LCD specific Declares.
- ILI9320 Colour Graphic LCD specific Declares.
- ADS7846 Touch Screen controller Declares.
- Keypad Declare.
- Rsin - Rsout Declares.
- Serin - Serout Declare.
- Shin - Shout Declare.
- Stack Declares.
- Oscillator Frequency Declare.
- Device
- Dim
- End
- Include
- Proc-EndProc
- Sub-EndSub
- Symbol
- Interrupt Directives
- Using the Preprocessor
- Positron16 IDE Overview
- Menu Bar
- Main Toolbar
- Edit Toolbar
- Compile and Program Toolbar Added
- Code Explorer
- Device Node Added
- Results View
- Editor Options
- Highlighter Options
- Reserved Word Formatting Added
- Compile and Program Options
- Installing a Programmer
- Creating a custom Programmer Entry
- IDE Plugins
- ASCII Table
- Hex View
- Assembler Window
- Assembler Main Toolbar
- Assembler Editor Options
- Serial Communicator
- Serial Communicator Main Toolbar
- Protected Positron16 Compiler Words