## Octal "assembler", based on osm.c. .globl main main: push %ebp mov %esp, %ebp push %esi push %ebx and $~0xf, %esp sub $0x10, %esp reset: xor %esi, %esi xor %ebx, %ebx next: call getchar cmp $-1, %eax je end sub $'0, %eax cmp $7, %eax ja emit shl $3, %ebx inc %esi or %eax, %ebx jmp next emit: test %esi, %esi je next mov %ebx, (%esp) call putchar jmp reset end: lea -8(%ebp), %esp xor %eax, %eax pop %ebx pop %esi pop %ebp ret