mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-01 14:50:10 +00:00
Kernel 0.92+
This commit is contained in:
parent
d70b2d90df
commit
f637ced1e4
@ -124,7 +124,7 @@ CS.QUIT clc
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
INPUT.RESET >STA.G INPUT.PassChar
|
INPUT.RESET >STA.G INPUT.PassChar
|
||||||
|
|
||||||
>STZ.G INPUT.BufPtr
|
>STZ.G INPUT.BUF
|
||||||
>STA.G INPUT.Status
|
>STA.G INPUT.Status
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -133,12 +133,12 @@ INPUT.CHARIN tax save char...
|
|||||||
>LDA.G INPUT.Status
|
>LDA.G INPUT.Status
|
||||||
bmi .9
|
bmi .9
|
||||||
|
|
||||||
lda #INPUT.BufPtr
|
lda #INPUT.BUF
|
||||||
clc
|
clc
|
||||||
adc pData
|
adc pData
|
||||||
sta ZPPTR1
|
sta ZPPTR1
|
||||||
lda pData+1
|
lda pData+1
|
||||||
adc /INPUT.BufPtr
|
adc /INPUT.BUF
|
||||||
sta ZPPTR1+1
|
sta ZPPTR1+1
|
||||||
|
|
||||||
cpx #$20 Control Char?
|
cpx #$20 Control Char?
|
||||||
|
@ -360,17 +360,27 @@ IO.READ.CDEV ldx #IOCTL.READ
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.WRITE.CDEV ldx #IOCTL.WRITE
|
IO.WRITE.CDEV ldx #IOCTL.WRITE
|
||||||
|
|
||||||
>PULLW K.S.IOCTL+S.IOCTL.BUFPTR
|
ldy #3
|
||||||
>PULLW K.S.IOCTL+S.IOCTL.BYTECNT
|
|
||||||
|
.1 lda (pStack),y
|
||||||
|
sta K.S.IOCTL+S.IOCTL.BUFPTR,y
|
||||||
|
dey
|
||||||
|
bpl .1
|
||||||
|
|
||||||
jsr K.IOCTL.GetPDRV
|
jsr K.IOCTL.GetPDRV
|
||||||
|
|
||||||
>LDYAI K.S.IOCTL
|
>LDYAI K.S.IOCTL
|
||||||
|
|
||||||
.1 jsr K.IOCTL.pDrvJmp
|
jsr K.IOCTL.pDrvJmp
|
||||||
bcs .9
|
bcc .8
|
||||||
>LDYA K.S.IOCTL+S.IOCTL.BYTECNT
|
tay CS, A=0 ?
|
||||||
.9 rts
|
bne .9 no, I/O error
|
||||||
|
|
||||||
|
rts BLOCKING I/O
|
||||||
|
|
||||||
|
.8 >LDYA K.S.IOCTL+S.IOCTL.BYTECNT
|
||||||
|
|
||||||
|
.9 >RET 4
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.WRITE.SSOCK ldy #S.FD.SSOCK.WRITE
|
IO.WRITE.SSOCK ldy #S.FD.SSOCK.WRITE
|
||||||
.HS 2C BIT ABS
|
.HS 2C BIT ABS
|
||||||
|
@ -19,15 +19,22 @@ HEXBUF.Signed .EQ ARG.SIGN
|
|||||||
* `int putchar ( int character );`
|
* `int putchar ( int character );`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* `lda caracter`
|
* `lda character`
|
||||||
* `>SYSCALL putchar`
|
* `>SYSCALL putchar`
|
||||||
* ## RETURN VALUE
|
* ## RETURN VALUE
|
||||||
* CC = success
|
* CC = success
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.PutChar >PUSHA
|
K.PutChar >PUSHA character
|
||||||
|
|
||||||
ldy #S.PS.hStdOut
|
ldy #S.PS.hStdOut
|
||||||
lda (pPs),y
|
lda (pPs),y
|
||||||
|
jsr K.FPutC
|
||||||
|
bcc .8
|
||||||
|
|
||||||
|
tay
|
||||||
|
beq K.FPutC.RET1
|
||||||
|
|
||||||
|
.8 rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # fputc (BLOCKING)
|
* # fputc (BLOCKING)
|
||||||
* Print A (char) to hFILE
|
* Print A (char) to hFILE
|
||||||
@ -41,19 +48,27 @@ K.PutChar >PUSHA
|
|||||||
* ## RETURN VALUE
|
* ## RETURN VALUE
|
||||||
* CC = success
|
* CC = success
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
|
* (pStack)+0 character
|
||||||
|
*--------------------------------------
|
||||||
K.FPutC jsr PFT.CheckNodeA
|
K.FPutC jsr PFT.CheckNodeA
|
||||||
bcs K.FPutC.9
|
bcs K.FPutC.RET1
|
||||||
|
|
||||||
>PULLB K.IOBuf
|
lda (pStack) character
|
||||||
|
|
||||||
ldy #1
|
ldy #1
|
||||||
|
|
||||||
K.FPutC.Y lda #0
|
K.FPutC.Y lda #0
|
||||||
|
|
||||||
>PUSHYA
|
>PUSHYA count
|
||||||
>PUSHWI K.IOBuf
|
>PUSHWI K.IOBuf buf
|
||||||
jmp IO.Write.I
|
jsr IO.Write.I
|
||||||
K.FPutC.9 >RET 1
|
bcc K.FPutC.RET1
|
||||||
|
tay
|
||||||
|
bne K.FPutC.RET1
|
||||||
|
|
||||||
|
>RET 4 pop buf,count but keep char
|
||||||
|
|
||||||
|
K.FPutC.RET1 >RET 1 pop char
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # puts (BLOCKING)
|
* # puts (BLOCKING)
|
||||||
* Write Str to StdOut, appends '\r\n'
|
* Write Str to StdOut, appends '\r\n'
|
||||||
@ -794,15 +809,20 @@ K.GetChar ldy #S.PS.hStdIn
|
|||||||
* A = char
|
* A = char
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.GetC jsr PFT.CheckNodeA
|
K.GetC jsr PFT.CheckNodeA
|
||||||
bcs K.GetC.9
|
bcs K.GetC.RTS
|
||||||
|
|
||||||
K.GetC.I >PUSHWI 1
|
K.GetC.I >PUSHWI 1
|
||||||
>PUSHWI K.IOBuf
|
>PUSHWI K.IOBuf
|
||||||
|
|
||||||
jsr IO.READ.I
|
jsr IO.READ.I
|
||||||
bcs K.GetC.9
|
bcc .8
|
||||||
lda K.IOBuf
|
tay
|
||||||
K.GetC.9 rts
|
bne K.GetC.RTS
|
||||||
|
|
||||||
|
>RET 4 BLOCKING I/O
|
||||||
|
|
||||||
|
.8 lda K.IOBuf
|
||||||
|
K.GetC.RTS rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # SScanF
|
* # SScanF
|
||||||
* Read formatted data from string
|
* Read formatted data from string
|
||||||
|
Loading…
Reference in New Issue
Block a user