I guess I made the mistake to ask Gemini 2.0 pro, to help me test the carry flag in joystick_read and I have been thrown to rewrite a big part of the program (original program was making declarations in .h files).
I now have a redone joystick.h and joystick.c that give a strange compile error
that does not seems to fit the code:
paul@fedora:~/dosdef$ LANG=C make
gcc -std=gnu99 -Wall -Wextra -Os -nostdlib -m32 -march=i386
-Wno-unused-function -ffreestanding -fomit-frame-pointer -fwrapv
-fno-strict-aliasing -fno-leading-underscore -fno-pic -fno-stack-protector -c
-o dosdef.o dosdef.c
time.h: Assembler messages:
time.h:7: Warning: generating 32-bit `push', unlike earlier gas versions
time.h:12: Warning: generating 32-bit `pop', unlike earlier gas versions
gcc -std=gnu99 -Wall -Wextra -Os -nostdlib -m32 -march=i386
-Wno-unused-function -ffreestanding -fomit-frame-pointer -fwrapv
-fno-strict-aliasing -fno-leading-underscore -fno-pic -fno-stack-protector -c
-o joystick.o joystick.c
joystick.c: Assembler messages:
joystick.c:25: Error: incorrect register `%bx' used with `l' suffix
make: *** [Makefile:27: joystick.o] Error 1
paul@fedora:~/dosdef$
but the line in joystick.c is:
"pushl %%ebp\n" // Preserve EBP
which almost make me ask myself if the compiler is right.
Then... I frankly does not understand well this integrated assembler format.
Attaching joystick.h and joystick.c.
joystick.c
Description: Binary data
joystick.h
Description: Binary data
_______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
