mcode: factored out formatting
mcode: fixed sign extension of displacement