mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-25 04:30:59 +00:00
Kernel 0.94+
This commit is contained in:
parent
f77498a457
commit
931dec0a29
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,8 +13,8 @@ A2osX.QC.Start .EQ *
|
||||
A2osX.QC cld
|
||||
jmp A2osX.QC.Start1
|
||||
|
||||
A2osX.QC.BOOT .BS 32
|
||||
A2osX.QC.ROOT .BS 32
|
||||
A2osX.QC.BOOT .BS 64
|
||||
A2osX.QC.ROOT .BS 64
|
||||
|
||||
A2osX.QC.Start1 sei
|
||||
ldx #$FF
|
||||
@ -169,6 +169,7 @@ A2osX.QC.PrintYA
|
||||
beq .9
|
||||
|
||||
ldy #1
|
||||
|
||||
.1 lda (TmpPtr1),y
|
||||
ora #$80
|
||||
jsr COUT
|
||||
@ -178,7 +179,9 @@ A2osX.QC.PrintYA
|
||||
|
||||
.9 plp
|
||||
bcc .99
|
||||
|
||||
jsr CROUT
|
||||
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
MLISETPREFIX03 .DA #1
|
||||
|
15
A2osX.S.txt
15
A2osX.S.txt
@ -106,6 +106,7 @@ A2osX.Init1.128 jsr MLI
|
||||
adc #$01
|
||||
cld
|
||||
bpl .2 if minus, BUG!, we have 6502
|
||||
|
||||
>LDYAI MSG.CPU.KO
|
||||
jsr PrintFYA
|
||||
bra *
|
||||
@ -128,14 +129,16 @@ A2osX.RamDrv >LDYAI MSG.RAMDRV
|
||||
|
||||
tax
|
||||
bne .1
|
||||
|
||||
>LDYAI MSG.RAMDRV.KO0
|
||||
jsr PrintFYA
|
||||
bra A2osX.SetupQC
|
||||
bra .8
|
||||
|
||||
.1 >LDYAI MSG.RAMDRV.KO1
|
||||
jsr PrintFYA
|
||||
bra A2osX.SetupQC
|
||||
bra .8
|
||||
|
||||
.2 >LDYAI MSG.RAMDRV.OK
|
||||
jsr PrintFYA
|
||||
|
||||
.8 jsr PrintFYA
|
||||
*--------------------------------------
|
||||
A2osX.EnumKM >LDYAI MSG.KMENUM
|
||||
jsr PrintFYA
|
||||
@ -672,7 +675,7 @@ PALETTE.AUX .HS 00.01.02.03.04.05.06.07
|
||||
*--------------------------------------
|
||||
A2osX.QC.B.Start
|
||||
A2osX.QC.B.BOOT .EQ *+4
|
||||
A2osX.QC.B.ROOT .EQ *+4+32
|
||||
A2osX.QC.B.ROOT .EQ *+4+64
|
||||
.INB usr/src/a2osx.s.qc
|
||||
.LIST ON
|
||||
SYSTEM.END .EQ *
|
||||
|
@ -391,17 +391,17 @@ CS.RUN.LL.DISKII
|
||||
jsr CS.RUN.LL.DISKII.V
|
||||
bcs .99
|
||||
|
||||
* jsr CS.RUN.MotorOn
|
||||
jsr CS.RUN.MotorOn
|
||||
|
||||
* lda #10
|
||||
* jsr CS.RUN.Wait
|
||||
lda #20
|
||||
jsr CS.RUN.Wait
|
||||
|
||||
.80
|
||||
* >PUSHB DSSS0000
|
||||
* >LIBCALL hLIBBLKDEV,LIBBLKDEV.D2Recalibrate
|
||||
>PUSHB DSSS0000
|
||||
>LIBCALL hLIBBLKDEV,LIBBLKDEV.D2Recalibrate
|
||||
|
||||
* lda #10
|
||||
* jsr CS.RUN.Wait
|
||||
lda #20
|
||||
jsr CS.RUN.Wait
|
||||
|
||||
clc
|
||||
.99 rts
|
||||
|
26
BIN/SH.S.txt
26
BIN/SH.S.txt
@ -236,8 +236,7 @@ CS.RUN jsr CL.Init
|
||||
bcs .9
|
||||
|
||||
>PUSHW L.MSG.GREETINGS
|
||||
>PUSHB #K.VER
|
||||
>PUSHB /K.VER
|
||||
>PUSHW A2osX.KVER
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
@ -258,17 +257,23 @@ CS.RUN.LOOP >SLEEP
|
||||
lda (pPS),y
|
||||
>SYSCALL FEOF
|
||||
bcs .9
|
||||
|
||||
tay
|
||||
bne CS.RUN.LOOP
|
||||
>SYSCALL GetChar
|
||||
bcs .9 I/O err
|
||||
|
||||
cmp #3 Ctrl-C
|
||||
bne .11
|
||||
|
||||
lda (pData) batch mode ?
|
||||
beq CS.RUN.LOOP
|
||||
|
||||
>LDA.G bSET.C
|
||||
beq .8
|
||||
|
||||
bra CS.RUN.LOOP
|
||||
|
||||
.11 cmp #19 test Ctrl-s
|
||||
bne CS.RUN.LOOP
|
||||
|
||||
@ -318,12 +323,14 @@ CS.RUN.INTERACTIVE
|
||||
|
||||
jsr CL.PrintPrompt
|
||||
bcs CS.RUN.CMDLINE.9
|
||||
|
||||
>STZ.G bREAD.S
|
||||
dec
|
||||
>STA.G READ.N
|
||||
|
||||
.1 >SYSCALL GetChar
|
||||
bcs CS.RUN.CMDLINE.9 I/O error
|
||||
|
||||
.2 cmp #C.EOF ....or Ctrl-D
|
||||
beq CS.RUN.CMDLINE.9 CS
|
||||
|
||||
@ -336,15 +343,16 @@ CS.RUN.INTERACTIVE
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
bcs CS.RUN.CMDLINE.9
|
||||
|
||||
lda (ZPCLBuf)
|
||||
beq CS.RUN.CMDLINE.8 Empty line
|
||||
beq CS.RUN.LOOP.END Empty line
|
||||
|
||||
jsr HIS.Add
|
||||
|
||||
>LDYA ZPCLBuf
|
||||
|
||||
CS.RUN.CMDLINE >SYSCALL StrDup
|
||||
bcs CS.RUN.CMDLINE.8
|
||||
bcs CS.RUN.CMDLINE.9
|
||||
|
||||
phx
|
||||
jsr GetArgV
|
||||
@ -352,19 +360,17 @@ CS.RUN.CMDLINE >SYSCALL StrDup
|
||||
|
||||
jsr CORE.Load.YAX Exec CL
|
||||
bcs CS.RUN.CMDLINE.9
|
||||
|
||||
lda #$C0+C.CLEXEC
|
||||
jsr CORE.StkPush
|
||||
|
||||
jsr CORE.Run
|
||||
|
||||
CS.RUN.CMDLINE.8
|
||||
jmp CS.RUN.LOOP.END
|
||||
bra CS.RUN.LOOP.RUN
|
||||
|
||||
CS.RUN.CMDLINE.9
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.BATCH >LDA.G bSET.X
|
||||
beq .5
|
||||
beq CS.RUN.LOOP.RUN
|
||||
|
||||
ldy #$ff
|
||||
|
||||
@ -384,7 +390,7 @@ CS.RUN.BATCH >LDA.G bSET.X
|
||||
>SYSCALL PrintF
|
||||
bcs CS.RUN.LOOP.RTS
|
||||
|
||||
.5 jsr CORE.Run
|
||||
CS.RUN.LOOP.RUN jsr CORE.Run
|
||||
|
||||
CS.RUN.LOOP.END ldy #S.PS.RC
|
||||
sta (pPS),y
|
||||
|
@ -1,11 +1,11 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
*--------------------------------------
|
||||
IO.D2.SeekTimeR .EQ 45 LIBBLKDEV Recalibration
|
||||
IO.D2.SeekTimeR .EQ 35 LIBBLKDEV Recalibration
|
||||
IO.D2.SeekTimeF .EQ 45 LIBBLKDEV Track Formatter
|
||||
IO.D2.SeekTimeB .EQ 45 LIBBLKDEV Boot Block
|
||||
IO.D2.SeekTimeP .EQ 15 ProDOS.FX initial
|
||||
IO.D2.SeekTimeI .EQ 10 ProDOS.FX increment -> until > 128
|
||||
IO.D2.SeekTimeI .EQ 5 ProDOS.FX increment -> until > 128
|
||||
*--------------------------------------
|
||||
IO.D2.Ph0Off .EQ $C080
|
||||
IO.D2.Ph0On .EQ $C081
|
||||
|
@ -128,13 +128,15 @@ D2MoveHead.SEI lda Slotn0
|
||||
|
||||
.3 and #6
|
||||
ora Slotn0
|
||||
|
||||
bcs .30
|
||||
|
||||
phx
|
||||
tax
|
||||
pla
|
||||
|
||||
.30 tay
|
||||
.30
|
||||
tay
|
||||
|
||||
lda IO.D2.Ph0On,x
|
||||
.4 lda IO.D2.RData SELF MODIFIED
|
||||
@ -175,7 +177,6 @@ D2TrkRead16s >PULLW ZPPtr1
|
||||
jsr CheckDiskII
|
||||
bcs .9
|
||||
|
||||
|
||||
lda VolNum
|
||||
clc
|
||||
.9
|
||||
|
@ -153,13 +153,21 @@ L538E lda A4L get command #
|
||||
*--------------------------------------
|
||||
.2 sei DISABLE IRQ
|
||||
|
||||
jsr XRW.TrackSelect
|
||||
lda #2
|
||||
sta XRW.RecalibrateCnt
|
||||
|
||||
.3 jsr XRW.TrackSelect
|
||||
bcs XRW.E.IO
|
||||
|
||||
jsr XRW.SectorIO
|
||||
bcc .4
|
||||
|
||||
jsr XRW.Recalibrate
|
||||
bcc .3
|
||||
|
||||
bcs XRW.E.IO
|
||||
|
||||
inc buf+1
|
||||
.4 inc buf+1
|
||||
|
||||
inc XRW.ReqSector
|
||||
inc XRW.ReqSector
|
||||
@ -188,31 +196,21 @@ XRW.E.EXIT ldx A2L
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.TrackSelect lda #2
|
||||
sta XRW.RecalibrateCnt
|
||||
sta XRW.BadSeek
|
||||
|
||||
.1 stz XRW.RetryCnt
|
||||
.1 lda #32
|
||||
sta XRW.RetryCnt
|
||||
|
||||
.2 jsr XRW.ReadAddr read next address field.
|
||||
bcc .4 if CC, A = current track
|
||||
|
||||
.3 inc XRW.RetryCnt one less chance.
|
||||
bpl .2 branch if < 128
|
||||
.3 dec XRW.RetryCnt one less chance.
|
||||
bne .2 branch if < 128
|
||||
|
||||
dec XRW.RecalibrateCnt
|
||||
sec
|
||||
beq .9
|
||||
jsr XRW.Recalibrate
|
||||
bcc .1
|
||||
|
||||
ldy XRW.UnitIndex
|
||||
|
||||
lda #41
|
||||
sta XRW.D2Trk-1,y
|
||||
|
||||
lda #0
|
||||
sta XRW.D2VolNum-1,y reset volnum for seeking 41 Qtracks
|
||||
|
||||
jsr XRW.Seek Seek from Track 41 -> 0
|
||||
bra .1
|
||||
rts
|
||||
|
||||
.4 ldy XRW.UnitIndex (4)
|
||||
lda XRW.AddrField.V (4)
|
||||
@ -226,10 +224,10 @@ XRW.TrackSelect lda #2
|
||||
beq .5 2 bad seeks, already
|
||||
|
||||
dec XRW.BadSeek
|
||||
bne .6
|
||||
bne .7
|
||||
|
||||
.5 lda XRW.SeekTime
|
||||
bmi .6 seektime already > 128
|
||||
bmi .7 seektime already > 128
|
||||
|
||||
clc
|
||||
adc #IO.D2.SeekTimeI
|
||||
@ -237,19 +235,11 @@ XRW.TrackSelect lda #2
|
||||
|
||||
sta XRW.D2SeekTime-1,y
|
||||
|
||||
.6 lda XRW.ReqTrack
|
||||
.7 lda XRW.ReqTrack
|
||||
jsr XRW.Seek
|
||||
bra .3
|
||||
|
||||
.8
|
||||
* jsr XRW.SEEK2T
|
||||
|
||||
* lda #1
|
||||
* jsr XRW.Wait100usecA
|
||||
|
||||
* jsr XRW.SEEKOFF
|
||||
|
||||
clc
|
||||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
.LIST ON
|
||||
@ -325,7 +315,23 @@ XRW.ReadAddr.RTS
|
||||
rts
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
* A = target track
|
||||
XRW.Recalibrate dec XRW.RecalibrateCnt
|
||||
bne .1
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
.1 ldy XRW.UnitIndex
|
||||
|
||||
lda #41
|
||||
sta XRW.D2Trk-1,y
|
||||
|
||||
lda #0
|
||||
sta XRW.D2VolNum-1,y reset volnum for seeking 41 Qtracks
|
||||
jsr XRW.Seek
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.Seek ldx XRW.UnitIndex
|
||||
pha save target track
|
||||
@ -348,9 +354,10 @@ XRW.Seek ldx XRW.UnitIndex
|
||||
lda #1
|
||||
bra .4
|
||||
|
||||
.1 pha
|
||||
.1 jsr XRW.SEEKOFF
|
||||
|
||||
pha
|
||||
|
||||
jsr XRW.SEEKOFF
|
||||
bcs .2
|
||||
|
||||
* Current < Target, must move in
|
||||
@ -380,13 +387,14 @@ XRW.Seek ldx XRW.UnitIndex
|
||||
|
||||
.3 and #6
|
||||
ora A2L
|
||||
* bcs .30
|
||||
|
||||
* phx
|
||||
* tax
|
||||
* pla
|
||||
bcs .30
|
||||
|
||||
*.30
|
||||
phx
|
||||
tax
|
||||
pla
|
||||
|
||||
.30
|
||||
tay
|
||||
|
||||
jsr XRW.SEEK2QT
|
||||
@ -403,47 +411,19 @@ XRW.Seek ldx XRW.UnitIndex
|
||||
XRW.SEEKOFF
|
||||
pha
|
||||
|
||||
* lda A2L
|
||||
* ora #IO.D2.RData
|
||||
* sta .1+1
|
||||
* sta .2+1
|
||||
lda A2L
|
||||
ora #IO.D2.RData
|
||||
sta .1+1
|
||||
sta .2+1
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
*.1 lda IO.D2.RData SELF MODIFIED
|
||||
nop
|
||||
nop
|
||||
.1 lda IO.D2.RData SELF MODIFIED
|
||||
lda IO.D2.Ph0Off,y
|
||||
*.2 lda IO.D2.RData SELF MODIFIED
|
||||
.2 lda IO.D2.RData SELF MODIFIED
|
||||
|
||||
pla
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.CheckMotorOn
|
||||
ldx A2L
|
||||
XRW.CheckMotorOnX
|
||||
ldy #0 init loop counter.
|
||||
|
||||
.1 lda IO.D2.RData,x read the shift register.
|
||||
jsr .9 delay
|
||||
|
||||
pha
|
||||
pla more delay.
|
||||
|
||||
cmp IO.D2.RData,x has shift reg changed ?
|
||||
bne .9 yes, motor is moving.
|
||||
|
||||
dey no, dec retry counter
|
||||
bne .1 and try 256 times.
|
||||
|
||||
.9 rts Z if motor OFF
|
||||
*--------------------------------------
|
||||
XRW.TestWP ldx A2L
|
||||
lda IO.D2.ReadProt,x test for write protected
|
||||
lda IO.D2.ReadMode,x
|
||||
rol write protect-->carry-->bit 0=1
|
||||
lda IO.D2.RData,x keep in read mode
|
||||
rts
|
||||
*--------------------------------------
|
||||
* preniblize subroutine (16 sector format)
|
||||
*
|
||||
* converts 256 bytes of user data in (buf) into 6 bit nibls in nbuf2.
|
||||
@ -568,18 +548,10 @@ L596F ldy #$FF index to last byte of data to write.
|
||||
XRW.SectorIO bit XRW.bWrite
|
||||
bpl .1
|
||||
|
||||
* lda XRW.ReqTrack
|
||||
* jsr XRW.SEEK2T
|
||||
* phx
|
||||
* phy
|
||||
|
||||
jsr XRW.PreNibble
|
||||
|
||||
* ply
|
||||
* plx
|
||||
* jsr XRW.SEEKOFF
|
||||
|
||||
.1 stz XRW.RetryCnt
|
||||
.1 lda #32
|
||||
sta XRW.RetryCnt
|
||||
|
||||
.DO XRWDBG=1
|
||||
jsr XRW.DEBUG
|
||||
@ -597,8 +569,8 @@ XRW.SectorIO bit XRW.bWrite
|
||||
|
||||
jmp XRW.Read
|
||||
|
||||
.3 inc XRW.RetryCnt
|
||||
bpl .2
|
||||
.3 dec XRW.RetryCnt
|
||||
bne .2
|
||||
|
||||
sec
|
||||
|
||||
@ -968,17 +940,15 @@ XRW.SEEK2QTXY pha
|
||||
tay
|
||||
|
||||
XRW.SEEK2QT
|
||||
* lda A2L
|
||||
* ora #IO.D2.RData
|
||||
* sta .1+1
|
||||
* sta .2+1
|
||||
lda A2L
|
||||
ora #IO.D2.RData
|
||||
sta .1+1
|
||||
sta .2+1
|
||||
|
||||
lda IO.D2.Ph0On,x
|
||||
*.1 lda IO.D2.RData SELF MODIFIED
|
||||
nop
|
||||
nop
|
||||
.1 lda IO.D2.RData SELF MODIFIED
|
||||
lda IO.D2.Ph0On,y
|
||||
*.2 lda IO.D2.RData SELF MODIFIED
|
||||
.2 lda IO.D2.RData SELF MODIFIED
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.Trk2Qtrk asl x2
|
||||
@ -992,6 +962,32 @@ XRW.Trk2Qtrk asl x2
|
||||
|
||||
.1 adc #$ff SELF MODIFIED
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.CheckMotorOn
|
||||
ldx A2L
|
||||
XRW.CheckMotorOnX
|
||||
ldy #0 init loop counter.
|
||||
|
||||
.1 lda IO.D2.RData,x read the shift register.
|
||||
jsr .9 delay
|
||||
|
||||
pha
|
||||
pla more delay.
|
||||
|
||||
cmp IO.D2.RData,x has shift reg changed ?
|
||||
bne .9 yes, motor is moving.
|
||||
|
||||
dey no, dec retry counter
|
||||
bne .1 and try 256 times.
|
||||
|
||||
.9 rts Z if motor OFF
|
||||
*--------------------------------------
|
||||
XRW.TestWP ldx A2L
|
||||
lda IO.D2.ReadProt,x test for write protected
|
||||
lda IO.D2.ReadMode,x
|
||||
rol write protect-->carry-->bit 0=1
|
||||
lda IO.D2.RData,x keep in read mode
|
||||
rts
|
||||
*--------------------------------------
|
||||
.LIST ON
|
||||
XRW.FREE .EQ $D540-*
|
||||
|
@ -967,9 +967,10 @@ PS.Find.5 >LDYAI K.Buf256
|
||||
jsr PS.STAT.YA
|
||||
bcs PS.Find.1 Failed...retry next path...
|
||||
|
||||
lda K.S.STAT+S.STAT.P.TYPE
|
||||
cmp #S.FI.T.DIR Dir ?
|
||||
lda K.S.STAT+S.STAT.MODE+1
|
||||
cmp /S.STAT.MODE.DIR Dir ?
|
||||
beq PS.Find.1
|
||||
|
||||
jsr PS.Find.98 Discard Expanded hSrch list
|
||||
|
||||
clc
|
||||
|
Loading…
Reference in New Issue
Block a user