HP 64700 User Manual page 57

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

Advertisement

25 * The instructions which follow determine which
26 * caller calls WRITE_NUMBER (depends on the last
27 * two bits of the previous random number).
0422 D0DC
28
0424 7207
29
0426 D0DC
30
0428 7216
31
042A E90700
32
042D D0DC
33 ONE_THREE
042F 7215
34
0431 E90600
35
36 * The WRITE_NUMBER routine is called from four
37 * different places.
38 * the program checks how many random numbers have
39 * been written.
0434 E83D00
40 CALLER_0
0437 E90F00
41
043A E83700
42 CALLER_1
043D E90900
43
0440 E83100
44 CALLER_2
0443 E90300
45
0446 E82B00
46 CALLER_3
0449 49
47 TEST
48 * If the counter is not zero, continue to write
49 * random numbers.
044A 75C6
50
51 * The counter is zero.
52 * in the RESULTS area.
044C B9FF04
53
54 * Push the "high address" and "low address"
55 * parameters expected by the QSORT routine.
044F B8FF05
56
0452 50
57
0453 B80005
58
0456 50
59
60 * Call the QSORT routine.
0457 E82000
61
045A EBB6
62
63
64 *----------------------------------------------------
65 * The RAND subroutine generates a pseudo-random
66 * number from 0-0FFH.
67 * register AX.
68 *----------------------------------------------------
69
045C B86D4E
70 RAND
045F 26F72E0006
71
0464 153903
72
0467 7301
73
0469 42
74
046A 26A30006
75 PAST_INC
046E 8BC2
76
0470 25FF00
77
0473 C3
78
79
Figure 3-1. "Complex" Config. Sample Program (Cont'd)
RCR
AH,1
JC
ONE_THREE
RCR
AH,1
JC
CALLER_2
JMP
CALLER_0
RCR
AH,1
JC
CALLER_3
JMP
CALLER_1
After the subroutine return,
CALL
WRITE_NUMBER
JMP
NEAR PTR TEST
CALL
WRITE_NUMBER
JMP
NEAR PTR TEST
CALL
WRITE_NUMBER
JMP
NEAR PTR TEST
CALL
WRITE_NUMBER
DEC
CX
JNZ
AGAIN
Sort the random numbers
MOV
CX,#4FFH
; Reset counter.
MOV
AX,OFFSET RESULTS+0FFH
PUSH
AX
MOV
AX,OFFSET RESULTS
PUSH
AX
CALL
NEAR PTR QSORT
JMP
AGAIN
; Repeat program.
The result is left in
MOV
AX,#4E6DH
IMUL
RAND_SEED
ADC
AX,#339H
JNC
PAST_INC
INC
DX
MOV
RAND_SEED,AX
MOV
AX,DX
AND
AX,#0FFH
RET
Accessing Full Analyzer Capability 3-9

Advertisement

Table of Contents
loading

Table of Contents