Sie sind auf Seite 1von 3

c  


ADDRESS MNEMONICS OPCODE COMMENTS
2000 MVI A, 80 3E LOAD ACCUMLATOR WITH THE
2001 80 CONTROL WORD

2002 OUT 03 D3 WRITE WORD IN THE CONTROL


2003 03 REGISTER TO INITIALIZE THE PORT

2004 CALL INTERRUPT CD CALL THE INTERRUPT INITIALIZING


2005 INITIALIZATION 30 PROGRAM
2006 30

2007 CALL DEVICE1 ON CD CALL SUBROUTINE TO SWITCH ON THE


2008 50 DEVICE 1
2009 20

200A CALL DELAY ON CD CALL THE SUBROUTINE ͞DELAY ON͟


200B 90
200C 20

200D CALL DELAY OFF CD CALL THE SUBROUTINE ͞OFF1͟ TO


200E 60 SWITCH
200F 20

2010 CALL DELAY OFF CD CALL THE SUBROUTINE ͞DELAY OFF͟,


2011 20 FOR DELAY IN OFF DURATION
2012 21

2013 CALL DEVICE2 ON CD CALL THE SUBROUTINE ͞DEVICE2 ON͟


2014 70 TO SWITCH ON THE SECOND DEVICE
2015 20

2016 CALL DELAY ON CD CALL THE DELAY SUBROUTINE


2017 90
2018 20

2019 CALL DEVICE2 OFF CD CALL THE SUBROUTINE ͞DEVICE2 OFF͟


201A 80 TO SWITCH OFF THE SECOND DEVICE
201B 20
201C CALL DELAY OFF CD CALL THE SUBROUTINE ͞DELAY OFF͟
201D 20 FOR DELAY IN THE OFF DURATION
201E 21
201F JMP START C3 JUMP TO THE START OF THE PROGRAM
2020 00
2021 20

ABOUT THE SUBROUTINES:

1)Y DEVICE1 ON:- This subroutine switches ON the first device that is
connected to PORT A of 8255A.

2)Y DEVICE1 OFF: This subroutine switches OFF the first device connected to
PORT A of 8255A.

3)Y DEVICE2 ON: This subroutine switches ON the device connected to PORT B
of 8255A.

4)Y DEVICE2 OFF: This subroutine switches OFF the device connected to PORT B
of 8255A.

5)Y DELAY ON: This subroutine gives delay about 3seconds when called. This
delay is used to set the ON duration of electronic device. User can alter the
delay time by entering desired hexadecimal number at address location
2091H. (remember 01H gives delay of 0.5 seconds of delay)
6)Y DELAY OFF: This delay subroutine is used to set the OFF duration of the
device. During this Off time user can place an interrupt by giving +5V at the
17th or 18th terminal of the 8259A interrupt controller.

7)Y INTERRUPT CALL DEVICE1: This subroutine is the vector address for the
microprocessor, it reads interrupt when +5V is provided at the terminal 17th
terminal of 8259A.

8)Y INTERRUPT CALL DEVICE2: When +5V is provided at the 18th terminal, this
subroutine is read by the microprocessor.

9)Y INTERRUPT IR0: When microprocessor reads the interrupt at address


location 2200H, it calls subroutine INTERRUPT IR0 and execute the program
written in it.

10)Y INTERRUPT IR1: When microprocessor reads the interrupt at address


location 2204H, it calls subroutine INTERRUPT IR1 and execute the program
written in it.

11)Y INTERRUPT INITIALIZATION: This subroutine serves the purpose of


initializing the 8259A.

12)Y CALL DELAY: We are using DELAY subroutine that is already been
written in microprocessor. Its address location is 03BCH. This subroutine
DELAY gives delay of about 0.5 seconds.

Das könnte Ihnen auch gefallen