;; Put number in binary form INCLUDE PCMAC.INC INCLUDE USEFUL.INC .MODEL SMALL .DATA .CODE Public PutBin PutBin PROC _PushRegs mov cl, 15 mov bx, ax BinLoop: mov ax, bx shr ax, cl and al, 1 cmp al, 0 jz PutZero mov al, '1' jmp PutCh PutZero: mov al, '0' PutCh: _PutCh al dec cl cmp cl, 7 jne NoSpace _PutCh ' ' NoSpace: cmp cl, 0 jge BinLoop _PopRegs ret PutBin ENDP END