mirror of
https://github.com/A2osX/A2osX.git
synced 2025-04-05 10:39:33 +00:00
Kernel 0.93
This commit is contained in:
parent
15c88347fe
commit
ca88602a61
Binary file not shown.
@ -26,6 +26,7 @@ ZPStrMax .BS 1
|
||||
ArgIndex .BS 1
|
||||
ArgUsername .BS 1
|
||||
ZPStrPtr .BS 2
|
||||
ZPTmpPtr .BS 2
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
@ -108,10 +109,13 @@ CS.RUN >LDYAI S.PW
|
||||
bcs .9
|
||||
|
||||
jsr CS.RUN.MkDir
|
||||
bcs .99
|
||||
* bcs .99
|
||||
|
||||
>LDYA pData
|
||||
>SYSCALL putpw
|
||||
bcs .99
|
||||
|
||||
lda #0
|
||||
sec
|
||||
rts
|
||||
|
||||
@ -268,16 +272,16 @@ CS.RUN.CheckArg inc ArgIndex
|
||||
lda pData
|
||||
clc
|
||||
adc #S.PW.DIR+11
|
||||
sta ZPPWPtr
|
||||
sta ZPTmpPtr
|
||||
lda pData+1
|
||||
adc /S.PW.DIR+11
|
||||
sta ZPPWPtr+1
|
||||
sta ZPTmpPtr+1
|
||||
|
||||
ldy #0
|
||||
|
||||
.5 lda (ZPStrPtr),y
|
||||
sta (pData),y
|
||||
sta (ZPPWPtr),y
|
||||
sta (ZPTmpPtr),y
|
||||
beq .6
|
||||
iny
|
||||
cpy #16
|
||||
@ -285,13 +289,13 @@ CS.RUN.CheckArg inc ArgIndex
|
||||
bra CS.RUN.CheckArg.9
|
||||
|
||||
.6 lda #'/'
|
||||
sta (ZPPWPtr),y
|
||||
|
||||
sta (ZPTmpPtr),y
|
||||
|
||||
>PUSHW ZPPWPtr
|
||||
lda ArgIndex
|
||||
sta ArgUsername
|
||||
>SYSCALL ArgV
|
||||
|
||||
|
||||
>SYSCALL GetPWName
|
||||
bcc .9
|
||||
|
||||
@ -354,22 +358,22 @@ CS.RUN.CheckArg.Next
|
||||
* clc
|
||||
txa
|
||||
adc pData
|
||||
sta ZPPWPtr
|
||||
sta ZPTmpPtr
|
||||
lda pData+1
|
||||
adc #0
|
||||
sta ZPPWPtr+1
|
||||
sta ZPTmpPtr+1
|
||||
|
||||
ldy #$ff
|
||||
|
||||
.1 iny
|
||||
lda (ZPStrPtr),y
|
||||
sta (ZPPWPtr),y
|
||||
sta (ZPTmpPtr),y
|
||||
beq .8
|
||||
cpy #64
|
||||
bne .1
|
||||
|
||||
lda #0
|
||||
sta (ZPPWPtr),y
|
||||
sta (ZPTmpPtr),y
|
||||
|
||||
.8 jmp CS.RUN.CheckArg
|
||||
*--------------------------------------
|
||||
|
@ -112,7 +112,22 @@ CORE.Events jsr CORE.GetEvents
|
||||
bcs .8
|
||||
|
||||
sta KBDSTROBE
|
||||
jsr CORE.ScrSel
|
||||
and #$0F
|
||||
tax
|
||||
lda A2osX.SCRNDEVS,x Get DevID
|
||||
beq .8 No device claimed this screen
|
||||
|
||||
cmp A2osX.ASCREEN Same as active screen...nothing to do
|
||||
beq .8
|
||||
|
||||
pha
|
||||
|
||||
>PUSHWI 0 Param
|
||||
>PUSHBI IOCTL.CONTROL request
|
||||
pla
|
||||
|
||||
jsr K.IOCTL
|
||||
|
||||
.8 jmp CORE.Run
|
||||
*--------------------------------------
|
||||
CORE.UpdateParentPS
|
||||
@ -342,22 +357,6 @@ CORE.GetPS.RTS rts
|
||||
|
||||
*.2 .AZ "!Evt:F=%b,Dev=$%h,LO=$%h,HI=$%h,W1=$%H,W2=$%H\n"
|
||||
*--------------------------------------
|
||||
CORE.ScrSel and #$0F
|
||||
tax
|
||||
lda A2osX.SCRNDEVS,x Get DevID
|
||||
beq CORE.GetPS.RTS No device claimed this screen
|
||||
|
||||
cmp A2osX.ASCREEN Same as active screen...nothing to do
|
||||
beq CORE.GetPS.RTS
|
||||
|
||||
pha
|
||||
|
||||
>PUSHWI 0 Param
|
||||
>PUSHBI IOCTL.CONTROL request
|
||||
pla
|
||||
|
||||
jmp K.IOCTL
|
||||
*--------------------------------------
|
||||
CORE.DestroyEvent
|
||||
lda (pEvent)
|
||||
beq .9
|
||||
|
@ -20,35 +20,25 @@ PWD.GetPWUID lda PWD.hDB
|
||||
>STYA ZPPtr3
|
||||
|
||||
.1 lda (ZPPtr3)
|
||||
beq .99
|
||||
beq .99 EOF
|
||||
|
||||
ldy #0
|
||||
|
||||
.2 lda (ZPPtr3),y
|
||||
iny
|
||||
cmp #':'
|
||||
bne .2
|
||||
bne .2 skip USERNAME
|
||||
|
||||
.3 lda (ZPPtr3),y
|
||||
iny
|
||||
cmp #':'
|
||||
bne .3
|
||||
bne .3 skip PASSWORD
|
||||
|
||||
jsr PWD.GetByte
|
||||
jsr PWD.GetByte get UID
|
||||
cmp ZPPtr1+1
|
||||
beq .8
|
||||
|
||||
.4 iny
|
||||
lda (ZPPtr3),y
|
||||
cmp #C.CR
|
||||
bne .4
|
||||
|
||||
tya
|
||||
sec
|
||||
adc ZPPtr3
|
||||
sta ZPPtr3
|
||||
bcc .1
|
||||
inc ZPPtr3+1
|
||||
jsr PWD.NextLine
|
||||
bra .1
|
||||
|
||||
.8 jmp PWD.Record2PW
|
||||
@ -86,17 +76,7 @@ PWD.GetPWName lda PWD.hDB
|
||||
cmp (ZPPtr3),y
|
||||
beq .2
|
||||
|
||||
.3 iny
|
||||
lda (ZPPtr3),y
|
||||
cmp #C.CR
|
||||
bne .3
|
||||
|
||||
tya
|
||||
sec
|
||||
adc ZPPtr3
|
||||
sta ZPPtr3
|
||||
bcc .1
|
||||
inc ZPPtr3+1
|
||||
.3 jsr PWD.NextLine
|
||||
bra .1
|
||||
|
||||
.4 lda (ZPPtr3),y
|
||||
@ -111,6 +91,7 @@ PWD.GetPWName lda PWD.hDB
|
||||
|
||||
.99 lda #E.IUSR
|
||||
sec
|
||||
PWD.GetPWName.RTS
|
||||
rts
|
||||
*--------------------------------------
|
||||
PWD.PutPW >LDYA ZPPtr2
|
||||
@ -121,16 +102,30 @@ PWD.PutPW >LDYA ZPPtr2
|
||||
|
||||
ldy #S.PW.UID
|
||||
jsr MEM.TXTPTR.GetY
|
||||
bne .9 Must be ROOT user
|
||||
bne PWD.GetPWName.RTS Must be ROOT user
|
||||
|
||||
jmp PWD.InitDB
|
||||
jsr PWD.GetRecordLen
|
||||
tay
|
||||
lda #0
|
||||
>STYA PWD.DBSize
|
||||
|
||||
jsr K.getmem
|
||||
bcs .99
|
||||
>STYA ZPPtr3
|
||||
>STYA PWD.DBPtr
|
||||
stx PWD.hDB
|
||||
|
||||
bra .8
|
||||
|
||||
.1 jsr K.GetmemPtr
|
||||
>STYA PWD.DBPtr
|
||||
|
||||
jsr PWD.DeleteRecord
|
||||
|
||||
jsr PWD.GetRecordLen
|
||||
jsr PWD.DeleteRecord
|
||||
bcc .11 user exits..
|
||||
|
||||
jsr PWD.SetUID new user, setup UID
|
||||
|
||||
.11 jsr PWD.GetRecordLen
|
||||
|
||||
clc
|
||||
adc PWD.DBSize
|
||||
@ -171,37 +166,25 @@ PWD.PutPW >LDYA ZPPtr2
|
||||
.5 lda PWD.hDB
|
||||
stx PWD.hDB
|
||||
jsr K.Freemem
|
||||
|
||||
|
||||
jsr PWD.StoreRecord
|
||||
|
||||
.8 jsr PWD.StoreRecord
|
||||
|
||||
inc PWD.bDirty
|
||||
clc
|
||||
rts
|
||||
.99 rts
|
||||
|
||||
.9 lda #E.IPWDDB
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
PWD.InitDB jsr PWD.GetRecordLen
|
||||
tay
|
||||
lda #0
|
||||
>STYA PWD.DBSize
|
||||
|
||||
jsr K.getmem
|
||||
bcs .9
|
||||
>STYA ZPPtr3
|
||||
>STYA PWD.DBPtr
|
||||
stx PWD.hDB
|
||||
|
||||
jsr PWD.StoreRecord
|
||||
|
||||
inc PWD.bDirty
|
||||
clc
|
||||
.9 rts
|
||||
rts
|
||||
*--------------------------------------
|
||||
* ZPPtr2 = pPW
|
||||
*--------------------------------------
|
||||
PWD.SetUID >LDYA PWD.DBPtr
|
||||
>STYA ZPPtr3
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
PWD.DeleteRecord
|
||||
jsr PWD.FindRecord
|
||||
bcs .9
|
||||
@ -256,21 +239,10 @@ PWD.FindRecord >LDYA PWD.DBPtr
|
||||
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
|
||||
.5 jsr PWD.NextLine
|
||||
bra .2
|
||||
|
||||
.8 clc
|
||||
@ -279,6 +251,19 @@ PWD.FindRecord >LDYA PWD.DBPtr
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
PWD.NextLine iny
|
||||
lda (ZPPtr3),y
|
||||
cmp #C.CR
|
||||
bne PWD.NextLine
|
||||
|
||||
tya
|
||||
sec
|
||||
adc ZPPtr3
|
||||
sta ZPPtr3
|
||||
bcc .8
|
||||
inc ZPPtr3+1
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
PWD.Record2PW sta CLRWRITEAUX
|
||||
|
||||
ldy #0
|
||||
|
Loading…
x
Reference in New Issue
Block a user