ccmny

CtoAsm

Sep 12th, 2011
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.20 KB | None | 0 0
  1. map <F4> :call CtoAsm()<CR>
  2. function CtoAsm(...)
  3.   let opt = ''
  4.   if a:0 > 0
  5.     let opt = 'O'.a:1
  6.   endif
  7.   exec "w"
  8.   exec '!gcc % -S' . ' -' . opt . ' ' . '-o %:r'.opt.'.s'
  9.   exec 'e! %:r'.opt.'.s'
  10. endfunc
Advertisement
Add Comment
Please, Sign In to add comment