Welcome, Guest. Please login or register.

Author Topic: system() command  (Read 2128 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline arkanoidTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2007
  • Posts: 174
    • Show all replies
system() command
« on: March 04, 2007, 05:06:09 PM »
Hi,

I'm trying to use DOS commands from within C code. Some work fine but others give me error. For example, system("dir") works but system("cpu") just produces the shell error: "sh: cpu: not found"

i thought maybe system() defaults to only the commands based in ROM (like Dir). So I used system("c:cpu") and still no luck. anyone know why?
Peg2/G4/MorphOS
Amiga A1200/060
 

Offline arkanoidTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2007
  • Posts: 174
    • Show all replies
Re: system() command
« Reply #1 on: March 04, 2007, 05:41:48 PM »
thanks guys. all three solutions work. for this one though i'll probably go with -noixemul as I want to make it portable so i can just edit command #defines for different platforms.
Peg2/G4/MorphOS
Amiga A1200/060