Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-09-05 20:44:58 +02:00
parent 643d2b816c
commit 875009f09b
6 changed files with 147 additions and 95 deletions

Binary file not shown.

Binary file not shown.

View File

@ -51,12 +51,67 @@ L.MSG.DUMP .DA MSG.DUMP
CS.INIT clc
CS.INIT.RTS rts
*--------------------------------------
CS.RUN jsr CS.RUN.ATCHECK
bcs CS.INIT.RTS
CS.RUN jsr CS.RUN.GetInfo
bcs .9
jsr CS.RUN.MyZone
bcs CS.INIT.RTS
jsr CS.RUN.GetMyZone
jsr CS.RUN.LookupName
lda #0
sec
.9 rts
*--------------------------------------
CS.RUN.GetInfo lda #AT.GetInfo
>STA.G P.GetInfo+1
>LEA.G P.GetInfo
jsr A2osX.ATKCALL
bcs .9
>PUSHW L.MSG.GETINFO
>PUSHB.G P.GetInfo+$09 THIS-NET
>PUSHB.G P.GetInfo+$08 THIS-NET
>PUSHB.G P.GetInfo+$0E NODE
>PUSHB.G P.GetInfo+$0A BRIDGE
>PUSHB.G P.GetInfo+$0D HARDWARE ID
>PUSHB.G P.GetInfo+$0C HARDWARE ID
>PUSHB.G P.GetInfo+$0B ROM VERSION
>PUSHBI 7
>SYSCALL PrintF
rts
.9 pha
>LDYA L.MSG.NOATK
>SYSCALL PutS
pla
sec
rts
*--------------------------------------
CS.RUN.GetMyZone
>LEA.G ZoneBuf
>STYA.G P.GetMyZone+$08
lda #4
>STA.G P.GetMyZone+$0C RetInt
>STA.G P.GetMyZone+$0D RetCnt
>LEA.G P.GetMyZone
ldx #AT.GetMyZone
jsr CS.RUN.GOATLK
bcs .9
>PUSHW L.MSG.MYZONE
>PUSHEA.G ZoneBuf
>PUSHBI 2
>SYSCALL PrintF
.9 rts
*--------------------------------------
CS.RUN.LookupName
>LDYA L.SEARCH.STRING
>STYA.G P.LookupName+$08 Entry Name Ptr
@ -121,52 +176,7 @@ CS.RUN jsr CS.RUN.ATCHECK
>DEC.G P.LookupName+$17
bne .1
lda #0
.8 sec
.9 rts
*--------------------------------------
CS.RUN.ATCHECK lda #AT.GetInfo
>STA.G P.GetInfo+1
>LEA.G P.GetInfo
jsr A2osX.ATKCALL
bcs .9
>PUSHW L.MSG.GETINFO
>PUSHW.G P.GetInfo+$08 THIS-NET
>PUSHB.G P.GetInfo+$0E NODE
>PUSHB.G P.GetInfo+$0A BRIDGE
>PUSHW.G P.GetInfo+$0A HARDWARE ID
>PUSHB.G P.GetInfo+$0A ROM VERSION
>PUSHBI 7
>SYSCALL PrintF
rts
.9 pha
>LDYA L.MSG.NOATK
>SYSCALL PutS
pla
sec
rts
*--------------------------------------
CS.RUN.MyZone >LEA.G ZoneBuf
>STYA.G P.GetMyZone+$08
lda #4
>STA.G P.GetMyZone+$0C RetInt
>STA.G P.GetMyZone+$0D RetCnt
>LEA.G P.GetMyZone
ldx #AT.GetMyZone
jsr CS.RUN.GOATLK
bcs .9
>PUSHW L.MSG.MYZONE
>PUSHEA.G ZoneBuf
>PUSHBI 2
>SYSCALL PrintF
.8 clc
.9 rts
*--------------------------------------
CS.RUN.GOATLK >STYA ZPAtlkParams
@ -183,6 +193,10 @@ CS.RUN.GOATLK >STYA ZPAtlkParams
>PUSHW L.MSG.ATKERR
ldy #1
lda (ZPAtlkParams),y
>PUSHA
ldy #3
lda (ZPAtlkParams),y
>PUSHA
@ -190,7 +204,7 @@ CS.RUN.GOATLK >STYA ZPAtlkParams
lda (ZPAtlkParams),y
>PUSHA
>PUSHBI 2
>PUSHBI 3
>SYSCALL PrintF
pla
@ -209,10 +223,10 @@ CS.QUIT lda hBuf
*--------------------------------------
CS.END
MSG.NOATK .AZ "AppleTalk Not Loaded."
MSG.ATKERR .AZ "AppleTalk ERR:%H\r\n"
MSG.GETINFO .AS "Network/Node:$%H/$%h\r\n"
.AS "Bridge : $%h\r\n"
.AZ "HWID/ROMVER :$%H/$%h\r\n"
MSG.ATKERR .AZ "AppleTalk Call %h, ERR:%H\r\n"
MSG.GETINFO .AS "Network/Node:$%h%h/$%h\r\n"
.AS "Bridge : $%h\r\n"
.AZ "HWID/ROMVER :$%h%h/$%h\r\n"
MSG.MYZONE .AZ "Zone Name :%S\r\n"
SEARCH.STRING >PSTR "=:=@*"
MSG.DUMP0 .AZ "Net Nod SkT En# Name"

