Ok, I'll stop nagging after this message for a while. I added to the Makefile: timer.o: $(CC) $(CFLAGS) -mgeneral-regs-only -mno-red-zone $< -o $@
And now it compile. But when run: Page fault CR2=00400002 in RMCB at eip 6; flags=3016 ... error=0004 which I believe was what I was receiving when adding iret at the end. ---- Le lun., 02 oct. 2023 13:06:35 -0400 Paul Dufresne via Freedos-user a écrit ---- > I have been able to rebuild the game using prebult cross-compiler from > build-djgpp project. > > When I add __asm__("iret"); > program crash as soon as I launch it. > Sorry not having the error now. > > I am trying to: > __attribute__((interrupt)) > void timer_handler(void *frame) > { > ticks++; > ... > > but getting: > i586-pc-msdosdjgpp-gcc -I. > -I/home/paul/Téléchargements/libmikmod-3.3.11.1/include -c -Wall -Werror > -pedantic -O3 -fomit-frame-pointer -ffast-math -march=i386 vga.c -o vga.o > timer.c: In function 'timer_handler': > timer.c:17:1: sorry, unimplemented: 80387 instructions aren't allowed in an > interrupt service routine > 17 | { > | ^ > make[1]: *** [Makefile:29: timer.o] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make[1]: Leaving directory '/home/paul/my_gminer/gold-mine-run/src' > make: *** [Makefile:2: all] Error 2 > paul@fedora:~/my_gminer/gold-mine-run2$ > > > Following: > https://stackoverflow.com/questions/55437894/how-to-correctly-compile-interrupt-service-routine-using-gcc > I have tried to add: -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow > -mno-red-zone at the end of CFLAGS > but it does not appears that my changes change the way the file is > compiled... > > I think I am very bad at editing Makefiles! > > > > > > _______________________________________________ > Freedos-user mailing list > Freedos-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-user > _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user