;This program counts the number of one bits found in byte 01FFH, and
;put the count (a number between 0 and 8) into location 0200H.
        mov al, byte ptr 01ffH          ;get the input
        mov byte ptr 0200h, 0           ;zero out count of "1" bits
lp:     cmp al, 0
        je  stopit
        add al, al                      ;double number = shift left
        jnc lp
        add byte ptr 0200h, 1
        jmp lp
stopit: hlt