[Coco] OS-9 question: Command line arguments?

Gene Heskett gene.heskett at verizon.net
Tue May 20 21:16:34 EDT 2008


On Tuesday 20 May 2008, Fedor Steeman wrote:
>Thanks, Gene!
>
>Cool! Sure the handling of arguments is up to the program, but here I am
>wondering how exactly they are passed? Does OS-9 store arguments on a
>standard location in memory for programs to access? Or is there a pointer
>stored in one of the registers? Or does the program itself figure out where
>the command line prompt is and read the arguments directly from video
>memory?
>
>Cheers,
>Fedor
>
I can't testify about rsdos/basic, but OS-9 passes a pointer to the input 
command line buffer in register x that points to the first character of the 
command, or the first character of any arguments, I've forgotten which, as 
the wet ram doesn't always get refreshed on time.  The program then pulls the 
arguments with the usual lda ,x+, handling what it reads till it hits the 
final carriage return, which is the end of the arguments marker.

>2008/5/20 Gene Heskett <gene.heskett at verizon.net>:
>> On Tuesday 20 May 2008, Fedor Steeman wrote:
>> >Hello,
>> >
>> >As someone completely unaware of the blessings of OS-9, I was just
>> >wondering...
>> >
>> >Does OS-9 support command line arguments when executing programs?
>> >
>> >Thanks for any enlightening answers...
>> >
>> >Fedor
>>
>> Generally yes Fedor, but all the shell does is pass the arguments, its up
>> to
>> the program to handle them.
>>
>> Doing an "xmode /t2 bau=6" is one example if that is what you were asking.
>>
>> --
>> Cheers, Gene
>> "There are four boxes to be used in defense of liberty:
>>  soap, ballot, jury, and ammo. Please use in that order."
>> -Ed Howdershelt (Author)
>> One Bell System - it used to work before they installed the Dimension!
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>
>--
>Coco mailing list
>Coco at maltedmedia.com
>http://five.pairlist.net/mailman/listinfo/coco



-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genius doesn't work on an assembly line basis.  You can't simply say,
"Today I will be brilliant."
		-- Kirk, "The Ultimate Computer", stardate 4731.3



More information about the Coco mailing list