Kernel 0.9.1 : KERNEL, Preemtive mode, generalize IOCTL for device access

This commit is contained in:
Rémy GIBERT 2018-04-16 16:25:39 +01:00
parent b2a0584f9d
commit 7ab9405274
17 changed files with 178 additions and 159 deletions

View File

@ -288,13 +288,24 @@ Create a new copy of this C-String
## In:
+ PUSHB = hSList
+ PUSHW = Key Ptr
+ PUSHW = Data Ptr
+ PUSHW = KeyID
+ PUSHW = Data Ptr
+ PUSHW = Key Ptr
## Out:
+ X,Y = Next KeyID
# SListUpdateByID
## In:
+ PUSHB = hSList
+ PUSHW = KeyID
+ PUSHW = Data Ptr
## Out:
+ A = Key Length
+ X,Y = KeyID
# SListAdd
## In:
@ -317,17 +328,6 @@ Create a new copy of this C-String
+ A = Key Length
+ X,Y = KeyID
# SListUpdateByID
## In:
+ PUSHB = hSList
+ PUSHW = KeyID
+ PUSHW = Data Ptr
## Out:
+ A = Key Length
+ X,Y = KeyID
# SListNew
## In:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -239,20 +239,20 @@ CS.RUN.WriteCat >PUSHB.G hDev
>PUSHBI DEVMGR.WRITEBLOCK
>PUSHEA.G BlkParams.Ptr
>SYSCALL DevIOCTL
>SYSCALL IOCTL
bcs .9
lda #'.'
>SYSCALL PutChar.A
>LDA.G BlkParams.Ptr+1
* clc
clc
adc #2
sta (pData),y
>INC.G BlkParams.Num
* >SLEEP
>SLEEP
>DEC.G BlkCnt
bne CS.RUN.WriteCat

View File

@ -55,7 +55,6 @@ L.MSG2.IP .DA MSG2.IP
L.MSG2.GW .DA MSG2.GW
L.MSG2.DNS .DA MSG2.DNS
L.MSG2.HOSTNAME .DA MSG2.HOSTNAME
L.DevName .DA DevName
.DA 0
*--------------------------------------
CS.INIT >LDYA L.LIBTCPIP
@ -79,13 +78,12 @@ CS.RUN >LDYA L.MSG0
>SYSCALL PrintF.YA
jmp CS.RUN.DONE
CS.RUN.DUMPDEV sta DevID
CS.RUN.DUMPDEV >STA.G DevID
>SYSCALL GetDevByID.A
>STYA ZPDevPtr
>STYA NetDevJmp+1
ldx #DEVMGR.STATUS
jsr NetDevJmp
>LDA.G DevID
>SYSCALL GetDevStatus.A
>STYA ZPDevStatPtr
>LDYA L.MSG0.L
@ -115,7 +113,7 @@ CS.RUN.DUMPDEV sta DevID
adc /S.DSTAT.IDS
>PUSHYA
>PUSHB DevID
>PUSHB.G DevID
>LDYA L.MSG1.DEV
>SYSCALL PrintF.YA
@ -255,8 +253,6 @@ CS.QUIT lda hLIBTCPIP
.8 clc
rts
*--------------------------------------
NetDevJmp jmp *
*--------------------------------------
CS.END
LIBTCPIP .AZ "libtcpip.o"
*--------------------------------------
@ -283,12 +279,11 @@ MSG2.GW .AZ " Gateway : %d.%d.%d.%d\r\n"
MSG2.DNS .AZ " DNS : %d.%d.%d.%d,%d.%d.%d.%d\r\n"
MSG2.HOSTNAME .AZ " Hostname : %S.%S\r\n"
hLIBTCPIP .BS 1
DevID .BS 1
DevName .BS 5
*--------------------------------------
.DUMMY
.OR 0
DS.START
DevID .BS 1
DS.END .ED
*--------------------------------------
MAN

View File

@ -117,7 +117,7 @@ SYS.Rename .EQ $42
SYS.GetDevByID.A .EQ $48
SYS.GetDevByName.YA .EQ $4A
SYS.GetDevStatus.A .EQ $4C
SYS.DevIOCTL .EQ $4E
SYS.IOCTL .EQ $4E
* .EQ $50
SYS.SScanF .EQ $52

