Search found 186 matches

by Garth
Wed Jun 17, 2020 5:59 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 99
Views: 10637

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

Chapter 17 of the Eyes & Lichty programming manual mentioned earlier dedicates an entire page to diagramming every one of the addressing modes. It would be difficult for me to do any better than that. Every instruction has an op code. That's the first byte of the instruction, and in some cases, the ...
by Garth
Wed Jun 17, 2020 1:58 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 99
Views: 10637

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

I'm wondering what you mean about "There could be quite a few variations, depending on the addressing mode." In an effort to keep it simple (since you're just starting out), I'll give just one example, in the analogy of a treasure hunt, the game where you get a clue that tells you where to look for...
by Garth
Tue Jun 16, 2020 7:03 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 99
Views: 10637

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

Operands are the things you need in order to carry out an operation. For example, if you're faced with the task of opening the door to your house, the operands are the keys and the door, the things without which you can't possibly finish the task. So Operands are like... the "Actors" of existences ...
by Garth
Sun Jun 14, 2020 5:29 pm
Forum: Newbie Help Center
Topic: Hello, I'm back, still need assistences
Replies: 99
Views: 10637

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: 99
Views: 10637

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: 99
Views: 10637

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: 99
Views: 10637

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: 99
Views: 10637

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: 99
Views: 10637

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: 99
Views: 10637

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: 99
Views: 10637

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: 99
Views: 10637

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: 99
Views: 10637

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: 4652

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: 4652

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...