Question: Computer science. Microcomputer assembly language ( ASCII data ) Code Templet: section . bss input resb 2 5 ; reserve 2 5 bytes for input
Computer science.
Microcomputer assembly language ASCII data
Code Templet:
section bss
input resb ; reserve bytes for input
sum resb
section data
len dd
msg db "Hello
len equ $ msg
msg db How are you?", xA
len equ $ msg
msg db "Your name has
len equ $ msg
msg db characters in itxA
len equ $ msg
section text
global start
start:
mov ecx, msg
mov edx, len
call print
; Read from input
mov eax,
mov ebx,
mov ecx, input
mov edx,
int x
mov len eax
mov dx
mov bx ; divide by for tens column value
div bx ; ax ax bx
add ax ; convert digit to ASCII
mov sum byte ax ; move quotient into place
add dx ; convert digit to ASCII
mov sum byte dx ; move remainder into place
mov ecx, input
mov edx, len
call print
mov ecx, msg
mov edx, len
call print
mov ecx, msg
mov edx, len
call print
mov ecx, sum
mov edx,
call print
mov ecx, msg
mov edx, len
call print
call exit
print:
mov eax, ;syswrite
mov ebx, ;stdout
int x ;System call
ret ;Return to caller
exit:
mov eax, ;Sysexit
mov ebx, ;Stdin
int x ;System call
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
