Hi isywum,
The tutorial you link to up above is good, but the next chapter on 16-bit code is what you want.
No, you can't just "pop" the parameter. The "call" instruction puts the return address on the stack, your parameters are above that... and here is a complication with 16-bit code! If it's a "near" call, only the offset part of the address is on the stack, if it's a "far" call, both the offset and the segment are on the stack (and you need to return from your function with "retf"). Since [sp + ?] is not a valid addressing mode in 16-bit code, we have to use bp, and we need to save it on the stack (caller is expecting it to be preserved). So I would expect your first parameter to be at [bp + 4] (near call, return address offset and bp on the stack), or [bp + 6] (far call, return address offset and segment and bp on the stack). Since I don't have a clue which kind of call gcc generates, I'd look for the first parameter by "trial and error". Since you've got the file disassembled, you can probably tell from that if it's a plain "call" or a "call far". If parameters are passed "by reference" (the address of the data, not its value), there's an issue with whether it's "far data" (both offset and segment is passed) or "near data" (only the offset part of the address is passed). 16-bit code is a real PITA! I'll be glad when I've forgotten it entirely (coming soon - my memory is pretty bad!).
If you can't get it (re-read that chapter on 16-bit), maybe it would help if you posted the relevant part of your disassembly(?).
Best,
Frank