; School of Computer Engineering ; K.N. Toosi University of Technology %include "asm_io.inc" segment .text global asm_main asm_main: enter 0,0 pusha ;; ========================== call read_int mov ebx, 0 mov ecx, 32 startloop: shl eax, 1 jnc l1 inc ebx l1: loop startloop endl: mov eax, ebx call print_int call print_nl ;; ========================== popa leave ret