HP 64700 User Manual page 58

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

Advertisement

0474 26889D0005
0479 C3
047A 8BEC
047C 8B7E04
047F 8B7602
0482 3BFE
0484 7C3A
0486 8A04
0488 47
0489 46
048A 3A04
048C 7E06
048E 3BFE
0490 7E15
0492 EBF5
0494 4F
0495 3A05
0497 7CFB
0499 3BFE
049B 7E0A
049D 8A24
049F 8A15
04A1 8814
Figure 3-1. "Complex" Config. Sample Program (Cont'd)
Accessing Full Analyzer Capability 3-10
80 *----------------------------------------------------
81 * The WRITE_NUMBER subroutine writes the random
82 * number to the RESULTS area.
83 * random number is the offset in this area.
84 *----------------------------------------------------
85
86 WRITE_NUMBER
MOV
87
RET
88
89 *----------------------------------------------------
90 * The QSORT subroutine is passed the high and low
91 * addresses of some area of bytes to be sorted on
92 * the stack.
93 *----------------------------------------------------
94
95 QSORT
MOV
96
MOV
97
MOV
98
99 * The following section splits the area to be sorted
100 * into two areas.
101 * of these smaller areas.
102
103 * If high index is less than low index, then sort
104 * is done.
105 OVER
CMP
106
JL
107 * AL = dividing value (from low index).
108
MOV
109 * (Increment allows DEC_HIGH loop to work first
110 * time through.)
111
INC
112 * Move low index up until it points to a value
113 * greater than the dividing value.
114 INC_LOW
INC
115
CMP
116
JLE
117
CMP
118
JLE
119
JMP
120 * Move high index down until it points to a value
121 * less than or equal to the dividing value.
122 DEC_HIGH
DEC
123
CMP
124
JL
125 * If high index is less than or equal to low index,
126 * the area is split; do not swap values.
127
CMP
128
JLE
129 * If high index is greater than low index, swap
130 * values and move indexes again.
131
MOV
132
MOV
133
MOV
The second previous
RESULTS[DI],BL
BP,SP
DI,[BP+4]
; DI = high index.
SI,[BP+2]
; SI = low index.
QSORT will be called to sort each
DI,SI
DONE
AL,[SI]
DI
SI
AL,[SI]
DEC_HIGH
DI,SI
OUT
INC_LOW
DI
AL,[DI]
DEC_HIGH
DI,SI
OUT
AH,[SI]
DL,[DI]
[SI],DL

Advertisement

Table of Contents
loading

Table of Contents