(8086/8088 programming) An assembly program is given below in .com format. The program reads a character from keyboard a
-
- 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
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
(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