SlideShare a Scribd company logo
1 of 5
MULTIPLICACION DE DOS OPERANDOS
(MULTIPLEXACION Y USO DE DISPLAYS)
CODIGO DEL PROGRAMA:
DISPLAY_A EQU 30H
DISPLAY_B EQU 31H
DISPLAY_C EQU 32H
DISPLAY_D EQU 33H
CONTADOR EQU 34H
OPERANDO_1 EQU 35H
OPERANDO_2 EQU 36H
ORG 00H
JMP CONFIGURAR
ORG 0BH
JMP MOSTRAR_DISPLAY
ORG 30H
CONFIGURAR:
MOV CONTADOR,#0
MOV DISPLAY_A,#255
MOV DISPLAY_B,#255
MOV DISPLAY_C,#255
MOV DISPLAY_D,#255
MOV TMOD,#02H
MOV IE,#10000010B
SETB TR0
INICIO:
CALL TECLADO
MOV DPTR,#NUMEROS
MOV OPERANDO_1,A
MOVC A,@A+DPTR
MOV DISPLAY_A,A
CALL TECLADO
MOV OPERANDO_2,A
MOVC A,@A+DPTR
MOV DISPLAY_B,A
MOV A,OPERANDO_1
MOV B,OPERANDO_2
MUL AB
MOV B,#10
DIV AB
MOVC A,@A+DPTR
MOV DISPLAY_C,A
MOV A,B
MOVC A,@A+DPTR
MOV DISPLAY_D,A
CALL TECLADO
MOV DISPLAY_A,#255
MOV DISPLAY_B,#255
MOV DISPLAY_C,#255
MOV DISPLAY_D,#255
JMP INICIO
MOSTRAR_DISPLAY:
PUSH ACC
MOV A,#0
CJNE A,CONTADOR,SIGUE1
MOV P2,#0
MOV P0,DISPLAY_A
SETB P2.0
JMP SALIR
SIGUE1:
MOV A,#1
CJNE A,CONTADOR,SIGUE2
MOV P2,#0
MOV P0,DISPLAY_B
SETB P2.1
JMP SALIR
SIGUE2:
MOV A,#2
CJNE A,CONTADOR,SIGUE3
MOV P2,#0
MOV P0,DISPLAY_C
SETB P2.2
JMP SALIR
SIGUE3:
MOV CONTADOR,#0
MOV P2,#0
MOV P0,DISPLAY_D
SETB P2.3
POP ACC
RETI
SALIR: INC CONTADOR
POP ACC
RETI
TECLADO:
MOV P3,#255
CLR P3.0
JNB P3.4,UNO
JNB P3.5,DOS
JNB P3.6,TRES
SETB P3.0
CLR P3.1
JNB P3.4,CUATRO
JNB P3.5,CINCO
JNB P3.6,SEIS
SETB P3.1
CLR P3.2
JNB P3.4,SIETE
JNB P3.5,OCHO
JNB P3.6,NUEVE
SETB P3.2
CLR P3.3
JNB P3.5,CERO
JMP TECLADO
UNO:
JNB P3.4,UNO
MOV A,#1
RET
DOS:
JNB P3.5,DOS
MOV A,#2
RET
TRES:
JNB P3.6,TRES
MOV A,#3
RET
CERO:
JNB P3.5,CERO
MOV A,#0
RET
CUATRO:
JNB P3.4,CUATRO
MOV A,#4
RET
CINCO:
JNB P3.5,CINCO
MOV A,#5
RET
SEIS:
JNB P3.6,SEIS
MOV A,#6
RET
SIETE:
JNB P3.4,SIETE
MOV A,#7
RET
OCHO:
JNB P3.5,OCHO
MOV A,#8
RET
NUEVE:
JNB P3.6,NUEVE
MOV A,#9
RET
NUMEROS:
DB 11000000B
DB 11111001B
DB 10100100B
DB 10110000B
DB 10011001B
DB 10010010B
DB 10000010B
DB 11111000B
DB 10000000B
DB 10011000B
END

More Related Content

Similar to Multiplicacion de dos operandos

Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051
logesh waran
 
Https _doc-0o-c4-apps-viewer.googleusercontent
Https  _doc-0o-c4-apps-viewer.googleusercontent Https  _doc-0o-c4-apps-viewer.googleusercontent
Https _doc-0o-c4-apps-viewer.googleusercontent
vijaydeepakg
 
Solution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidiSolution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidi
Muhammad Abdullah
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
Noor Tahasildar
 
8051-mazidi-solution
8051-mazidi-solution8051-mazidi-solution
8051-mazidi-solution
ZunAib Ali
 

Similar to Multiplicacion de dos operandos (20)

Buy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineBuy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects Online
 
Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051
 
Https _doc-0o-c4-apps-viewer.googleusercontent
Https  _doc-0o-c4-apps-viewer.googleusercontent Https  _doc-0o-c4-apps-viewer.googleusercontent
Https _doc-0o-c4-apps-viewer.googleusercontent
 
Programs using Microcontrollers.ppt
Programs using Microcontrollers.pptPrograms using Microcontrollers.ppt
Programs using Microcontrollers.ppt
 
Solution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidiSolution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidi
 
