Question: Appendix 3.3: taskim.asm ; This program aims to show you ; (1) how DB, DW, (DUP), EQU, are used, and (2) how indirect addressing modes

 Appendix 3.3: taskim.asm ; This program aims to show you ;(1) how DB, DW, (DUP), EQU, are used, and (2) how indirect

Appendix 3.3: taskim.asm ; This program aims to show you ; (1) how DB, DW, (DUP), EQU, are used, and (2) how indirect addressing modes are used, and ; (3) how to do addition for more than two numbers, and ; (4) convince you by displaying results to screen. In this program, four number are put in memory locations, instructions are included to add them up (in al), and save the sum in another memory location with address label num. i CSEG SEGMENT start: MOV AX, DSEG MOV DS, AX ; initial value of DS MOV BL,3 MOV SI, offset listn MOVALO addup: ADD AL,[SI] ; al + ds:[si] al INC SI DEC BL JNZ addup ADD AL, var2 CONVERT TO ASCII CODE LEA BX, num MOV [BX], AL MOV DX, OFFSET msg ; display string from MSG MOV AH,09H INT 21H MOV AX, 4COOH ; return control to DOS INT 211 ENDS DSEG SEGMENT var1 EQU 89983H var2 EQU 30H listn DB 1,2,3,4 msg DB "The sum of numbers in listn, is DB ? ; (one) digit to be displayed DB ODh,0Ah,'$ ENDS num SSEG SEGMENT STACK DB 100H DUP(?) ENDS END start 7. In tasklm.asm, MOV BL, 3 copies number 3 to BL. Can we use 4? (To do this question, you need to understand instructions: ADD, INC, DEC, JNZ.) Remark: In the two files, an interrupt service routine is invoked. The interrupt type is 21H

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!