User manual

151
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
Prototype
function Ord(const character : char) : byte;
Description Function returns ASCII code of the character.
This is an “inline” routine; the code is generated in the place of the call.
Parameters - character: input character
Returns ASCII code of the character.
Requires Nothing.
Example
c := Ord(‘A’); // returns 65
Notes None.
Ord
Prototype
procedure SetBit(var register_ : word; rbit : byte);
Description Function sets the bit rbit of register_. Parameter rbit needs to be a variable or literal with
value 0..15. For more information on register identiers see Predened Globals and Constants .
This is an “inline” routine; the code is generated in the place of the call.
Parameters - register_: desired register
- rbit: desired bit
Returns Nothing.
Requires Nothing.
Example
SetBit(PORTB, 2); // Set RB2
Notes None.
SetBit
Prototype
procedure ClearBit(var register_ : byte; rbit : byte);
Description Function clears the bit rbit of register. Parameter rbit needs to be a variable or literal with
value 0..7. See Predened globals and constants for more information on register identiers.
This is an “inline” routine; code is generated in the place of the call, so the call doesn’t count against
the nested call limit.
Parameters - register_: desired register
- rbit: desired bit
Returns Nothing.
Requires Nothing.
Example
ClearBit(PORTC, 7); // Clear RC7
Notes None.
ClearBit