LS.S: Added Usage info if invalid args given

This commit is contained in:
Bobbi Webber-Manners 2021-06-11 20:20:31 -04:00
parent f830ee17e7
commit 806df67ccf

View File

@ -63,6 +63,7 @@ CS.START cld
.DA CS.RUN
.DA CS.DOEVENT
.DA CS.QUIT
L.MSG.USAGE .DA MSG.USAGE
L.MSG.REG .DA MSG.REG
L.MSG.REGEXT .DA MSG.REGEXT
L.MSG.DIR .DA MSG.DIR
@ -110,6 +111,10 @@ CS.RUN
dex
bpl .2
>PUSHW L.MSG.USAGE
>PUSHBI 0
>SYSCALL PrintF
lda #E.SYN
sec
rts
@ -800,6 +805,12 @@ CS.END
OptionList .AS "ACFLRacflr"
OptionVars .DA #bAllmostAll,#bColumn,#bFullPath,#bLong,#bRecurse,#bAllmostAll,#bColumn,#bFullPath,#bLong,#bRecurse
*--------------------------------------
MSG.USAGE .AS "Usage : LS [-A] [-C] [-F] [-L] [-R] [filespec]\r\n"
.AS " -A : Show dot files\r\n"
.AS " -C : List in multiple columns\r\n"
.AS " -F : Show full paths\r\n"
.AS " -L : Use long listing format\r\n"
.AZ " -R : Recursively list subdirectories\r\n"
MSG.REGEXT .AZ "%s %6s %6s %10u %s %s %s %H %s"
MSG.REG .AZ "%19s"
MSG.DIREXT .AZ "%s %6s %6s %s %s <dir> %s"