mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
Kernel 0.93
This commit is contained in:
parent
d4ef30ab1f
commit
80ef6ced5c
@ -95,12 +95,13 @@ CS.RUN >LDYAI S.PW
|
||||
|
||||
jmp CS.RUN.ROOT
|
||||
|
||||
.1 ldy #S.PW-1
|
||||
.1 ldy #S.PW
|
||||
|
||||
.2 lda PW.DEFAULT,y
|
||||
.2 dey
|
||||
lda PW.DEFAULT,y
|
||||
sta (pData),y
|
||||
dey
|
||||
bpl .2
|
||||
tya
|
||||
bne .2
|
||||
|
||||
jsr CS.RUN.CheckArg
|
||||
bcs .9
|
||||
@ -274,7 +275,7 @@ CS.RUN.CheckArg inc ArgCount
|
||||
ldy #0
|
||||
|
||||
.5 lda (ZPStrPtr),y
|
||||
sta (PW),y
|
||||
sta (pData),y
|
||||
sta (ZPPWPtr),y
|
||||
beq .6
|
||||
iny
|
||||
@ -368,7 +369,7 @@ PW.ROOT .AS "ROOT"
|
||||
PW.DEFAULT .BS 17 NAME
|
||||
.HS D41D8CD98F00B204E9800998ECF8427E00
|
||||
.DA #0 UID
|
||||
.DA #0 GID
|
||||
.DA #1 GID
|
||||
.BS 65 GECOS
|
||||
.AS "${ROOT}USR/"
|
||||
.BS 65-11
|
||||
|
@ -638,8 +638,7 @@ S.SESSION.P.ROOT .EQ %10000000
|
||||
S.SESSION.P.SYSADMIN .EQ %01000000
|
||||
S.SESSION.UID .EQ 1
|
||||
S.SESSION.GID .EQ 2
|
||||
S.SESSION.PASSWD .EQ 3
|
||||
S.SESSION.NAME .EQ 20
|
||||
S.SESSION.NAME .EQ 3
|
||||
*S.SESSION.GECOS .EQ 0
|
||||
*S.SESSION.DIR .EQ 0
|
||||
*S.SESSION.SHELL .EQ 0
|
||||
|
@ -231,7 +231,7 @@ CS.RUN.SetRootSession
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.SetUserSession
|
||||
ldx #S.SESSION.NAME P+UID+GID+PASSWD
|
||||
ldx #S.SESSION.NAME P+UID+GID
|
||||
|
||||
ldy #S.PW.NAME-1
|
||||
|
||||
@ -481,7 +481,6 @@ SHELL .AZ "${SHELL}"
|
||||
SESSION.ROOT .DA #S.SESSION.P.ROOT
|
||||
.DA #0 UID
|
||||
.DA #0 GID
|
||||
.BS 17 PASSWD
|
||||
.AZ "ROOT" NAME
|
||||
.AZ "Root User" GECOS
|
||||
.AZ "${ROOT}ROOT/" DIR
|
||||
|
@ -51,7 +51,7 @@ PWD.GetPWUID lda PWD.hDB
|
||||
inc ZPPtr3+1
|
||||
bra .1
|
||||
|
||||
.8 jmp PWD.Record2PM
|
||||
.8 jmp PWD.Record2PW
|
||||
|
||||
.9 lda #E.IPWDDB
|
||||
sec
|
||||
@ -103,8 +103,7 @@ PWD.GetPWName lda PWD.hDB
|
||||
cmp #':'
|
||||
bne .3
|
||||
|
||||
jmp PWD.Record2PM
|
||||
|
||||
jmp PWD.Record2PW
|
||||
|
||||
.9 lda #E.IPWDDB
|
||||
sec
|
||||
@ -126,24 +125,62 @@ PWD.PutPW >LDYA ZPPtr2
|
||||
|
||||
jmp PWD.InitDB
|
||||
|
||||
.1 jsr PWD.
|
||||
.1 jsr K.GetmemPtr
|
||||
>STYA PWD.DBPtr
|
||||
|
||||
jsr PWD.DeleteRecord
|
||||
|
||||
jsr PWD.GetRecordLen
|
||||
pha
|
||||
tya
|
||||
|
||||
clc
|
||||
adc PWD.DBSize
|
||||
tay
|
||||
pla
|
||||
adc PWD.DBSize+1 Y,A = new DB Size
|
||||
sta PWD.DBSize
|
||||
bcc .2
|
||||
inc PWD.DBSize+1
|
||||
|
||||
.2 >LDYA PWD.DBPtr
|
||||
>STYA ZPPtr4
|
||||
|
||||
>LDYA PWD.DBSize
|
||||
|
||||
jsr K.Getmem
|
||||
bcs .99
|
||||
|
||||
>STYA ZPPtr3
|
||||
>STYA PWD.DBPtr
|
||||
|
||||
ldy #0
|
||||
|
||||
.3 lda (ZPPtr4),y
|
||||
sta (ZPPtr3),y
|
||||
beq .4
|
||||
|
||||
iny
|
||||
bne .3
|
||||
inc ZPPtr4
|
||||
inc ZPPtr3
|
||||
bra .3
|
||||
|
||||
.4 tya
|
||||
clc
|
||||
adc ZPPtr3
|
||||
sta ZPPtr3
|
||||
bcc .5
|
||||
inc ZPPtr3+1
|
||||
|
||||
.5 jsr PWD.StoreRecord
|
||||
|
||||
inc PWD.bDirty
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 lda #E.IPWDDB
|
||||
sec
|
||||
rts
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
PWD.InitDB jsr PWD.GetRecordLen
|
||||
tay
|
||||
lda #0
|
||||
>STYA PWD.DBSize
|
||||
|
||||
jsr K.getmem
|
||||
@ -161,10 +198,45 @@ PWD.InitDB jsr PWD.GetRecordLen
|
||||
* ZPPtr2 = pPW
|
||||
*--------------------------------------
|
||||
PWD.DeleteRecord
|
||||
>LDYA PWD.DBPtr
|
||||
jsr PWD.FindRecord
|
||||
bcs .9
|
||||
|
||||
.1 iny
|
||||
lda (ZPPtr3),y
|
||||
cmp #C.CR
|
||||
bne .1
|
||||
|
||||
sty .8+1
|
||||
|
||||
tya
|
||||
sec
|
||||
adc ZPPtr3
|
||||
sta ZPPtr4
|
||||
lda ZPPtr3+1
|
||||
adc #0
|
||||
sta ZPPtr4+1
|
||||
|
||||
ldy #$ff
|
||||
|
||||
.2 iny
|
||||
lda (ZPPtr4),y
|
||||
sta (ZPPtr3),y
|
||||
bne .2
|
||||
|
||||
lda PWD.DBSize
|
||||
sec
|
||||
.8 sbc #$ff SELF MODIFIED
|
||||
sta PWD.DBSize
|
||||
bcs .9
|
||||
|
||||
dec PWD.DBSize+1
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
PWD.FindRecord >LDYA PWD.DBPtr
|
||||
>STYA ZPPtr3
|
||||
|
||||
.1 >LDYA ZPPtr2
|
||||
>LDYA ZPPtr2
|
||||
>STYA TXTPTR
|
||||
|
||||
.2 lda (ZPPtr3)
|
||||
@ -173,18 +245,36 @@ PWD.DeleteRecord
|
||||
ldy #$ff
|
||||
|
||||
.3 iny
|
||||
jsr MEM.TXTPTR.GetNext
|
||||
jsr MEM.TXTPTR.GetY
|
||||
beq .4
|
||||
cmp (ZPPtr3),y
|
||||
bne
|
||||
|
||||
and #$ff
|
||||
beq .3
|
||||
bra .5
|
||||
|
||||
|
||||
.4 lda (ZPPtr3),y
|
||||
beq .8
|
||||
|
||||
.5 iny
|
||||
lda (ZPPtr3),y
|
||||
cmp #C.CR
|
||||
bne .5
|
||||
|
||||
tya
|
||||
sec
|
||||
adc ZPPtr3
|
||||
sta ZPPtr3
|
||||
bcc .2
|
||||
inc ZPPtr3+1
|
||||
bra .2
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
PWD.Record2PM sta CLRWRITEAUX
|
||||
PWD.Record2PW sta CLRWRITEAUX
|
||||
|
||||
ldy #0
|
||||
|
||||
@ -359,8 +449,6 @@ PWD.GetRecordLen
|
||||
jsr PWD.StoreChar
|
||||
|
||||
txa
|
||||
tay
|
||||
lda #0
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user