Any help with this computer Organization and
Architecture question
It's on assembly language procedure
Please use TASM
Please find the code below::
.model small
.stack 100h
.data
msg1 db 'Evenly$'
msg2 db 'Not Evenly$'
.code
main proc
mov ax,@data
mov ds, ax
mov cx,5 ;CX VALUE
mov bx,27 ;BX VALUE
push cx ;PUSH TO STACK
push bx
jmp divides ;CALL FUNCTION
return: ;FUNCTION RETURN
mov ax, 4c00h ;TERMINATE
int 21h
main endp
;;;;;;FUCNTION STARTS
divides:
pop bx ;;get argument value from stack
pop cx
loopHere:
sub bx,cx ;SUBTRACT BC FROM BX
cmp bx,0 ;CHECK IF RESULT ZERO,, THAN PRINT EVENLY
je evenly
cmp bx,cx ;IF NOT ZERO CHECK IF NUMBER IS LESS THAN BX, THAN PRINT NOT EVENLY
jl notEvenly
jmp loopHere ;LOOP CONTINUE
evenly:
mov dx, offset msg1
mov ah, 9
int 21h
jmp return
notEvenly:
mov dx, offset msg2
mov ah, 9
int 21h
jmp return
end main
;;;;;;FUCNTION ENDS
output:
Any help with this computer Organization and Architecture question It's on assembly language procedure Please use...
Need help on Assembly language 1.Solve the following conditions: A. Suppose AL contains 11001011 and CF = 1. Give the new contents of AL after each of the following instructions is executed. Assume the above initial conditions for each part of this question. a. SHL AL,1 b. SHR AL,1 c. ROL AL,2 d. ROR AL,3 e. SAR AL,2 f. RCL AL,1 g. RCR AL,3 B. Suppose EAX contain ABCDH. Show the contents of BX and CX after...
Assembly Language Programming Assignment program must be in: MASM assembly language / x86 architecture / irvine library procedures Objectives: 1. using register indirect addressing 2. passing parameters 3. generating “random” numbers 4. working with arrays Description: Write and test a MASM program to perform the following tasks: 1. Introduce the program. 2. Generate ARRAYSIZE random integers in the range [LO = 10 .. HI = 29], storing them in consecutive elements of an array. ARRAYSIZE should be set to 200....
Need some help I am not understanding this programming class at all. We are using Microsoft visual studio with python in console mode to complete these labs. Double-click to hide white space CIS115 Week 4 Lab Overview Title of Lab: Multiplication Table in Python Summary This week's lab is to create a simple multiplication table using nested loops and if statements. Prompt the user for the size of the multiplication table (from 2x2 to 10x10). Use a validation loop to...
== Programming Assignment == For this assignment you will write a program that controls a set of rovers and sends them commands to navigate on the Martian surface where they take samples. Each rover performs several missions and each mission follows the same sequence: deploy, perform one or more moves and scans, then return to base and report the results. While on a mission each rover needs to remember the scan results, in the same order as they were taken,...