
Extension Instruction Specifications
3-27
Bit 31
Bit 0
1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dn before execution
Dn after execution
Search range
Search direction
MSB
LSB
BSCH (Bit search instruction)
[Instruction Format (Macro Name)]
BSCH Dm, Dn
[Assembler Mnemonic]
udf07 Dm, Dn
[Operation]
Bit search is performed within the bit string of the 32 bits contained in Dm from the bit position of the bit number
indicated by the contents of Dn - 1 in the direction that the bit number becomes smaller. The bit number of the first
bit position where a "1" is found is written into Dn.
When the contents of the lower 5 bits of Dn are 0, bit search is performed from bit 31 in the direction that the bit
number becomes smaller.
If search is performed up to the bit position of bit 0 without finding a "1", the C flag is set, Dn is set to 0x00000000,
and instruction execution ends.
When instruction execution starts, the upper 27 bits of Dn are ignored.
[Flag Changes]
When search was successful ("1" was found)
Flag
Change
Condition
V
*
Undefined
C
0
This indicates that search was successful.
N
*
Undefined
Z
*
Undefined
When search failed ("1" was not found)
Flag
Change
Condition
V
*
Undefined
C
1
This indicates that search failed.
N
*
Undefined
Z
*
Undefined
[Programming Cautions]
PSW updating by flag changes is delayed by one instruction.
However, Bcc and Lcc instructions can evaluate flags without waiting for flag reflection to PSW.
The operations of "udf07 imm8, Dn", "udf07 imm16, Dn" and "udf07 imm32, Dn" are not assured. In addition, a
system error interrupt does not occur in these cases.
Summary of Contents for MN103001G/F01K
Page 1: ...MICROCOMPUTER MN1030 MN103001G F01K LSI User s Manual Pub No 23101 050E ...
Page 2: ......
Page 4: ......
Page 6: ......
Page 8: ......
Page 9: ...Table of Contents List of Figures and Tables 0 ...
Page 26: ...xviii ...
Page 27: ...1 0 1 General Specifications ...
Page 35: ...2 CPU 2 ...
Page 57: ...3 Extension Instruction Specifications 3 ...
Page 96: ...Extension Instruction Specifications 3 40 ...
Page 97: ...4 Memory Modes 3 4 ...
Page 102: ...Memory Modes 4 6 ...
Page 103: ...5 Operating Mode 5 ...
Page 107: ...6 Clock Generator 6 13 ...
Page 111: ...7 Internal Memory 7 ...
Page 114: ...Internal Memory 7 4 ...
Page 115: ...8 Bus Controller BC 8 ...
Page 189: ...9 Interrupt Controller 9 ...
Page 220: ...Interrupt Controller 9 32 ...
Page 221: ...10 8 bit Timers 9 10 ...
Page 254: ...8 bit Timers 10 34 ...
Page 255: ...11 16 bit Timers 11 ...
Page 292: ...16 bit Timers 11 38 ...
Page 293: ...12 Watchdog Timer 11 12 ...
Page 302: ...Watchdog Timer 12 10 ...
Page 303: ...13 Serial Interface 13 ...
Page 354: ...Serial Interface 13 52 ...
Page 355: ...14 A D Converter 14 ...
Page 367: ...15 I O Ports 15 ...
Page 431: ...16 Internal Flash Memory 16 ...
Page 439: ...17 17 Ordering Mask ROM ...
Page 442: ...Ordering Mask ROM 17 4 ...
Page 443: ...Appendix ...