Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a very basic assembly program that clears the screen, and then line by lin

ID: 3749090 • Letter: W

Question

Write a very basic assembly program that clears the screen, and then line by line, generates the following menu:

After the program is generated, the cursor should be positioned directly after the "-->"

Inventory Control Management Screen A Add new inventory items B Lookup inventory items D - Print inventory report F-Print monthly sales report I CRemove inventory items E- Update SKU/PLU information x - Exit the system Select operation from menu above i> Fl Return to POS F2 Toggle Terminal Mode x - Exit System I

Explanation / Answer

A clean prototype assembly program (in the EMU8086 compiler) for above situation may be prepared as:

;Assuming compiler to be EMU-8086

.model small

.stack 100h

.data

menu db "Inventory Control Management Screen", 13, 10
db "A - Add new inventory items", 13, 10
db "B - Lookup inventory items", 13, 10
db "C - Remove inventory items", 13, 10
db "D - Print inventory report", 13, 10
db "E - Update SKU/PLU information", 13, 10
db "F - Print monthly sales report", 13, 10
db "X - Exit the system", 13, 10
db "Select operation from menu above : ", '$'

.code
start:

;INITIALIZE DATA SEGMENT
mov ax, @data
mov ds, ax

call clear_screen   
call display_menu   

;PRESS ANY KEY TO CONTINUE...
mov ah, 7
int 21h

;PROGRAM COMPLETION
mov ax, 4c00h
int 21h


;DISPLAYING MENU PROCEDURE
display_menu proc
mov dx, offset menu
mov ah, 9
int 21h
ret
display_menu endp

;CLEARING SCREEN PROCEDURE
clear_screen proc
mov ah, 0
mov al, 3
int 10H
ret
clear_screen endp

end start

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote