APPENDIX

 

 

BENCHMARK:

Character

Search

 

 

 

 

 

 

PROCESSOR:

Intel

iAPX

88

 

 

 

 

 

 

 

 

 

 

 

;REGISTER

 

USAGE:

 

 

 

 

 

 

 

 

AL

-

ACCUMULATOR

 

 

 

 

 

 

 

 

CX

 

COUNT

 

 

 

 

 

 

 

 

01

-

TABLE POINTER

 

 

Bytes

Cycles

 

 

 

 

 

 

 

 

4

6

 

LEA

 

OI,PTR

 

;Initialize Table

Pointer

~

4

 

MOv

 

AL,CHAR

 

;Search

character

 

3

4

 

MOv

 

CX,40

 

;Initialize count

flag

1

2

 

CLO

 

 

 

 

;Clear direction

~

9+15/

REPNE

SCAS

PTR

 

 

;Search

 

 

~

16/4

 

JZ

 

PASTPTR

 

;Jump if

found

 

3

4

 

MOv

 

01,1

 

;Not found:OI will return 0

1

~

PASTPTR:OEC

 

01

 

 

;Adj ust

01

 

 

 

 

18

bytes

of

code

 

 

 

 

 

 

 

8

lines

of

code

 

 

 

 

35

AFN 01532A

Page 304
Image 304
Intel 210200-002 manual Oi,Ptr