Please write in assembly language 8086 windows32
Question 3:
Write an assembly program that has a macro maximum that finds the larger of two numbers inputted by the user
Answer:
Assembly program that has a macro maximum that finds the larger of
two numbers inputted by the user.
%include "io.mac"
.STACK 100H
.DATA
Numbers DW 3,4,5,2,6,0
msg0 db "Printing values in array",0
msg1 db "Max",0
msg2 db "Min",0
.CODE
.STARTUP
PutStr msg0
mov dx, Numbers
mov si, dx ;point to array
printValues:
cmp word [si], 0
je procedure
nwln
PutInt [si]
add si, 2
jmp printValues
procedure:
push Numbers ;push Number to stack to pass parameter by stack
call maxMeth
nwln
PutStr msg1
nwln
PutInt ax
nwln
complete:
.EXIT
maxMeth:
enter 0,0 ;save old bp and set bp to sp
mov si, [bp+4] ;point to array
mov ax, [si] ; ax holds max
add si,2 ; Increment si to next number
;Now entering loop
max:
cmp word [si],0 ; checks to see if the number is 0 and if it is,
then we are done.
je finish
cmp ax, [si] ; ax holds the max . So if ax is greater than si, then
dont assign si to ax.
jge increment
jmp newMax
newMax:
mov ax, [si] ; Otherwise we have a new a max
increment:
add si, 2 ;now increment si to check the next value and jump back
to the main loop.
jmp max
finish: ;clean up.
leave ;pop bp
ret ;return
#please consider my effort and give me a like...thank u....
Please write in assembly language 8086 windows32 Question 3: Write an assembly program that has a...
. Write an 8086 assembly language program to find the prime numbers among 100 bytes of data in an array stored from the address 4000H: 1000H in the data segment and store the result from the address 4000H: 3000H. write the code using 8086 assembly language only i do not want any other language If you Do not sure please do not solve it
Write an 8086 assembly language program to find the prime numbers among 100 bytes of data in an array stored from the address 4000H: 1000H in the data segment and store the result from the address 4000H: 3000H.
INTEL 80x86 ASSEMBLY LANGUAGE CODE Write a windows32 assembly language program that utilizes a recursive procedure. The main (_MainProc) procedure should: accept, from the user, a positive integer. Guard against non-positive integers being entered using a loop. call the sumseries sub-procedure using the cdecl protocol, receive the results of the sub-procedure, and display the results. The sumseries sub-procedure should: recursively find the sum of the series: 1*2 + 2*3 + 3*4 + ... + i*(i+1) (This is an iterative definition....
MASM Assembly Language x86 Processor. Must use windows32 framework Write a non-recursive algorithm to find the greatest common divisor of two positive numbers. . • Your program should read the two positive integers using dialog boxes. If they are not positive, a message box should be displayed with an appropriate message. • Your program needs to have a procedure that takes two positive integers as parameters. • You need to follow cdecl protocol for parameter passing. • Display the valid...
MASM Assembly Language x86 Processor. Must use windows32 framework Write a non-recursive algorithm to find the greatest common divisor of two positive numbers. . • Your program should read the two positive integers using dialog boxes. If they are not positive, a message box should be displayed with an appropriate message. • Your program needs to have a procedure that takes two positive integers as parameters. • You need to follow cdecl protocol for parameter passing. • Display the valid...
write an 8086 assembly program that performs the following functions: Prompts the user to enter a set of student’s lab grades (array of 2-digit decimal numbers) and store it in the memory. Use ‘$’ sign as termination, i.e., the user enters ‘$’ at the end of the numbers. You can assume that the maximum number of students in the lab is 20.
Code in assembly language please "Write an assembly 32 bit program that adds two numbers (other than 5 and 6) and stores the value to a variable called 'sum'. Also, use a block COMMENT to depict the name and description of the program, author of the program, and date."
write an 8086 assembly program that 1) adds two operand. 2) that adds operands until the new value to be added is 0. 3) Write a program that increments by 2 the content of a register 10 times.
Write a simple and short MIPS assembly language program that asks the user for 6 numbers, merge-sorts them, and then prints them out in ascending order comment each and every programme .(USING WINDOWS QtSpim) Note : This question is not giving desired solution may you please try it in a simple manner for six number inputed by the user.