Question: Part 1 : Coding task One task, two levels Regular Level Task for 1 0 0 points: Write two short assembly subroutines: one that does

Part 1: Coding task One task, two levels
Regular Level Task for 100 points: Write two short assembly subroutines: one that does 16-
bit integer division with remainder, and one that factorizes 16-bit semiprimes.
A semiprime is simply a number that is the product of exactly two prime numbers, e.g.,15=3*5,
21=3*7, etc. Knowing that there are exactly two prime factors makes the program (or the data
structures that are required to record the factors) much easier but increases running time. But
you can be smart and easily halve the running time.
The first subroutine is called integer_div and does integer division with remainder, i.e., given
the operation y/x where both y and x are integers, it finds the integer quotient q and the
remainder 0<= r < x such that
y = q*x + r
The integer_div subroutine will follow this contract:
The second subroutine is called factorize and will find the two factors of a 16-bit semiprime.
(Recall, a semiprime is a number that is the product of exactly two prime factors). The contract
for this subroutine is as follows:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!