Before You Can Use The Analyzer; Figure 2-1. Pseudo-Code Algorithm Of Sample Program - HP 64700 User Manual

Emulators terminal interface
Hide thumbs Also See for 64700:
Table of Contents

Advertisement

Initialize the stack pointer.
AGAIN:
Save the two previous random numbers.
Call the RAND random number generator subroutine.
Test the two least significant bits of the previous random number.
CALLER_0:
Call the WRITE_NUMBER subroutine.
Goto AGAIN (repeat program).
CALLER_1:
Call the WRITE_NUMBER subroutine.
Goto AGAIN (repeat program).
CALLER_2:
Call the WRITE_NUMBER subroutine.
Goto AGAIN (repeat program).
CALLER_3:
Call the WRITE_NUMBER subroutine.
Goto AGAIN (repeat program).
WRITE_NUMBER:
Write the random number to a 256 byte data area, using the second
previous random number as an offset into that area.
RETURN from subroutine.
RAND:
Pseudo-random number generator which returns a random number
from 0-0FFH.
RETURN from subroutine.

Figure 2-1. Pseudo-Code Algorithm of Sample Program

Before You Can
Use the Analyzer
If 00B then goto CALLER_0.
If 01B then goto CALLER_1.
If 10B then goto CALLER_2.
If 11B then goto CALLER_3.
from many different places. An example later in this chapter will show
you how to use the analyzer to determine where a routine is called from.
An assembler listing of the sample program is shown in figure 2-2. It is
provided so that you can see the addresses associated with the program
labels. The program area, which contains the instructions to be exe-
cuted by the microprocessor, is located at 400H. The RESULTS area,
to which the random numbers are written, is located at 500H. The area
which contains a variable used by the RAND subroutine and the loca-
tions for the stack is located at 600H.
Before you can use the analyzer to perform measurements on the sam-
ple program, you must map memory and load the sample program.
Getting Started 2-3

Advertisement

Table of Contents
loading

Table of Contents