pub fn program_counter() -> raw_ptr 
Expand description

The program counter. Memory address of the current instruction.

Returns

  • [raw_ptr] - The location in memory of the current instruction.

Examples

use std::registers::program_counter;

fn foo() {
    let pc = program_counter();
    assert(!pc.is_null());
}