19.04.2018 Views

Tutorial de ensamblador

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Posicionar carácter en ciertas coor<strong>de</strong>nadas <strong>de</strong> la pantalla<br />

gotoxy macro fila,col<br />

mov ah,02h<br />

mov dh,fila<br />

mov dl,col<br />

mov bh,0h<br />

int 10h<br />

endm<br />

pantalla macro que<br />

mov ah,02h<br />

mov dl,que<br />

int 21h<br />

endm<br />

.mo<strong>de</strong>l small<br />

.data<br />

.co<strong>de</strong><br />

startup:<br />

mov ax,@data<br />

mov ds,ax<br />

mov ax,0003h<br />

int 10h<br />

gotoxy 10,10<br />

pantalla 41h<br />

mov ah,01h<br />

int 21h<br />

mov ax,4c00h<br />

int 21h<br />

end startup<br />

Posicionar en pantalla<br />

gotoxy macro fila,col<br />

mov ah,02h<br />

mov dh,fila<br />

mov dl,col<br />

mov bh,0h<br />

int 10h<br />

endm<br />

MOV AH, 02H posiciona el cursor. Las siguientes dos líneas <strong>de</strong> código se<br />

asignan al registro <strong>de</strong> datos. MOV BH, 0H es para enviarle un cero a BH, INT 10<br />

es la interrupción <strong>de</strong> vi<strong>de</strong>o.<br />

77

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!