Kernel 0.94++

This commit is contained in:
Rémy GIBERT 2021-06-03 19:43:28 +02:00
parent 53194b5efb
commit 9d5e142b0e
22 changed files with 107 additions and 100 deletions

Binary file not shown.

Binary file not shown.

View File

@ -194,7 +194,15 @@ KW.NIBBLE
KW.NOT
KW.ON
KW.NOCAR
lda #E.CSYN
sec
rts
*--------------------------------------
KW.OPEN
lda #E.CSYN
sec
rts
*--------------------------------------
KW.POKE
KW.POP
KW.POSITION
@ -206,9 +214,9 @@ KW.PRINT stz hOut reset to hStdOut
stz ZPPtr2 put ending CR
* ldy #S.PS.hStdOut
* lda (pPS),y
* sta hOut Default to screen
ldy #S.PS.hStdOut
lda (pPS),y
sta hOut Default to screen
.10 jsr CORE.GetNextCharNB
bcs .8

View File

@ -4,11 +4,20 @@ NEW
*--------------------------------------
RT.StrSet
*--------------------------------------
RT.StrGet
RT.StrGet
*--------------------------------------
clc
rts
*--------------------------------------
RT.StrLeft
clc
rts
*--------------------------------------
RT.FileOpen
*--------------------------------------
MAN
SAVE usr/src/bin/acos.s.rt
LOAD usr/src/bin/acos.s

View File

@ -444,14 +444,15 @@ CCODE.TESTTRUE lda (pStack)
.1 bne .1+5
CCODE.TESTTRUE.LEN .EQ *-CCODE.TESTTRUE
*--------------------------------------
CCODE.FPRINTSTR >PUSHW L.MSG.STR
ldy #3
CCODE.FPRINTSTR ldy #S.PS.hStdOut
lda (pPS),y
>PUSHA
ldy #2
lda (pStack),y
>PUSHA
lda (pStack),y
>PUSHA
>PUSHBI 2
>SYSCALL PrintF
>SYSCALL fputs
inc pStack
inc pStack
CCODE.FPRINTSTR.LEN .EQ *-CCODE.FPRINTSTR

View File

@ -395,6 +395,7 @@ PrintDebugMsg >LDYA pStack
>PUSHBI 2
>SYSCALL PrintF
>DEBUG
rts
*--------------------------------------
PrintTraceMsg >STYA ZPPtr3

View File

@ -164,11 +164,10 @@ CS.QUIT clc
NSC.Init php
sei
lda RDC3ROM
lda RDCXROM
php
* sta CLRC8ROM Make cards release $C8xx space
sta CLRC3ROM
sta SETCXROM
ldx #8
@ -184,9 +183,9 @@ NSC.Init php
bne .1
plp
bpl .8
bmi .8
sta SETC3ROM
sta CLRCXROM
.8 plp
rts
@ -194,11 +193,10 @@ NSC.Init php
NSC.Read php
sei
lda RDC3ROM
lda RDCXROM
php
* sta CLRC8ROM Make cards release $C8xx space
sta CLRC3ROM
sta SETCXROM
jsr NSC.Select
@ -216,9 +214,9 @@ NSC.Read php
bpl .1
plp
bpl .8
bmi .8
sta SETC3ROM
sta CLRCXROM
.8 plp
rts
@ -226,11 +224,10 @@ NSC.Read php
NSC.Write php
sei
lda RDC3ROM
lda RDCXROM
php
* sta CLRC8ROM Make cards release $C8xx space
sta CLRC3ROM
sta SETCXROM
jsr NSC.Select
@ -257,9 +254,9 @@ NSC.Write php
bpl .3
plp
bpl .8
bmi .8
sta SETC3ROM
sta CLRCXROM
.8 plp
rts

View File

@ -266,8 +266,6 @@ CMD.SET.EXEC jsr CORE.ArgV.NextChar skip "`"
CMD.DATE >PUSHEA.G TimeBuf
>SYSCALL Time
>PUSHEA.G TimeBuf
>PUSHW ZPCLBuf
lda (ZPArgVBufPtr)