View File

@ -40,29 +40,70 @@ CS.START cld
L.MSG.NOATK .DA MSG.NOATK
L.MSG.ATKERR .DA MSG.ATKERR
L.MSG.USAGE .DA MSG.USAGE
L.MSG.GETINFO .DA MSG.GETINFO
.DA 0
*--------------------------------------
CS.INIT clc
rts
*--------------------------------------
CS.RUN ldy #S.PS.ARGC
lda (pPs),y
beq CS.RUN.USAGE
jsr CS.RUN.GetInfo
bcs .9
jsr CS.RUN.LookupName
bcs .9
jsr CS.RUN.FILogin
bcs .9
lda #0
sec
.9 rts
*--------------------------------------
CS.RUN.USAGE >PUSHW L.MSG.USAGE
>PUSHBI 0
>SYSCALL PrintF
lda #E.SYN
sec
CS.RUN.USAGE.RTS
rts
*--------------------------------------
CS.RUN jsr CS.RUN.ATCHECK
bcs CS.RUN.USAGE.RTS
CS.RUN.GetInfo lda #AT.GetInfo
>STA.G P.GetInfo+1
>LEA.G P.GetInfo
lda #AT.LookupName
>STA.G P.LookupName+1
jsr A2osX.ATKCALL
bcs .9
>PUSHW L.MSG.GETINFO
>PUSHB.G P.GetInfo+$09 THIS-NET
>PUSHB.G P.GetInfo+$08 THIS-NET
>PUSHB.G P.GetInfo+$0E NODE
>PUSHB.G P.GetInfo+$0A BRIDGE
>PUSHB.G P.GetInfo+$0D HARDWARE ID
>PUSHB.G P.GetInfo+$0C HARDWARE ID
>PUSHB.G P.GetInfo+$0B ROM VERSION
>PUSHBI 7
>SYSCALL PrintF
rts
.9 pha
>LDYA L.MSG.NOATK
>SYSCALL PutS
pla
sec
rts
*--------------------------------------
CS.RUN.LookupName
lda #1
>SYSCALL ArgV
bcs CS.RUN.USAGE
>STYA.G P.LookupName+$08
lda #4
@ -78,13 +119,10 @@ CS.RUN jsr CS.RUN.ATCHECK
>STA.G P.LookupName+$16 MaxMatch
>LEA.G P.LookupName
jsr CS.RUN.GOATLK
bcs .9
lda #AT.FILogin
>STA.G P.FILogin+1
>LEA.G P.FILogin+$4
ldx #AT.LookupName
jmp CS.RUN.GOATLK
*--------------------------------------
CS.RUN.FILogin >LEA.G P.FILogin+$4
>STYA ZPPTR2
ldy #3
@ -101,29 +139,16 @@ CS.RUN jsr CS.RUN.ATCHECK
>STYA.G P.FILogin+$10
>LEA.G P.FILogin
jsr CS.RUN.GOATLK
bcs .9
.8 lda #0
sec
.9 rts
*--------------------------------------
CS.RUN.ATCHECK lda #AT.GetInfo
>STA.G P.GetInfo+1
>LEA.G P.GetInfo
jsr A2osX.ATKCALL
bcc .9
pha
>LDYA L.MSG.NOATK
>SYSCALL PutS
pla
sec
.9 rts
ldx #AT.FILogin
jmp CS.RUN.GOATLK
*--------------------------------------
CS.RUN.GOATLK >STYA ZPAtlkParams
ldy #1
txa
sta (ZPAtlkParams),y
>LDYA ZPAtlkParams
jsr A2osX.ATKCALL
bcc .9
@ -131,6 +156,10 @@ CS.RUN.GOATLK >STYA ZPAtlkParams
>PUSHW L.MSG.ATKERR
ldy #1
lda (ZPAtlkParams),y
>PUSHA
ldy #3
lda (ZPAtlkParams),y
>PUSHA
@ -138,12 +167,11 @@ CS.RUN.GOATLK >STYA ZPAtlkParams
lda (ZPAtlkParams),y
>PUSHA
>PUSHBI 2
>PUSHBI 3
>SYSCALL PrintF
pla
sec
.9 rts
*--------------------------------------
CS.DOEVENT sec
@ -154,7 +182,10 @@ CS.QUIT clc
*--------------------------------------
CS.END
MSG.NOATK .AZ "AppleTalk Not Loaded."
MSG.ATKERR .AZ "AppleTalk ERR:%H\r\n"
MSG.ATKERR .AZ "AppleTalk Call %h, ERR:%H\r\n"
MSG.GETINFO .AS "Network/Node:$%h%h/$%h\r\n"
.AS "Bridge : $%h\r\n"
.AZ "HWID/ROMVER :$%h%h/$%h\r\n"
MSG.USAGE .AZ "Usage : ATLOGON <SERVER> [USER] [PASSWORD]"
*--------------------------------------
.DUMMY

