mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-12 01:30:36 +00:00
Kernel 0.92+
This commit is contained in:
parent
ff51059a11
commit
b00d226b00
Binary file not shown.
@ -158,8 +158,9 @@ CS.RUN.OPENSKT >PUSHBI 0 no protocol
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.Connect
|
||||
bcs .9
|
||||
|
||||
>PUSHBI 0
|
||||
>LDYA L.MSG.SKTOK
|
||||
>SYSCALL puts
|
||||
>SYSCALL printf
|
||||
|
||||
>LDYAI BUFSIZE
|
||||
>SYSCALL getmem
|
||||
@ -169,6 +170,7 @@ CS.RUN.OPENSKT >PUSHBI 0 no protocol
|
||||
>STA.G hBuf
|
||||
|
||||
CS.RUN.LOOP >SLEEP
|
||||
|
||||
>PUSHWI BUFSIZE
|
||||
>PUSHW ZPBufPtr
|
||||
>LDA.G hSocket
|
||||
@ -186,17 +188,20 @@ CS.RUN.LOOP >SLEEP
|
||||
>SYSCALL fwrite
|
||||
bcs .11
|
||||
|
||||
.2 >PUSHWI BUFSIZE
|
||||
>PUSHW ZPBufPtr
|
||||
ldy #S.PS.hStdIn
|
||||
.2 ldy #S.PS.hStdIn
|
||||
lda (pPs),y
|
||||
|
||||
>SYSCALL fread
|
||||
bcc .3
|
||||
>SYSCALL feof
|
||||
bcs CS.RUN.IOERR
|
||||
tay
|
||||
beq CS.RUN.LOOP no char from STDIN
|
||||
|
||||
.11 jmp CS.RUN.IOERR
|
||||
>PUSHWI BUFSIZE
|
||||
>PUSHW ZPBufPtr
|
||||
ldy #S.PS.hStdIn
|
||||
lda (pPs),y
|
||||
>SYSCALL fread
|
||||
.11 bcs CS.RUN.IOERR
|
||||
|
||||
.3 >STYA ZPBufLen
|
||||
lda (ZPBufPtr)
|
||||
@ -213,8 +218,8 @@ CS.RUN.LOOP >SLEEP
|
||||
tay
|
||||
bne CS.RUN.SKTERR
|
||||
|
||||
* >SLEEP
|
||||
* bra .4
|
||||
>SLEEP
|
||||
bra .4
|
||||
|
||||
.8 jmp CS.RUN.LOOP
|
||||
|
||||
@ -242,7 +247,7 @@ CS.RUN.IOERR pha
|
||||
*--------------------------------------
|
||||
CS.RUN.USER >LDYA L.MSG.USER
|
||||
>SYSCALL puts
|
||||
lda #3
|
||||
lda #0
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -294,7 +299,7 @@ MSG.USAGE .AZ "Usage : TELNET <ip|host> [port]"
|
||||
MSG.UNKNOWN .AZ "%s: Unknown host\r\n"
|
||||
MSG.HOSTOK .AZ "Connecting to %d.%d.%d.%d:%D (%s)..."
|
||||
MSG.SKTKO .AZ "Failed to Open Socket."
|
||||
MSG.SKTOK .AZ "Connected, Exit key is Ctrl-T"
|
||||
MSG.SKTOK .AZ "Connected\r\n(Exit key is Ctrl-T)\r\n"
|
||||
MSG.SKTERR .AZ "Socket Error : $%h\r\n"
|
||||
MSG.IOERR .AZ "I/O Error : $%h\r\n"
|
||||
MSG.USER .AZ "User interrupt."
|
||||
|
@ -269,7 +269,11 @@ STATUS.9 lda #MLI.E.BADCTL
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
OPEN jsr CLOSE
|
||||
OPEN lda #S.DIB.S.OPENED
|
||||
bit DIB+S.DIB.S
|
||||
bne .9
|
||||
|
||||
jsr CLOSE
|
||||
|
||||
* ldx DEVSLOTx0 Done by CLOSE
|
||||
|
||||
@ -314,6 +318,10 @@ OPEN jsr CLOSE
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 lda #MLI.E.OPEN
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CLOSE ldx DEVSLOTx0
|
||||
|
||||
|
10
ETC/INIT
10
ETC/INIT
@ -1,17 +1,17 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
#!/BIN/SHELL
|
||||
#!/BIN/SH
|
||||
ECHO *** A2osX INIT Script ***
|
||||
SET PS1 = '$PWD'
|
||||
SET PATH = ${PATH}:${ROOT}BIN/DEV/
|
||||
SET DRV = ${DRV}:${ROOT}DRV/GUI/
|
||||
SET LIB = ${LIB}:${ROOT}LIB/GUI/
|
||||
# Main Screens
|
||||
GETTY /DEV/TTY1 ${ROOT}SBIN/LOGIN &
|
||||
GETTY /DEV/TTY2 ${ROOT}SBIN/LOGIN &
|
||||
GETTY /DEV/TTY3 ${ROOT}SBIN/LOGIN &
|
||||
GETTY /DEV/TTY4 ${ROOT}SBIN/LOGIN &
|
||||
NOHUP GETTY /DEV/TTY1 ${ROOT}SBIN/LOGIN &
|
||||
NOHUP GETTY /DEV/TTY2 ${ROOT}SBIN/LOGIN &
|
||||
NOHUP GETTY /DEV/TTY3 ${ROOT}SBIN/LOGIN &
|
||||
NOHUP GETTY /DEV/TTY4 ${ROOT}SBIN/LOGIN &
|
||||
# Serial Login
|
||||
#INSDRV SSC.DRV 9600,N,8,1,X
|
||||
#INSDRV SSC.I.DRV 9600,N,8,1,X
|
||||
|
@ -46,6 +46,7 @@ CS.START cld
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.DEVNAME .DA DEVNAME
|
||||
L.MSG.RUNNING .DA MSG.RUNNING
|
||||
L.MSG.DEV.OK .DA MSG.DEV.OK
|
||||
L.MSG.DEV.KO .DA MSG.DEV.KO
|
||||
L.MSG.LIB .DA MSG.LIB
|
||||
@ -54,7 +55,10 @@ L.DCB.NIC .DA DCB.NIC
|
||||
L.ETCNETWORK .DA ETCNETWORK
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT jsr CS.INIT.DEV
|
||||
CS.INIT lda DevID
|
||||
bne .99
|
||||
|
||||
jsr CS.INIT.DEV
|
||||
bcs .9
|
||||
|
||||
jsr CS.INIT.LIBS
|
||||
@ -63,6 +67,13 @@ CS.INIT jsr CS.INIT.DEV
|
||||
jsr CS.INIT.CONF
|
||||
|
||||
.9 rts
|
||||
|
||||
.99 >LDYA L.MSG.RUNNING
|
||||
>SYSCALL puts
|
||||
|
||||
lda #0
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.INIT.DEV >PUSHBI 0
|
||||
>LDYA L.DEVNAME
|
||||
@ -257,17 +268,22 @@ CS.QUIT ldx #0
|
||||
inx
|
||||
bra .1
|
||||
|
||||
.7 >PUSHWI 0
|
||||
.7 lda DevID
|
||||
beq .8
|
||||
|
||||
pha
|
||||
>PUSHWI 0
|
||||
>PUSHBI IOCTL.CLOSE
|
||||
lda DevID
|
||||
pla
|
||||
>SYSCALL IOCTL
|
||||
|
||||
clc
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
DEVNAME .AZ "/DEV/ETH1"
|
||||
MSG.RUNNING .AZ "NETWORKD:Already loaded, exiting."
|
||||
MSG.DEV.KO .AZ "NETWORKD:No Device Found, exiting."
|
||||
MSG.DEV.OK .AZ "NETWORKD:Bound To Device : %s\r\n"
|
||||
MSG.LIB .AZ "NETWORKD:Loading %s ...\r\n"
|
||||
|
@ -405,7 +405,7 @@ IO.READ.PIPE ldy #S.FD.PIPE.S
|
||||
lda (pFD),y
|
||||
bne .11
|
||||
jmp IO.READ.PIPE.99 Remote PS closed the Pipe
|
||||
|
||||
|
||||
.11 ldy #S.FD.PIPE.Used+1
|
||||
|
||||
lda (pFD),y
|
||||
@ -432,10 +432,12 @@ IO.READ.PIPE ldy #S.FD.PIPE.S
|
||||
jsr K.GetMemPtr
|
||||
>STYA .2+1
|
||||
|
||||
* >DEBUG
|
||||
|
||||
ldy #S.FD.PIPE.Head
|
||||
lda (pFD),y
|
||||
sta .4+1
|
||||
|
||||
|
||||
dey S.FD.PIPE.Tail
|
||||
lda (pFD),y
|
||||
tay
|
||||
@ -445,23 +447,23 @@ IO.READ.PIPE ldy #S.FD.PIPE.S
|
||||
.1 inc IO.Counter
|
||||
bne .2
|
||||
inc IO.Counter+1
|
||||
beq .8
|
||||
beq .5
|
||||
|
||||
.2 lda $ffff,y SELF MODIFIED
|
||||
.3 sta $ffff,x SELF MODIFIED
|
||||
inx
|
||||
beq .5
|
||||
beq .8 moved $100 bytes
|
||||
|
||||
iny
|
||||
.4 cpy #$ff SELF MODIFIED
|
||||
bne .1
|
||||
|
||||
.5 sec moved $100 bytes
|
||||
.HS 90 BCC
|
||||
|
||||
.5 clc
|
||||
.HS B0 BCS
|
||||
|
||||
.8 clc
|
||||
.8 sec
|
||||
lda #0
|
||||
ror
|
||||
rol
|
||||
sta IO.Counter+1
|
||||
stx IO.Counter
|
||||
|
||||
@ -550,6 +552,8 @@ IO.WRITE.PIPE ldy #S.FD.PIPE.S
|
||||
lda (pFD),y
|
||||
jsr K.GetMemPtr
|
||||
>STYA .3+1
|
||||
|
||||
* >DEBUG
|
||||
|
||||
ldy #S.FD.PIPE.Head
|
||||
lda (pFD),y
|
||||
@ -680,7 +684,7 @@ IO.EOF.SSOCK
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
IO.EOF.PIPE
|
||||
IO.EOF.PIPE >DEBUG
|
||||
|
||||
lda #MLI.E.IO
|
||||
sec
|
||||
|
@ -298,10 +298,6 @@ K.Pipe >LDYAI K.PIPE.SIZE
|
||||
lda #S.FD.T.PIPE
|
||||
sta (pFD)
|
||||
|
||||
ldy #S.FD.PIPE.S
|
||||
lda #S.FD.PIPE.S.Opened
|
||||
sta (pFD),y
|
||||
|
||||
ldy #S.FD.PIPE.Free
|
||||
lda #K.PIPE.SIZE
|
||||
sta (pFD),y
|
||||
@ -309,6 +305,10 @@ K.Pipe >LDYAI K.PIPE.SIZE
|
||||
lda /K.PIPE.SIZE
|
||||
sta (pFD),y
|
||||
|
||||
ldy #S.FD.PIPE.S
|
||||
lda #S.FD.PIPE.S.Opened
|
||||
sta (pFD),y
|
||||
|
||||
iny S.FD.PIPE.hMem
|
||||
.1 lda #$ff Self Modified
|
||||
sta (pFD),y
|
||||
|
@ -64,6 +64,13 @@ DRV.TERM.STATUS jsr DRV.TERM.GetIOCTLBufCntDCB
|
||||
.3 cmp #S.IOCTL.STATCODE.GETRC
|
||||
bne .9
|
||||
|
||||
ldy #S.DCB.TTY.STATUS
|
||||
lda (ZPDCBPtr),y
|
||||
and #S.DIB.S.OPENED
|
||||
beq .8
|
||||
|
||||
jsr DRV.TERM.CURBLNK
|
||||
|
||||
ldy #S.DCB.TTY.OUTTAIL
|
||||
lda (ZPDCBPtr),y
|
||||
iny
|
||||
@ -187,17 +194,11 @@ DRV.TERM.READ jsr DRV.TERM.GetIOCTLBufCntDCB
|
||||
|
||||
bit bActive is screen active?
|
||||
bpl .6 no....go check flush...
|
||||
|
||||
lda A2osX.TIMER16
|
||||
and #CURSOR.BLINK.SPEED
|
||||
ldy #S.DCB.TTY.bCURON
|
||||
eor (ZPDCBPtr),y
|
||||
beq .1
|
||||
|
||||
|
||||
jsr DRV.TERM.CURBLNK
|
||||
|
||||
.1 lda OPENAPPLE
|
||||
bpl .11
|
||||
lda OPENAPPLE
|
||||
bpl .1
|
||||
|
||||
lda KBD
|
||||
bmi .6 Open apple key, not for us...
|
||||
@ -205,7 +206,7 @@ DRV.TERM.READ jsr DRV.TERM.GetIOCTLBufCntDCB
|
||||
jsr DRV.TERM.Title.ON
|
||||
bra .6
|
||||
|
||||
.11 jsr DRV.TERM.Title.OFF
|
||||
.1 jsr DRV.TERM.Title.OFF
|
||||
|
||||
lda KBD
|
||||
bpl .6
|
||||
@ -981,14 +982,26 @@ SCROLL.DN ldy #S.DCB.TTY.SCROLLBOT
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRV.TERM.CUROFF ldy #S.DCB.TTY.bCURON
|
||||
lda (ZPDCBPtr),y
|
||||
beq DRV.TERM.CURBLNK.RTS
|
||||
DRV.TERM.CURBLNK
|
||||
bit bActive
|
||||
bpl DRV.TERM.CURBLNK.RTS do not Light if screen is not active
|
||||
bpl .9
|
||||
|
||||
lda A2osX.TIMER16
|
||||
and #CURSOR.BLINK.SPEED
|
||||
ldy #S.DCB.TTY.bCURON
|
||||
eor (ZPDCBPtr),y
|
||||
bne DRV.TERM.CURBLNK.1
|
||||
|
||||
.9 rts
|
||||
|
||||
DRV.TERM.CUROFF bit bActive
|
||||
bpl DRV.TERM.CURBLNK.RTS
|
||||
|
||||
ldy #S.DCB.TTY.bCURON
|
||||
lda (ZPDCBPtr),y
|
||||
beq DRV.TERM.CURBLNK.RTS
|
||||
|
||||
DRV.TERM.CURBLNK.1
|
||||
lda (ZPDCBPtr),y
|
||||
bne DRV.TERM.CURBLNK.OFF
|
||||
|
||||
@ -1244,9 +1257,6 @@ RESET.VALUES .DA #0 S.DCB.TTY.MODE
|
||||
.DA #S.DCB.TTY.OUTBUFFER S.DCB.TTY.OUTHEAD
|
||||
.DA #S.DCB.TTY.INBUFFER S.DCB.TTY.INBUFFER
|
||||
*--------------------------------------
|
||||
SCR.BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0
|
||||
SCR.BASEH .HS 04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07
|
||||
*--------------------------------------
|
||||
CtrlChars .HS 05080A0C0D151B
|
||||
CtrlChars.Cnt .EQ *-CtrlChars
|
||||
*--------------------------------------
|
||||
|
@ -275,6 +275,9 @@ BUF.BASEH .DA /0
|
||||
.DA /1760
|
||||
.DA /1840
|
||||
*--------------------------------------
|
||||
SCR.BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0
|
||||
SCR.BASEH .HS 04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/SYS/KERNEL.S.TERMLC
|
||||
LOAD USR/SRC/SYS/KERNEL.S
|
||||
|
Loading…
x
Reference in New Issue
Block a user