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


You are not connected. Please login or register

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

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

diadem59

avatar
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

View user profile

2 nice work people. on 2nd March 2009, 2:51 pm

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

View user profile http://www.sumitmaharjan.com.np

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

jaiparivesh

avatar
Administrator
diadem59 rocks sunny

View user profile 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