- data segment
- bin db 10011101b
- buff db 3 dup(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 [buff+2],al
- mov al,ah
- mov cl,3
- shr al,cl
- mov ah,al
- and al,00000111b
- mov [buff+1],al
- mov al,ah
- shr al,cl
- and al,00000111b
- mov [buff],al
- mov si,0
- pp:
- mov dl,buff[si]
- add dl,30h
- mov ah,02h
- int 21h
- inc si
- loop pp
- mov ax,4c00h
- int 21h
- code ends
- end start