Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I enjoy these, hope you keep going!

Maybe it's my nasm version, but "\n" seems to be inserted literal for me and not translated into LF. Thus my program outputs "Sum is correct\". Doing "msg: db 'Sum is correct',0xA" works for me though.



Nasm uses backquotes to enable c-style string escapes. So `\n` should work, "\n" should render as \n (not new-line).

Eg:

    "Sum is correct",`\n` ;or
    `Sum is correct\n`




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: