C Bootloader Experiment
Re: C Bootloader Experiment
Yeah I meant that it is 16bit code using 32bit registers and I´m looking for a way to get gcc to use 16bit registers.
Re: C Bootloader Experiment
I find a small macro like this very useful:Couldn't you just inline them, like: (From the GCC manual.)Code: Select all
inline void foo (const char) __attribute__((always_inline));
Code: Select all
#define INLINE_FUNCTION(_decl) \
static inline _decl __attribute__((always_inline)); \
_decl
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: C Bootloader Experiment
Are you going to be running the code on a <= 286 processor?FlashBurn wrote:Yeah I meant that it is 16bit code using 32bit registers and I´m looking for a way to get gcc to use 16bit registers.
Re: C Bootloader Experiment
No, but I read that the "ret" instruction will also be 32bit, so that it tries to return to a 32bit address. I haven´t checked this. At the moment I try to get my old borland c++ 2.0 running and to compile for loader.