VOGONS


C-12 has a question

Topic actions

First post, by C-12

User metadata
Rank Newbie
Rank
Newbie

I'm sorry can someone tell me how can I start a C/C++ program with Dosbox. I'm looking all week but I cann't find anything please post me a Dosbox and I don't now what ever it takes to start a "hello world" program 😢

btw. My english is very bad!

Reply 1 of 9, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

What is the name of the program?
Where is the program?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 2 of 9, by C-12

User metadata
Rank Newbie
Rank
Newbie

.... I want to put a compiled c/c++ program that i creat on PC and put it in psp and run it....

So I'm studying Programing in school ( C/C++/Pascal/Basic) and create some programs and now I want to put them in my PSP... is it posible? They are very simple programs( running with Windows cmd) so I was thinking it is posible to start them with Dosbox but I'm not shure so ..I have no idea what to do can someone help me?

Reply 3 of 9, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

I don't know how you copy your program to the PSP. Maybe store it on a Flash-card on the PC?

When you have it on the PSP you start DOSBox and enter something like:

mount C "Name-of-your-PSP-storage-device"
C:
dir /w
hello.exe

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 4 of 9, by C-12

User metadata
Rank Newbie
Rank
Newbie

The problem is when I try to open the program it said:
"This program cannot be run in DOS mode."

Is it obligatory to do that:

mount C "Name-of-your-PSP-storage-device"
C:
dir /w
hello.exe

I'm doing it that way:
start dosbox

Z:\ C:
C:\cd new
C:\new\add.exe
This program cannot be run in DOS mode.

Reply 5 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

what is add.exe ?

Reply 6 of 9, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

"This program cannot be run in DOS mode."

Dosbox can only run DOS gy ames.

The Windows command prompt by default runs WIN32 executables, it's only NTVDM that allows DOS programs to be executed in the Windows command prompt. So just because your program runs in the Windows command prompt does not mean that it is a DOS program.

How To Ask Questions The Smart Way
Make your games work offline

Reply 7 of 9, by C-12

User metadata
Rank Newbie
Rank
Newbie
DosFreak wrote:

"This program cannot be run in DOS mode."

Dosbox can only run DOS gy ames.

The Windows command prompt by default runs WIN32 executables, it's only NTVDM that allows DOS programs to be executed in the Windows command prompt. So just because your program runs in the Windows command prompt does not mean that it is a DOS program.

10x 😐

Reply 8 of 9, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

> So I'm studying Programing in school ( C/C++/Pascal/Basic) and create some programs

See if you can get the compiler to create DOS-programs. Maybe there is an option to create "16-bit programs"?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 9 of 9, by C-12

User metadata
Rank Newbie
Rank
Newbie

See if you can get the compiler to create DOS-programs. Maybe there is an option to create "16-bit programs"?

You are right I compiler with Turbo C++ and its worked!