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
0
votes
1 answer

How does program counter in 8085 actually work?

I have been reading about Program Counter of 8085. This material here states that the function of the program counter is to point to the memory address from which the next byte is to be fetched. When a byte (machine code) is being fetched, the…
Ravi
  • 612
  • 1
  • 6
  • 17
0
votes
1 answer

Reset the program-counter (AKA instruction-pointer) to 0

I am trying to reset the program-counter (AKA instruction-pointer) to 0. I had expected the following C code to work (but it didn't): typedef void(*func)(); func reset = NULL; reset(); Here is the dis-assembly when using VS2013 compiler: mov dword…
barak manos
  • 29,648
  • 10
  • 62
  • 114
0
votes
2 answers

In application loading and running programs

I want to write two main programs P1 and P2. P1 will be loaded into STM32 board with JTAG, and the binary file generated after P2 compilation will be written in STM32 board external flash memory. In P1, after doing somethings, I want to load P2 into…
ARM
  • 363
  • 1
  • 7
  • 18
0
votes
1 answer

When does instruction pointer get zero while debugging?

What are the possible scenarios when a program counter or instruction pointer get zero ?
0
votes
1 answer

Modify Program Counter (PC) to a saved address

I'm working on a program that uses inline assembly to perform a long jump. To my understanding, all I need to do is replace the FP and PC to a saved FP and PC. Using assembly, I'm able to change the frame pointer (%ebp) however I'm unable to do…
Kosz
  • 124
  • 1
  • 9
0
votes
1 answer

Exception encountered when trying to display the length of a string given by a user. MIPS

I am trying to compute the length of a string given by a user. Every time I try to run the code, I get the message "Exception occurred at PC=(a certain address) followed by the message :"Bad address in Data/stack read: (another address). I know…
T4000
  • 231
  • 1
  • 7
  • 24
0
votes
1 answer

branch if not equal to PC address

Hey got a question regarding Branch instructions. I have a branch if not equal to instruction located at 0x00002000 (PC) and the following: RS(Register 4) = 0 RT(Register 3) = 7 Therefore branch does not equal and should then follow the following…
user1060187
  • 957
  • 5
  • 12
  • 28
0
votes
2 answers

Program Counter changes

Of all possibilities in which the PC (program counter) register changes I found these: 1) PC increases its value with loading new instruction 2) with jumps and branches 3) with calling subroutine 4) with return from subroutine Are those all or am I…
user1097772
  • 3,499
  • 15
  • 59
  • 95
-1
votes
1 answer

How to declare counter in assembly language / emu8086?

I am new in assembly language. I just need some advice or tips on how can I declare counter loop that decrement the input number. For example, input = 5, print = 55555.5555.555.55.5 include emu8086.inc org 100h print 'Input a number: ' MOV AH,01H…
Bro
  • 1
  • 1
-1
votes
1 answer

Android Studio counter

I have a problem with a small counter system that I made in Android Studio the problem is that I don't know how to do the counter plus 1.5 because now it is all the time when I press the plus button it does all the time 1 there but that must be 1.5…
-1
votes
3 answers

Verilog Program Counter with branching

I need to create a Verilog module which accepts the clock, a reset, the immediate value from the instruction word (least significant byte), and the zero output from the ALU as inputs and generates an 8-bit Program Counter (PC) for the output. The…
dms94
  • 32
  • 1
  • 1
  • 6
-1
votes
2 answers

Change Program Counter in C

I want to change the content of the Program Counter (Instruction Pointer). I thought by overriding the system signal handler in C, I can get the pointer in the system stack frame. From there I can get the return address of the function and change…
P5291
  • 51
  • 1
  • 8
-1
votes
1 answer

Why is modification of the program counter not a privileged instruction?

The program counter is stored in the PCB and that is in the kernel space. But modifying the program counter is not a privileged instruction. Why is that?
Sanke
  • 676
  • 2
  • 13
  • 30
-1
votes
1 answer

VHDL Program Counter , multiple constant driver error

I am currently attempting to design a Program Counter(PC) using previously made components. The model of my design looks like this picture here. The issue im running into is connected my MUX component to the PC register component. I am supposed to…
Erik Machorro
  • 33
  • 1
  • 2
  • 7
-2
votes
1 answer

how can i remove a push button logic in the program counter and add Done logic so the program counter incements till this Done logic is high?

actually this my university project and I need how to write a Verilog code if anyone can help? I need the Verilog code.. thanks project statement: Aim of this project is to add the “done” signal and remove the “push button” for incrementing the…
cryptor
  • 17
  • 6
1 2 3 4 5 6
7