Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
MOV AH, 02, como ya se mencionó anteriormente, sirve para mostrar el<br />
carácter. Para esto <strong>de</strong>be ir acompañado <strong>de</strong> INT 10H.<br />
Imprimir el carácter<br />
mov ah,0ah<br />
mov al,byte ptr[di]<br />
mov cx,1<br />
inc di<br />
int 10h<br />
<strong>de</strong>c temp<br />
mov cx,temp<br />
loop imprime<br />
En la primera línea se solicita que se ingrese un enter. Al ingresar el enter,<br />
en la siguiente línea, se mueve el carácter que se encuentra en el índice DI <strong>de</strong> la<br />
ca<strong>de</strong>na al registro acumulador en la parte baja, se incrementa CX en 1, se<br />
<strong>de</strong>crementa la longitud <strong>de</strong> ca<strong>de</strong>na, CX toma el valor <strong>de</strong> la longitud <strong>de</strong> ca<strong>de</strong>na y<br />
proce<strong>de</strong> a ejecutar el ciclo <strong>de</strong> imprime. Este código toma cada letra <strong>de</strong> la ca<strong>de</strong>na y<br />
la imprime en forma <strong>de</strong> diagonal.<br />
71