Hi All,
I have some assembly language source, in an older document, that when it was ported to our current platform, the code samples got messed up.
I am now faced with the task of going through and reformatting the assembly language examples. I'm using vim, to format the code but it is still a pretty manual task. I was wondering if anyone could suggest a better method.
I start with something like this:
<Code> MOVIZF32 R1H, #-2.0 ; R1H = -2.0 (0xC0000000) ABSF32 R1H, R1H ; R1H = 2.0 (0x40000000), ZF = NF = 0 MOVIZF32 R0H, #5.0 ; R0H = 5.0 (0x40A00000) ABSF32 R0H, R0H ; R0H = 5.0 (0x40A00000), ZF = NF = 0 MOVIZF32 R0H, #0.0 ; R0H = 0.0 ABSF32 R1H, R0H ; R1H = 0.0 ZF = 1, NF = 0</Code>
And to maintain the formatting i need to end up with something like this:
<Code> 
        MOVIZF32  R1H, #-2.0    ; R1H = -2.0 (0xC0000000) 
        ABSF32       R1H, R1H      ; R1H = 2.0 (0x40000000), ZF = NF = 0 
        MOVIZF32  R0H, #5.0     ; R0H = 5.0 (0x40A00000) 
        ABSF32       R0H, R0H      ; R0H = 5.0 (0x40A00000), ZF = NF = 0 
        MOVIZF32  R0H, #0.0     ; R0H = 0.0 
        ABSF32       R1H, R0H      ; R1H = 0.0 ZF = 1, NF = 0</Code>
Can anyone suggest the best way to do this in Vim?
thanks,
Russ
-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Monday, November 24, 2014
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment