Questions tagged [program-counter]

The program counter (PC), commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR), the instruction counter, or just part of the instruction sequencer, is a processor register that indicates where a computer is in its program sequence.

The program counter (PC), commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR), the instruction counter, or just part of the instruction sequencer, is a processor register that indicates where a computer is in its program sequence.

105 questions
1
vote
1 answer

Is the difference between programming model wrt Program Counter and Stack Pointer in case of Assembly?

Processor model I ● Registers  PC – Program Counter  Single data register (accumulator) without name  We will use symbol A to describe operations on this register ● Stack with an unspecified implementation ● Data specified…
user366312
  • 16,949
  • 65
  • 235
  • 452
1
vote
1 answer

Trap instruction: why must the program counter and processor status register be changed atomically?

I came across the following problem on a previous exam from my operating systems class. Consider an architecture in which the TRAP instruction has two effects: to load a predefined value of the Processor Status Register (PCR), which contains the…
Tyler Small
  • 85
  • 11
1
vote
0 answers

instruction register Motorola 68k

Hello I was wondering how the program counter of the Motorola 68k is incremented as in Mc68k instructions are length variable. Furthermore what's the length of the instruction register? How can instruction register hold a length variable…
1
vote
1 answer

MIPS PC and label tracking

Assuming that the current PC is 0x00400010 (after increment) and the target label has the value of 0x00400040. What is the binary value of the constant in the instruction? beq $s0, $s0, target I'm not really sure how to approach this question. I…
user8588899
1
vote
1 answer

What does the gate-level circuitry of a Program Counter in a processor look like? Or the time step counter?

Computer architecture seems to be a very difficult area of computer engineering that I think needs further material. There are great conceptual explanations of how different units work with each other, particularly concerning registers in an MOS…
Keith Axelrod
  • 175
  • 1
  • 6
1
vote
0 answers

RISCV tests seem to have no code in start_pc

I've cloned this repo and built tests using toolchain. But faced some issues: riscv-qemu faults running these tests (segfault or memory allocation fault). Followed the instruction on your site starting pc in the test header (ex., rv32(64)mi-p-csr)…
mechanic
  • 128
  • 1
  • 10
1
vote
2 answers

Does mips have 32 bit addresses AND 32 bit instructions?

I know that 32-bit MIPS instruction and memory registers are... well 32 bits... and that the PC calculates the address for that instruction in the instruction register. My question is this: Are the 32-bit address appended to a 32-bit…
Charlie
  • 11
  • 3
1
vote
1 answer

Is there a way to move the program counter in the Chrome debugger?

Is there a way to move the program counter to a given line when debugging Javascript in Chrome? I do not mean continue to a given line, but to skip instructions. I wasn't able to find anything in the tutorials or help. I'm using v 49.0.2623.87 at…
Kit
  • 20,354
  • 4
  • 60
  • 103
1
vote
2 answers

Add command under ARM architecture and program counter

I'm focusing on a snippet of ARM Assembly where add command it is used. The snippet, see below, simply states: to the address of the program counter add the offset calculated to find the position of the string stored at L._str, where L._str is the…
Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
1
vote
1 answer

What is the value of stack pointer?

Consider a processor with byte-addressable memory. Assume that all registers, including Program Counter (PC) and Program Status Word (PSW), are of size 2 bytes. A stack in the main memory is implemented from memory location (0100)hex and it grows…
Vikrant Singh
  • 669
  • 1
  • 6
  • 18
1
vote
1 answer

VHDL Program counter using signals and previously made components?

I am currently in the middle of a project where I am attempting to design a single cycle cpu. I am doing this without any pipe-lining, since that would greatly add to the complexity of the design. I am simply taking baby steps as I learn this. I…
Erik Machorro
  • 33
  • 1
  • 2
  • 7
1
vote
1 answer

Questions about adding jal instruction to mips single cycle datapath

I am trying to add jal instruction i understand how it works however i am having difficulty implementing it in the hardware? I have this schematic and it shows that 31 connects to the mux before the register but not sure what to connect. I see…
user998316
  • 10,313
  • 4
  • 18
  • 11
1
vote
1 answer

Infinite loop when simulating a Program Counter design with Icarus Verilog

I am implementing a simple Program Counter adder with the following prototype: module program_counter(input enable_count, input enable_overwrite, input[31:0] overwrite_value, …
Patrick Samy
  • 156
  • 1
  • 10
1
vote
2 answers

Silent failure: debuggerd committing suicide to free the zombie

My app seems to shut down silently about every 3-4 times I start it. No exception, no Force close message, it just opens for a split second and then shuts down. After that I can start it on average 3-4 times again without problems before the same…
Magnus
  • 17,157
  • 19
  • 104
  • 189
1
vote
1 answer

PC value in between two instructions (program counter)

Trying to understand the cause of the watchdog. The snippet of assembly routine is as follows: fe813cf0: 2820 cmp r0, #32 fe813cf2: dbf0 blt.n fe813cd6 fe813cf4: f04f 30ff mov.w r0,…
Sandeep
  • 18,356
  • 16
  • 68
  • 108