CompuServe Messages

#ReadArgs() Problems

    22-May-94 10:08:02
Sb: #ReadArgs() Problems
Fm: Lou Bertato 73246,1744
To: ALL
I am having a heck of a time getting the ReadArgs() function to work for me in assembler. What I want to do is get the parameters of a command from the CLI, and along with the template, give me some sort of rdargs or something. But after I call ReadArgs(), I keep on getting a NULL in d0. I try something like this: readargs: move.l #template,d1 move.l #array,d2 move.l #0,d3 move.l _DOSBase,a6 jsr _LVOReadArgs(a6) tst.l d0 ; I get a zero here (??) rts template: dc.b 'Filename/A,HI/S,BYE/S',0 cnop 0,2 array: dc.l 0,0,0 I am using the c.o startup code from SAS/C 6.2. So I am basically getting a main(argc,argv), which I already have an array from this. But I am more interested in the RDArgs I want to get in d0. Another thing that I am wondering is how is the ReadArgs supposed to get the CLI command line from SAS/C c.o startup code if there are no CLI command line pointers being passed to the ReadArgs() function? All I have are C examples in The AmigaDOS Manual (3rd edition). But the examples are confusing me. Can somebody explain what I am doing wrong? And I would love some code that can work (with what I want to do….) Thanks…. Luciano 73246,1744