November 29, 2016
This very minimalist example: http://pastebin.com/T2u7tWve is producing the error:


C:\DosProject>c:\dm\bin\dmc c:\DosProject\main.c c:\DosProject\video.c
c:\DosProject\main.c:
c:\DosProject\video.c:
      int 10h                          // Use Bios to set video mode
 ^
c:\DosProject\video.c(6) : Warning 13: Illegal type/size of operands for the mov instruction
link main+video,,,user32+kernel32/noi;


C:\DosProject>pause
Press any key to continue . . .

whats weird is this code is coming from straight from an example(chapter 2, page 26) from the book Tricks of The Game Programming Guru which is a book for programming dos games and is very highly revered. Judging from the user32 & kernal32 i'm guessing it's trying to make a win32. I already installed the Dos 16 add on, how do i force dm to compile a dos 16 true mode app? Any assistance in this matter would be greatly appreciated.

Dos Idle
6 days ago
On Tuesday, 29 November 2016 at 22:57:02 UTC, DosIdle wrote:
> This very minimalist example: http://pastebin.com/T2u7tWve is producing the error:
>
>
> C:\DosProject>c:\dm\bin\dmc c:\DosProject\main.c c:\DosProject\video.c
> c:\DosProject\main.c:
> c:\DosProject\video.c:
>       int 10h                          // Use Bios to set video mode
>  ^
> c:\DosProject\video.c(6) : Warning 13: Illegal type/size of operands for the mov instruction
> link main+video,,,user32+kernel32/noi;
>
>
> C:\DosProject>pause
> Press any key to continue . . .
>
> whats weird is this code is coming from straight from an example(chapter 2, page 26) from the book Tricks of The Game Programming Guru which is a book for programming dos games and is very highly revered. Judging from the user32 & kernal32 i'm guessing it's trying to make a win32. I already installed the Dos 16 add on, how do i force dm to compile a dos 16 true mode app? Any assistance in this matter would be greatly appreciated.
>
> Dos Idle

If you have the full DM C++ package including the IDE, there's a tutorial online.

http://www.digitalmars.com/ugr/chapter10.html

The important parameter for the command-line compiler is the memory model setting. To make a simple program that can use up to 640K of DOS memory, use "-mld" as a command-line parameter.

http://www.digitalmars.com/ctg/sc.html#switch_mn