IN loc16,*(PA)
SYNTAX OPTIONS
IN loc16,*(PA)
Operands
loc16
*(PA)
Description
Flags and
N
Modes
Z
Repeat
Example
; IORegA address = 0x0300;
; IOREgB address = 0x0301;
; IOREgC address = 0x0302;
; IORegA = 0x0000;
; IORegB = 0x0400;
; IORegC = VarA;
; if( IORegC = 0x2000 )
;
IORegA
IORegB
IORegC
MOV
UOUT
MOV
UOUT
OUT
IN
CMP
SB
Addressing mode (see Chapter 5)
Immediate I/O space memory address
Load the location pointed to by the "loc16" addressing mode with the content
of the specified I/O location pointed to by "*(PA)":
[loc16] = IOspace[PA];
I/O Space is limited to 64K range (0x0000 to 0xFFFF). On the external
interface (XINTF), the I/O strobe signal (XIS), if available on your particular
device, is toggled during the operation. The I/O address appears on the
lower 16 XINTF address lines (XA[15:0]) and the upper address lines are
zeroed. The data is read on the lower 16 data lines (XD[15:0]).
Note:
I/O space may not be implemented on all C28x devices. See the data sheet for your
particular device for details.
If (loc16 = @AX), then after the move AX is tested for a negative condition.
The negative flag bit is set if bit 15 of AX is 1, otherwise it is cleared.
If (loc16 = @AX), then after the move, AX is tested for a zero condition. The
zero flag bit is set if AX = 0, otherwise it is cleared.
This instruction is repeatable. If the operation follows a RPT instruction, then
it will be executed N+1 times. When repeated, the "(PA)" I/O space address
is post-incremented by 1 during each repetition.
IORegC = 0x0000;
.set
0x0300
.set
0x0301
.set
0x0302
@AL,#0
*(IORegA),@AL
@AL,#0x0400
*(IORegB),@AL
*(IORegC),@VarA
@AL,*(IORegC)
@AL,#0x2000
$10,NEQ
OPCODE
1011 0100 LLLL LLLL
CCCC CCCC CCCC CCCC
; Define IORegA address
; Define IORegB address
; Define IORegC address
; AL = 0
; IOspace[IORegA] = AL
; AL = 0x0400
; IOspace[IORegB] = AL
; IOspace[IORegC] = VarA
; AL = IOspace[IORegC]
; Set flags on (AL − 0x2000)
; Branch if not equal
IN loc16,*(PA)
Input Data From Port
OBJMODE
RPT
CYC
1
Y
N+2
6-111
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?