Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About GarthW

  • Rank
    Combat Commando

Contact / Social Media

Profile Information

  • Gender
  1. I have a lot of tips of this kind in the Tips For Programming the 65(c )02 chapter of my 6502 primer. The following is one of them. An automatic compare-to-zero instruction is built into the following 65(C )02 instructions: LDA, LDX, LDY, INC, INX, INY, DEC, DEX, DEY, INA, DEA, AND, ORA, EOR, ASL, LSR, ROL, ROR, PLA, PLX, PLY, SBC, ADC, TAX, TXA, TAY, TYA, and TSX. This means that, for example, a CMP #0 after an LDA is redundant, a wasted instruction. The only time a 65c02 (CMOS) needs a compare-to-zero instruction after one of these is if you want to compare a register that was not involved in the previous instruction; for example, DEY CPX #0 (Note the Y and the X are not the same register.) If you can spare a register to which you can transfer the one you want to test, you can save a byte with the transfer instead of a compare instruction. The example above, if the contents of A don't need to be kept, could be changed to: DEY TXA and then you can branch on the N or Z flag which tell if X was negative or zero. The TXA isn't any faster (both TXA and CPX# take two clocks); but TXA takes only one byte, whereas the CPX #0 takes two bytes. The NMOS 6502 did have a bug in that the flags weren't always correct after a decimal-mode operation like ADC; so then you might have to follow it with the CMP #0 to get the N and Z flags right. It's best to just use the CMOS processor when possible. Note to admin: I have PM'ed about this kind of thing before, and gotten no answer. Whether in BBCode mode or otherwise, I can't find any way to keep the "#0" black in the code section, or put the C in 65C02 in parentheses without a space after it and keep it from turning it into the copyright sign, or other things I want to do. In BBCode mode, there's no line wrap as I'm writing. This kind of thing is why I don't post much on this forum. It's too discouraging. Please give the option to just do like the phpBB forums where we manually tell it everything we want, or even html as done in a plain text editor where we manually write all the tags..
  2. I'm a few years late, but I just found this. I think you may be mixing up a couple of stories, one of mine with perhaps one of someone else's. The closest one of mine is that we were using a switching regulator IC, successfully at first, but perhaps a year into production on the PCB, Maxim increased the switching slew rate on the IC and it started making a lot of electrical noise that got into the aircraft radios. The solution was to manually scab on a couple of extra capacitors, one directly to IC pins on the bottom of the board, and another directly to pins on the top of the IC, as close to the body as possible, and with the absolute shortest lead length on the capacitors as possible. (This was 20 years ago, and thru-hole.) We also added capacitors in a couple of other places, and ferrite beads over three wires. That took care of the noise. Dr. Howard Johnson, industry guru of high-speed digital design, says he wishes manufacturers would guarantee a minimum rise time also, not just a maximum, for reasons like this. As for a 7805, the only product we ever put one in had no heating issues of any kind, at any time. http://WilsonMinesCo.com/ Lots of 6502 resources
  • Create New...