Reading through the first manual in the SDK has reminded me what the "pure small memory model" is.
The ES register is never corrupted (DS=ES=SS).
#TopSpeed C implemented this, which was one of the main reasons why #Psion used it for the SDK.
I've heard that it's possible to implement this with #Borland C (and maybe #Watcom?), but I don't know how.
#x86 #epoc16 #retrocomputing #16bit #watcom #borland #psion #topspeed
Reading through the first manual in the SDK has reminded me what the "pure small memory model" is.
The ES register is never corrupted.
#TopSpeed C implemented this, which was one of the main reasons why #Psion used it for the SDK.
I've heard that it's possible to implement this with #Borland C (and maybe #Watcom?), but I don't know how.
#epoc16 #retrocomputing #16bit #watcom #borland #psion #topspeed
🥰 O-M-G! I love #DOSBox.
It helped me to find a stupid bug in my framebuffer code that slowed down clearing images.
Coding and compiling was done with #VSCode and #WATCOM,
and execution in DOSBox showed immediately what failed.
We don't see such bugs on Windows or Linux with our GHz CPUs anymore.
But with good old #DOS on an emulated 386 33 MHz host it made a jump from 2 to 18 FPS after fixing.
That's true optimization nobody cares about today. #gamedev before #Y2K must have been real fun.
#dosbox #vscode #watcom #dos #gamedev #y2k
And again: Grandpa knows why.
Compiling with #watcom for #freedos showed me some code-bloat in my hardcoded static C v-tables. The referenced v-table methods cannot be eliminated by the optimizer when those structures are not used.
But shifting the initialization of v-tables into separate functions
gives compilers the option to discard all unnecessary stuff.
This seems to be true for MSVC and GCC too.
However ... smaller executables are more important on DOS than on #windows or #linux.
#watcom #freedos #windows #linux
When I prepared my #C sources for a #DOS port for some experiments with #watcom, #freedos and #dosbox last year, I did not know that I also prepared a port to the #webassembly APIs with #emscripten.
Making threads and other system-specific stuff optional in interfaces did help a lot.
So, lesson learned: Doing something old means doing something new 😁
#c #dos #watcom #freedos #dosbox #webassembly #emscripten
Milestone #1 in my xmas DOS coding exercise was to unlock 256MB RAM in my pmode program; Milestone #2, highly robust (performance) timer/counter that is capable to provide close 1193200 ticks per second as unsigned long int (32bit) value. At such frequency, maximum 32bit value equals 60mins of heavily precise timer tracking without restarting the routine to recalculate for more. Hints how to get it done here: https://retrocomputing.stackexchange.com/questions/1426/timing-interrupts-on-ms-dos that was my starting point then #watcom C and #assembly code
@unjello @badlogic #Dosbox comes with nice built-in debugger you can hook yourself to, indeed. Quite handy to understand things internal to the dos machine it emulates (https://www.vogons.org/viewtopic.php?t=3944). Personally, I prefer to code inside it, with #watcom. Otherwise it's no different than targetting any other platform in #VSCode. No nostalgic emotion, just tasks to deliver. That's why GDI and hardware accelerated blits via WinAPI won in Simulacrum over any other option to "emulate" VESA 2.0 tech stack