basic logic for the assembler