(8086/8088 programming) An assembly program is given below in .com format. The program reads a character from keyboard a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

(8086/8088 programming) An assembly program is given below in .com format. The program reads a character from keyboard a

Post by correctanswer »

8086 8088 Programming An Assembly Program Is Given Below In Com Format The Program Reads A Character From Keyboard A 1
8086 8088 Programming An Assembly Program Is Given Below In Com Format The Program Reads A Character From Keyboard A 1 (128.28 KiB) Viewed 21 times
(8086/8088 programming) An assembly program is given below in .com format. The program reads a character from keyboard and detects whether the corresponding key belongs to the set of characters of "<", "=", and ">". These three characters are used to denote the operators of less-than, equal, and greater-than. Identify which instructions are used for this detection and explain how the detection is performed. The ASCII code chart on the next page is needed for this question. The code for a character is formed by concatenation of the row number and column number. For example, the ASCII code for "F" is 46H. ORG 100H JMP START MSG DB ODH,0AH, 'You have entered a correct operator. ' ODH, 0Ah, '$' ERR DB "Wrong operator!", ODh,0Ah, '$' OPR DB ? ; get operator: START: ; read a single char to AL MOV AH, 1 INT 21H MOV OPR, AL ; detection of wrong operator CMP OPR, '<' JB WRONG_OPR CMP OPR, '>' JA WRONG_OPR ; print successful entry message LEA DX, MSG; display string from MSG MOV AH,09H INT 21H JMP BACK WRONG_OPR: LEA DX, ERR MOV AH,09H INT 21H BACK: RET ; return control to DOS
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply