Generación de retardos en la familia HC908 - Edudevices
Generación de retardos en la familia HC908 - Edudevices
Generación de retardos en la familia HC908 - Edudevices
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Dto. Técnico EduDevices www.edu<strong>de</strong>vices.com.ar<br />
Ciclos Bytes Código Com<strong>en</strong>tarios<br />
1 1 NOP -<br />
2 1 SEI Fuerza I=1<br />
2 1 CLI Fuerza I=0<br />
2 1 DAA Invalida registro A<br />
2 1 TSX Invalida registros H y X<br />
2 2<br />
NOP<br />
NOP<br />
-<br />
3 1 NSA Intercambia nibbles <strong>de</strong>l registro A<br />
3 2 BRN $ -<br />
4 2<br />
PSHA<br />
PULA<br />
Utiliza y libera un byte <strong>de</strong>l stack<br />
5 1 MUL<br />
PSHA<br />
Invalida registros A, X y CC (bits H y C)<br />
5 3<br />
PULA<br />
NOP<br />
Utiliza y libera un byte <strong>de</strong>l stack<br />
5 3 MOV $80,$80<br />
Invalida registro CC (bits V, N y Z)<br />
Usar cualquier dirección <strong>en</strong> página 0.<br />
6 2<br />
NSA<br />
NSA<br />
-<br />
7 1 DIV<br />
PSHA<br />
Invalida registros A, X y H<br />
7 3<br />
NSA<br />
PULA<br />
Utiliza y libera un byte <strong>de</strong>l stack<br />
8 3 (o 2)<br />
9 3<br />
9 4 (o 3)<br />
16 2 (o 1)<br />
BSR rutina<br />
..<br />
rutina: RTS<br />
NSA<br />
NSA<br />
NSA<br />
JSR rutina<br />
..<br />
rutina: RTS<br />
SWI<br />
...<br />
vector_swi: RTI<br />
Utiliza y libera dos bytes <strong>de</strong>l stack<br />
Se pue<strong>de</strong> utilizar un RTS exist<strong>en</strong>te y ahorrar un<br />
byte.<br />
Intercambia nibbles <strong>de</strong>l registro A<br />
Utiliza y libera dos bytes <strong>de</strong>l stack<br />
Se pue<strong>de</strong> utilizar un RTS exist<strong>en</strong>te y ahorrar un<br />
byte.<br />
Utiliza y libera 5 bytes <strong>de</strong>l stack<br />
Se pue<strong>de</strong> utilizar un RTS exist<strong>en</strong>te y ahorrar un<br />
byte.<br />
En <strong>la</strong> tab<strong>la</strong> se ac<strong>la</strong>ra que efecto co<strong>la</strong>teral ti<strong>en</strong>e realizar <strong>la</strong> <strong>de</strong>mora con <strong>la</strong>s instrucciones indicadas.<br />
Por ejemplo: <strong>la</strong> instrucción "NSA" <strong>de</strong>mora 3 ciclos pero intercambia los nibbles <strong>de</strong>l registro A,<br />
por lo que también se indica <strong>en</strong> <strong>la</strong> tab<strong>la</strong> que usando <strong>la</strong> instrucción "BRN xx" (branch never) se obti<strong>en</strong>e<br />
una <strong>de</strong>mora igual pero sin modificar ningún registro. También pue<strong>de</strong>n ponerse 3 "NOP"s pero a exp<strong>en</strong>sas<br />
<strong>de</strong> 1 byte extra y ningún b<strong>en</strong>eficio.<br />
Ing. Daniel Di Lel<strong>la</strong>: - Dedicated Field Application Engineer e-mail: dilel<strong>la</strong>@arnet.com.ar