Jump to content
IGNORED

Command-line arguments from DOS XL/SDX


dmlloyd

Recommended Posts

Does anyone know of a reference which explains how command-line arguments are passed to ".COM" style XEXes in DOS XL (and presumably SDX as well)? I'm given to understand that both DOSes use a similar mechanism but I can't seem to find any information about how to write an XEX that accepts arguments. I'm near to disassembling .COMs at this point.

Link to comment
Share on other sites

Does anyone know of a reference which explains how command-line arguments are passed to ".COM" style XEXes in DOS XL (and presumably SDX as well)? I'm given to understand that both DOSes use a similar mechanism but I can't seem to find any information about how to write an XEX that accepts arguments. I'm near to disassembling .COMs at this point.

 

SDX:

 

SpartaDOS User Accessible Data Table

 

Several SpartaDOS variables have been made available to programmers

to allow easy access to the command line for applications and utilities.

This data table is referred to as COMTAB and is pointed to by the OS vari -

able DOSVEC at memory location 10 ($0A). An assembly language example

is included for aid. This table is valid with all versions of Sparta-

DOS except where noted. Locations COMTAB, ZCRNAME, BUFOFF, COMFNAM,

and LBUF are also supported by OS/A+ and DOS XL.

 

 

ZCRNAME COMTAB+3

This is a 6502 jump instruction followed by the address of the file name

crunch routine. This location is used to interpret the command line. A

jump here will pull the next command from LBUF, translate the drive or

device identifier if one is given (i.e., A: to D1:), add the default drive iden-

tifier if none is given and place the result at COMFNAM. Each call will advance

BUFOFF to point to the next entry on the command line, so that

each call to the crunch routine will get the next entry on the line. If no

entries remain, the 6502 zero flag will be SET on return. Since the 6502

has no indirect jsr, it is necessary to use a few lines of code to access this

routine.

 

 

COMFNAM COMTAB+33

This is the destination buffer for the ZCRNAME routine. It will ALWAYS begin

with a Dd: since the default drive is added if none is given. If you are

looking for switches or other options, start looking at COMFNAM+3. This

buffer is 28 bytes long.

 

LBUF COMTAB+63

This is the input buffer for the command processor. The entire command

line is stored here. LBUF is 64 bytes long.

Edited by atari8warez
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...