View File

@ -188,6 +188,9 @@ BIN.Load.1 >PUSHWI K.Buf256
>STYA ZPPtr1 set ZPPtr1 -> New Code start
jsr BIN.ComputeOffsetYA YA = actual load address
jsr Mem.SetOwnerPS0 this CS is owned by PS 0
ldy #H.BIN.CS.SIZE get Code Len
lda (ZPPtr1),y
pha
@ -201,6 +204,8 @@ BIN.Load.1 >PUSHWI K.Buf256
jsr K.strdup make a copy of this string
bcs .98
jsr Mem.SetOwnerPS0 Make BINPATH owned by PS0
lda BIN.hMem Keep X=new string hMem
jsr MEM.GetMemByID X unmodified
lda (ZPMemMgrSPtr)

View File

@ -445,8 +445,10 @@ MEM.GetMemByID sta ZPMemMgrSPtr
sta ZPMemMgrSPtr+1
rts
*--------------------------------------
Mem.SetOwner ldy #S.MEM.OWNERPID
lda CORE.LastPSID
Mem.SetOwnerPS0 lda #0
.HS 2C BIT ABS
Mem.SetOwner lda CORE.LastPSID
ldy #S.MEM.OWNERPID
sta (ZPMemMgrSPtr),y
rts
*--------------------------------------