I'm afraid I'm still pretty confused. What is the purpose of the "%assign"s?
What you've got there is valid code, but doesn't make a lot of sense. You're passing the word at offset 21 into your data segment (or wherever ds is), etc. You probably want to:
push 21
push 12
push 2012
call the_function
add sp, 6
(presumably this returns 0 :)
More likely, you want to use this for more than just that one day... You could declare variables as either initialized:
segment .data
day dw 21
month dw 12
year dw 2012
...
Or declare 'em uninitialized:
section .bss
day resw 1
month resw 1
year resw 1
You don't want to *use* 'em uninitialized, of course...
mov word [day], 21
mov word [month], 12
mov word [year], 2012
...
(Masm/Tasm will "remember" that we declared the variables as "word", so "word" can be left out, although "word ptr" is often used for clarity. Nasm has amnesia, and needs to be told the size) You can alter initialized data, too. (this is *not* what "%assign" does!)
segment .text
push word [day]
push word [month]
push word [year]
call the_function
add sp, 6
A C function will preserve bx, si, di, and bp, so you don't need to save those in the caller. This implies that ax, cx, and dx may be trashed. ax will be the return value, or dx:ax if it returns a 32-bit result. So the caller must preserve these, if you're using them. Your (original) function was declared "void". This doesn't mean that ax contains "no value", of course, (nor that it is preserved) just that it isn't meaningful. "x = my_void_function(a, b, c);" would be an error in C, but asm wouldn't prevent you from using ax, whether it's "sensible" or not.
If I'm still off-base... post a bit of the Tasm code you're trying to port. In particular, we'd need to see where the variables are declared, as well as where they're used (IMHO, Masm/Tasm syntax is quite ambiguous - "mov ax, something" in Masm/Tasm would probably translate to "mov ax, [something]" in Nasmese... but not always - depends on what "something" is.) If the Tasm code is available online, just post a link to it. I've had a bit of experience translating Masm/Tasm code to Nasm - a while ago, but I think I remember most of it. :)
Best,
Frank