View File

@ -331,11 +331,7 @@ D2TrkWNIB >PULLB DrvSlt
ldy #TrkWriter.Size
*.7 lda TrkWriter,y
* sta UsrBuf256,y
* dey
* bne .7
* jmp UsrBuf256
clc

View File

@ -35,8 +35,6 @@ L.MSG.USAGE .DA MSG.USAGE
L.MSG.TELNETOPT .DA MSG.TELNETOPT
L.MSG.GREETINGS .DA MSG.GREETINGS
L.ENV.TERM .DA ENV.TERM
L.HEX .DA HEX
L.HEX2 .DA HEX2
.DA 0 End Of Reloc Table
*--------------------------------------
CS.INIT ldy #S.PS.ARGC
@ -57,6 +55,8 @@ CS.INIT ldy #S.PS.ARGC
ldy #S.PS.hStdErr
sta (pPs),y
>STA.G hNode
lda #2
>SYSCALL GetArg.A
bcs .9
@ -85,9 +85,7 @@ CS.RUN >SLEEP
>SYSCALL GetChar
bcs CS.RUN
.11
* jsr PRINTA2
>SLEEP
.11 >SLEEP
>SYSCALL GetChar
bcc .11
@ -104,18 +102,12 @@ CS.RUN >SLEEP
cpy #MSG.TELNETOPT.LEN
bne .1
* >LDYA L.MSG.TELNETOPT
* >SYSCALL PrintF.YA
* bcs *
CS.RUN.LOOP
.1 >SLEEP
>SYSCALL GetChar
bcs .4
* jsr PRINTA
cmp #IAC
beq CS.RUN.IACMODE
@ -143,22 +135,19 @@ CS.RUN.IACMODE >SLEEP Wait for IAC VERB (or SB)
bcs CS.RUN.IACMODE
>STA.G IAC.VERB
* jsr PRINTA
.1 >SLEEP Wait for IAC OPT
>SYSCALL GetChar
bcs .1
>STA.G IAC.OPT
* jsr PRINTA
>LDA.G IAC.VERB
cmp #SB
beq CS.RUN.IACSB
*--------------------------------------
CS.RUN.IACVERB
* lda #'.'
* >SYSCALL PutChar.A
jmp CS.RUN.LOOP
*--------------------------------------
CS.RUN.IACSB
@ -168,8 +157,6 @@ CS.RUN.IACSB
>STA.G IAC.SB
* jsr PRINTA
lda #0
sta (pData) reset IAC.SB.DATA
@ -181,7 +168,6 @@ CS.RUN.IACSB
beq .4 end of DATA, go wait SE
pha
* jsr PRINTA
ldy #IAC.SB.DATA-1
@ -215,10 +201,7 @@ CS.RUN.IACSB
>PUSHW L.ENV.TERM
>SYSCALL SetEnv
.8
* lda #':'
* >SYSCALL PutChar.A
jmp CS.RUN.LOOP
.8 jmp CS.RUN.LOOP
*--------------------------------------
CS.DOEVENT lda (pEvent)
bpl .9 is it a TIMER event?
@ -233,15 +216,21 @@ CS.DOEVENT lda (pEvent)
.9 sec do not discard TIMER event
rts
*--------------------------------------
CS.QUIT ldy #hBinName
CS.QUIT >LDA.G hBinName
lda (pData),y
beq .1
>SYSCALL FreeMem.A
.1 ldx #DEVMGR.CLOSE
* jsr pDevJmp
.1 >LDA.G hNode
beq .8
clc
>PUSHA
>PUSHBI DEVMGR.CLOSE
>PUSHBI 0
>SYSCALL IOCTL
.8 clc
rts
*--------------------------------------
Init.Timeout ldy #TimeOut
@ -256,19 +245,6 @@ Wait.TimeOut sec
clc
.9 rts
*--------------------------------------
PRINTA pha
>PUSHA
>LDYA L.HEX
>SYSCALL PrintF.YA
pla
rts
*--------------------------------------
PRINTA2 pha
>PUSHA
>LDYA L.HEX2
>SYSCALL PrintF.YA
pla
rts
CS.END
MSG.USAGE .AZ "Usage : GETTY <DEV> <PROGRAM>\r\n"
MSG.TELNETOPT .DA #IAC,#WILL,#TELOPT.BINARY
@ -284,19 +260,17 @@ MSG.TELNETOPT .DA #IAC,#WILL,#TELOPT.BINARY
MSG.TELNETOPT.LEN .EQ *-MSG.TELNETOPT
MSG.GREETINGS .AZ "\r\nA2osX-GeTTY 0.9.1\r\n"
ENV.TERM .AZ "TERM"
HEX .AZ "[%h]"
HEX2 .AZ "{%h}"
* \e[12h
*--------------------------------------
.DUMMY
.OR 0
DS.START
IAC.SB.DATA .BS 64
hBinName .BS 1
TimeOut .BS 1
IAC.VERB .BS 1
IAC.OPT .BS 1
IAC.SB .BS 1
hNode .BS 1
hBinName .BS 1
TimeOut .BS 1
DS.END .ED
MAN
SAVE /A2OSX.SRC/SBIN/GETTY.S

View File

@ -1,8 +1,6 @@
PR#3
PREFIX /A2OSX.BUILD
NEW
INC 1
AUTO 6
PREFIX /A2OSX.BUILD
AUTO 4,1
.LIST OFF
.OP 65C02
.OR $2000
@ -17,6 +15,7 @@ CONN.MAX .EQ 16
*--------------------------------------
ZPIPCfgPtr .EQ ZPBIN
ZPSktPtr .EQ ZPBIN+2
ZPLinePtr .EQ ZPBIN+4
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
@ -25,9 +24,10 @@ CS.START cld
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
.DA 0
.DA CS.END-CS.START Code Length To Relocate
.DA DS.END-DS.START Data Segment to Allocate
.DA 0
.DA CS.END-CS.START CS
.DA DS.END-DS.START DS
.DA #64 SS
.DA #6 ZP
.DA 0
*--------------------------------------
* Relocation Table
@ -48,7 +48,7 @@ L.HTTP.200OK .DA HTTP.200OK
.DA 0
*--------------------------------------
CS.INIT >LDYA L.LIBTCPIP
>SYSCALL LoadLibYA
>SYSCALL LoadLib.YA
sta hLIBTCPIP
lda (pPs)
@ -72,20 +72,26 @@ CS.RUN jsr Init.Timeout
>SLEEP
jsr Wait.Timeout
bcc .1
>SYSCALL GetC
>SYSCALL GetChar
bcs .1
cmp #$03
bne .1
jmp CS.RUN.ABORT
>LDYA L.MSG.ABORT
>SYSCALL PrintF.YA
lda #0
clc
rts
.99 >LDYA L.MSG.TCPIPERR
>SYSCALL PrintF.YA
lda #K.E.SYN
sec
rts
CS.RUN.RTS rts
CS.RUN.INIT ldx #3
ldy #S.IPCFG.IP+3
.1 lda (ZPIPCfgPtr),y
sta Socket.Src.Addr,x
dey
@ -94,15 +100,23 @@ CS.RUN.INIT ldx #3
>PUSHW L.Socket
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.New
bcs .9
bcs CS.RUN.RTS
txa
ldy #hSrvSocket
sta (pData),y
>LDYAI 256
>SYSCALL GetMem.YA
bcs CS.RUN.RTS
>STYA ZPLinePtr
txa
>STA.G hLineBuf
>LDYA L.MSG.INITOK
>SYSCALL PrintF.YA
.2 >SLEEP
CS.RUN.LOOP >SLEEP
jsr CS.RUN.SERVER
bcs CS.RUN.ERR
@ -124,7 +138,7 @@ CS.RUN.INIT ldx #3
.4 sta (pData),y
bra .2
bra CS.RUN.LOOP
.9 >LDYA L.MSG.SKTERR
>SYSCALL PrintF.YA
@ -132,10 +146,6 @@ CS.RUN.INIT ldx #3
sec
rts
CS.RUN.ABORT >LDYA L.MSG.ABORT
>SYSCALL PrintF.YA
lda #0
CS.RUN.ERR sec
rts
*--------------------------------------
@ -183,13 +193,14 @@ CS.RUN.SERVER ldy #hSrvSocket
.9 rts
*--------------------------------------
CS.RUN.CLIENT sta hClntSocket
>PUSHA hSocket
>PUSHWI UsrBuf256
>PUSHW ZPLinePtr
>PUSHWI 256
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.GetS
bcs .1
>LDYAI UsrBuf256
>PUSHW ZPLinePtr
>SYSCALL PrintF.YA
>PUSHB hClntSocket
@ -222,8 +233,13 @@ CS.QUIT ldx #CONN.MAX
lda (pData),y
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.CLOSEA
lda hLIBTCPIP
>SYSCALL UnloadLibA
>LDA.G hLineBuf
beq .3
>SYSCALL FreeMem.A
.3 lda hLIBTCPIP
>SYSCALL UnloadLib.A
clc
rts
*--------------------------------------
@ -241,7 +257,7 @@ Wait.TimeOut sec
*--------------------------------------
CS.END
*--------------------------------------
LIBTCPIP >PSTR "libtcpip.o"
LIBTCPIP .AZ "libtcpip.o"
MSG.TCPWAIT .AZ "HTTPD:Waiting for TCP/IP initializing...\r\n"
MSG.INITOK .AZ "HTTPD:Init Ok, Listening.\r\n"
MSG.TCPIPERR .AZ "HTTPD:TCP/IP Not initialized properly\r\n"
@ -251,7 +267,7 @@ MSG.INCOMING .AZ "HTTPD:Incoming Connection [SKT=%h] From : %d.%d.%d.%d\r\n"
hLIBTCPIP .BS 1
hClntSocket .BS 1
*--------------------------------------
HTTP.200OK >PSTR "HTTP/1.1 200 OK\r\n"
HTTP.200OK .AZ "HTTP/1.1 200 OK\r\n"
*--------------------------------------
Socket .DA #S.SOCKET.SOCK.STREAM
.DA #S.SOCKET.SO.ACCEPTCONN
@ -266,6 +282,7 @@ Socket.Dst.Port .BS 2
.OR 0
DS.START
hSockets .BS CONN.MAX pData
hLineBuf .BS 1
SktIndex .BS 1
hSrvSocket .BS 1
TimeOut .BS 1

View File

@ -165,12 +165,16 @@ CS.RUN.Load >PUSHEA.G StatBuf
bcs .99
* sec
* lda UsrBuf256+S.STAT.SIZE
* >LDA.G StatBuf+S.STAT.SIZE
* eor #16
* bne .99
* lda UsrBuf256+S.STAT.SIZE+1
* ora UsrBuf256+S.STAT.SIZE+2
* ora UsrBuf256+S.STAT.SIZE+3
* iny
* lda (pData),y
* iny
* ora (pData),y
* iny
* ora (pData),y
* bne .99
>LDA.G StatBuf+S.STAT.P.TYPE

View File

@ -60,8 +60,12 @@ CS.RUN lda #0
.1 >SLEEP
>SYSCALL GetChar
bcs .1 no char
jsr INPUT.CHARIN
bcc .11
tax
beq .1 no char
bra .9
.11 jsr INPUT.CHARIN
jsr INPUT.LINEIN
bcc .1
@ -74,8 +78,12 @@ CS.RUN lda #0
.2 >SLEEP
>SYSCALL GetChar
bcs .2 no char
jsr INPUT.CHARIN
bcc .22
tax
beq .2 no char
bra .9
.22 jsr INPUT.CHARIN
jsr INPUT.LINEIN
bcc .2
@ -90,18 +98,18 @@ CS.RUN lda #0
>SYSCALL ExpandStr.YA
bcs .9
stx .3+1
phx
>SYSCALL ExecPS.YA
plx
php
pha
.3 lda #$ff Self Modified
txa
>SYSCALL FreeMem.A
pla
plp
rts
.8 clc
.9 rts
*--------------------------------------
CS.DOEVENT

View File

@ -1,8 +1,6 @@
PR#3
PREFIX /A2OSX.BUILD
NEW
INC 1
AUTO 6
PREFIX /A2OSX.BUILD
AUTO 4,1
.LIST OFF
.OP 65C02
.OR $2000
@ -11,9 +9,10 @@ AUTO 6
.INB /A2OSX.BUILD/INC/MACROS.I
.INB /A2OSX.BUILD/INC/A2OSX.I
.INB /A2OSX.BUILD/INC/LIBTCPIP.I
.INB /A2OSX.BUILD/INC/MLI.ERR.I
*--------------------------------------
ZPIPCfgPtr .EQ ZPBIN
ZPIPDevPtr .EQ ZPBIN+2
ZPDevStatusPtr .EQ ZPBIN+2
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
@ -97,32 +96,34 @@ CS.INIT.DEV >LDYA L.DEVNAME
>LDYA L.MSG.DEV.KO
>SYSCALL PrintF.YA
lda #$28 MLI.ERR.NODEV
lda #MLI.E.NODEV
sec
rts
.1 >STYA ZPIPDevPtr
>STYA NetDevJmp+1
stx hNetDev
stx IPCFG+S.IPCFG.HDEV
.1 txa
>STA.G hDev
sta IPCFG+S.IPCFG.HDEV
>PUSHW L.DEVNAME
>LDYA L.MSG.DEV.OK
>SYSCALL PrintF.YA
ldx #DEVMGR.OPEN
jsr NetDevJmp
>PUSHB.G hDev
>PUSHBI DEVMGR.OPEN
>PUSHWI 0
>SYSCALL IOCTL
bcs .9
ldx #DEVMGR.STATUS
jsr NetDevJmp
>LDA.G hDev
>SYSCALL GetDevStatus.A
bcs .9
>STYA ZPIPDevPtr
>STYA ZPDevStatusPtr
ldy #S.DSTAT+2 MAC
ldx #S.IPCFG.MAC
.2 lda (ZPIPDevPtr),y
.2 lda (ZPDevStatusPtr),y
sta IPCFG,x
iny
inx
@ -146,10 +147,13 @@ CS.DOEVENT lda (pEvent)
.9 sec never discard TIME event
rts
*--------------------------------------
CS.QUIT lda IPCFG+S.IPCFG.HDEV
CS.QUIT >LDA.G hDev
beq .1
ldx #DEVMGR.CLOSE
jsr NetDevJmp
>PUSHA
>PUSHBI DEVMGR.CLOSE
>PUSHWI 0
>SYSCALL IOCTL
.1 lda hLIBTCPIP
>SYSCALL UnloadLib.A
@ -174,8 +178,6 @@ A2CharAX pha
bcc .8
adc #6
.8 rts
*--------------------------------------
NetDevJmp jmp *
*--------------------------------------
.INB /A2OSX.SRC/SBIN/TCPIPD.S.CFG
*--------------------------------------
@ -206,7 +208,6 @@ CFG.Keyword.Map .DA #0 End Of Keyword table and NA Keyword
.DA #S.IPCFG.DNS1
.DA #S.IPCFG.DNS2
hLIBTCPIP .BS 1
hNetDev .BS 1
IPCFG .BS S.IPCFG
CFG.hCfgFile .BS 1
CFG.hCfgPath .BS 1
@ -220,6 +221,7 @@ UsrBuf256 .BS 256
.DUMMY
.OR 0
DS.START
hDev .BS 1
DS.END .ED
*--------------------------------------
MAN

View File

@ -76,17 +76,18 @@ K.GetDevDNF lda #MLI.E.NODEV CS from cpx/beq
* ## OUT:
* Y,A = S.DSTAT
*\--------------------------------------
K.DevClose.A ldx #DEVMGR.CLOSE
.HS 2C BIT ABS
K.GetDevStatus.A
ldx #DEVMGR.STATUS
jsr K.GetDevByID.A
bcs .9
bcs K.IOCTL.9
>STYA pDev
ldx #DEVMGR.STATUS
jmp (pDev)
.9 rts
*/--------------------------------------
* # K.DevIOCTL
* # K.IOCTL
* ## IN:
* PUSHB = DevID
* PUSHB = Operation
@ -94,7 +95,7 @@ K.GetDevStatus.A
* ## OUT:
* Y,A = ...
*\--------------------------------------
K.DevIOCTL >PULLB .1+1
K.IOCTL >PULLB .1+1
>PULLB .2+1
>PULLA
@ -102,7 +103,7 @@ K.DevIOCTL >PULLB .1+1
>PULLA
jsr K.GetDevByID.A
bcs .9
bcs K.IOCTL.9
>STYA pDev
@ -111,7 +112,7 @@ K.DevIOCTL >PULLB .1+1
jmp (pDev)
.9 rts
K.IOCTL.9 rts
*--------------------------------------
MAN
SAVE /A2OSX.SRC/SYS/KERNEL.S.DEV

View File

@ -22,6 +22,10 @@ K.OpenDir.YA jsr PFT.CheckPathYA
>STYA ZPPtr1
stx .8+1
ldy #S.NODE.T Done by GetMem0
lda #S.NODE.T.DIR
sta (ZPPtr1),y
ldy #1
lda (ZPPtr2),y One char ?
beq .8 No, Go open dir....
@ -49,7 +53,7 @@ K.OpenDir.YA jsr PFT.CheckPathYA
.98 pha save MLI error
lda .8+1
jsr K.CloseDir.A.1
jsr K.CloseDir.A
pla get back MLI error
sec
.99 rts
@ -599,7 +603,6 @@ K.ReadDir.A.ConvertTime
* none, always succeed.
*\-------------------------------------
K.CloseDir.A .EQ K.FClose.A
K.CloseDir.A.1 .EQ K.FClose.A.1
*--------------------------------------
MAN
SAVE /A2OSX.SRC/SYS/KERNEL.S.DIRENT

View File

@ -49,7 +49,7 @@ K.SYSCALL.JMP .DA 0 $00
.DA K.GetDevByID.A
.DA K.GetDevByName.YA
.DA K.GetDevStatus.A
.DA K.DevIOCTL
.DA K.IOCTL
.DA 0 $50
.DA K.SScanF

View File

@ -263,6 +263,10 @@ K.FOpen.10 >LDYAI S.NODE.REG
>STYA ZPPtr1
stx .8+1
* ldy #S.NODE.T Done by GetMem0
* lda #S.NODE.T.REG
* sta (ZPPtr1),y
jsr STDIO.SetIOBUF
bcs .98
@ -297,7 +301,7 @@ K.FOpen.10 >LDYAI S.NODE.REG
.20 lda K.FOpen.MODE
and #SYS.FOpen.T Text Mode ?
beq .30
beq .8
lda #$FF
sta K.MLI.PARAMS+2
@ -305,16 +309,13 @@ K.FOpen.10 >LDYAI S.NODE.REG
sta K.MLI.PARAMS+3
>MLICALL MLINEWLINE
.30 ldy #S.NODE.T
lda #S.NODE.T.REG
sta (ZPPtr1),y
.8 lda #$ff Self Modified
clc
rts CC
.98 pha save MLI error
lda .8+1
jsr K.FClose.A.1
jsr K.FClose.A
pla get back MLI error
sec
rts
@ -330,13 +331,23 @@ K.FOpen.AUXTYPE .BS 2
* ## Out :
*\--------------------------------------
K.FClose.A jsr PFT.CheckNodeA
pha
sta K.FClose.A.8+1
jsr K.GetMemPtr.A
>STYA ZPPtr1
pla
K.FClose.A.1 sta K.FClose.A.2+1
ldy #S.NODE.REG.REF
ldy #S.NODE.T
lda (ZPPtr1),y
asl
tax
jmp (.1,x)
.1 .DA K.FClose.A.REG
.DA K.FClose.A.DIR
.DA K.FClose.A.CDEV
K.FClose.A.REG
K.FClose.A.DIR ldy #S.NODE.REG.REF
lda (ZPPtr1),y
beq .1
sta K.MLI.PARAMS+1
@ -344,11 +355,19 @@ K.FClose.A.1 sta K.FClose.A.2+1
.1 ldy #S.NODE.REG.IOBUF
lda (ZPPtr1),y
beq K.FClose.A.2
jsr K.FreeMem.A
beq K.FClose.A.8
K.FClose.A.2 lda #$ff Self Modified
jsr K.FreeMem.A
bra K.FClose.A.8
K.FClose.A.CDEV ldy #S.NODE.DEV.ID
lda (ZPPtr1),y
jsr K.DevClose.A
bcs K.FClose.A.9
K.FClose.A.8 lda #$ff Self Modified
jmp K.FreeMem.A
K.FClose.A.9 rts
*/--------------------------------------
* # FRead.A
* Read ONE byte (A) from file (Y)