Write a program that defines 100 bytes in DATA SEGMENT with Label LIST_A and 50 bytes in EXTRA SEGMENT with Label LIST_B. The Program Code Receives 50BCD Number At DATA Port in unpacked Form and save At Even memory Address of LIST_A and Store 0 at Odd memory locations ,After Successful saving copy only saved BCD Number from LIST_A to LIST_B
I think i can help you. This ASM program starts from here: ;Define Part DATA SEGMENT LIST_A DB 100 DUP(?) DATA ENDS EXTRA SEGMENT LIST_B DB 50 DUP(?) EXTRA ENDS ;I assume that CPU and I/O Interface are in unconditional transfer mode ;Receiving Part MOV AX,DATA MOV DS,AX MOV CX,50 LEA SI,LIST_A LOP: IN AL,DATA ; DATA is a port MOV [SI],AL INC SI MOV AL,0H MOV [SI],AL INC SI LOOP LOP ;Copy BCD from A to B MOV CX,50 LEA SI,LIST_A LEA DI,LIST_B LOP2: MOVS BYTE PTR [DI],BYTE PTR [SI] INC SI INC SI INC DI LOOP LOP2
Please post this question in the Computer Science group. Thank you. Link to the Computer Science group: http://openstudy.com/study#/groups/Computer%20Science
Join our real-time social learning platform and learn together with your friends!