Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ReWrite the program below WITHOUT USING XLAT where a user will enter a number between 1 and 5 (both included), then entered number will be

ReWrite the program below "WITHOUT USING XLAT" where a user will enter a number between 1 and 5 (both included), then entered number will be written on screen with letters. If entry is NOT a number in given range program will exit.

DTS SEGMENT DTL DB "ONE TWO THREEFOUR FIVE " DTJ DB 0DH,0AH,'$' DTS ENDS

CDS SEGMENT

MAIN PROC FAR ASSUME DS:DTS, CS:CDS

MOV AX,DTS

MOV DS,AX NEXT: CALL KEYIN CALL PRINT

CALL LINE

 JMP NEXT MAIN ENDP 

KEYIN PROC MOV AH,10H

 INT 16H CMP AL,31H JL EXIT CMP AL,35H JG EXIT SUB AL,31H MOV CX,05H MUL CL RET 

EXIT: MOV AH,4CH MOV AL,0

INT 21H KEYIN ENDP

PRINT PROC LEA BX,DTL

LPR: PUSH AX XLAT

 MOV AH,02H MOV DL,AL INT 21H POP AX 
 INC AL LOOP LPR RET 

PRINT ENDP

LINE PROC MOV AH,09H 
 LEA DX,DTJ INT 21H RET 

LINE ENDP

CDS ENDS END MAIN

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

fscanf retums a special value EOF that stands for...

Answered: 1 week ago