Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2020-01-09 17:44:20 +01:00
parent e07b58ccf3
commit c3da0960dc
2 changed files with 20 additions and 22 deletions

Binary file not shown.

View File

@ -13,7 +13,7 @@ NEW
.DUMMY
.OR ZPBIN
ZS.START
USRID .BS 1
SessionID .BS 1
ZPSessionPtr .BS 2
ZS.END
.ED
@ -48,45 +48,43 @@ CS.RUN >LDYA L.MSG0
>SYSCALL puts
ldx #1
stx USRID
stx SessionID
.1 lda S.Table.hSession-1,x
beq .7
lda S.Table.hFile-1,x
tax
jsr CS.RUN.GETIO
>PUSHYA
ldx USRID
lda S.Table.hSession-1,x
>SYSCALL GetMemPtr
>STYA ZPSessionPtr
>PUSHW L.MSG1 format
>PUSHB SessionID 1 byte SID
ldy #S.SESSION.UID
>PUSHB (ZPSessionPtr),y 1 byte UID
>PUSHB (ZPSessionPtr) 1 byte PRIVILEGE
lda ZPSessionPtr
clc
adc #S.SESSION.NAME
tay
lda ZPSessionPtr+1
adc /S.SESSION.NAME
>PUSHYA
>PUSHYA 2 bytes NAME
>PUSHB (ZPSessionPtr)
ldx SessionID
lda S.Table.hFile-1,x
tax
jsr CS.RUN.GETIO
>PUSHYA 2 bytes DEV
ldy #S.SESSION.UID
>PUSHB (ZPSessionPtr),y
>PUSHBI 7 total = 7 ... bytes
>PUSHB USRID
>PUSHBI 7
>LDYA L.MSG1
>SYSCALL printf
>SYSCALL printf2
bcs .9
.7 inc USRID
ldx USRID
.7 inc SessionID
ldx SessionID
cpx #K.USR.MAX+1
bne .1