Personaly i like to make some very special batch files for DOS/DOSBOX and i put all instructions inside for a tiny routine to build an executable com file with a little help from Debug. Example: COLOR.BAT is for the text mode with 80x25 collumns/rows and 16 colors. Start on DOS prompt with a color attached. @echo off REM Need one parameter(%1) attached. REM Usage: *Color.bat* color REM Example: COLOR.BAT 1b echo acs:100>tmp.deb echo mov ax,b800>>tmp.deb echo mov ds,ax>>tmp.deb echo mov cx,820>>tmp.deb echo xor di,di>>tmp.deb echo mov al,%1>>tmp.deb echo mov [di+1],al>>tmp.deb echo add di,2>>tmp.deb echo dec cx>>tmp.deb echo jnz 010C>>tmp.deb echo ret>>tmp.deb echo.>>tmp.deb echo n Color.com>>tmp.deb echo rcx>>tmp.deb echo 16>>tmp.deb echo wcs:100>>tmp.deb echo q>>tmp.deb debugnul del tmp.deb Color.com del Color.com
Well' I'd prefer to just use Watcom's Toolchain as it's able to run on my Linux and macOS boxes via DOS. My windows machine is a little bit outdated and underpowered. I stopped to use it for streaming after seeing how poor the picture quality is.
Hint: DOSBOX emulates a PC with an INTEL 80386 CPU/FPU with 32 bit register/instructions. Debug from the Freedos Operating System: (provide 32 bit register/instructions) Download and extract debug into the mounted folder of DOSBOX. www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/debug.html
@@KodingAjaDulu But we can easy use all 32 bit register as an address-register within the 16 bit real address mode with 64kb segment size of DOSBOX using an address size prefix.
@@KodingAjaDulu Ok. I never set SS. Personaly i do not use the calling convention. I prefer to use mov and mov instructions to and from the data segment, because push and pop instructions are executing much slower than mov and mov instructions specially on older CPU before Pentium 4. And we can use the value of the data segment from inside and outside nested subroutines multiple times without to take care about the stack pointer. And we can get the best performance if we put all parameter into register only without a ram access. The stack size of all my executables for DOS is 10h bytes.