11 May 2010, 15:34 | #1 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
|
Using ReadArgs() from asm
I was checking out dos/ReadArgs() but came to the conclusion that I don't understand much of the parameters it would require.
My program expects just a single parameter which should be a filename (incl path, if that matters). What should I provide in the template-parameter that ReadArgs() requires? Thanks in advance |
11 May 2010, 16:00 | #2 | ||
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
Code:
move.l #template,d1 move.l #filename,d2 moveq #0,d3 move.l DOSBase,a6 jsr -798(a6) template: dc.b "FILE/A",0 filename: dc.l 0 Quote:
Quote:
Last edited by thomas; 11 May 2010 at 16:08. |
||
11 May 2010, 16:03 | #3 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
|
Cool, thanks alot, will try that.. By the way, how did you know about "FILE/A"? What's FILE in this context? Just a name? Or some kind of parametername?
|
11 May 2010, 16:04 | #4 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
FILE is the filename and /A means that it is required, i.e. no filename given -> error.
Here's an example from one of my tools: Code:
TEMPLATE dc.b "DISKFILE/A,DIR,WP=WRITEPITCHES/S,SPLIT/S,SH=SAVEHEADER/S",0 |
11 May 2010, 16:11 | #5 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
I've edited my first post. Please also read the autodocs. FILE is just a name you can specify. It's also a keyword the user can enter to rearrange the arguments (if you had more than one). "/A" means the argument is required.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need an ASM manual | VoltureX | Coders. General | 2 | 17 November 2011 15:24 |
for ASM programmers | meynaf | Coders. General | 29 | 05 August 2010 10:00 |
6502 Asm | pmc | Coders. General | 21 | 06 November 2008 09:37 |
ASM Uni Course | BippyM | Coders. Tutorials | 27 | 18 September 2008 10:37 |
Looking Barfly asm | Oneillsite | Coders. General | 4 | 25 September 2006 20:27 |
|
|