Search found 183 matches

by Garth
Sun Jun 14, 2020 5:29 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

Okay, A, X, and Y can turn on the Negative Flag. But NOT S nor PC. Mostly right. Actions on A, X, or Y can set the N flag. Does "Actions on A, X, or Y" ALSO applies to Carry Flag and Zero Flag? Or only one at a time? Yes, as I put later in the same post. The flags are in the Processor status regist...
by Garth
Sat Jun 13, 2020 9:21 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

In this case you can simply say SBC/CMP subtracts a number from another, but if you want to get technical, numbers are specified as operands in instructions. For example: in the instruction SBC #14, SBC is the operator (it performs an operation) and #14 is the operand (it's an argument needed by th...
by Garth
Sat Jun 13, 2020 9:11 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

You cannot rotate, shift, or add in the X & Y registers, nor S. You can compare X or Y with CPX or CPY, and that can affect the C flag. You cannot compare S though. This one, I'm a little confused... I'm thinking the X and Y Register will NOT be affected by Overflow Flag? Unless I'm forgetting some...
by Garth
Sat Jun 13, 2020 4:59 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

So Zero Flag can turn on if the latest operation [A, X, Y, and S] is 0 right now? If X and Y is number 20 and 50, but A is 0, the Flag is on, and will remain on until A equals something other than 0? If the latest operation was on X, Z will reflect the X result. If the latest operation was on Y, Z ...
by Garth
Sat Jun 13, 2020 3:02 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

The Zero Flag: It turns on if the A, X, Y, or S Register has zero? It turns on if ONLY The A Register is turned on? Or if the destination of Address is holding zero right now? Z=1 if the result of the last load, logic, or arithmetic operation is 0. Stores do not affect it, nor does it ever reflect ...
by Garth
Sat Jun 13, 2020 2:38 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

I don't understand at first sight. LDA foobar - Load number into A Register from "foobar" label. "Foobar" is a silly name used in programming discussions where the identity is not particularly important, like of like saying "John Doe" for a hypothetical person. In the scenario I gave, "foobar" is t...
by Garth
Fri Jun 12, 2020 11:30 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

Can you do examples about it??? Ok, here's an example: Let's say you want to examine an 8-bit variable in memory to see if it's zero, and branch on whether it is or not. If you just load in into whichever register is free, the next instruction can be your branch instruction: LDA foobar ; Examine va...
by Garth
Fri Jun 12, 2020 8:38 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

An automatic compare-to-zero instruction (which updates the N and Z flags) is built into the following 65c02 instructions: LDA, LDX, LDY, INC, INX, INY, DEC, DEX, DEY, AND, ORA, EOR, ASL, LSR, ROL, ROR, PLA, SBC, ADC, TAX, TXA, TAY, TYA, and TSX, and on the 65c02 (ie, CMOS), INA, DEA, PLX, and PLY. ...
by Garth
Thu Jun 11, 2020 6:49 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

At least 6502 jargon does not use the term "move" like many processors do, which I'm glad for, because "move" wrongly suggests it's no longer in the source. "Copy" is good. "Transfer" (like TAY, TYA, TAX, TXA, TXS, and TSX), "load," and "store" are still better than "move."
by Garth
Thu Jun 11, 2020 2:15 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 98
Views: 7165

Re: Hello, I'm back, still need assistences

I think "if" is a better term than "while." "While" implies a condition that persists, usually in a loop, where you continue looping and looping until that condition ends. The C flag may be changing many, many times in that loop though, and the branch only sees if it's set at the moment the conditio...
by Garth
Wed May 13, 2020 11:33 am
Forum: NESdev
Topic: Compiled stack proposal
Replies: 22
Views: 3682

Re: Compiled stack proposal

It seems like some key characteristics of stacks are perhaps not being understood correctly. There's a treatise on 6502 stacks (plural, not just the page-1 hardware stack) at http://wilsonminesco.com/stacks/ . Later chapters do get into local variables and environments, and recursion. You may not n...
by Garth
Wed May 13, 2020 2:10 am
Forum: NESdev
Topic: Compiled stack proposal
Replies: 22
Views: 3682

Re: Compiled stack proposal

It seems like some key characteristics of stacks are perhaps not being understood correctly. There's a treatise on 6502 stacks (plural, not just the page-1 hardware stack) at http://wilsonminesco.com/stacks/ . Later chapters do get into local variables and environments, and recursion. You may not ne...
by Garth
Thu May 07, 2020 10:46 am
Forum: NESdev
Topic: Linear interpolation overtones
Replies: 10
Views: 2253

Re: Linear interpolation overtones

I think the legitimate purpose of the interpolation would be to remedy some aliasing trouble, at the expense of accepting some distortion. Is a better anti-alias filter an option? Up to 4th- or 5th-order is pretty easy with common parts, not needing precision capacitors. (Precision resistors are com...
by Garth
Tue May 05, 2020 11:49 am
Forum: Newbie Help Center
Topic: eeprom chips
Replies: 6
Views: 1597

Re: eeprom chips

I have found a lot of those chips on ebay Be careful! If they're coming from China, they're usually not what they say they are. We've been through this on the 6502.org forum. Recently there have been a lot of fake 6502's and 65c02's on eBay—fake in the sense that they're not the exact type, brand, ...
by Garth
Mon Apr 27, 2020 7:26 pm
Forum: Newbie Help Center
Topic: Questions on CLC/SEC and general NMI logic
Replies: 6
Views: 1193

Re: Questions on CLC/SEC and general NMI logic

The carry flag is always drawn into the ADC and SBC instructions. If you already know that a previous instruction left it the way you want it, then you can omit the CLC or SEC; but usually an addition or subtraction will require initializing it. (If it's a multi-byte addition or subtraction, only do...