Department of Computer Scien
ce and Information Engineering
National Cheng Kung University, TAIWAN
HANEL
PROGRAMMING THE 8255Connecting 8031/51 to
(^8255) (cont’)
Example 15-3 (cont’)(c)
MOV A,#90H ;(PA=IN, PB=OUT, PC=OUT)MOV DPTR,#1003H ;load
control register
;port address
MOVX @DPTR,A ;issue control wordMOV DPTR,#1000H ;PA addressMOVX A,@DPTR ;get data from PAINC DPTR ;PB addressMOVX @DPTR, A ;send the data to PBINC DPTR ;PC addressMOVX @DPTR, A ;send it also to PC