1111-111r rrrr-Xbbb Skip if Bit in Register is Set. FFFFh means: Skip over the next instruction if bit 7 of Register 31 (1Fh) is set. It means that leaving the rest of the memory programmed as FFFFh, the AVR will be running over the entire FFFFh area instruction by instruction if Reg31 bit 7 is off. If such bit is on, it will run over the same area but jumping one instruction after executing the previous, so the program counter will execute only instructions addresses of multiple of 4 bytes starting at the first FFFF found. It means that if by some reason a block of FFFFh is found in a sequence of program, if such bit 7 is off nothing bad will happens, since the AVR will go completely over the FFFFh without any problem and will execute the first valid instruction after the block. But if bit 7 is on, and the FFFFh block size (byte count) not being multiple of 4, then the program counter may exit the FFFFh block skiping over the first valid instruction after the block. The reason is that when such bit 7 is on, the counter jumps one instruction (2 bytes) and execute next, jumps one instruction and executes next. The "next" (jumped) can be the first valid after the block. Wagner Lipnharski - email: wagner@ustr.net UST Research Inc. - Development Director http://www.ustr.net - Orlando Florida 32837 Licensed Consultant Atmel AVR _/_/_/_/_/_/ March 5, 2004 10:34 am ----- Original Message ----- From: "David VanHorn" <dvanhorn@cedar.net> To: <AVR-Chat@yahoogroups.com> Sent: Thursday, March 04, 2004 5:01 PM Subject: [AVR-Chat] Opcodes > > Odd question: I know that 0000h is a nop, but what does FFFFh do? > > When one leaves areas of memory unprogrammed, this makes a difference, if the program jumps there. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.600 / Virus Database: 381 - Release Date: 2/28/2004
Message
Re: [AVR-Chat] Opcodes
2004-03-05 by Wagner Lipnharski
Attachments
- No local attachments were found for this message.