View File

@ -1,9 +1,9 @@
NEW
AUTO 3,1
*--------------------------------------
IO.D2.SeekTimeR .EQ 48 LIBBLKDEV Recalibration
IO.D2.SeekTimeF .EQ 48 LIBBLKDEV Track Formatter
IO.D2.SeekTimeB .EQ 48 LIBBLKDEV Boot Block
IO.D2.SeekTimeR .EQ 58 LIBBLKDEV Recalibration
IO.D2.SeekTimeF .EQ 58 LIBBLKDEV Track Formatter
IO.D2.SeekTimeB .EQ 58 LIBBLKDEV Boot Block
IO.D2.SeekTimeP .EQ 38 ProDOS.FX initial
IO.D2.SeekTimeI .EQ 10 ProDOS.FX increment -> until > 128
*--------------------------------------

View File

@ -332,7 +332,7 @@ BB.Seek lda BB.HdrTrk get track we're on
bit #1
bne .1
jsr .10 we are on 0/4 or 2/4 track
jsr .20 we are on 0/4 or 2/4 track
bra .9 no wait, next operation will be phy/plx/Ph0On,y
.1 cmp BB.TargetQTrack we are on 1/4 or 3/4
@ -349,7 +349,7 @@ BB.Seek lda BB.HdrTrk get track we're on
bra .6 Ph ON to go to 0/4 or 2/4, then wait
*--------------------------------------
.10 and #6
.20 and #6
ora BB.Slotn0
tay
lda IO.D2.Ph0On,y
@ -378,7 +378,7 @@ BB.Seek lda BB.HdrTrk get track we're on
inc CC: C < T, ON next PH
.6 jsr .10 now X and Y on
.6 jsr .20 now X and Y on
.8 lda #IO.D2.SeekTimeB
jsr BB.Wait100usecA ...wait...
@ -390,10 +390,14 @@ BB.Seek lda BB.HdrTrk get track we're on
lda #0
jsr BB.Wait100usecA
lda IO.D2.Ph0Off,x
nop
nop
lda IO.D2.Ph0Off,y
ldy #0
.10 dey
bne .10
lda IO.D2.Ph0Off,x
*--------------------------------------
BB.Read ldx BB.Slotn0

View File

@ -135,10 +135,15 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
jsr D2.Wait25600usec
sta IO.D2.Ph0Off,x
* nop
* nop
sta IO.D2.Ph0Off,y
lda IO.D2.Ph0Off,y
ldy #0
.10 dey
bne .10
lda IO.D2.Ph0Off,x
rts
D2.SeekPhOnY and #6

View File

@ -16,7 +16,7 @@ CIFS2.FStat lda #MLI.E.BADCALL
CIFS.Stat >STYA pPath resolved path
jsr ClearSocket
jsr MakeTrans2Reg
jsr MakeTrans2Req
ldx #0
@ -79,7 +79,7 @@ CIFS2.Stat jsr ReadSocket
rts
.9 cmp #E.NODATA
bne .9
bne .99
dec CIFS.Retries
beq .90
@ -96,7 +96,7 @@ CIFS2.Stat jsr ReadSocket
*--------------------------------------
CIFS.MKDir >STYA pPath resolved path
jsr MakeTrans2Reg
jsr MakeTrans2Req
ldx #0
@ -216,7 +216,7 @@ CIFS.ReadDir jsr GetPFD
ora (pFD),y
bne CIFS.ReadDir.Next
jsr MakeTrans2Reg
jsr MakeTrans2Req
ldx #0
@ -230,7 +230,7 @@ CIFS.ReadDir jsr GetPFD
bra CIFS.ReadDir.Send
CIFS.ReadDir.Next
jsr MakeTrans2Reg
jsr MakeTrans2Req
ldx #0
@ -534,7 +534,7 @@ CIFS2.ChOwn
sec
rts
*--------------------------------------
CIFS.FOpen jsr MakeTrans2Reg
CIFS.FOpen jsr MakeTrans2Req
ldx #0
@ -561,6 +561,7 @@ CIFS.FOpen jsr MakeTrans2Reg
and #O.RDWR
dec
lda #2
ldy #S.NETBIOS+S.SMB.H+SMB.Trans2.H.Len+9 AccessMode
sta (ZPReqPtr),y
@ -571,7 +572,7 @@ CIFS.FOpen jsr MakeTrans2Reg
and #O.CREATE
beq .2
lda #$10
lda #$12
sta (ZPReqPtr),y
.2 pla
@ -580,7 +581,7 @@ CIFS.FOpen jsr MakeTrans2Reg
lda (ZPReqPtr),y
ora #1
sta (ZPReqPtr),y
* sta (ZPReqPtr),y
.3 ply

