Herr Otto Partz says you're all nothing but pipsqueaks!
Quote from: Cas on October 10, 2025, 10:28:15 PMBut programming for SDL feels very different to me from programming in a language. The library takes over and you really are no longer writing the graphics code.
Quote from: Cas on October 10, 2025, 04:52:28 PMthere are tons of SDL-based 3D graphics engines out there already.
Quotebut when talking about graphics code, since C does not include that,
QuoteThe version above uses SDL for graphics, but the version for DOS/DOSBox, which is available below, uses some graphical functions available with Open Watcom, as SDL has no support for DOS.
int16_t a;
__asm{
mov ax,0
push ax
push ax
mov ax,1234
call int_atan2_asm
add sp,4
mov a,ax
}
printf("a:%d\n", a);
return 0;
const int16_t min = -2;
const int16_t max = +2;
for(int i = min; i < max; ++i)
{
printf("[%d](x=0,y=0) a: %d, c: %d\n", i, int_atan2_asm(0, 0),int_atan2(0, 0));
}
for (int16_t x = min; x < max; ++x)
{
for (int16_t y = min; y < max; ++y)
{
int16_t a = int_atan2_asm(x, y);
int16_t c = int_atan2(x, y);
printf("x=%d, y=%d -> C=%d, ASM=%d\n", x, y, c, a);
}
}
[-2](x=0,y=0) a: 0, c: 0
[-1](x=0,y=0) a: 0, c: 0
[0](x=0,y=0) a: 0, c: 0
[1](x=0,y=0) a: 0, c: 0
x=-2, y=-2 -> C=-384, ASM=-384
x=-2, y=-1 -> C=-332, ASM=-332
x=-2, y=0 -> C=-256, ASM=-256
x=-2, y=1 -> C=-180, ASM=-180
x=-1, y=-2 -> C=-436, ASM=-436
x=-1, y=-1 -> C=-384, ASM=-384
x=-1, y=0 -> C=-256, ASM=-256
x=-1, y=1 -> C=-128, ASM=-128
x=0, y=-2 -> C=512, ASM=512
x=0, y=-1 -> C=512, ASM=512
x=0, y=0 -> C=0, ASM=28 <======= ???
x=0, y=1 -> C=0, ASM=0
x=1, y=-2 -> C=436, ASM=436
x=1, y=-1 -> C=384, ASM=384
x=1, y=0 -> C=256, ASM=256
x=1, y=1 -> C=128, ASM=128
int16_t c = int_atan2(x, y);
int16_t a = int_atan2_asm(x, y);
Quote from: dstien on October 09, 2025, 07:44:31 PMQuotecompile with current Watcom V2 on Windows for DOS 16bit Model small exe using wcl+wasm
the test run was done on a real DOS 6.22 on VMWare Player (because dosbox failed to run the complete test without hanging)
Does this include the fix I pushed the other day? Strangely I can't reproduce it on my end with dosemu2 or DOSBox. Could you attach the exe file? I'm keen to have a look.
Quotepeak values crashes both implementations
mkfs.msdos -C myfloppy.img 1440
mcopy -i myfloppy.img test16.exe ::/
mdir -i myfloppy.img ::/