I have the book "The Ultimate DOS Programmer's Manual" 2nd Edition by John Mueller at hand right now. Chapter 7 of that book discusses BIOS-independent interrupts to do BIOS routines (not DOS stuff). I found a few interrupt I might want to program floppy disk boot sectors for (512 byte files that are written to the first 512 bytes of a floppy disk).
I think Mueller uses TASM or MASM because I see Assembly code in the following fashion (taking a part from one of its examples and stripping it of comments):
==========
HexConv PROC NEAR
MOV CX,10
NextChar: XOR DX,DX
DIV CX
ADD DL,30h
MOV [DI],DL
DEC DI
CMP AX,10
JGE NextChar
ADD AL,30h
MOV [DI],AL
RET
HexConv ENDP
==========
(from Mueller, John. "The Ultimate DOS Programmer's Manual", 2/e, pg. 129; code by John Mueller)
I understand the format: HexConv is a procedure and NextChar is a local label in that procedure that only code in HexConv can JMP to.
I want to know this: how do I do the same thing in NASM? More specifically, how do I make a procedure in NASM and then give it an internal label?
Also, what is PROC NEAR and PROC FAR and how do I use them in NASM?