View File

@ -585,7 +585,7 @@ GetPFD tax
>STYA pFD
rts
*--------------------------------------
MakeTrans2Reg lda MountTable+2
MakeTrans2Req lda MountTable+2
>SYSCALL2 GetMemPtr
>STYA ZPCtxPtr
@ -1042,7 +1042,7 @@ SMB.Open2 .DA 0 TRANS2_OPEN2
.BS 2 FileAttributes
.HS 00000000 CreationTime
.BS 2 OpenMode
.HS 00000000 AllocationSize
.HS 00020000 AllocationSize
.HS 00000000000000000000 Reserved
* .AZ "filename"
SMB.Open2.Len .EQ *-SMB.Open2

View File

@ -351,6 +351,7 @@ CLIP.Line.EncodeX.AX
tya
ora #CLIP.Line.RIGHT
rts
.8 tya
rts
@ -371,6 +372,7 @@ CLIP.Line.EncodeY.AX
tya
ora #CLIP.Line.BOTTOM
rts
.8 tya
rts

View File

@ -1,8 +1,8 @@
NEW
AUTO 3,1
*--------------------------------------
MOU.Init >PUSHBI 0
>LDYA L.DEVNAME.MOUSE
MOU.Init >PUSHW L.DEVNAME.MOUSE
>PUSHBI 0
>SYSCALL2 open
bcc .2

View File

@ -1,8 +1,8 @@
NEW
AUTO 3,1
*--------------------------------------
WND.Init >PUSHBI 0
>LDYA L.DEVNAME.GFX
WND.Init >PUSHW L.DEVNAME.GFX
>PUSHBI 0
>SYSCALL2 open
bcs .9

View File

@ -894,7 +894,7 @@ SKT.Recv clc
lda (ZPFrameInPtr),y
sta SA.REMOTE+S.SOCKADDR
.8 lda #S.SOCKADDR-1
.8 ldy #S.SOCKADDR-1
.80 lda SA.REMOTE,y
sta (ZPTmpPtr1),y

View File

@ -354,11 +354,10 @@ DS1216E.DATA2 .EQ A1L
LDR.ClkDevScan php
sei
lda RDC3ROM
lda RDCXROM
php
* sta CLRC8ROM Make cards release $C8xx space
sta CLRC3ROM
sta SETCXROM
sta $C300
@ -413,9 +412,9 @@ LDR.ClkDevScan php
bne .6
plp
bpl .8
bmi .8
sta SETC3ROM
sta CLRCXROM
.8 plp
@ -901,7 +900,7 @@ LDR.SetDevID ldy #$FE check attributes byte.
sta devid
rts
*--------------------------------------
LDR.ScrInit80 sta CLRC3ROM
LDR.ScrInit80 sta CLRC3ROM TODO: support 80COL cards with ROM ???
lda #$8C Reset 80 col screen ($0C:HOME)
jsr $C300

View File

