diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2017-01-15 12:51:08 -0600 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2017-01-15 23:19:33 -0600 |
commit | f38a18c10bcb7cfd5ce76a7216686b2631789fee (patch) | |
tree | 70aae3b6c12deed3f2f87421f30e8f4176055e0f /nqdasm.c | |
parent | 9acd6ce40559c59ca55899215aa9d7e781b5a8b7 (diff) |
nqdasm: improve spacing between mnemonic and operands
Diffstat (limited to 'nqdasm.c')
-rw-r--r-- | nqdasm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,5 @@ #include <stdio.h> +#include <string.h> #include "mnemonics.h" @@ -33,7 +34,8 @@ int main() printf("\t%s", m->mnem); for (int i = 0; i < 3 && m->operands[i].type; i++) { - printf("%s", i ? ", " : " "); + if (i) printf(", "); + else printf("%*s", 8 - (int)strlen(m->mnem), ""); print_operand(bits, m->operands + i); } printf("\n"); |