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

Write a simple assembly program ( x86 nasm on 64 bit Linux gl server) that creat

ID: 3607115 • Letter: W

Question

Write a simple assembly program ( x86 nasm on 64 bit Linux gl server) that creates an array called “pracArray” of size 9, then accepts user inputs to assign character “A” or “B” to a certain index of that array. The array must be printed to the screen after each addition of a character by the user. Write a simple assembly program ( x86 nasm on 64 bit Linux gl server) that creates an array called “pracArray” of size 9, then accepts user inputs to assign character “A” or “B” to a certain index of that array. The array must be printed to the screen after each addition of a character by the user. Write a simple assembly program ( x86 nasm on 64 bit Linux gl server) that creates an array called “pracArray” of size 9, then accepts user inputs to assign character “A” or “B” to a certain index of that array. The array must be printed to the screen after each addition of a character by the user.

Explanation / Answer

DATA SEGMENT pracArray 9 DB "ENTER CHARACTER :$" X DB ? //Creating pracArray of size 9 and used DB as charater takes a byte to get store so DB is sufficient ENDS CODE SEGMENTATION ASSUME DT:DATA CO:CODE // Registers assumption START: MOV AX,DATA //Moving data to AX register MOV DT,AX LEA DX,MESSAGE MOV AH,9 INT 21H MOV AH,1 INT 21H MOV X,AL MOV AH,4CH INT 21H ENDS END START