Edit this existing program to make and create 2 programs: a. When a user presses a lower case an upper case shows. b. Wh
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Edit this existing program to make and create 2 programs: a. When a user presses a lower case an upper case shows. b. Wh
Edit this existing program to make and create 2 programs: a. When a user presses a lower case an upper case shows. b. When a user presses either upper case or lower case the program will display the opposite which means that the program detects whether a Upper or Lower case was pressed. View the program runs (Click below) http://dpeled.com/ULLUCase.mp4 You may need to use one of following commands: JMP L1 unconditional jump JNZ L1→ Conditional jump only if last command not resulting in zero. JZ L1 → Conditional Jump only if last command resulted in zero. JNS L1 → Conditional Jump only if last command not resulted in negative. JS L1 → Conditional Jump only if last command resulted in negative. JNC L1→ Conditional Jump only if last command resulted in no carry. JC L1 → Conditional Jump only if last command resulted in Carry. SUB DL, 10 Subtract 10 from the DL register
; Author: DAVID PELED ; displays upper case to lower case Enter to exit .model small .386 ; to support 32 bits .stack 100h ; Stack with 100h locations = 256(10) ( .data ; to declare variables ; variables to be called here .code main proc L1: mov ah, 1 ; enter key int 21h cmp al, 13 ; if CR then end JZ short L2 mov di, al ; save the key entered to dl ADD DL, 20h ; add 20h = 32(10) mov ah, 6 ; displays the content of dl int 21h jmp L1 L2: mov ax, 4cooh ; return to DOS ends to program int 21h main endp end main