long params

I'm having some bizarre behavior with functions that take multiple long values as parameters. If I change them to ints, all is fine, but if they are longs the target locks up on the function call. The simulator also shows "extra" hex addresses on the call stack, but is "normal" when the params are ints.

I simply have a main() routine that calls the following function:

unsigned char *GetBuffer(long, long, long, long);

I.E. b=GetBuffer(0, 320, 240, 1);

Am I missing something obvious?
The target is a 80C390, but I'm not
running in contiguous mode (yet), just in the large memory model.

I just updated to v6.22. (But I had not tried this with v6.21)

Parents
  • C functions normaly pass parameters in registers. If no registers available parameters passed in fixed memory locations.

    When entering the function some internal subroutines are called to save the parameters into local variables.
    So you see the return adress from these subroutines.

    Is this what you mean?

    Chris

Reply
  • C functions normaly pass parameters in registers. If no registers available parameters passed in fixed memory locations.

    When entering the function some internal subroutines are called to save the parameters into local variables.
    So you see the return adress from these subroutines.

    Is this what you mean?

    Chris

Children
More questions in this forum