mirror of
https://github.com/A2osX/A2osX.git
synced 2024-07-14 04:29:02 +00:00
Kernel 0.93
This commit is contained in:
parent
ca88602a61
commit
7e9bc637b1
Binary file not shown.
@ -14,7 +14,7 @@ NEW
|
|||||||
.OR ZPBIN
|
.OR ZPBIN
|
||||||
ZS.START
|
ZS.START
|
||||||
USRID .BS 1
|
USRID .BS 1
|
||||||
ZPPWPtr .BS 2
|
ZPSessionPtr .BS 2
|
||||||
ZS.END
|
ZS.END
|
||||||
.ED
|
.ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -63,20 +63,20 @@ CS.RUN >LDYA L.MSG0
|
|||||||
ldx USRID
|
ldx USRID
|
||||||
lda S.Table.hSession-1,x
|
lda S.Table.hSession-1,x
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
>STYA ZPPWPtr
|
>STYA ZPSessionPtr
|
||||||
|
|
||||||
lda ZPPWPtr
|
lda ZPSessionPtr
|
||||||
clc
|
clc
|
||||||
adc #S.SESSION.NAME
|
adc #S.SESSION.NAME
|
||||||
tay
|
tay
|
||||||
lda ZPPWPtr+1
|
lda ZPSessionPtr+1
|
||||||
adc /S.SESSION.NAME
|
adc /S.SESSION.NAME
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
|
||||||
>PUSHB (ZPPWPtr)
|
>PUSHB (ZPSessionPtr)
|
||||||
|
|
||||||
ldy #S.SESSION.UID
|
ldy #S.SESSION.UID
|
||||||
>PUSHB (ZPPWPtr),y
|
>PUSHB (ZPSessionPtr),y
|
||||||
|
|
||||||
>PUSHB USRID
|
>PUSHB USRID
|
||||||
|
|
||||||
|
@ -275,11 +275,11 @@ CS.RUN.SetUserSession
|
|||||||
bcs .9
|
bcs .9
|
||||||
>STYA pSession
|
>STYA pSession
|
||||||
>STYA ZPStrPtr
|
>STYA ZPStrPtr
|
||||||
|
|
||||||
stx ZPhSID
|
stx ZPhSID
|
||||||
|
|
||||||
* clc
|
* clc
|
||||||
|
|
||||||
ldy #S.PW.GID
|
ldy #S.PW.GID
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
tax
|
tax
|
||||||
|
@ -6,8 +6,8 @@ X.PWD jmp (.1-SYS.GetPWUID,x)
|
|||||||
.DA PWD.GetPWName
|
.DA PWD.GetPWName
|
||||||
.DA PWD.PutPW
|
.DA PWD.PutPW
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* ZPPtr1 : UID / pName
|
* ZPPtr1 : UID / pName (Input)
|
||||||
* ZPPtr2 : pPW
|
* ZPPtr2 : pPW (Output)
|
||||||
* ZPPtr3 : pDB
|
* ZPPtr3 : pDB
|
||||||
* USERNAME:PASSWORD:UID:GID:GECOS:HOME:SHELL\CR
|
* USERNAME:PASSWORD:UID:GID:GECOS:HOME:SHELL\CR
|
||||||
* ....\CR
|
* ....\CR
|
||||||
@ -63,7 +63,7 @@ PWD.GetPWName lda PWD.hDB
|
|||||||
ldy #0
|
ldy #0
|
||||||
jsr MEM.TXTPTR.GetY
|
jsr MEM.TXTPTR.GetY
|
||||||
beq .99
|
beq .99
|
||||||
|
* >DEBUG
|
||||||
.1 lda (ZPPtr3)
|
.1 lda (ZPPtr3)
|
||||||
beq .99
|
beq .99
|
||||||
|
|
||||||
@ -94,6 +94,9 @@ PWD.GetPWName lda PWD.hDB
|
|||||||
PWD.GetPWName.RTS
|
PWD.GetPWName.RTS
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
* ZPPtr2 : pPW (Input)
|
||||||
|
* ZPPtr3 : pDB
|
||||||
|
*--------------------------------------
|
||||||
PWD.PutPW >LDYA ZPPtr2
|
PWD.PutPW >LDYA ZPPtr2
|
||||||
>STYA TXTPTR
|
>STYA TXTPTR
|
||||||
|
|
||||||
@ -110,7 +113,7 @@ PWD.PutPW >LDYA ZPPtr2
|
|||||||
>STYA PWD.DBSize
|
>STYA PWD.DBSize
|
||||||
|
|
||||||
jsr K.getmem
|
jsr K.getmem
|
||||||
bcs .99
|
bcs PWD.GetPWName.RTS
|
||||||
>STYA ZPPtr3
|
>STYA ZPPtr3
|
||||||
>STYA PWD.DBPtr
|
>STYA PWD.DBPtr
|
||||||
stx PWD.hDB
|
stx PWD.hDB
|
||||||
@ -123,8 +126,13 @@ PWD.PutPW >LDYA ZPPtr2
|
|||||||
jsr PWD.DeleteRecord
|
jsr PWD.DeleteRecord
|
||||||
bcc .11 user exits..
|
bcc .11 user exits..
|
||||||
|
|
||||||
jsr PWD.SetUID new user, setup UID
|
jsr PWD.GetUID new user, get UID
|
||||||
|
bcs .99
|
||||||
|
ldy #S.PW.UID
|
||||||
|
sta CLRWRITEAUX
|
||||||
|
sta (TXTPTR),y
|
||||||
|
sta SETWRITEAUX
|
||||||
|
|
||||||
.11 jsr PWD.GetRecordLen
|
.11 jsr PWD.GetRecordLen
|
||||||
|
|
||||||
clc
|
clc
|
||||||
@ -179,11 +187,45 @@ PWD.PutPW >LDYA ZPPtr2
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* ZPPtr2 = pPW
|
* ZPPtr2 = pPW
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PWD.SetUID >LDYA PWD.DBPtr
|
PWD.GetUID >LDYA PWD.DBPtr
|
||||||
>STYA ZPPtr3
|
>STYA ZPPtr3
|
||||||
|
|
||||||
|
stz .8+1
|
||||||
|
|
||||||
|
.1 lda (ZPPtr3)
|
||||||
|
beq .8 End of DB
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
|
||||||
|
.2 lda (ZPPtr3),y
|
||||||
|
iny
|
||||||
|
cmp #':'
|
||||||
|
bne .2 skip name
|
||||||
|
|
||||||
|
.3 lda (ZPPtr3),y
|
||||||
|
iny
|
||||||
|
cmp #':'
|
||||||
|
bne .3 skip password
|
||||||
|
|
||||||
|
jsr PWD.GetByte
|
||||||
|
cmp .8+1
|
||||||
|
bcc .4
|
||||||
|
|
||||||
|
sta .8+1
|
||||||
|
|
||||||
|
.4 jsr PWD.NextLine
|
||||||
|
bra .1
|
||||||
|
|
||||||
|
.8 lda #$ff SELF MODIFIED
|
||||||
|
inc
|
||||||
|
beq .9
|
||||||
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
.9 lda #E.IUSR
|
||||||
|
sec
|
||||||
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PWD.DeleteRecord
|
PWD.DeleteRecord
|
||||||
jsr PWD.FindRecord
|
jsr PWD.FindRecord
|
||||||
@ -355,7 +397,7 @@ PWD.Record2PW sta CLRWRITEAUX
|
|||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PWD.GetByte stz .8+1
|
PWD.GetByte stz ZPPtr4
|
||||||
|
|
||||||
.1 lda (ZPPtr3),y
|
.1 lda (ZPPtr3),y
|
||||||
iny
|
iny
|
||||||
@ -365,20 +407,20 @@ PWD.GetByte stz .8+1
|
|||||||
and #$f
|
and #$f
|
||||||
pha
|
pha
|
||||||
|
|
||||||
lda .8+1
|
lda ZPPtr4
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
clc
|
clc
|
||||||
adc .8+1
|
adc ZPPtr4
|
||||||
asl
|
asl
|
||||||
sta .8+1
|
sta ZPPtr4
|
||||||
pla
|
pla
|
||||||
clc
|
clc
|
||||||
adc .8+1
|
adc ZPPtr4
|
||||||
sta .8+1
|
sta ZPPtr4
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.8 lda #$ff
|
.8 lda ZPPtr4
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PWD.StoreRecord sec
|
PWD.StoreRecord sec
|
||||||
|
Loading…
Reference in New Issue
Block a user