A window showing 86box, a PC emulator, emulating a Compaq Deskpro 386, with Compaq MS-DOS 3.31.
Within the emulated screen, the result of executing a "Hello World" program, written in 16-bit x86 assembly, and linked as a COM file, which implies a tiny memory model (code and data are in the same segment, which cannot exceed 64 KiB). Open Watcom 2.0 is used to assemble and link the executable.
As it can be seen, garbage is printed instead of the desired message.
Using Open Watcom to create COM files is difficult, as the default setting for such files assumes a C language program is being compiled, and so automatically integrates startup code to set segments and entry points understandable by C objects. In this case, however, this code is not needed, and so, the assembly code must perform the initialization by itself.
It is suspected the initialization is not being done correctly in this case, as a separate data section contains the string to print, with no obvious constraint enforced to it, and a warning relocating the code segment to address 0x101 is observed, when the startup address for a COM file must always be 0x100.
Setting foot into x86 assembly territory, I tried to make sense of the Open Watcom grimoires to get a mythical-era COM executable.
But... <(=﹏=)>
#assembly #x86 #watcom #pc #dos #computing