Compare commits

..

No commits in common. "c3d9f28c2216f71b51fd4b07f0cd28b50f84afdd" and "27a14a992b7bf458866cd4931c64cd9862c1f4b3" have entirely different histories.

3 changed files with 21 additions and 61 deletions

Binary file not shown.

Binary file not shown.

View File

@ -54,6 +54,7 @@ L.MSG.ROOTPWD2 .DA MSG.ROOTPWD2
L.MSG.MISMATCH .DA MSG.MISMATCH
L.MSG.CRLF .DA MSG.CRLF
L.MSG.BS .DA MSG.BS
*L.ROOT .DA ROOT
J.CS.RUN.CheckArg
.DA CS.RUN.CheckArg.C
.DA CS.RUN.CheckArg.D
@ -148,9 +149,7 @@ CS.RUN.ROOT ldy #0
>PUSHBI 0
>SYSCALL PrintF
bcs .9
jsr CS.RUN.GetStr
.90 bcs .9
>PUSHW ZPStrPtr
@ -161,8 +160,13 @@ CS.RUN.ROOT ldy #0
>SYSCALL StrCmp
bcs .99
* jsr CS.RUN.TEST
>PUSHW pData
>SYSCALL PutPW
* jsr CS.RUN.TEST
bcs .9
lda #0
@ -175,30 +179,33 @@ CS.RUN.ROOT ldy #0
sec
rts
*--------------------------------------
*CS.RUN.TEST php
* pha
* >PUSHW L.ROOT
* >PUSHWI 0
* >SYSCALL GetEnv
* phx
* >SYSCALL PutS
* pla
* >SYSCALL FreeMem
* pla
* plp
* rts
*--------------------------------------
CS.RUN.GetStr stz ZPStrLen
.1 >SYSCALL GetChar
bcs .9
cmp #C.SPACE
bcc .2
ldy ZPStrLen
cpy ZPStrMax
beq .1
bit ZPbStrSecret
bmi .10
jsr CS.RUN.IsValidChar
bcs .1
.10 sta (ZPStrPtr),y
sta (ZPStrPtr),y
iny
sty ZPStrLen
bit ZPbStrSecret
bmi .1
>SYSCALL PutChar
bra .1
@ -207,13 +214,10 @@ CS.RUN.GetStr stz ZPStrLen
cmp #C.CR
beq .8
cmp #C.BS
bne .1
ldy ZPStrLen
beq .1
dec ZPStrLen
bit ZPbStrSecret
bmi .1
@ -222,7 +226,6 @@ CS.RUN.GetStr stz ZPStrLen
>PUSHBI 0
>SYSCALL PrintF
bra .1
.8 ldy ZPStrLen
lda #0
sta (ZPStrPtr),y
@ -230,7 +233,6 @@ CS.RUN.GetStr stz ZPStrLen
>PUSHW L.MSG.CRLF
>PUSHBI 0
>SYSCALL PrintF
.9 rts
*--------------------------------------
CS.RUN.CheckArg inc ArgIndex
@ -250,7 +252,6 @@ CS.RUN.CheckArg inc ArgIndex
.2 cmp OptionList,x
beq .3
dex
bpl .2
@ -275,8 +276,6 @@ CS.RUN.CheckArg inc ArgIndex
adc /S.PW.DIR+11
sta ZPTmpPtr+1
stz ZPbStrSecret
ldy #0
.5 lda (ZPStrPtr),y
@ -284,9 +283,6 @@ CS.RUN.CheckArg inc ArgIndex
sta (ZPTmpPtr),y
beq .6
jsr CS.RUN.IsValidChar
bcs CS.RUN.CheckArg.9
iny
cpy #16
bne .5
@ -304,11 +300,10 @@ CS.RUN.CheckArg inc ArgIndex
>SYSCALL GetPWName
bcc .9
jmp CS.RUN.CheckArg
bra CS.RUN.CheckArg
.8 lda ArgUsername
beq CS.RUN.CheckArg.9
clc
rts
@ -325,7 +320,6 @@ CS.RUN.CheckArg.P
lda ArgIndex
>SYSCALL ArgV
bcs CS.RUN.CheckArg.9
>PUSHYA
>PUSHEA.G S.PW.PASSWD
>SYSCALL MD5
@ -336,7 +330,6 @@ CS.RUN.CheckArg.C
lda ArgIndex
>SYSCALL ArgV
bcs CS.RUN.CheckArg.9
ldx #S.PW.GECOS
bra CS.RUN.CheckArg.Next
*--------------------------------------
@ -345,7 +338,6 @@ CS.RUN.CheckArg.D
lda ArgIndex
>SYSCALL ArgV
bcs CS.RUN.CheckArg.9
ldx #S.PW.DIR
bra CS.RUN.CheckArg.Next
*--------------------------------------
@ -382,34 +374,6 @@ CS.RUN.CheckArg.Next
.8 jmp CS.RUN.CheckArg
*--------------------------------------
CS.RUN.IsValidChar
cmp #'z'+1
bcs .99
cmp #'a'
bcs .8
cmp #'Z'+1
bcs .99
cmp #'A'
bcs .8
cpy #0
bcs .99
cmp #'0'
bcc .9
cmp #'9'+1
rts
.9 sec
.99 rts
.8 clc
rts
*--------------------------------------
CS.RUN.MkDir >PUSHEA.G S.PW.DIR
>PUSHWI S.STAT.MODE.RO+S.STAT.MODE.RG+S.STAT.MODE.FU
>SYSCALL MKDir
@ -427,14 +391,10 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT lda ZPhStr
beq .1
>SYSCALL FreeMem
.1 lda ZPhPW
beq .2
>SYSCALL FreeMem
.2 clc
rts
*--------------------------------------