Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-07-20 17:19:32 +02:00
parent 42bb2759e0
commit be74645b12
6 changed files with 110 additions and 31 deletions

View File

@ -126,9 +126,9 @@ Create a hDEV
## ASM
`>LDYA dirpath`
`>SYSCALL opendir`
`>SYSCALL opendir`
## RETURN VALUE
## RETURN VALUE
CC : success
A = hDIR
CS : error
@ -144,7 +144,7 @@ Create a hDEV
`lda hDIR`
`>SYSCALL readdir`
## RETURN VALUE
## RETURN VALUE
CC : success
X = hDIRENT
Y,A = PTR to S.DIRENT
@ -162,7 +162,7 @@ Create a hDEV
`>SYSCALL closedir`
## RETURN VALUE
none, always succeed.
none, always succeed.
# SetEnv
Change or add an environment variable
@ -559,6 +559,18 @@ CS : not found
## RETURN VALUE
# OpenSession
## C
`short int hSID opensession(const char *name, const char *passwd);`
## ASM
`>PUSHW name`
`>PUSHW passwd`
`>SYSCALL OpenSession`
## RETURN VALUE
# GetPWName
## C
@ -586,7 +598,7 @@ CS : not found
# PutPW
## C
`int putpw( S.PW* passwd );`
`int putpw(S.PW* passwd);`
## ASM
`>PUSHW passwd`
@ -605,18 +617,6 @@ CS : not found
## RETURN VALUE
# OpenSession
## C
`short int hSID opensession(const char *name, const char *passwd);`
## ASM
`>PUSHW name`
`>PUSHW passwd`
`>SYSCALL OpenSession`
## RETURN VALUE
# CloseSession
## C
@ -903,6 +903,21 @@ Get char from Node
`lda stream`
`>SYSCALL getc`
## RETURN VALUE
CC = success
A = char
# ungetc
push byte back into input stream
## C
`int ungetc(short int c, hFILE stream);
## ASM
`>PUSHB c`
`>PUSHB stream`
`>SYSCALL ungetc`
## RETURN VALUE
CC = success
A = char

View File

@ -3,9 +3,18 @@
## Copyright
Copyright 2015 - 2020, Remy Gibert and the A2osX contributors.
# D2TrkRead16s
Write a track (16 sectors)
PUSHB = DSSS0000
PUSHB = TrackNum * 4 : 0->136+
PUSHW = Ptr to 16*256 buffer
## RETURN VALUE
CC : success, A = VolNum
CS : A = Error
# D2TrkWrite16s
Write a track (16 sectors)
**In:**
PUSHB = DSSS0000
PUSHB = TrackNum * 4 : 0->136+
PUSHW = Ptr to 16*256 buffer
@ -13,7 +22,6 @@ Write a track (16 sectors)
## RETURN VALUE
CC : success
CS : A = Error
A=0, currently starting/seeking...
# D2TrkWriteNIB
Write a track (NIBBLE)

Binary file not shown.

View File

@ -7,6 +7,7 @@ NEW
*--------------------------------------
.INB inc/macros.i
.INB inc/a2osx.i
.INB inc/kernel.i
.INB inc/mli.i
.INB inc/mli.e.i
*--------------------------------------
@ -25,6 +26,10 @@ ZPFileName .BS 2
ZPFileStat .BS 2
ZPPW .BS 2
bToDev .BS 1
hLineBuf .BS 1
ZPLineBuf .BS 2
ZS.END
.ED
*--------------------------------------
@ -78,10 +83,12 @@ CS.RUN
.1 >INC.G ArgCount
>SYSCALL ArgV
bcs .6
>STYA ZPPtr1
lda (ZPPtr1)
cmp #'-'
bne .4
ldy #1
lda (ZPPtr1),y
@ -124,6 +131,25 @@ CS.RUN
>STYA ZPPW
txa
>STA.G hPW
>LDYAI 256
>SYSCALL GetMem
bcs .9
>STYA ZPLineBuf
stx hLineBuf
ldy #S.PS.hStdOut
lda (pPS),y
tax
lda OF.Table.hFD-1,x
>SYSCALL GetMemPtr
>STYA ZPPtr1
lda (ZPPtr1) S.FD.T
beq CS.RUN.LOOP S.FD.T.REG
cmp #S.FD.T.PIPE
beq CS.RUN.LOOP
dec bToDev
*--------------------------------------
CS.RUN.LOOP ldy #S.PS.hStdIn
lda (pPS),y
@ -222,7 +248,9 @@ CS.RUN.PRINT.REG
bcs .9
jmp CS.RUN.UpdateColCnt
*--------------------------------------
.1 >PUSHW L.MSG.REGEXT
.1
* >PUSHW ZPLineBuf
>PUSHW L.MSG.REGEXT
jsr Mod2CSTR (2)
@ -255,7 +283,10 @@ CS.RUN.PRINT.REG
>PUSHBI 20
>SYSCALL PrintF
bcs .9
jmp CS.RUN.NewLine.1
.9 rts
*--------------------------------------
CS.RUN.PRINT.DIR
@ -318,7 +349,9 @@ CS.RUN.PRINT.DIR
>PUSHW ZPFileName
>PUSHBI 12
>SYSCALL PrintF
bcs .90
jsr CS.RUN.NewLine.1
bcs .90
.5 >LDA.G bRecurse
@ -413,6 +446,9 @@ CS.RUN.PRINT.BDEV
>SYSCALL PrintF
bcs .90
jsr CS.RUN.NewLine.1
bcs .90
ldy #bRecurse
lda (pData),y
@ -592,10 +628,18 @@ CS.RUN.UpdateColCnt
CS.RUN.NewLine >LDA.G ColCount
beq CS.RUN.NewLine.8
CS.RUN.NewLine.1
bit bToDev
bpl CS.RUN.NewLine.CR
>PUSHW L.MSG.CRLF
>PUSHBI 0
>SYSCALL PrintF
rts
CS.RUN.NewLine.CR
lda #C.CR
>SYSCALL putchar
rts
CS.RUN.NewLine.8
clc
rts
@ -622,6 +666,11 @@ CS.QUIT jsr LeaveSubDir
>SYSCALL FreeMem
.3 >LDA.G hPW
beq .4
>SYSCALL FreeMem
.4 lda hLineBuf
beq .8
>SYSCALL FreeMem
@ -700,7 +749,7 @@ Mod2CSTR ldy #S.STAT.MODE+1
>PUSHEA.G MOD
rts
*--------------------------------------
.INB USR/SRC/BIN/X.FILEENUM.S
.INB usr/src/bin/x.fileenum.s
*--------------------------------------
CS.END
*--------------------------------------
@ -708,11 +757,11 @@ OptionList .AS "ACFLRacflr"
OptionVars .DA #bAllmostAll,#bColumn,#bFullPath,#bLong,#bRecurse,#bAllmostAll,#bColumn,#bFullPath,#bLong,#bRecurse
*--------------------------------------
MSG.REG .AZ "%19s"
MSG.REGEXT .AZ "%s %6s %6s %10u %s %s %S %H %s\r\n"
MSG.REGEXT .AZ "%s %6s %6s %10u %s %s %S %H %s"
MSG.DIR .AZ "\e[32m%s/\e[0m"
MSG.DIREXT .AZ "%s %6s %6s %s %s <dir> \e[32m%s/\e[0m\r\n"
MSG.DIREXT .AZ "%s %6s %6s %s %s <dir> \e[32m%s/\e[0m"
MSG.BDEV .AZ "\e[32m%s/\e[0m"
MSG.BDEVEXT .AZ "/%15s S%dD%d Blocks Used:%5D Total:%5D\r\n"
MSG.BDEVEXT .AZ "/%15s S%dD%d Blocks Used:%5D Total:%5D"
MSG.ENTER .AS "Directory:%s"
MSG.CRLF .AZ "\r\n"
*--------------------------------------

View File

@ -90,7 +90,7 @@ Dev.Detect >LDYA L.MSG.DETECT
>PUSHWI DRV.CS.START
>LDYA L.DRV.CS.START
>SYSCALL InsDrv
bcs .9
bcs .99
>STYA FD.DEV+S.FD.DEV.DRVPTR
@ -98,7 +98,7 @@ Dev.Detect >LDYA L.MSG.DETECT
>PUSHW L.FD.DEV.NAME
>SYSCALL MKDEV
rts
.99 rts
*--------------------------------------
CS.END
MSG.DETECT .AZ "Apple Mouse Driver."

View File

@ -396,6 +396,7 @@ RWDRV.START cld ProDOS will check that byte!!!
sbc RWDRV.MAXHI+1
bcs RWDRV.IOERR DRV.BLKNUM >= RW.DRV.SIZE, IO error
* bit RD80STORE save 80 Store status
php Disable IRQ as no vector set in RW Banks
sei
@ -437,7 +438,9 @@ RWDRV.W sta SETWRITEAUX
RWDRV.RW stx RWDRV.RW.SRC+1
sta RWDRV.RW.DST+1
ldx #2 2 pages to copy
* clc 2 pages to copy
.HS B0 BCS
RWDRV.RW.LOOP sec
RWDRV.RW.SRC lda ($FF),y
RWDRV.RW.DST sta ($FF),y
@ -446,8 +449,7 @@ RWDRV.RW.DST sta ($FF),y
dec DRV.BUFF+1
dec DRV.A2H
dex
bne RWDRV.RW.SRC
bcc RWDRV.RW.LOOP
stz RWBankSelect
sta CLRREADAUX
@ -455,6 +457,9 @@ RWDRV.RW.DST sta ($FF),y
plp restore IRQ
* bpl RMDRV.CMDSTATUS
* sta SET80STORE
RMDRV.CMDSTATUS
RWDRV.MAXLO ldx #$FF return device block count in X,Y...
RWDRV.MAXHI ldy #$FF
@ -492,7 +497,9 @@ RWDRV.GOAUX pha save BANK
rts A & carry setup properly by RWDRVX.RESTORE
RWDRV.END .EP
RWDRV.B.END
.LIST ON
RWDRV.SIZE .EQ RWDRV.B.END-RWDRV.B.START
.LIST OFF
*--------------------------------------
* Driver for Ramworks in aux memory
* $0200 -> $02FF TMP buffer for PAGE copy