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 2062 Bhadra (Reg./Back) Q. N. 5 on 10th March 2009, 2:05 pm

diadem59

avatar
Administrator
Write a program to read a string and separate the words from the string. Display each word at the center of each lineof a clear screen with blue background and cyan foreground.

SOLUTION:

DOSSEG

.MODEL SMALL
.STACK
.DATA
REQ DB 'PLEASE TYPE A SENTENCE (80 Characters Max.)',0AH,0DH,'$'
MAX DB 80
ACT DB ?
CHAR DB 80 DUP (?)

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

LEA DX,REQ ;Request user to type sentence
MOV AH,09H
INT 21H

MOV AH,0AH ;Read string
MOV DX,OFFSET MAX
INT 21H

MOV AH,06H ;request scroll ; clears screen
MOV AL,00H ;full screen
MOV BH,16H ; set attribute,
MOV CX,0000 ;top left corner
MOV DX,184FH ;bottom right corner of box
INT 10H ; interrupt call

LEA DI,CHAR
MOV CL,ACT
MOV CH,00
MOV BH,CH ; PAGE 0
MOV DH,CH
MOV DL,40
MOV AH,02H
INT 10H

agn:CMP [DI],' '
JE nextline
MOV DL,[DI]
MOV AH,02H
INT 21H
JMP skip
nextline: INC DH
MOV DL,40
INT 10H

skip: INC DI
LOOP AGN

MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN

View user profile

2 Re: 2062 Bhadra (Reg./Back) Q. N. 5 on 12th March 2009, 9:44 am

jaiparivesh

avatar
Administrator
thnakx dude

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

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