1 / 5

Design by : sir Masood

Progam .-(6) * Write a program to Display series of Leaner , Even and odd using by LOOP command and Direct Offset address. Design by : sir Masood. Algorithm steps. Store 9 into CX Store 1 into BL Store BL into DL Add 48 in to DL Display to DL Increment in BL

stesha
Download Presentation

Design by : sir Masood

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Progam.-(6)* Write a program to Display series of Leaner , Even and odd using by LOOP command and Direct Offset address. Design by : sir Masood

  2. Algorithm steps • Store 9 into CX • Store 1 into BL • Store BL into DL • Add 48 in to DL • Display to DL • Increment in BL • Check CX IF CX=0 Then go to step No.8 else go to step 3 8. Store 5 into CX 9. Store 1 into BL 10 Store BL into DL 11 Add 48 in to DL 12 Display to DL 13 BL=BL+2 14 Check CX IF CX=0 Then go to step No.15 else go to step 10 15. Store 5 into CX 16. Store 0 into BL 17 Store BL into DL 18. Add 48 in to DL 19 Display to DL 20 BL=BL+2 • Check CX IF CX=0 Then go to step No.22 else go to step 17 • END Design by : sir Masood

  3. Start c D CX=9 CX=5 CX=5 BL=1 BL=1 BL=1 DL=BL DL=BL DL=BL DISPLAY DL DISPLAY DL DISPLAY DL DL=DL+48 DL=DL+48 DL=DL+48 BL=BL+1 BL=BL+2 BL=BL+2 Yes CX≠0 Yes Yes CX≠0 CX≠0 No No No Design by : Sir. Masood End C D

  4. Program Example MOV CX,9 ; for loop 9 Times MOV BL,1 MOV AH,2 ; This is service For display Offset address: ; This is label name MOV DL,BL ADD DL,30H ; Add Simple No. to ASCII Code No. INT 21H INC BL LOOP Offset address MOV CX,5 ; for loop 5 Times MOV BL,1 MOV AH,2 ; This is service For display Offset address : ; This is label name MOV DL,BL ADD DL,30H ; Add Simple No. to ASCII Code No. INT 21H ADD BL,2 ; This is service For display LOOP Offset address Design by :Sir Masood

  5. Program Example MOV CX,5 ; for loop 5 Times MOV BL,0 MOV AH,2 Offset address : ; This is label name MOV DL,BL ADD DL,30H ; Add Simple No. to ASCII Code No. INT 21H ADD BL,2 ; Increment 2 in DL regester LOOP Offset address INT 20H ; Here end Program Design by : Sir Masood

More Related