Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE DOSBOX One of the methods used to generate random numbers is the linear congruential generation method. In this method, the next random number (x

USE DOSBOX

One of the methods used to generate random numbers is the "linear congruential generation" method. In this method, the next random number (x (t + 1)) is compared to the previous random number (xt). x (t + 1) = (axt + c) (mod m) It is calculated according to the formula. The value of x0 is named as seed. You are asked to generate a random number between 0-255 with the method given for m = 8191, a = 884 and c = 1 values. Write the code that produces a random number in assembly language as a complete EXE program, accepting the number you will read from the 23 offset in the code segment as seed. Define m, a and c values appropriately in the data segment, keep the generated random number in the data segment again.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago