23 April 2017, 17:22 | #1 |
Ya' like it Retr0?
Join Date: Jul 2005
Location: United Kingdom
Age: 49
Posts: 9,768
|
Using System DOS commands within SAS-C
Hello my fellow forum chummies, buds and friends!
Quick Question - I have just set up and working SAS-C environment to evolve AGLaunch into something a lot more configurable - I was wondering if there is a way to use DOS commands to create a dumb text file. Such that Code:
#include <sdtio.h> #include <stdlib.h> #include <string.h> #include <system.h> void main (void) { printf("Igor!... Throw tha Switch!!\n\nYesss Mastaaah...\n\n"); blah code; blah code; blah code; system("DIR DIRS >RAM:tst.txt"); blah code (open the file in ram) blah code (do some shenanigans on txt file) } |
23 April 2017, 17:29 | #2 |
Registered User
Join Date: Jul 2014
Location: Finland
Posts: 1,186
|
Is there a dirent.h ? Then you could just do this straight from C.
Actually, take a look in the dos autodocs, theres an example using ExamineDir() Last edited by Locutus; 23 April 2017 at 17:35. |
23 April 2017, 17:35 | #3 |
Ya' like it Retr0?
Join Date: Jul 2005
Location: United Kingdom
Age: 49
Posts: 9,768
|
|
23 April 2017, 17:40 | #4 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,844
|
There's the dos.library function execute: http://amigadev.elowar.com/read/ADCD.../node015E.html
|
23 April 2017, 17:50 | #5 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Just include <stdlib.h> and your call to system() will compile.
|
23 April 2017, 18:14 | #6 |
Ya' like it Retr0?
Join Date: Jul 2005
Location: United Kingdom
Age: 49
Posts: 9,768
|
Cheers all!!!
Now cooking with GAS!!! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PCMCIA fault: DOS error code 225 - Not a valid DOS disk | 4am | support.Hardware | 2 | 07 April 2012 10:20 |
Zip help commands | mickolite | support.Apps | 5 | 16 June 2011 21:00 |
SAS/C Startup commands | Eternal_Newbie | support.Apps | 2 | 04 July 2010 00:53 |
System is not validated! FFS (and I dont mean fast file system!) | Macca | support.Hardware | 11 | 11 June 2007 13:04 |
For those of you that must run old MS-DOS games, DOS Box has been ported | Pyromania | Amiga scene | 19 | 06 June 2003 11:44 |
|
|