> PUSH 6(BP) ! here i'm putting romfile on the stack again
It's the way a compiler would do it.
> another solution would be to have a register (BX maybe?)
Also a possible way, for example __fastcall
Whether you push all the params, or pass a few in registers, I think you'd still declare the function in the same way.
readfile(char *file)
Tells you the interface, not the implementation.
Adopting a consistent approach which works would be more important than over-optimising every single case.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953