mirror of https://github.com/A2osX/A2osX.git
Kernel 0.94+
This commit is contained in:
parent
cfa13a36bb
commit
01d23aec78
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -16,6 +16,7 @@ NEW
|
|||
ZS.START
|
||||
ZPAtlkParams .BS 2
|
||||
ZPPTR1 .BS 2
|
||||
BufPtr .BS 2
|
||||
hBuf .BS 1
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
|
@ -43,6 +44,8 @@ L.MSG.ATKERR .DA MSG.ATKERR
|
|||
L.MSG.GETINFO .DA MSG.GETINFO
|
||||
L.MSG.MYZONE .DA MSG.MYZONE
|
||||
L.SEARCH.STRING .DA SEARCH.STRING
|
||||
L.MSG.ZONES .DA MSG.ZONES
|
||||
L.MSG.PSTR .DA MSG.PSTR
|
||||
L.MSG.DUMP0 .DA MSG.DUMP0
|
||||
L.MSG.DUMP .DA MSG.DUMP
|
||||
.DA 0
|
||||
|
@ -55,6 +58,15 @@ CS.RUN jsr CS.RUN.GetInfo
|
|||
|
||||
jsr CS.RUN.GetMyZone
|
||||
|
||||
>LDYAI 1024
|
||||
>SYSCALL GetMem
|
||||
bcs .9
|
||||
|
||||
>STYA BufPtr
|
||||
stx hBuf
|
||||
|
||||
jsr CS.RUN.GetZoneList
|
||||
|
||||
jsr CS.RUN.LookupName
|
||||
|
||||
lda #0
|
||||
|
@ -106,6 +118,41 @@ CS.RUN.GetMyZone
|
|||
>PUSHEA.G ZoneBuf
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GetZoneList
|
||||
>LDYAI 1024
|
||||
>STYA.G P.LookupName+$08 BufLen
|
||||
>LDYA BufPtr
|
||||
>STYA.G P.LookupName+$0A BufPtr
|
||||
|
||||
>LDA.G P.GetInfo+$0A BRIDGE
|
||||
>STA.G P.GetZoneList+$0E
|
||||
|
||||
lda #1
|
||||
>STA.G P.GetZoneList+$0F Start Index
|
||||
|
||||
lda #4 1/4 sec
|
||||
>STA.G P.GetZoneList+$11 RetInt
|
||||
>STA.G P.GetZoneList+$12 RetCnt
|
||||
|
||||
>LEA.G P.GetZoneList
|
||||
ldx #AT.GetZoneList
|
||||
jsr CS.RUN.GOATLK
|
||||
bcs .9
|
||||
|
||||
>LDYA L.MSG.ZONES
|
||||
>SYSCALL PutS
|
||||
|
||||
>LDA.G P.GetZoneList+$13 Zone #
|
||||
beq .8
|
||||
|
||||
tax
|
||||
>LDYA BufPtr
|
||||
jsr CS.RUN.PrintListYAX
|
||||
|
||||
.8 clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.LookupName
|
||||
|
@ -115,15 +162,11 @@ CS.RUN.LookupName
|
|||
lda #4
|
||||
>STA.G P.LookupName+$0C RetInt
|
||||
>STA.G P.LookupName+$0D RetCnt
|
||||
|
||||
>LDYAI 1024
|
||||
>STYA.G P.LookupName+$10 BufLen
|
||||
>LDYAI 1024
|
||||
>SYSCALL GetMem
|
||||
bcs .99
|
||||
|
||||
>LDYA BufPtr
|
||||
>STYA ZPPTR1
|
||||
stx hBuf
|
||||
|
||||
>STYA.G P.LookupName+$12 BufPtr
|
||||
|
||||
lda #16
|
||||
|
@ -213,6 +256,30 @@ CS.RUN.GOATLK >STYA ZPAtlkParams
|
|||
sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.PrintListYAX
|
||||
>STYA ZPPTR1
|
||||
|
||||
.1 phx
|
||||
>PUSHW L.MSG.PSTR
|
||||
>PUSHW ZPPTR1
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
plx
|
||||
bcs .9
|
||||
|
||||
lda (ZPPTR1)
|
||||
sec
|
||||
adc ZPPTR1
|
||||
sta ZPPTR1
|
||||
bcc .2
|
||||
inc ZPPTR1+1
|
||||
|
||||
.2 dex
|
||||
bne .1
|
||||
|
||||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -233,6 +300,8 @@ MSG.MYZONE .AZ "Zone Name :%S\r\n"
|
|||
SEARCH.STRING >PSTR "="
|
||||
>PSTR "="
|
||||
>PSTR "*"
|
||||
MSG.ZONES .AZ "Zone list :"
|
||||
MSG.PSTR .AZ " %S\r\n"
|
||||
MSG.DUMP0 .AZ "Net Nod SkT En# Object:Type@Zone"
|
||||
MSG.DUMP .AZ "\e[?7l%H %h %h %h %S:%S@%S\r\n"
|
||||
*--------------------------------------
|
||||
|
@ -240,8 +309,9 @@ MSG.DUMP .AZ "\e[?7l%H %h %h %h %S:%S@%S\r\n"
|
|||
.OR 0
|
||||
DS.START
|
||||
P.GetInfo .BS $0F
|
||||
P.GetMyZone .BS $0F
|
||||
P.LookupName .BS $17
|
||||
P.GetZoneList .BS $19
|
||||
P.GetMyZone .BS $10
|
||||
P.LookupName .BS $18
|
||||
ZoneBuf .BS 33
|
||||
DS.END .ED
|
||||
*--------------------------------------
|
||||
|
|
|
@ -40,7 +40,7 @@ CS.START cld
|
|||
*--------------------------------------
|
||||
.1 .DA CS.INIT
|
||||
.DA CS.RUN
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.NOATK .DA MSG.NOATK
|
||||
|
@ -48,8 +48,11 @@ L.MSG.ATKERR .DA MSG.ATKERR
|
|||
L.MSG.GETINFO .DA MSG.GETINFO
|
||||
L.MSG.NETNODPORT .DA MSG.NETNODPORT
|
||||
L.MSG.NOTFOUND .DA MSG.NOTFOUND
|
||||
L.MSG.SRVINFO .DA MSG.SRVINFO
|
||||
L.FPLogin .DA FPLogin
|
||||
L.MSG.SRVINFO1 .DA MSG.SRVINFO1
|
||||
L.MSG.SRVINFO2 .DA MSG.SRVINFO2
|
||||
L.MSG.PSTR .DA MSG.PSTR
|
||||
L.FPLogin.Guest .DA FPLogin.Guest
|
||||
L.FPLogin.Auth .DA FPLogin.Auth
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT clc
|
||||
|
@ -64,16 +67,16 @@ CS.RUN ldy #S.PS.ARGC
|
|||
|
||||
jsr CS.RUN.LookupName
|
||||
bcs .9
|
||||
|
||||
|
||||
jsr CS.RUN.GetParms
|
||||
bcs .9
|
||||
|
||||
|
||||
jsr CS.RUN.GetStatus
|
||||
bcs .9
|
||||
|
||||
|
||||
jsr CS.RUN.FILogin
|
||||
bcs .9
|
||||
|
||||
|
||||
lda #0
|
||||
sec
|
||||
.9 rts
|
||||
|
@ -95,13 +98,13 @@ CS.RUN.GetInfo >LEA.G P.GetInfo
|
|||
>PUSHB.G P.GetInfo+$08 THIS-NET
|
||||
>PUSHB.G P.GetInfo+$09 THIS-NET
|
||||
>PUSHB.G P.GetInfo+$0E NODE
|
||||
|
||||
|
||||
>PUSHB.G P.GetInfo+$0A BRIDGE
|
||||
|
||||
|
||||
>PUSHB.G P.GetInfo+$0C HARDWARE ID
|
||||
>PUSHB.G P.GetInfo+$0D HARDWARE ID
|
||||
>PUSHB.G P.GetInfo+$0B ROM VERSION
|
||||
|
||||
|
||||
>PUSHBI 7
|
||||
>SYSCALL PrintF
|
||||
rts
|
||||
|
@ -117,7 +120,7 @@ CS.RUN.LookupName
|
|||
lda #1
|
||||
>SYSCALL ArgV
|
||||
>STYA ZPPTR1
|
||||
|
||||
|
||||
>LEA.G NameBuf
|
||||
>STYA ZPPTR2
|
||||
>STYA.G P.LookupName+$08
|
||||
|
@ -127,11 +130,11 @@ CS.RUN.LookupName
|
|||
.1 iny
|
||||
lda (ZPPTR1),y
|
||||
bne .1
|
||||
|
||||
|
||||
tya
|
||||
tax
|
||||
jsr CS.RUN.PutPtr2
|
||||
|
||||
|
||||
.2 ldy #0
|
||||
|
||||
.3 lda (ZPPTR1),y
|
||||
|
@ -139,29 +142,29 @@ CS.RUN.LookupName
|
|||
iny
|
||||
dex
|
||||
bne .3
|
||||
|
||||
|
||||
ldx #SEARCH.STRING.Len
|
||||
ldy #0
|
||||
|
||||
.4 lda SEARCH.STRING,y
|
||||
jsr CS.RUN.PutPtr2
|
||||
iny
|
||||
iny
|
||||
dex
|
||||
bne .4
|
||||
|
||||
|
||||
lda #4
|
||||
>STA.G P.LookupName+$C RetInt
|
||||
>STA.G P.LookupName+$D RetCnt
|
||||
|
||||
|
||||
>LDYAI 5+99
|
||||
>STYA.G P.LookupName+$10 BufLen
|
||||
|
||||
>LEA.G LookupBuf
|
||||
>STYA.G P.LookupName+$12 BufPtr
|
||||
|
||||
|
||||
lda #1
|
||||
>STA.G P.LookupName+$16 MaxMatch
|
||||
|
||||
|
||||
>LEA.G P.LookupName
|
||||
ldx #AT.LookupName
|
||||
jsr CS.RUN.GOATLK
|
||||
|
@ -174,7 +177,7 @@ CS.RUN.LookupName
|
|||
|
||||
ldy #LookupBuf
|
||||
ldx #4
|
||||
|
||||
|
||||
.5 lda (pData),y
|
||||
>PUSHA
|
||||
iny
|
||||
|
@ -196,36 +199,36 @@ CS.RUN.GetParms >LEA.G P.GetParms
|
|||
ldx #AT.GetParms
|
||||
jsr CS.RUN.GOATLK
|
||||
bcs .9
|
||||
|
||||
|
||||
>LDYA.G P.GetParms+$4
|
||||
>SYSCALL GetMem
|
||||
bcs .9
|
||||
|
||||
|
||||
>STYA ZPCmdBuf
|
||||
stx hCmdBuf
|
||||
|
||||
>LDYA.G P.GetParms+$6
|
||||
>SYSCALL GetMem
|
||||
bcs .9
|
||||
|
||||
|
||||
>STYA ZPReplyBuf
|
||||
stx hReplyBuf
|
||||
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GetStatus
|
||||
>LDYA.G LookupBuf
|
||||
>LEA.G LookupBuf
|
||||
>STYA ZPPTR1
|
||||
>LEA.G P.GetStatus+$8
|
||||
>STYA ZPPTR2
|
||||
|
||||
|
||||
ldy #3
|
||||
|
||||
.1 lda (ZPPTR1),y copy NETWORK/NODE/SOCKET
|
||||
|
||||
.1 lda (ZPPTR1),y copy NETWORK/NODE/SOCKET
|
||||
sta (ZPPTR2),y
|
||||
dey
|
||||
bpl .1
|
||||
|
||||
|
||||
>LDYA.G P.GetParms+$6
|
||||
>STYA.G P.GetStatus+$C Reply buffer length
|
||||
|
||||
|
@ -236,51 +239,212 @@ CS.RUN.GetStatus
|
|||
ldx #AT.GetStatus
|
||||
jsr CS.RUN.GOATLK
|
||||
bcs .9
|
||||
|
||||
>PUSHW L.MSG.SRVINFO
|
||||
|
||||
lda (ZPReplyBuf) Offset to Machine Type
|
||||
|
||||
>PUSHW L.MSG.SRVINFO1
|
||||
|
||||
lda #10 Server Name
|
||||
clc
|
||||
adc ZPReplyBuf
|
||||
tay
|
||||
lda #0
|
||||
adc ZPReplyBuf+1
|
||||
>PUSHYA
|
||||
|
||||
|
||||
|
||||
|
||||
ldy #1
|
||||
lda (ZPReplyBuf),y Offset to Machine Type
|
||||
clc
|
||||
adc ZPReplyBuf
|
||||
pha
|
||||
|
||||
lda (ZPReplyBuf)
|
||||
adc ZPReplyBuf+1
|
||||
ply
|
||||
>PUSHYA
|
||||
|
||||
>PUSHBI 4
|
||||
>SYSCALL PrintF
|
||||
|
||||
ldy #3 Offset to Version list
|
||||
lda (ZPReplyBuf),y
|
||||
clc
|
||||
adc ZPReplyBuf
|
||||
pha
|
||||
|
||||
dey
|
||||
lda (ZPReplyBuf),y
|
||||
adc ZPReplyBuf+1
|
||||
ply
|
||||
|
||||
jsr CS.RUN.PrintListYA
|
||||
|
||||
>LDYA L.MSG.SRVINFO2
|
||||
>SYSCALL PutS
|
||||
|
||||
ldy #5 Offset to UAM list
|
||||
lda (ZPReplyBuf),y
|
||||
clc
|
||||
adc ZPReplyBuf
|
||||
pha
|
||||
|
||||
dey
|
||||
lda (ZPReplyBuf),y
|
||||
adc ZPReplyBuf+1
|
||||
ply
|
||||
|
||||
jsr CS.RUN.PrintListYA
|
||||
clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.PrintListYA
|
||||
>STYA ZPPTR1
|
||||
|
||||
lda (ZPPTR1)
|
||||
beq .8
|
||||
|
||||
tax
|
||||
inc ZPPTR1
|
||||
bne .1
|
||||
inc ZPPTR1+1
|
||||
|
||||
.1 phx
|
||||
>PUSHW L.MSG.PSTR
|
||||
>PUSHW ZPPTR1
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
|
||||
.9 rts
|
||||
plx
|
||||
bcs .9
|
||||
|
||||
lda (ZPPTR1)
|
||||
sec
|
||||
adc ZPPTR1
|
||||
sta ZPPTR1
|
||||
bcc .2
|
||||
inc ZPPTR1+1
|
||||
|
||||
.2 dex
|
||||
bne .1
|
||||
|
||||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.FILogin >LDYA.G LookupBuf
|
||||
CS.RUN.FILogin >LEA.G LookupBuf
|
||||
>STYA ZPPTR1
|
||||
>LEA.G P.FILogin+$4
|
||||
>STYA ZPPTR2
|
||||
|
||||
|
||||
ldy #3
|
||||
|
||||
.1 lda (ZPPTR1),y copy NETWORK/NODE/SOCKET
|
||||
|
||||
.1 lda (ZPPTR1),y copy NETWORK/NODE/SOCKET
|
||||
sta (ZPPTR2),y
|
||||
dey
|
||||
bpl .1
|
||||
|
||||
>LDYAI FPLogin.Len
|
||||
>STYA.G P.FILogin+$8 Cmd buffer length
|
||||
|
||||
>LDYA L.FPLogin
|
||||
>STYA.G P.FILogin+$A
|
||||
|
||||
|
||||
>LDYA.G P.GetParms+$6
|
||||
>STYA.G P.FILogin+$E Reply buffer length
|
||||
|
||||
>LDYA ZPReplyBuf
|
||||
>STYA.G P.FILogin+$10
|
||||
|
||||
>LEA.G P.FILogin
|
||||
|
||||
lda #2 USERNAME
|
||||
>SYSCALL ArgV
|
||||
bcc .2
|
||||
|
||||
>LDYAI FPLogin.Guest.Len
|
||||
>STYA.G P.FILogin+$8 Cmd buffer length
|
||||
|
||||
>LDYA L.FPLogin.Guest
|
||||
>STYA.G P.FILogin+$A
|
||||
|
||||
bra .80
|
||||
*--------------------------------------
|
||||
.2 >STYA ZPPTR1
|
||||
|
||||
ldx #FPLogin.Auth.Len
|
||||
ldy #0
|
||||
|
||||
.3 lda FPLogin.Auth,y
|
||||
sta (ZPCmdBuf),y
|
||||
iny
|
||||
dex
|
||||
bne .3
|
||||
|
||||
phy
|
||||
ldy #$ff
|
||||
|
||||
.4 iny
|
||||
lda (ZPPTR1),y
|
||||
bne .4
|
||||
|
||||
tya
|
||||
tax
|
||||
|
||||
ply
|
||||
sta (ZPCmdBuf),y USERNAME Len
|
||||
iny
|
||||
|
||||
.5 jsr CS.RUN.GetPtr1
|
||||
sta (ZPCmdBuf),y
|
||||
iny
|
||||
dex
|
||||
bne .5
|
||||
|
||||
tya
|
||||
lsr
|
||||
bcc .6
|
||||
|
||||
lda #0
|
||||
sta (ZPCmdBuf),y
|
||||
iny
|
||||
|
||||
.6 phy
|
||||
|
||||
lda #3 PASSWORD
|
||||
>SYSCALL ArgV
|
||||
bcs .99
|
||||
|
||||
>STYA ZPPTR1
|
||||
|
||||
ldx #8
|
||||
ply
|
||||
|
||||
.7 jsr CS.RUN.GetPtr1
|
||||
beq .8
|
||||
|
||||
sta (ZPCmdBuf),y
|
||||
iny
|
||||
dex
|
||||
bne .7
|
||||
|
||||
.8 txa
|
||||
beq .10
|
||||
|
||||
lda #0
|
||||
|
||||
.9 sta (ZPCmdBuf),y
|
||||
iny
|
||||
dex
|
||||
bne .9
|
||||
|
||||
.10 >STYA.G P.FILogin+$8 Cmd buffer length
|
||||
|
||||
>LDYA ZPCmdBuf
|
||||
>STYA.G P.FILogin+$A
|
||||
|
||||
.80 >LEA.G P.FILogin
|
||||
ldx #AT.FILogin
|
||||
jmp CS.RUN.GOATLK
|
||||
jsr CS.RUN.GOATLK
|
||||
bcs .89
|
||||
|
||||
>LDA.G P.FILogin+$14
|
||||
sta A2osX.ATLKSID
|
||||
|
||||
.89 rts
|
||||
|
||||
.99 ply
|
||||
lda #E.SYN
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GOATLK >STYA ZPAtlkParams
|
||||
|
||||
|
@ -295,49 +459,58 @@ CS.RUN.GOATLK >STYA ZPAtlkParams
|
|||
pha
|
||||
|
||||
>PUSHW L.MSG.ATKERR
|
||||
|
||||
|
||||
ldy #1
|
||||
lda (ZPAtlkParams),y
|
||||
>PUSHA
|
||||
|
||||
|
||||
ldy #3
|
||||
lda (ZPAtlkParams),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPAtlkParams),y
|
||||
>PUSHA
|
||||
|
||||
|
||||
>PUSHBI 3
|
||||
>SYSCALL PrintF
|
||||
|
||||
pla
|
||||
sec
|
||||
.9 rts
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GetPtr1 lda (ZPPTR1)
|
||||
beq .8
|
||||
|
||||
inc ZPPTR1
|
||||
bne .8
|
||||
|
||||
inc ZPPTR1+1
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.PutPtr2 sta (ZPPTR2)
|
||||
inc ZPPTR2
|
||||
bne .8
|
||||
|
||||
inc ZPPTR2+1
|
||||
.8 rts
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT lda hReplyBuf
|
||||
beq .1
|
||||
|
||||
|
||||
>SYSCALL FreeMem
|
||||
|
||||
|
||||
.1 lda hCmdBuf
|
||||
beq .2
|
||||
|
||||
|
||||
>SYSCALL FreeMem
|
||||
|
||||
.2 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
CS.END
|
||||
MSG.USAGE .AZ "Usage : ATLOGON <SERVER> [USER] [PASSWORD]"
|
||||
MSG.NOATK .AZ "AppleTalk Not Loaded."
|
||||
MSG.ATKERR .AZ "AppleTalk Call %h, ERR:%H\r\n"
|
||||
|
@ -346,24 +519,34 @@ MSG.GETINFO .AS "Network/Node:%H/%h\r\n"
|
|||
.AZ "HWID/ROMVER :%H/%h\r\n"
|
||||
MSG.NETNODPORT .AZ "Server Address : %H/%h:%h\r\n"
|
||||
MSG.NOTFOUND .AZ "Server not found"
|
||||
MSG.SRVINFO .AS "Server Type : %S\r\n"
|
||||
.DA #0
|
||||
MSG.SRVINFO1 .AS "Server Name : %S\r\n"
|
||||
.AS "Server Type : %S\r\n"
|
||||
.AZ "AFP Dialects :\r\n"
|
||||
MSG.SRVINFO2 .AZ "Supported UAMs :"
|
||||
MSG.PSTR .AZ " %S\r\n"
|
||||
SEARCH.STRING >PSTR "AFPServer"
|
||||
>PSTR "*"
|
||||
SEARCH.STRING.Len .EQ *-SEARCH.STRING
|
||||
*--------------------------------------
|
||||
FPLogin .DA #12
|
||||
.DA #0
|
||||
>PSTR "AFPVersion 1.1"
|
||||
FPLogin.Guest .DA #18
|
||||
* .DA #0
|
||||
>PSTR "AFPVersion 2.1"
|
||||
>PSTR "No User Authent"
|
||||
.DA #0
|
||||
FPLogin.Len .EQ *-FPLogin
|
||||
FPLogin.Guest.Len .EQ *-FPLogin.Guest
|
||||
*--------------------------------------
|
||||
FPLogin.Auth .DA #18
|
||||
* .DA #0
|
||||
>PSTR "AFPVersion 2.1"
|
||||
>PSTR "Cleartxt Passwrd"
|
||||
* >PSTR "username"
|
||||
* .AS "password" 8 bytes, word aligned, 0 padded
|
||||
FPLogin.Auth.Len .EQ *-FPLogin.Auth
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
DS.START
|
||||
DS.START
|
||||
P.GetInfo .BS $0F
|
||||
P.LookupName .BS $17
|
||||
P.LookupName .BS $18
|
||||
P.GetParms .BS $07
|
||||
P.GetStatus .BS $14
|
||||
P.FILogin .BS $19
|
||||
|
|
|
@ -0,0 +1,356 @@
|
|||
NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF bin/atmount
|
||||
*--------------------------------------
|
||||
.INB inc/macros.i
|
||||
.INB inc/a2osx.i
|
||||
.INB inc/mli.i
|
||||
.INB inc/mli.e.i
|
||||
.INB inc/appletalk.i
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR ZPBIN
|
||||
ZS.START
|
||||
ZPAtlkParams .BS 2
|
||||
hCmdBuf .BS 1
|
||||
hReplyBuf .BS 1
|
||||
ZPCmdBuf .BS 2
|
||||
ZPReplyBuf .BS 2
|
||||
ZPPTR1 .BS 2
|
||||
ZPPTR2 .BS 2
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
*--------------------------------------
|
||||
CS.START cld
|
||||
jmp (.1,x)
|
||||
.DA #$61 6502,Level 1 (65c02)
|
||||
.DA #1 BIN Layout Version 1
|
||||
.DA 0
|
||||
.DA CS.END-CS.START CS
|
||||
.DA DS.END-DS.START DS
|
||||
.DA #64 Stack Size
|
||||
.DA #ZS.END-ZS.START Zero Page Size
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
* Relocation Table
|
||||
*--------------------------------------
|
||||
.1 .DA CS.INIT
|
||||
.DA CS.RUN
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.NOATK .DA MSG.NOATK
|
||||
L.MSG.NOSESSION .DA MSG.NOSESSION
|
||||
L.MSG.ATKERR .DA MSG.ATKERR
|
||||
L.MSG.GETINFO .DA MSG.GETINFO
|
||||
L.MSG.VOLLIST .DA MSG.VOLLIST
|
||||
L.MSG.VOL .DA MSG.VOL
|
||||
L.MSG.MOUNTED .DA MSG.MOUNTED
|
||||
L.FPGetSrvrParms .DA FPGetSrvrParms
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN jsr CS.RUN.GetInfo
|
||||
bcs .9
|
||||
|
||||
lda A2osX.ATLKSID
|
||||
bne .1
|
||||
|
||||
>LDYA L.MSG.NOSESSION
|
||||
>SYSCALL PutS
|
||||
lda #0
|
||||
sec
|
||||
rts
|
||||
|
||||
.1 jsr CS.RUN.GetParms
|
||||
bcs .9
|
||||
|
||||
lda #1
|
||||
>SYSCALL ArgV
|
||||
bcc .2
|
||||
|
||||
jsr CS.RUN.ListVols
|
||||
bcs .9
|
||||
|
||||
lda #0
|
||||
sec
|
||||
rts
|
||||
|
||||
.2 jsr CS.RUN.MountVol
|
||||
bcs .9
|
||||
|
||||
lda #0
|
||||
sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.USAGE >PUSHW L.MSG.USAGE
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
|
||||
lda #E.SYN
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GetInfo >LEA.G P.GetInfo
|
||||
ldx #AT.GetInfo
|
||||
jsr CS.RUN.GOATLK
|
||||
bcs .9
|
||||
|
||||
>PUSHW L.MSG.GETINFO
|
||||
>PUSHB.G P.GetInfo+$08 THIS-NET
|
||||
>PUSHB.G P.GetInfo+$09 THIS-NET
|
||||
>PUSHB.G P.GetInfo+$0E NODE
|
||||
|
||||
>PUSHB.G P.GetInfo+$0A BRIDGE
|
||||
|
||||
>PUSHB.G P.GetInfo+$0C HARDWARE ID
|
||||
>PUSHB.G P.GetInfo+$0D 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.GetParms >LEA.G P.GetParms
|
||||
ldx #AT.GetParms
|
||||
jsr CS.RUN.GOATLK
|
||||
bcs .9
|
||||
|
||||
>LDYA.G P.GetParms+$4
|
||||
>SYSCALL GetMem
|
||||
bcs .9
|
||||
|
||||
>STYA ZPCmdBuf
|
||||
stx hCmdBuf
|
||||
|
||||
>LDYA.G P.GetParms+$6
|
||||
>SYSCALL GetMem
|
||||
bcs .9
|
||||
|
||||
>STYA ZPReplyBuf
|
||||
stx hReplyBuf
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.ListVols lda A2osX.ATLKSID
|
||||
>STA.G P.Command+$08 Session Ref
|
||||
|
||||
>LDYAI FPGetSrvrParms.Len
|
||||
>STYA.G P.Command+$09
|
||||
|
||||
>LDYA L.FPGetSrvrParms
|
||||
>STYA.G P.Command+$0B
|
||||
|
||||
>LDYA.G P.GetParms+$6 Reply Size
|
||||
>STYA.G P.Command+$0F
|
||||
|
||||
>LDYA ZPReplyBuf
|
||||
>STYA.G P.Command+$11
|
||||
|
||||
>LEA.G P.Command
|
||||
ldx #AT.Command
|
||||
jsr CS.RUN.GOATLK
|
||||
bcs .9
|
||||
|
||||
>LDYA L.MSG.VOLLIST
|
||||
>SYSCALL Puts
|
||||
|
||||
lda ZPReplyBuf
|
||||
clc
|
||||
adc #4
|
||||
tay
|
||||
lda ZPReplyBuf+1
|
||||
adc #0
|
||||
jsr CS.RUN.PrintListYA
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.PrintListYA
|
||||
>STYA ZPPTR1
|
||||
|
||||
lda (ZPPTR1)
|
||||
beq .8
|
||||
|
||||
tax
|
||||
|
||||
inc ZPPTR1
|
||||
bne .1
|
||||
inc ZPPTR1+1
|
||||
|
||||
.1 phx
|
||||
|
||||
>PUSHW L.MSG.VOL
|
||||
|
||||
>PUSHB (ZPPTR1)
|
||||
|
||||
inc ZPPTR1
|
||||
bne .10
|
||||
inc ZPPTR1+1
|
||||
|
||||
.10 >PUSHW ZPPTR1
|
||||
>PUSHBI 3
|
||||
>SYSCALL PrintF
|
||||
plx
|
||||
bcs .9
|
||||
|
||||
lda (ZPPTR1)
|
||||
sec
|
||||
adc ZPPTR1
|
||||
sta ZPPTR1
|
||||
bcc .2
|
||||
inc ZPPTR1+1
|
||||
|
||||
.2 dex
|
||||
bne .1
|
||||
|
||||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.MountVol >STYA ZPPTR1
|
||||
|
||||
>LEA.G VolName
|
||||
>STYA ZPPTR2
|
||||
|
||||
ldy #$ff
|
||||
|
||||
.1 iny
|
||||
lda (ZPPTR1),y
|
||||
bne .1
|
||||
|
||||
tya
|
||||
tax
|
||||
sta (ZPPTR2)
|
||||
|
||||
ldy #0
|
||||
|
||||
.2 lda (ZPPTR1),y
|
||||
iny
|
||||
sta (ZPPTR2),y
|
||||
dex
|
||||
bne .2
|
||||
|
||||
lda A2osX.ATLKSID
|
||||
>STA.G P.MountVol+$04 Session Ref
|
||||
|
||||
lda #128
|
||||
>STA.G P.MountVol+$05 Mount Flag
|
||||
|
||||
>LEA.G VolName
|
||||
>STYA.G P.MountVol+$06
|
||||
|
||||
>LEA.G P.MountVol
|
||||
ldx #AT.FIMountVol
|
||||
jsr CS.RUN.GOATLK
|
||||
bcs .9
|
||||
|
||||
>PUSHW L.MSG.MOUNTED
|
||||
>PUSHW ZPPTR2
|
||||
>LDA.G P.MountVol+$0C
|
||||
asl
|
||||
php
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
>PUSHA
|
||||
plp
|
||||
lda #0
|
||||
rol
|
||||
inc
|
||||
>PUSHA
|
||||
>PUSHBI 4
|
||||
>SYSCALL PrintF
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.GOATLK >STYA ZPAtlkParams
|
||||
|
||||
ldy #1
|
||||
txa
|
||||
sta (ZPAtlkParams),y
|
||||
|
||||
>LDYA ZPAtlkParams
|
||||
jsr A2osX.ATKCALL
|
||||
bcc .9
|
||||
|
||||
pha
|
||||
|
||||
>PUSHW L.MSG.ATKERR
|
||||
|
||||
ldy #1
|
||||
lda (ZPAtlkParams),y
|
||||
>PUSHA
|
||||
|
||||
ldy #3
|
||||
lda (ZPAtlkParams),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPAtlkParams),y
|
||||
>PUSHA
|
||||
|
||||
>PUSHBI 3
|
||||
>SYSCALL PrintF
|
||||
|
||||
pla
|
||||
sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT lda hReplyBuf
|
||||
beq .1
|
||||
|
||||
>SYSCALL FreeMem
|
||||
|
||||
.1 lda hCmdBuf
|
||||
beq .2
|
||||
|
||||
>SYSCALL FreeMem
|
||||
|
||||
.2 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
MSG.USAGE .AZ "Usage : ATMOUNT [VOLUME]"
|
||||
MSG.NOATK .AZ "AppleTalk Not Loaded."
|
||||
MSG.NOSESSION .AZ "No Active AppleTalk Session."
|
||||
MSG.ATKERR .AZ "AppleTalk Call %h, 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.VOLLIST .AZ "Flags Volume Name"
|
||||
MSG.VOL .AZ "%b %S\r\n"
|
||||
MSG.MOUNTED .AZ "Volume %S Mounted as s%dd%d\r\n"
|
||||
*--------------------------------------
|
||||
FPGetSrvrParms .DA #16
|
||||
FPGetSrvrParms.Len .EQ *-FPGetSrvrParms
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
DS.START
|
||||
P.GetInfo .BS $0F
|
||||
P.GetParms .BS $07
|
||||
P.Command .BS $1B
|
||||
P.MountVol .BS $11
|
||||
VolName .BS 28
|
||||
DS.END
|
||||
.ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE usr/src/bin/atmount.s
|
||||
ASM
|
|
@ -61,7 +61,7 @@ A2osX.ASCREEN .EQ $BEDA Active Screen
|
|||
* free BEDB -> BEDF
|
||||
A2osX.KVER .EQ $BEE0
|
||||
A2osX.IRQMode .EQ $BEE3
|
||||
|
||||
A2osX.ATLKSID .EQ $BEE4
|
||||
A2osX.FSID .EQ $BEE5
|
||||
A2osX.CPUTYPE .EQ $BEE6
|
||||
A2osX.CPUSPEED .EQ $BEE7 WORD, (->255.99 Mhz)
|
||||
|
|
|
@ -11,12 +11,13 @@ AT.GetZoneList .EQ $1B
|
|||
|
||||
AT.GetParms .EQ $1C
|
||||
AT.GetStatus .EQ $1D
|
||||
AT.Command .EQ $20
|
||||
|
||||
AT.FILogin .EQ $2B
|
||||
AT.FILoginCont .EQ $2C
|
||||
AT.FILogout .EQ $2D
|
||||
AT.FIMountVol .EQ $2E
|
||||
AT.FIListSessions .EQ $3F
|
||||
AT.FIListSessions .EQ $2F
|
||||
AT.FINaming .EQ $33
|
||||
AT.FIGetSVersion .EQ $3A
|
||||
*--------------------------------------
|
||||
|
|
|
@ -10,7 +10,7 @@ S.NETBIOS .EQ 4
|
|||
*--------------------------------------
|
||||
S.SMB.H.PROTO .EQ 0 \xFF 'SMB'
|
||||
S.SMB.H.CMD .EQ 4
|
||||
S.SMB.H.CMD.TRANSACTION2 .EQ $32
|
||||
S.SMB.H.CMD.TRANS2 .EQ $32
|
||||
S.SMB.H.CMD.NEGOTIATE .EQ $72
|
||||
S.SMB.H.CMD.SESSION.SETUP.ANDX .EQ $73
|
||||
S.SMB.H.CMD.TREE.CONNECT.ANDX .EQ $75
|
||||
|
@ -36,5 +36,13 @@ S.SMB.H.MID .EQ 30
|
|||
*
|
||||
S.SMB.H .EQ 32
|
||||
*--------------------------------------
|
||||
SMB_INFO_STANDARD .EQ $0001
|
||||
SMB_INFO_QUERY_EA_SIZE .EQ $0002
|
||||
SMB_INFO_QUERY_EAS_FROM_LIST .EQ $0003
|
||||
SMB_FIND_FILE_DIRECTORY_INFO .EQ $0101
|
||||
SMB_FIND_FILE_FULL_DIRECTORY_INFO .EQ $0102
|
||||
SMB_FIND_FILE_NAMES_INFO .EQ $0103
|
||||
SMB_FIND_FILE_BOTH_DIRECTORY_INFO .EQ $0104
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE INC/NET.SMB.I
|
||||
|
|
|
@ -48,7 +48,7 @@ D2Recalibrate >PULLB DrvSlt
|
|||
|
||||
lda #IO.D2.SeekTimeR
|
||||
jsr D2.Wait100usecA
|
||||
|
||||
|
||||
pla
|
||||
bne .1
|
||||
|
||||
|
@ -76,8 +76,16 @@ D2MoveHead >PULLB MoveTo
|
|||
clc
|
||||
.9 rts
|
||||
|
||||
D2MoveHead.SEI ldx Slotn0
|
||||
ldy Slotn0
|
||||
D2MoveHead.SEI lda MoveFrom
|
||||
tay
|
||||
|
||||
and #6
|
||||
ora Slotn0
|
||||
tax
|
||||
|
||||
tya
|
||||
inc
|
||||
bra .3
|
||||
|
||||
.1 lda MoveFrom
|
||||
cmp MoveTo
|
||||
|
@ -96,11 +104,11 @@ D2MoveHead.SEI ldx Slotn0
|
|||
.HS B0 BCS
|
||||
|
||||
* Current > Target, must move out
|
||||
|
||||
|
||||
.2 dec
|
||||
|
||||
sta MoveFrom
|
||||
|
||||
|
||||
and #6
|
||||
ora Slotn0
|
||||
tax
|
||||
|
@ -117,17 +125,15 @@ D2MoveHead.SEI ldx Slotn0
|
|||
.3 and #6
|
||||
ora Slotn0
|
||||
tay
|
||||
|
||||
sta IO.D2.Ph0On,x
|
||||
sta IO.D2.Ph0On,y
|
||||
|
||||
sta IO.D2.Ph0On,y
|
||||
sta IO.D2.Ph0On,x
|
||||
lda #IO.D2.SeekTimeF
|
||||
jsr D2.Wait100usecA
|
||||
|
||||
bra .1
|
||||
|
||||
|
||||
.8 jsr D2.Wait25600usec
|
||||
|
||||
|
||||
sta IO.D2.Ph0Off,x
|
||||
sta IO.D2.Ph0Off,y
|
||||
rts
|
||||
|
@ -304,12 +310,7 @@ CheckDiskII pha
|
|||
lda IO.D2.ReadMode,x
|
||||
lda IO.D2.RData,x
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
lda IO.D2.Ph1Off,x
|
||||
lda IO.D2.Ph2Off,x
|
||||
lda IO.D2.Ph3Off,x
|
||||
|
||||
* clc
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 pla
|
||||
|
@ -492,11 +493,11 @@ D2WriteTrackPtr2
|
|||
jsr $200
|
||||
|
||||
bcs .9
|
||||
|
||||
|
||||
plp
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
.9 plp
|
||||
sec
|
||||
rts
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF lib/libblkdev
|
||||
|
@ -78,13 +78,13 @@ LIB.UNLOAD clc
|
|||
* # GetProDOSCatSize
|
||||
* Compute space needed for ProDOS Catalog
|
||||
* ## C
|
||||
* int getprodoscatsize (short int options, short int catsize, int devsize );
|
||||
* int getprodoscatsize (short int options, short int catsize, int devsize );
|
||||
* ## ASM
|
||||
* **In:**
|
||||
* PUSHW = DevSize (in 512b blocks)
|
||||
* PUSHB = Catalog Size (in blocks)
|
||||
* PUSHB = Options
|
||||
* ## RETURN VALUE
|
||||
* ## RETURN VALUE
|
||||
* X=BlockCount (max 22)
|
||||
* Y,A=BufSize (max $4400)
|
||||
*\--------------------------------------
|
||||
|
@ -175,15 +175,17 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
|||
|
||||
* Blk 2 : First Directory Block
|
||||
|
||||
jsr ZeroPtr1
|
||||
|
||||
* ldy #0
|
||||
|
||||
stz VolDirHdr.Prev
|
||||
* stz VolDirHdr.Prev
|
||||
* stz VolDirHdr.Prev+1 always 0
|
||||
|
||||
lda #3 next block
|
||||
|
||||
ldx VolDirHdr.CatSize
|
||||
dex
|
||||
dex
|
||||
bne .30
|
||||
|
||||
txa
|
||||
|
@ -197,22 +199,22 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
|||
beq .39
|
||||
|
||||
iny
|
||||
|
||||
|
||||
cmp #'a'
|
||||
bcc .38
|
||||
cmp #'z'+1
|
||||
bcs .38
|
||||
|
||||
|
||||
eor #$20
|
||||
|
||||
|
||||
pha
|
||||
cpy #8
|
||||
bcs .31
|
||||
|
||||
|
||||
lda LC.BitMap,y
|
||||
tsb VolDirHdr.MVER
|
||||
bra .32
|
||||
|
||||
|
||||
.31 lda LC.BitMap-8,y
|
||||
tsb VolDirHdr.VER
|
||||
|
||||
|
@ -222,7 +224,7 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
|||
pla
|
||||
|
||||
.38 sta VolDirHdr.Name,y
|
||||
|
||||
|
||||
cpy #15
|
||||
bne .3
|
||||
|
||||
|
@ -237,13 +239,17 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
|||
dey
|
||||
bpl .4
|
||||
|
||||
* Blk 3...n : additional Directory Blocks
|
||||
* Blk 3...n : additional Directory Blocks
|
||||
|
||||
lda #3 Actual Block ID
|
||||
ldy #2 next blk ptr
|
||||
|
||||
.41 inc ZPPtr1+1
|
||||
jsr ZeroPtr1
|
||||
|
||||
inc ZPPtr1+1 Next Block
|
||||
jsr ZeroPtr1
|
||||
|
||||
dex
|
||||
bmi .40
|
||||
|
||||
|
@ -262,7 +268,7 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
|||
|
||||
* BitMap Blocks : 0=Used 1=free
|
||||
|
||||
.40
|
||||
.40
|
||||
BuildProDOSCat.BM
|
||||
jsr GetProDOSCatSize.I X=blk used for boot/dir/bitmap
|
||||
|
||||
|
@ -287,7 +293,7 @@ BuildProDOSCat.BM
|
|||
.6 lsr
|
||||
bne .5
|
||||
iny
|
||||
bne .50
|
||||
bne .50
|
||||
|
||||
.7 lda #%10000000
|
||||
|
||||
|
@ -296,7 +302,7 @@ BuildProDOSCat.BM
|
|||
|
||||
inc Count+1
|
||||
bne .81
|
||||
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
@ -311,7 +317,20 @@ BuildProDOSCat.BM
|
|||
bne .7
|
||||
|
||||
inc ZPPtr1+1
|
||||
jsr ZeroPtr1
|
||||
bra .7
|
||||
*--------------------------------------
|
||||
ZeroPtr1 phy
|
||||
|
||||
lda #0
|
||||
tay
|
||||
|
||||
.1 sta (ZPPtr1),y
|
||||
iny
|
||||
bne .1
|
||||
|
||||
ply
|
||||
rts
|
||||
*--------------------------------------
|
||||
.INB usr/src/lib/libblkdev.s.d2
|
||||
*--------------------------------------
|
||||
|
@ -329,24 +348,24 @@ TrkWriter.Start lda IO.D2.ReadProt,x
|
|||
|
||||
ldy ZPPtr1
|
||||
stz ZPPtr1
|
||||
|
||||
|
||||
lda (ZPPtr1),y
|
||||
|
||||
|
||||
iny
|
||||
|
||||
* bne .10 no chance this happens because mem blocks are $FFF0 aligned....
|
||||
* inc ZPPtr1+1
|
||||
|
||||
|
||||
.10 cmp #$80 if CC, it is a sync byte
|
||||
ora #$80 make sure Bit7 high
|
||||
|
||||
|
||||
sta IO.D2.WriteMode,x (5) goto write mode
|
||||
ora IO.D2.WShift,x (4)
|
||||
|
||||
nop (2)
|
||||
|
||||
bra .2 (3)
|
||||
|
||||
|
||||
.1 lda (ZPPtr1),y (5) as NibbleBuf is page aligned, no page crossing
|
||||
beq .8 (2)(3 if Z) END OF TRACK
|
||||
* nobody will never try to write 00000000, right?
|
||||
|
@ -360,7 +379,7 @@ TrkWriter.Start lda IO.D2.ReadProt,x
|
|||
|
||||
* 32us Byte,next page : 2 (beq failed)+5 +2+2+5+4+2+2 (bne failed) + 5 + 3 (bcs succeeded) = 32
|
||||
inc ZPPtr1+1 (5)
|
||||
|
||||
|
||||
bcs .1 (2)(3 if cs) regular 32us byte
|
||||
|
||||
* 40us Byte,next page : 2 (beq failed) +2+2+5+4+2+2 (bne failed) + 5 + 2 (bcs failed) +2+2+2+3 = 40
|
||||
|
@ -386,7 +405,7 @@ TrkWriter.Start lda IO.D2.ReadProt,x
|
|||
.8 pha (3) make sure 32us elapsed before switching to read mode (beq(3)+pha(3)=beq(2)+cmp(2)+ora(2))
|
||||
lda IO.D2.ReadMode,x close write mode
|
||||
lda IO.D2.RData,x
|
||||
pla from pha (3)
|
||||
pla from pha (3)
|
||||
|
||||
clc
|
||||
rts
|
||||
|
|
|
@ -66,6 +66,22 @@ J.CIFS .DA CIFS.ChTyp
|
|||
.DA CIFS.Read
|
||||
.DA CIFS.Write
|
||||
.DA CIFS.ChOwn
|
||||
J.CIFS2 .DA CIFS2.ChTyp
|
||||
.DA CIFS2.ChMod
|
||||
.DA CIFS2.FStat
|
||||
.DA CIFS2.Stat
|
||||
.DA CIFS2.MKDir
|
||||
.DA CIFS2.MKNod
|
||||
.DA CIFS2.MKFIFO
|
||||
.DA CIFS2.Pipe
|
||||
.DA CIFS2.OpenDir
|
||||
.DA CIFS2.ReadDir
|
||||
.DA CIFS2.CloseDir
|
||||
.DA CIFS2.Open
|
||||
.DA CIFS2.Close
|
||||
.DA CIFS2.Read
|
||||
.DA CIFS2.Write
|
||||
.DA CIFS2.ChOwn
|
||||
L.LIBTCPIP .DA LIBTCPIP
|
||||
L.SMB.TRANSPORT .DA SMB.TRANSPORT
|
||||
.DA 0
|
||||
|
@ -458,55 +474,193 @@ CIFS.Mount ldy #1
|
|||
CIFS.UMount clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CIFS.CallBack jmp (J.CIFS,x)
|
||||
CIFS.CallBack bit CIFS.Status
|
||||
bmi .1
|
||||
|
||||
jmp (J.CIFS,x)
|
||||
|
||||
.1 ldy #S.PS.PID
|
||||
lda (pPS),y
|
||||
cmp CIFS.PID
|
||||
bne .8
|
||||
|
||||
jmp (J.CIFS2,x)
|
||||
|
||||
.8 lda #0
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CIFS.ChTyp
|
||||
CIFS2.ChTyp
|
||||
*--------------------------------------
|
||||
CIFS.ChMod
|
||||
CIFS2.ChMod
|
||||
*--------------------------------------
|
||||
CIFS.FStat
|
||||
CIFS.FStat
|
||||
*--------------------------------------
|
||||
CIFS.Stat pha
|
||||
>PULLW ZPPtr2 S.STAT
|
||||
>PULLW ZPPtr1 PATH
|
||||
|
||||
pla
|
||||
>SYSCALL2 PutS
|
||||
|
||||
|
||||
.99 lda #MLI.E.INVPATH
|
||||
CIFS2.FStat lda #MLI.E.BADCALL
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CIFS.Stat >STYA ZPPtr1 resolved path
|
||||
|
||||
lda MountTable+2
|
||||
>SYSCALL2 GetMemPtr
|
||||
>STYA ZPCtxPtr
|
||||
|
||||
ldx #S.SMB.H.CMD.TRANS2
|
||||
jsr RequestSetupX
|
||||
|
||||
ldx #0
|
||||
|
||||
.1 lda SMB.Trans2.H,x
|
||||
sta (ZPReqPtr),y
|
||||
iny
|
||||
inx
|
||||
cpx #SMB.Trans2.H.Len
|
||||
bne .1
|
||||
|
||||
ldx #0
|
||||
|
||||
.2 lda SMB.QueryPathInfo,x
|
||||
sta (ZPReqPtr),y
|
||||
iny
|
||||
inx
|
||||
cpx #SMB.QueryPathInfo.Len
|
||||
bne .2
|
||||
|
||||
.3 lda (ZPPtr1)
|
||||
inc ZPPtr1
|
||||
bne .4
|
||||
|
||||
inc ZPPtr1+1
|
||||
|
||||
.4 sta (ZPReqPtr),y
|
||||
iny
|
||||
tax
|
||||
bne .3
|
||||
|
||||
jsr SetT2ReqLenYA
|
||||
|
||||
>PUSHYA
|
||||
>PUSHW ZPReqPtr
|
||||
lda MountTable+3 hSocket
|
||||
|
||||
ldx #LIBTCPIP.Send
|
||||
jsr GO.LIBTCPIP
|
||||
bcs .9
|
||||
|
||||
ldy #S.PS.PID
|
||||
lda (pPS),y
|
||||
sta CIFS.PID
|
||||
|
||||
dec CIFS.Status
|
||||
|
||||
lda #0
|
||||
sec
|
||||
rts
|
||||
|
||||
lda #MLI.E.INVPATH
|
||||
sec
|
||||
.9 >RET 4
|
||||
*--------------------------------------
|
||||
CIFS2.Stat lda MountTable+3 hSocket
|
||||
ldx #LIBTCPIP.Recv
|
||||
jsr GO.LIBTCPIP
|
||||
bcs .9
|
||||
|
||||
jsr GetRespData
|
||||
|
||||
ldy #S.NETBIOS+S.SMB.H.STATUS
|
||||
lda (ZPRespPtr),y
|
||||
beq .1
|
||||
|
||||
lda #MLI.E.FNOTFND
|
||||
bra .99
|
||||
|
||||
.1 >PULLW ZPPtr1
|
||||
inc pStack
|
||||
inc pStack
|
||||
|
||||
stz CIFS.Status
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 cmp #E.NODATA
|
||||
bne .99
|
||||
|
||||
dec CIFS.Retries
|
||||
beq .90
|
||||
|
||||
lda #0
|
||||
sec
|
||||
rts
|
||||
|
||||
.90 lda #MLI.E.IO
|
||||
.99 sec
|
||||
stz CIFS.Status
|
||||
>RET 4
|
||||
*--------------------------------------
|
||||
CIFS.MKDir
|
||||
CIFS2.MKDir
|
||||
*--------------------------------------
|
||||
CIFS.MKNod
|
||||
CIFS2.MKNod
|
||||
*--------------------------------------
|
||||
CIFS.MKFIFO
|
||||
CIFS2.MKFIFO
|
||||
*--------------------------------------
|
||||
CIFS.Pipe lda #MLI.E.BADCALL
|
||||
CIFS.Pipe
|
||||
CIFS2.Pipe lda #MLI.E.BADCALL
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CIFS.OpenDir lda #MLI.E.BADCALL
|
||||
CIFS.OpenDir >STYA ZPPtr1 resolved path
|
||||
>SYSCALL2 PutS
|
||||
|
||||
>LDYAI S.FD.DIR
|
||||
>SYSCALL2 GetMem
|
||||
bcs .9
|
||||
|
||||
>STYA ZPPtr2
|
||||
|
||||
lda #S.FD.T.DIR
|
||||
sta (ZPPtr2)
|
||||
|
||||
>PUSHW ZPPtr1
|
||||
>PUSHWI 0
|
||||
txa
|
||||
>PUSHA
|
||||
>SYSCALL2 mknod
|
||||
|
||||
.9 rts
|
||||
|
||||
CIFS2.OpenDir lda #MLI.E.BADCALL
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CIFS.ReadDir lda #MLI.E.INVPATH
|
||||
CIFS.ReadDir
|
||||
CIFS2.ReadDir lda #MLI.E.INVPATH
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CIFS.CloseDir
|
||||
CIFS2.CloseDir
|
||||
*--------------------------------------
|
||||
CIFS.Open
|
||||
CIFS2.Open
|
||||
*--------------------------------------
|
||||
CIFS.Close
|
||||
CIFS2.Close
|
||||
*--------------------------------------
|
||||
CIFS.Read
|
||||
CIFS2.Read
|
||||
*--------------------------------------
|
||||
CIFS.Write
|
||||
CIFS2.Write
|
||||
*--------------------------------------
|
||||
CIFS.ChOwn
|
||||
CIFS2.ChOwn
|
||||
lda #MLI.E.BADCALL
|
||||
sec
|
||||
rts
|
||||
|
@ -559,7 +713,29 @@ SetReqLenYAtA sty ZPReqLen
|
|||
iny
|
||||
lda #0
|
||||
sta (ZPReqPtr),y
|
||||
bra SetReqLenNETBIOS
|
||||
*--------------------------------------
|
||||
SetT2ReqLenYA sty ZPReqLen
|
||||
stz ZPReqLen+1
|
||||
|
||||
tya
|
||||
sec
|
||||
sbc #S.NETBIOS+S.SMB.H+SMB.Trans2.H.Len+7
|
||||
|
||||
ldy #S.NETBIOS+S.SMB.H+1
|
||||
sta (ZPReqPtr),y
|
||||
|
||||
ldy #S.NETBIOS+S.SMB.H+19
|
||||
sta (ZPReqPtr),y
|
||||
|
||||
inc
|
||||
inc
|
||||
inc
|
||||
|
||||
ldy #S.NETBIOS+S.SMB.H+SMB.Trans2.H.Len+2
|
||||
sta (ZPReqPtr),y
|
||||
|
||||
SetReqLenNETBIOS
|
||||
lda ZPReqLen
|
||||
sec
|
||||
sbc #S.NETBIOS
|
||||
|
@ -598,6 +774,10 @@ hSocket .BS 1
|
|||
hReq .BS 1
|
||||
hResp .BS 1
|
||||
*--------------------------------------
|
||||
CIFS.Status .BS 1
|
||||
CIFS.PID .BS 1
|
||||
CIFS.Retries .BS 1
|
||||
*--------------------------------------
|
||||
MountTable .BS 2 pMountPoint
|
||||
.BS 1 hSMBContext
|
||||
.BS 1 hSocket
|
||||
|
@ -680,51 +860,53 @@ SMB.TreeConnect.T
|
|||
.AZ "A:" Disk Share
|
||||
SMB.TreeConnect.T.Len .EQ *-SMB.TreeConnect.T
|
||||
*--------------------------------------
|
||||
SMB.TRANS2.H .DA #15 WORD COUNT
|
||||
.BS 2 TotalParamCount
|
||||
SMB.Trans2.H .DA #15 WORD COUNT
|
||||
.BS 2 TotalParamCount
|
||||
.DA 0 TotalDataCount
|
||||
.DA 10 MaxParameterCount
|
||||
.DA 460 MaxDataCount
|
||||
.DA #1 MaxSetupCount
|
||||
.DA 2 MaxParameterCount
|
||||
.DA 40 MaxDataCount
|
||||
.DA #0 MaxSetupCount
|
||||
.HS 00 Reserved1
|
||||
.DA 0 Flags
|
||||
.HS 00000000 Timeout
|
||||
.HS 0000 Reserved2
|
||||
.BS 2 ParameterCount
|
||||
.DA 66 ParameterOffset
|
||||
.BS 2 ParameterCount
|
||||
.DA 68 ParameterOffset
|
||||
.HS 0000 DataCount
|
||||
.HS 0000 DataOffset
|
||||
.DA #1 SetupCount
|
||||
.HS 00 Reserved3
|
||||
SMB.Trans2.H.Len .EQ *-SMB.Trans2.H
|
||||
*--------------------------------------
|
||||
SMB.QueryPathInfo
|
||||
.DA 5 TRANS2_QUERY_PATH_INFORMATION
|
||||
|
||||
.DA SMB.QueryPathInfo.PrmCnt+1 INCLUDING Padding byte below
|
||||
.HS 00 Padding
|
||||
|
||||
SMB.QueryPathInfo.Prm
|
||||
.DA $0001 InformationLevel
|
||||
.BS 2 PrmCnt
|
||||
.HS 000000 Padding
|
||||
.DA SMB_INFO_STANDARD InformationLevel
|
||||
.HS 00000000 SearchStorageType
|
||||
SMB.QueryPathInfo.PrmCnt .EQ *-SMB.QueryPathInfo.Prm
|
||||
.AZ "server.met" FileName
|
||||
SMB.QueryPathInfo.end
|
||||
|
||||
* .AZ "file" FileName
|
||||
SMB.QueryPathInfo.Len .EQ *-SMB.QueryPathInfo
|
||||
*--------------------------------------
|
||||
SMB.FindFirst .DA 1 TRANS2_FIND_FIRST2
|
||||
|
||||
.DA SMB.FindFirst.PrmCnt+1 INCLUDING Padding byte below
|
||||
.BS 2 PrmCnt
|
||||
.HS 00 Padding
|
||||
|
||||
SMB.FindFirst.Prm
|
||||
.DA $0016 SearchAttributes
|
||||
.DA 1024 SearchCount
|
||||
.DA 3 Flags
|
||||
.DA $0001 InformationLevel
|
||||
.HS 00000000 SearchStorageType
|
||||
SMB.FindFirst.PrmCnt .EQ *-SMB.FindFirst.Prm
|
||||
.AZ "\*.*" FileName
|
||||
SMB.FindFirst.end
|
||||
.DA 2 Flags
|
||||
.DA SMB_INFO_STANDARD InformationLevel
|
||||
* .AZ "*.*" FileName
|
||||
SMB.FindFirst.end .EQ *-SMB.FindFirst
|
||||
*--------------------------------------
|
||||
SMB.FindNext .DA 2 TRANS2_FIND_NEXT2
|
||||
.BS 2 PrmCnt
|
||||
.HS 00 Padding
|
||||
.BS 2 SID
|
||||
.DA 1024 SearchCount
|
||||
.DA SMB_INFO_STANDARD InformationLevel
|
||||
.HS 00000000 ResumeKey
|
||||
.DA 2 Flags
|
||||
* .AZ "*.*" FileName
|
||||
SMB.FindNext.end .EQ *-SMB.FindNext
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE usr/src/lib/libcifs.s
|
||||
|
|
|
@ -75,7 +75,8 @@ L59BD lda bloknml
|
|||
lsr
|
||||
sta XRW.ReqSector
|
||||
*--------------------------------------
|
||||
jsr XRW.Reset
|
||||
ldx A2L
|
||||
jsr XRW.ReadMode
|
||||
|
||||
jsr XRW.CheckMotorOn
|
||||
|
||||
|
@ -152,6 +153,9 @@ L538E lda A4L get command #
|
|||
*--------------------------------------
|
||||
.2 sei DISABLE IRQ
|
||||
|
||||
jsr XRW.TrackSelect
|
||||
bcs XRW.E.IO
|
||||
|
||||
jsr XRW.SectorIO
|
||||
bcs XRW.E.IO
|
||||
|
||||
|
@ -160,6 +164,7 @@ L538E lda A4L get command #
|
|||
inc XRW.ReqSector
|
||||
inc XRW.ReqSector
|
||||
|
||||
lda XRW.ReqTrack
|
||||
jsr XRW.SectorIO get 2nd half of block
|
||||
dec buf+1
|
||||
|
||||
|
@ -304,16 +309,11 @@ L596F ldy #$FF index to last byte of data to write.
|
|||
stx wrefd5+1
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.SectorIO lda #2
|
||||
XRW.TrackSelect lda #2
|
||||
sta XRW.RecalibrateCnt
|
||||
sta XRW.BadSeek
|
||||
jsr XRW.DEBUG
|
||||
bit XRW.bWrite
|
||||
bpl .1
|
||||
|
||||
jsr XRW.PreNibble must prenibblize for write
|
||||
|
||||
.1 stz XRW.RetryCnt
|
||||
.1 stz XRW.RetryCnt
|
||||
|
||||
.2 jsr XRW.ReadAddr read next address field.
|
||||
bcc .4 if CC, A = current track
|
||||
|
@ -337,39 +337,64 @@ XRW.SectorIO lda #2
|
|||
bra .1
|
||||
|
||||
.4 cmp XRW.ReqTrack
|
||||
beq .6
|
||||
beq .8
|
||||
|
||||
lda XRW.BadSeek
|
||||
beq .40 2 bad seeks, already
|
||||
* lda XRW.BadSeek
|
||||
* beq .5 2 bad seeks, already
|
||||
|
||||
dec XRW.BadSeek
|
||||
bne .5
|
||||
* dec XRW.BadSeek
|
||||
* bne .6
|
||||
|
||||
.40 lda XRW.SeekTime
|
||||
bmi .5 seektime already > 128
|
||||
*.5 lda XRW.SeekTime
|
||||
* bmi .6 seektime already > 128
|
||||
|
||||
clc
|
||||
adc #IO.D2.SeekTimeI
|
||||
sta XRW.SeekTime
|
||||
* clc
|
||||
* adc #IO.D2.SeekTimeI
|
||||
* sta XRW.SeekTime
|
||||
|
||||
ldx XRW.UnitIndex
|
||||
sta XRW.D2SeekTime-1,x
|
||||
* ldx XRW.UnitIndex
|
||||
* sta XRW.D2SeekTime-1,x
|
||||
|
||||
.5 lda XRW.ReqTrack
|
||||
.6 lda XRW.ReqTrack
|
||||
jsr XRW.Seek
|
||||
bra .3
|
||||
|
||||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
XRW.SectorIO bit XRW.bWrite
|
||||
bpl .1
|
||||
|
||||
.6 lda XRW.AddrField.S is this the right sector ?
|
||||
jsr XRW.SEEK2T
|
||||
phx
|
||||
phy
|
||||
jsr XRW.PreNibble
|
||||
ply
|
||||
plx
|
||||
jsr XRW.SEEKOFF
|
||||
|
||||
.1 stz XRW.RetryCnt
|
||||
|
||||
jsr XRW.DEBUG
|
||||
|
||||
.2 jsr XRW.ReadAddr
|
||||
bcs .3
|
||||
|
||||
lda XRW.AddrField.S
|
||||
cmp XRW.ReqSector
|
||||
bne .3 no, try another sector.
|
||||
beq .8
|
||||
|
||||
bit XRW.bWrite
|
||||
bmi XRW.Write
|
||||
|
||||
.7 jsr XRW.Read
|
||||
bcs .3 if bad read
|
||||
.3 inc XRW.RetryCnt
|
||||
bpl .2
|
||||
|
||||
sec
|
||||
|
||||
.9 rts
|
||||
|
||||
.8 bit XRW.bWrite
|
||||
bmi XRW.Write
|
||||
|
||||
jmp XRW.Read
|
||||
*--------------------------------------
|
||||
* write subroutine (16 sector format)
|
||||
*
|
||||
|
@ -519,11 +544,13 @@ wrefd5 ldx #$60 (2) restore slot. warning: modified by prenib
|
|||
|
||||
clc (2)
|
||||
|
||||
lda #$FF (2)
|
||||
jsr XRW.Write.RTS (6+6)
|
||||
|
||||
nop (2)
|
||||
nop (2)
|
||||
|
||||
jsr wnibl (15,6) write turn off byte.
|
||||
* lda #$FF (2)
|
||||
* jsr wnibl (15,6) write turn off byte.
|
||||
|
||||
XRW.ReadMode lda IO.D2.ReadMode,x out of write mode
|
||||
lda IO.D2.WShift,x to read mode.
|
||||
|
@ -542,14 +569,29 @@ wnibl sta IO.D2.WLoad,x (5) nibl write
|
|||
XRW.Write.RTS rts (6)
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
XRW.Reset ldx A2L
|
||||
* determine if motor is stopped
|
||||
*
|
||||
* if stopped, controller's shift register will not be changing.
|
||||
* return y = 0 and zero flag set if it is stopped.
|
||||
*--------------------------------------
|
||||
XRW.CheckMotorOn
|
||||
ldx A2L
|
||||
XRW.CheckMotorOnX
|
||||
ldy #0 init loop counter.
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
lda IO.D2.Ph1Off,x
|
||||
lda IO.D2.Ph2Off,x
|
||||
lda IO.D2.Ph3Off,x
|
||||
.1 lda IO.D2.RData,x read the shift register.
|
||||
jsr .9 delay
|
||||
|
||||
jmp XRW.ReadMode
|
||||
pha
|
||||
pla more delay.
|
||||
|
||||
cmp IO.D2.RData,x has shift reg changed ?
|
||||
bne .9 yes, motor is moving.
|
||||
|
||||
dey no, dec retry counter
|
||||
bne .1 and try 256 times.
|
||||
|
||||
.9 rts Z if motor OFF
|
||||
*--------------------------------------
|
||||
* read subroutine (16-sector format)
|
||||
*
|
||||
|
@ -716,20 +758,22 @@ XRW.Seek ldx XRW.UnitIndex
|
|||
jsr XRW.Trk2Qtrk
|
||||
sta XRW.CurrentQTrack
|
||||
|
||||
tay
|
||||
|
||||
pla
|
||||
sta XRW.D2Trk-1,x will be current track at the end
|
||||
|
||||
ldx A2L
|
||||
ldy A2L
|
||||
tya
|
||||
jsr XRW.Seek2QT
|
||||
bra .4
|
||||
|
||||
.1 lda XRW.CurrentQTrack
|
||||
cmp XRW.TargetQTrack
|
||||
beq .8
|
||||
|
||||
pha
|
||||
|
||||
sta IO.D2.Ph0Off,x
|
||||
sta IO.D2.Ph0Off,y
|
||||
|
||||
jsr XRW.SEEKOFF
|
||||
bcs .2
|
||||
|
||||
* Current < Target, must move in
|
||||
|
@ -763,20 +807,37 @@ XRW.Seek ldx XRW.UnitIndex
|
|||
|
||||
sta IO.D2.Ph0On,x
|
||||
sta IO.D2.Ph0On,y
|
||||
jsr XRW.WaitSeekTime
|
||||
|
||||
.4
|
||||
* lda XRW.SeekTime
|
||||
lda #IO.D2.SeekTimeP
|
||||
jsr XRW.Wait100usecA
|
||||
bra .1
|
||||
|
||||
.8 jsr XRW.Wait25600usec
|
||||
|
||||
sta IO.D2.Ph0Off,x
|
||||
XRW.SEEKOFF sta IO.D2.Ph0Off,x
|
||||
sta IO.D2.Ph0Off,y
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.WaitSeekTime
|
||||
* lda XRW.SeekTime
|
||||
lda #IO.D2.SeekTimeP
|
||||
.HS 2C BIT ABS
|
||||
XRW.SEEK2T ldx XRW.UnitIndex
|
||||
jsr XRW.Trk2Qtrk
|
||||
|
||||
XRW.SEEK2QT pha
|
||||
and #6
|
||||
ora A2L
|
||||
tax
|
||||
|
||||
pla
|
||||
inc
|
||||
and #6
|
||||
ora A2L
|
||||
tay
|
||||
|
||||
sta IO.D2.Ph0On,x
|
||||
sta IO.D2.Ph0On,y
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.Wait25600usec
|
||||
lda #0
|
||||
XRW.Wait100usecA
|
||||
|
@ -890,30 +951,6 @@ XRW.ReadAddr.RTS
|
|||
rts
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
* determine if motor is stopped
|
||||
*
|
||||
* if stopped, controller's shift register will not be changing.
|
||||
* return y = 0 and zero flag set if it is stopped.
|
||||
*--------------------------------------
|
||||
XRW.CheckMotorOn
|
||||
ldx A2L
|
||||
XRW.CheckMotorOnX
|
||||
ldy #0 init loop counter.
|
||||
|
||||
.1 lda IO.D2.RData,x read the shift register.
|
||||
jsr .9 delay
|
||||
|
||||
pha
|
||||
pla more delay.
|
||||
|
||||
cmp IO.D2.RData,x has shift reg changed ?
|
||||
bne .9 yes, motor is moving.
|
||||
|
||||
dey no, dec retry counter
|
||||
bne .1 and try 256 times.
|
||||
|
||||
.9 rts Z if motor OFF
|
||||
*--------------------------------------
|
||||
XRW.TestWP ldx A2L
|
||||
lda IO.D2.ReadProt,x test for write protected
|
||||
lda IO.D2.ReadMode,x
|
||||
|
@ -922,6 +959,7 @@ XRW.TestWP ldx A2L
|
|||
rts
|
||||
*--------------------------------------
|
||||
XRW.DEBUG sta CLRPAGE2
|
||||
|
||||
lda #"R"
|
||||
bit XRW.bWrite
|
||||
bpl .1
|
||||
|
@ -930,37 +968,31 @@ XRW.DEBUG sta CLRPAGE2
|
|||
|
||||
.1 sta $723
|
||||
|
||||
ldx #$24
|
||||
|
||||
lda XRW.ReqTrack
|
||||
pha
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
jsr .7
|
||||
sta $724
|
||||
pla
|
||||
jsr .7
|
||||
sta $725
|
||||
jsr .6
|
||||
|
||||
lda XRW.ReqSector
|
||||
pha
|
||||
|
||||
.6 pha
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
jsr .7
|
||||
sta $726
|
||||
pla
|
||||
jsr .7
|
||||
sta $727
|
||||
rts
|
||||
|
||||
.7 and #$0F
|
||||
ora #$B0
|
||||
cmp #"9"+1
|
||||
bcc .8
|
||||
|
||||
adc #6
|
||||
.8 rts
|
||||
|
||||
.8 sta $700,x
|
||||
inx
|
||||
rts
|
||||
*--------------------------------------
|
||||
.LIST ON
|
||||
XRW.FREE .EQ $D540-*
|
||||
|
|
Loading…
Reference in New Issue