Pascal Compiler for 8051 Microcontrollers
Turbo51 variables can have memory type directives DATA, IDATA, or XDATA which overrides default memory type for variables (IDATA memory with addresses starting from $80 is not available on all 8051 derivatives, some 8051 derivatives have also internal XDATA memory). Boolean variables are stored as bits in bit-addressable DATA memory wich is available in all 8051 derivatives. Volatile directive declares volatile variable - variable which is modified by some interrupt or hardware. Absolute directive declares variable on top of another variable (AbsVar absolute RecordVariable.Field is also possible) or at some absolute address.
Boolean variables can not be passed by reference (8051 has no instruction to reference bit variable by address) and can not be passed as parameter in re-entrant procedures. In such cases you can use system type ByteBool which occupies 1 byte. BitAddressable directive declares variable which will be placed in DATA address space from $20 to $2F - you can access individual bits of such (8-bit) bit-addressable variable with BitAddressableVar.n where n is 0 to 7. Data is always stored in little endian format. Examples: