Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; You may customize this and other start-up templates;
- ; The location of this template is c:\emu8086\inc\0_com_template.txt
- org 100h
- .stack small
- .data
- count dw 0
- input dw ?
- string db ?
- ; add your code here
- ;jc
- .code
- mov ah,01h
- int 21h
- mov cx,ax
- sub cx,48
- mov bx,16
- whileLoop2:
- shl cx,1
- jc print1
- jmp print0
- print1:
- mov ah,02h
- mov dx,'1'
- int 21h
- dec bx
- cmp bx,1
- jge whileLoop2
- cmp bx,0
- jmp end
- print0:
- mov ah,02h
- mov dx,'0'
- int 21h
- dec bx
- cmp bx,1
- jge whileLoop2
- end: ret
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement