Search found 5 matches
- Tue Jan 16, 2024 2:16 pm
- Forum: Programming
- Topic: cc65 equivalent instructions?
- Replies: 7
- Views: 6546
cc65 equivalent instructions?
So I am writing a 6502 emulator, and now wants to test out some programs. I decided to generate the 6502 assembly from C using https://godbolt.org/ . I wrote a simple program declaring two variables and then adding them and storing the result on a third variable. The generated assembly output using ...
- Tue Dec 26, 2023 1:02 pm
- Forum: Newbies
- Topic: Which flag bits are set by the PLP instruction on 6502?
- Replies: 3
- Views: 16866
Which flag bits are set by the PLP instruction on 6502?
I was going through the instruction set of 6502 at https://www.masswerk.at/6502/6502_instruction_set.html#PLA . Now below the PLP (Pull Processor Status from Stack) instruction, it is stated that The status register will be pulled with the break flag and bit 5 ignored.
As far PLA instruction is ...
As far PLA instruction is ...
- Wed Nov 22, 2023 3:02 pm
- Forum: Newbies
- Topic: What does (PC+1) -> PCL and (PC+2) -> PCH mean here?
- Replies: 1
- Views: 4314
What does (PC+1) -> PCL and (PC+2) -> PCH mean here?
I was reading the JMP instruction of 6502 at https://www.masswerk.at/6502/6502_instruction_set.html#CMP
It states the folllowing:
JMP: Jump to New Location
(PC+1) -> PCL
(PC+2) -> PCH
I understand that the JMP instruction will change the Program Counter to the address given by the operand of ...
It states the folllowing:
JMP: Jump to New Location
(PC+1) -> PCL
(PC+2) -> PCH
I understand that the JMP instruction will change the Program Counter to the address given by the operand of ...
- Thu Nov 09, 2023 8:19 pm
- Forum: Newbies
- Topic: How does a 6502 processor know when to stop F-D-E-U cycle?
- Replies: 2
- Views: 4009
How does a 6502 processor know when to stop F-D-E-U cycle?
I was wondering how does a 6502 processor knows when to stop the Fetch-Decode-Execute-Update cycle
Suppose I have a few lines of instruction say:
LDA $01
ADC $02
STA $0671
I get the program execution up to the first three instruction, but how does the processor knows after executing the third ...
Suppose I have a few lines of instruction say:
LDA $01
ADC $02
STA $0671
I get the program execution up to the first three instruction, but how does the processor knows after executing the third ...
- Thu Oct 26, 2023 5:50 pm
- Forum: Newbies
- Topic: What are the initial values of the flag bits?
- Replies: 3
- Views: 4243
What are the initial values of the flag bits?
Apologies in advance if my question is too basic, I tried searching for the answer elsewhere but couldn't find it.
So I am trying to emulate a 6502 like processor, and currently I am just trying to write a very basic blueprint code for the project. As part of it I have written an 8 bit register, but ...
So I am trying to emulate a 6502 like processor, and currently I am just trying to write a very basic blueprint code for the project. As part of it I have written an 8 bit register, but ...