Hi, Philipp

Using the normal C syntax.
> Function pointers are always 24 bits in the large model, while they are
> always 16 bits in the medium model.
> Thus, you can't just link files compiled using the medium model with
> files compiled using the large model.
>

OK, then how do I cast a function pointer to void * and backward?

Best regards,
Paul Beltyukov

чт, 6 мая 2021 г. в 19:58, Philipp Klaus Krause <p...@spth.de>:

> Am 06.05.21 um 16:47 schrieb Павел Бельтюков:
> > Hi, Philipp!
> >
> >     * Functions usually return by ret (medium model) or retf (large
> model).
> >
> > So, call/jp and callf/jpf are used in medium and large models
> > respectfully, aren't them?
>
> Yes. Though in the large model, for some function calls, retf is used
> (callf/jpf lack some addressing modes of call/jp, which is worked around
> using retf).
>
> >
> > How do I declare a function pointer (24 bit) in case of large memory
> model?
>
> Using the normal C syntax.
> Function pointers are always 24 bits in the large model, while they are
> always 16 bits in the medium model.
> Thus, you can't just link files compiled using the medium model with
> files compiled using the large model.
>
> Philipp
>
>
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to