- data segment
- bin db 10011101b
- buff db 3dup(0)
- data ends
- code segment
- assume cs:code,ds:data
- start:
- mov ax,data
- mov ds,ax
- mov al,bin
- mov ah,al
- and al,00000111b
- mov [buf+2],al
- mov al,ah
- mov cl,3
- shr al,cl
- mov ah,al
- and al,00000111b
- mov [buf+1],al
- mov al,ah
- shr al,cl
- and al,00000111b
- mov [buf],al
- mov si,offset buf
- pp:
- mov dl,buf[si]
- add dl,30h
- mov ah,02h
- int 21h
- inc si
- loop pp
- mov ax,4c00h
- int 21h
- code ends
- end start