@ -10,11 +10,10 @@ DS1216E.DATA .EQ $200 Reverted YY MM DD Day HH mm SS CS
NCLK.START php
sei NO IRQ !!!
lda RDC3ROM because no IRQ handler at $C3FA...
lda RDCXROM because no IRQ handler at $C3FA...
php
* sta CLRC8ROM Make cards release $C8xx space
sta CLRC3ROM ... after this
sta SETCXROM ... after this
sta $C300
lda $C304 Reset DS1216E comparison register with READ A2=1
@ -98,9 +97,9 @@ NCLK.START php
sta TIMELO+1
plp
bpl .8
bmi .8
sta SETC3ROM
sta CLRCXROM
.8 plp
rts

View File

@ -203,13 +203,7 @@ XRW.E.EXIT ldx A2L
XRW.SectorIO bit XRW.bWrite
bpl .1
* jsr XRW.SeekPhOnXY
* phx
* phy
jsr XRW.PreNibble
* ply
* plx
* jsr XRW.SeekPhOff
.1 stz XRW.RetryCnt
@ -401,7 +395,7 @@ XRW.TestWP ldx A2L
.LIST ON
XRW.Write bit IO.D2.ReadProt,x (4) PREWRITE MODE
.LIST OFF
* bit IO.D2.ReadMode,x (4)
bit IO.D2.ReadMode,x (4)
lda #$FF (2)
@ -413,7 +407,7 @@ XRW.Write bit IO.D2.ReadProt,x (4) PREWRITE MODE
ldy nbuf2 (4)
sty pcl (3)
ldy #6 (2)
ldy #5 (2)
.1 pha (3) exact timing.
pla (4) exact timing.
@ -839,26 +833,17 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
jsr XRW.Wait25600usec
XRW.SeekPhOff sta IO.D2.Ph0Off,x
* nop
* nop
sta IO.D2.Ph0Off,y
lda IO.D2.Ph0Off,y
ldy #0
.10 dey
bne .10
lda IO.D2.Ph0Off,x
clc Exit wit CC (recalibrate)
rts
*--------------------------------------
*XRW.SeekPhOnXY lda XRW.ReqTrack2
* jsr XRW.Trk2Qtrk
* pha
* and #6
* ora A2L
* tax
* lda IO.D2.Ph0On,x
* pla
* inc
XRW.SeekPhOnY and #6
ora A2L
tay

View File

@ -38,6 +38,7 @@ MAIN.B .PH A2osX.EndTables
.INB usr/src/sys/kernel.s.drv
.INB usr/src/sys/kernel.s.pft
.INB usr/src/sys/kernel.s.fs
.INB usr/src/sys/kernel.s.math16
.INB usr/src/sys/kernel.s.mathf
Mem.MLoMem .EQ *
.EP
@ -109,7 +110,6 @@ E0.B .PH $E000
.INB usr/src/sys/kernel.s.irq
.INB usr/src/sys/kernel.s.shared
.INB usr/src/sys/kernel.s.math
.INB usr/src/sys/kernel.s.math16
.INB usr/src/sys/kernel.s.math32
.INB usr/src/sys/kernel.s.term

View File

@ -55,11 +55,10 @@ DS1216E.DATA2 .EQ $18
NSC.Detect php
sei
lda RDC3ROM
lda RDCXROM
php
* sta CLRC8ROM Make cards release $C8xx space
sta CLRC3ROM
sta SETCXROM
sta $C300
@ -115,9 +114,9 @@ NSC.Detect php
bne .6
plp
bpl .8
bmi .8
sta SETC3ROM
sta CLRCXROM
.8 plp
@ -203,11 +202,10 @@ NSCDRV.B.START .EQ *
NSCDRV php
sei
lda RDC3ROM
lda RDCXROM
php
* sta CLRC8ROM Make cards release $C8xx space
sta CLRC3ROM
sta SETCXROM
sta $C300
lda $C304 Reset DS1216E comparison register with READ A2=1
@ -291,9 +289,9 @@ NSCDRV.R5 lda DS1216E.DATA+4 Get HH
sta TIMELO+1
plp
bpl .8
bmi .8
sta SETC3ROM
sta CLRCXROM
.8 plp
rts