Assignment Help, Cloud Based ERP System, Microsoft NAV Certification
WELCOME !!

Please Register, ask for assignment solutions & post the solutions if you know any.

LETS START POSTING YOUR IDEAS AND THOUGHTS AND BUILD THE COMMUNITY OF EXPERTS.

Assignment Help, Cloud Based ERP System, Microsoft NAV Certification
WELCOME !!

Please Register, ask for assignment solutions & post the solutions if you know any.

LETS START POSTING YOUR IDEAS AND THOUGHTS AND BUILD THE COMMUNITY OF EXPERTS.

Assignment Help, Cloud Based ERP System, Microsoft NAV Certification

Stock Market, Online Tutoring, Cloud Based ERP System, Microsoft Dynamics Reporting, Microsoft Nav Certification

Similar topics

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

12064 shrawan (back) Q. N. 5 Empty 2064 shrawan (back) Q. N. 5 2nd March 2009, 11:11 am

diadem59

diadem59
Administrator
WAP to generate multiplication table of five numbers stored in memory as array, store the result and display in following format.
5 10 15 20 25 30 35 40 45 50
3 6 9 12 15 18 21 24 27 30
... ... ... ...

SOLUTION:

Code:
TITLE MULTBL
DOSSEG
.MODEL SMALL
.STACK 64H
.DATA
          NUM DB 5,3,2,9,7 ;any 5 nos.
          RESULT DW 50 DUP (?) ;mul. Tbl.
          TEMP DB 4 DUP (?)
          DIVISOR DB 0AH

.CODE
MAIN  PROC
          MOV AX,@DATA
          MOV DS,AX

          MOV SI,00H
          MOV DI,0
RE:      MOV BL,01H
NEXT:  MOV AL,NUM[SI]
          MUL BL
          MOV RESULT[DI],AX ; multiply and store result (in hex word)
          INC DI
          INC DI 
          INC BL
          CMP BL,0BH
          JNE NEXT

          INC SI
          CMP SI,05H
          JNE RE

          MOV BX,0
NXTBL:MOV CX,0AH
NXVAL:MOV SI,00H
          MOV AX,RESULT[BX]
REDIV: DIV DIVISOR
          MOV TEMP[SI], AH ; STORES REMAINDER 
          MOV AH,00H
          INC SI
          CMP AL,00H ;until quotient is 0
          JNE REDIV

          MOV AH,02H
DISP:  DEC SI
          MOV DL,TEMP[SI]
          ADD DL,30H
          INT 21H
          CMP SI,0
          JE EXIT
          JMP DISP

EXIT:  INC BX
          INC BX
          MOV DL,' '
          INT 21H
          LOOP NXVAL
          MOV DL,0AH
          INT 21H
          MOV DL,0DH
          INT 21H
          CMP BX,DI
          JB NXTBL
 
          MOV AX,4C00H
          INT 21H
MAIN  ENDP
END    MAIN



Last edited by diadem59 on 12th March 2009, 12:48 am; edited 4 times in total

22064 shrawan (back) Q. N. 5 Empty nice work people. 2nd March 2009, 2:51 pm

since1987ad

since1987ad
this is really awesome way of learning..
nice job u guys.. cheers

http://www.sumitmaharjan.com.np

32064 shrawan (back) Q. N. 5 Empty Re: 2064 shrawan (back) Q. N. 5 12th March 2009, 9:54 am

jaiparivesh

jaiparivesh
Administrator
diadem59 rocks sunny

https://www.alertpay.com/?ExlPku5EtIiST4N2a1hiEg%3d%3d

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum