
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
try: | |
CR EQU 13 | |
LF EQU 10 | |
IMPRIMIR EQU 9 | |
FIN EQU 4C00H | |
DOS EQU 21H | |
TAB EQU 09H | |
BELL EQU 07H | |
DATOS SEGMENT | |
ENCABEZADO DB 13,10,13,TAB,TAB, "============================" | |
DB 13,10,13,TAB,TAB," PROGRAMA QUE IMPRIME UN VALOR BINARIO" | |
DB 13,10,13,TAB,TAB,"====================================",13,10,"$" | |
VALOR_ASCII DB '0101010110',"$" | |
DATOS ENDS | |
PILA SEGMENT STACK | |
DB 64 DUP("0") | |
PILA ENDS | |
CODIGO SEGMENT | |
ASCI PROC NEAR | |
ASSUME CS:CODIGO, DS:DATOS, SS:PILA | |
MOV AX,DATOS | |
MOV DS,AX | |
LEA DX,ENCABEZADO | |
CALL ESCRIBE | |
LEA DX, VALOR_ASCII | |
CALL ESCRIBE | |
CALL SALIR | |
ASCI ENDP | |
ESCRIBE PROC | |
MOV AH,9 | |
INT 21H | |
RET | |
ESCRIBE ENDP | |
SALIR PROC NEAR | |
MOV AX,FIN | |
INT DOS | |
RET | |
SALIR ENDS | |
CODIGO ENDS | |
END ASCI | |