8085 Assembly programming.pptx
8085 Assembly programming.pptx8085 Assembly programming.pptx
8085 Assembly programming.pptx
 
Mic practicals
Mic practicalsMic practicals
Mic practicals
 
Steppert Motor Interfacing With Specific Angle Entered Through Keypad
Steppert Motor Interfacing With Specific Angle Entered Through KeypadSteppert Motor Interfacing With Specific Angle Entered Through Keypad
Steppert Motor Interfacing With Specific Angle Entered Through Keypad
 
Assemblers
AssemblersAssemblers
Assemblers
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.ppt
 
8051 TIMER COUNTER SERIAL COMM. INTERUPT PROGRAMMING.pdf
8051 TIMER COUNTER SERIAL COMM. INTERUPT PROGRAMMING.pdf8051 TIMER COUNTER SERIAL COMM. INTERUPT PROGRAMMING.pdf
8051 TIMER COUNTER SERIAL COMM. INTERUPT PROGRAMMING.pdf
 
project report
project reportproject report
project report
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manual
 
Rapport
RapportRapport
Rapport
 
Implementation - Sample Runs
Implementation - Sample RunsImplementation - Sample Runs
Implementation - Sample Runs
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
 
8051-mazidi-solution
8051-mazidi-solution8051-mazidi-solution
8051-mazidi-solution
 
New text document
New text documentNew text document
New text document
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086
 

Recently uploaded

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Recently uploaded (20)

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 

Multiplicacion de dos operandos

  • 1. MULTIPLICACION DE DOS OPERANDOS (MULTIPLEXACION Y USO DE DISPLAYS) CODIGO DEL PROGRAMA: DISPLAY_A EQU 30H DISPLAY_B EQU 31H DISPLAY_C EQU 32H DISPLAY_D EQU 33H CONTADOR EQU 34H OPERANDO_1 EQU 35H OPERANDO_2 EQU 36H ORG 00H JMP CONFIGURAR ORG 0BH JMP MOSTRAR_DISPLAY ORG 30H CONFIGURAR: MOV CONTADOR,#0 MOV DISPLAY_A,#255 MOV DISPLAY_B,#255 MOV DISPLAY_C,#255 MOV DISPLAY_D,#255 MOV TMOD,#02H MOV IE,#10000010B SETB TR0 INICIO: CALL TECLADO MOV DPTR,#NUMEROS MOV OPERANDO_1,A MOVC A,@A+DPTR MOV DISPLAY_A,A CALL TECLADO
  • 2. MOV OPERANDO_2,A MOVC A,@A+DPTR MOV DISPLAY_B,A MOV A,OPERANDO_1 MOV B,OPERANDO_2 MUL AB MOV B,#10 DIV AB MOVC A,@A+DPTR MOV DISPLAY_C,A MOV A,B MOVC A,@A+DPTR MOV DISPLAY_D,A CALL TECLADO MOV DISPLAY_A,#255 MOV DISPLAY_B,#255 MOV DISPLAY_C,#255 MOV DISPLAY_D,#255 JMP INICIO MOSTRAR_DISPLAY: PUSH ACC MOV A,#0 CJNE A,CONTADOR,SIGUE1 MOV P2,#0 MOV P0,DISPLAY_A SETB P2.0 JMP SALIR SIGUE1: MOV A,#1 CJNE A,CONTADOR,SIGUE2 MOV P2,#0 MOV P0,DISPLAY_B SETB P2.1
  • 3. JMP SALIR SIGUE2: MOV A,#2 CJNE A,CONTADOR,SIGUE3 MOV P2,#0 MOV P0,DISPLAY_C SETB P2.2 JMP SALIR SIGUE3: MOV CONTADOR,#0 MOV P2,#0 MOV P0,DISPLAY_D SETB P2.3 POP ACC RETI SALIR: INC CONTADOR POP ACC RETI TECLADO: MOV P3,#255 CLR P3.0 JNB P3.4,UNO JNB P3.5,DOS JNB P3.6,TRES SETB P3.0 CLR P3.1 JNB P3.4,CUATRO JNB P3.5,CINCO JNB P3.6,SEIS SETB P3.1 CLR P3.2
  • 4. JNB P3.4,SIETE JNB P3.5,OCHO JNB P3.6,NUEVE SETB P3.2 CLR P3.3 JNB P3.5,CERO JMP TECLADO UNO: JNB P3.4,UNO MOV A,#1 RET DOS: JNB P3.5,DOS MOV A,#2 RET TRES: JNB P3.6,TRES MOV A,#3 RET CERO: JNB P3.5,CERO MOV A,#0 RET CUATRO: JNB P3.4,CUATRO MOV A,#4 RET CINCO: JNB P3.5,CINCO MOV A,#5 RET SEIS: JNB P3.6,SEIS
  • 5. MOV A,#6 RET SIETE: JNB P3.4,SIETE MOV A,#7 RET OCHO: JNB P3.5,OCHO MOV A,#8 RET NUEVE: JNB P3.6,NUEVE MOV A,#9 RET NUMEROS: DB 11000000B DB 11111001B DB 10100100B DB 10110000B DB 10011001B DB 10010010B DB 10000010B DB 11111000B DB 10000000B DB 10011000B END