label 1 # read a char and put copies on the stack push 0 readchar push 0 retrieve # compate to EOF and jump to end if it matches dup push -1 sub jz 5 # compare to \t and jump to 3 if it matches dup push 9 sub jz 3 jump 2 # non-tab label 2 outchar jump 4 # tab label 3 discard push 32 dup dup dup outchar outchar outchar outchar jump 4 # goto start label 4 jump 1 # end label 5 exit