APPENDIX
BENCHMARK:
Block
Translate
PROCESSOR:
zao
;Register
usage
A Accumulator
BC
Count
DE
ASCII
Buffer
DE'
EBCDIC
Buffer
HL
Accumulator
SP
Translate
table
pointer
Bytes
Cycles
3
10
1
4
3
10
3
10
3
10
4
LP:
~
7
1
4
~
7
1
4
1
11
~
16
3
10
LD
DE'
,EBCBUF
EXX
LD
BC,
COUNT
LD
DE,
ASCIBUF
LD
SP,
XTBL
EXX
LDD
A,(DE')
EXX
LD
H,O
LD
L,A
ADD
HL,SP
LDI
(DE),
(HL)
JP
PO,LD
~6
bytes
of
code
13
lines
of
code
16
;Load
EBCDIC
pointer
;Store
pointer
in
DE'
;COUNT
=
1~5
;Load,
ASCII
pointer
;Load
translate
table
pointer
;Restore
EBCDIC
pointer
;
Load
EBCDIC
character
;Restore
pointers
;C1ear
H
;Load
character
into
A
;Address
of
ASCII
character
;Move
ASCII
character
;Jump
if
not
done
AFN.()1664A