You expect "mov dl, [bp + 6]" to work by magic? Well, once you get an executable, you'll be able to find out easily. I don't know what to do about the error message. "PUBLIC" is what Nasm calls "global", so apparently it's "global WriteChar" that it's complaining about - but that looks okay to me. The only thing I can think of to try is to replace "[section .text]" with "section code class=code". Nasm's "-f obj" (OMF) output format doesn't know any "special names" like ".text" (most other output formats know what to do with ".text"), so specifying "class=code" might help. Since it's "far", the name shouldn't matter (?). Hmmm, I guess that's not right. Looking at the Friendly Nasm Manual:
# Procedures and functions must be in a segment whose name is either CODE, CSEG, or something ending in _TEXT.
So maybe make it "section CODE class=code"... maybe if you use one of those names, you wouldn't need "class=code"... Fool around in that area and see if it changes your results any.
Best,
Frank