function main {int argc} { int x int y int r set x 4 set y 9 set r [+ [+ $x 1] [- $y 1]] return 0 } after incrementing our %esi base offset for the integer declarations we go to the sets set x 4 lappend cmd $tok ;#tok is "set" We enter a different state, now that our "cmd" has been gathered. if {![llength $cmd]} { lappend cmd $tok ;#tok is "set" } else { if {"EOC" eq $type} { set name [lindex $cmd 0] if {"" eq [info commands comp:$name]} { return -code error "invalid keyword: '$name'" } eval comp:\$name [lrange $cmd 1 end] } elseif {"RECURSE" eq $type} { ceval $tok asm.out { subl $4,%ebp movl %eax,(%ebp)} lappend cmd #pop } elseif {"\$" eq [string index $tok 0]} { set off [get.symbol.offset [string range $tok 1 end]] asm.out " movl $off,%eax subl \$4,%ebp movl %eax,(%ebp)" lappend cmd #pop } elseif {[is.symbol? $tok]} { set off [get.symbol.offset $tok] asm.out " lea $off,%eax subl \$4,%ebp movl %eax,(%ebp)" lappend cmd #pop } }