;; Log of 2 INCLUDE PCMAC.INC .MODEL SMALL .STACK 100h .DATA N DW ? .CODE Main PROC EXTRN GetDec : NEAR, PutDec : NEAR mov ax, @data mov ds, ax call GetDec mov N, ax mov bx, 0 mov ax, 1 while1: cmp ax, N jnle Out1 inc bx add ax, ax jmp while1 Out1: dec bx _PutCh 13,10 mov ax, bx call PutDec _exit 0 Main ENDP END Main