REPO Cleanup #2 (hugh...), CIFS,UNAME,XARGS,SED,NSC,IRQ

This commit is contained in:
Rémy GIBERT 2021-06-23 19:43:04 +02:00
parent 44b2e0e443
commit b2d59ddbd7
14 changed files with 128 additions and 65 deletions

Binary file not shown.

Binary file not shown.

View File

@ -173,7 +173,7 @@ NSC.Init php
.1 ldy #8
.2 lda $C304
.2 lda $C104
lsr
ror DS1216E.DETECT-1,x
dey
@ -204,7 +204,7 @@ NSC.Read php
.1 ldy #8
.2 lda $C304
.2 lda $C104
lsr
ror DS1216E.DATA-1,x
dey
@ -245,7 +245,7 @@ NSC.Write php
iny
.5 pha
lda $C300,y Write Pattern bit in A0, with A2=0
lda $C100,y Write Pattern bit in A0, with A2=0
pla
dex
bne .4
@ -263,10 +263,10 @@ NSC.Write php
rts
*--------------------------------------
NSC.Select
* sta $C300
* sta $C100
lda $C00B Workaround for Ultrawarp bug
lda $C304 Reset DS1216E comparison register with READ A2=1
lda $C104 Reset DS1216E comparison register with READ A2=1
ldy #8 Read 8 bytes...
@ -281,7 +281,7 @@ NSC.Select
inx
.5 bit $C300,x Write Pattern bit in A0, with A2=0
.5 bit $C100,x Write Pattern bit in A0, with A2=0
dey
bne .4

View File

@ -18,12 +18,17 @@ ZPPtr2 .BS 2
Index .BS 1
Count .BS 1
BufPtr .BS 2
hBuf .BS 1
bHostName .BS 1
bMachineType .BS 1
bCPUType .BS 1
bCPUSpeed .BS 1
bAltCPU .BS 1
bKernelVersion .BS 1
bKernelBuild .BS 1
bKernelMode .BS 1
bKernelClk .BS 1
ZS.END .ED
@ -50,6 +55,8 @@ CS.START cld
.DA CS.QUIT
L.MSG.USAGE .DA MSG.USAGE
L.MSG.CRLF .DA MSG.CRLF
L.ETCHOSTNAME .DA ETCHOSTNAME
L.ETCVERSION .DA ETCVERSION
L.TYPES .DA TYPE.UNKNOWN
.DA TYPE.IIe
.DA TYPE.IIc
@ -98,6 +105,7 @@ CS.RUN ldy #S.PS.ARGC
.8 lda #$ff
sta bKernelVersion
sta bKernelBuild
sta bKernelMode
sta bMachineType
sta bCPUType
@ -153,22 +161,34 @@ CS.RUN.PRINT bit bHostName
>PUSHBI 2
jsr CS.RUN.PRINTF
.6 bit bKernelMode
.6 bit bKernelBuild
bpl .60
jsr CS.RUN.GetBuild
bcs .60
>LDYA pData
jsr CS.RUN.PRINTYA
.60 bit bKernelMode
bpl .7
ldx #0
bit A2osX.IRQMode
bpl .60
bpl .61
inx
inx
bit A2osX.F
bvc .60
bvc .61
inx
inx
.60 >LDYA L.KERNEL.MODES,x
.61 >LDYA L.KERNEL.MODES,x
jsr CS.RUN.PRINTYA
.7 bit bKernelClk
@ -184,6 +204,39 @@ CS.RUN.PRINT bit bHostName
sec
rts
*--------------------------------------
CS.RUN.GetBuild >LDYA L.ETCVERSION
>SYSCALL LoadTxtFile
bcs .9
stx hBuf
txa
>SYSCALL GetMemPtr
>STYA BufPtr
ldy #$ff
.1 iny
lda (BufPtr),y
beq .2
cmp #C.CR
beq .2
cpy #64
beq .2
sta (pData),y
bra .1
.2 lda #0
sta (pData),y
lda hBuf
>SYSCALL FreeMem
* clc
.9 rts
*--------------------------------------
CS.RUN.PRINTYA >PUSHYA
>PUSHBI 0
@ -233,6 +286,7 @@ OptionVars .DA #bHostName,#bHostName
.DA #bCPUSpeed,#bCPUSpeed
.DA #bAltCPU,#bAltCPU
.DA #bKernelVersion,#bKernelVersion
.DA #bKernelBuild,#bKernelBuild
.DA #bKernelMode,#bKernelMode
.DA #bKernelClk,#bKernelClk
*--------------------------------------
@ -243,9 +297,14 @@ MSG.USAGE .AS "Usage : UNAME\r\n"
.AS " -S : CPU Speed\r\n"
.AS " -A : Alternate CPU\r\n"
.AS " -V : Kernel Version\r\n"
.AS " -B : Kernel Build\r\n"
.AS " -K : Kernel Mode\r\n"
.AS " -Z : Kernel Timing\r\n"
MSG.CRLF .AZ "\r\n"
*--------------------------------------
ETCHOSTNAME .AZ "${ROOT}etc/hostname"
ETCVERSION .AZ "${ROOT}etc/version"
*--------------------------------------
TYPE.UNKNOWN .AZ "Unknown_HW"
TYPE.IIe .AZ "Apple//e"
TYPE.IIc .AZ "Apple//c"
@ -261,7 +320,7 @@ KERNEL.PREEMPT .AZ "Preemptive_Mode"
*--------------------------------------
.DUMMY
.OR 0
DS.START
DS.START .BS 65
DS.END .ED
*--------------------------------------
MAN

View File

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

View File

@ -292,7 +292,7 @@ BB.ReadBlock lda blok figure out track & sector.
*--------------------------------------
BB.Wait100usecA phx (3)
.1 ldx #20 (2)
.1 ldx #21 (2)
.2 dex (2)
bne .2 (3)

View File

@ -84,11 +84,9 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
bne .1
jsr D2.SeekPhOnY we are on 0/4 or 2/4 track
bra .9 no wait, next operation will be phy/plx/Ph0On,y
.1 cmp D2.TargetQTrack we are on 1/4 or 3/4
bcs .2 if CS, C > T, must move out
inc CC: C < T, ON next PH
@ -143,9 +141,10 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
bcc .90
lda IO.D2.Ph0Off,x
.90 rts
.90
rts
*--------------------------------------
D2.SeekPhOnY and #6
ora D2.Slotn0
tay
@ -386,7 +385,7 @@ D2.Wait25600usec
D2.Wait100usecA phx
.1 ldx #20 (2)
.1 ldx #21 (2)
.2 dex (2)
bne .2 (3)

View File

@ -277,13 +277,11 @@ CIFS2.ReadDir jsr GetPFD
jsr GetRespDataPtr1
jsr CIFS2.ReadDir.FillBuf
lda hResp
>SYSCALL2 FreeMem
jsr Exit.OK
>LDYA BufPtr
ldx hBuf
stz CIFS.Status
clc
.90 rts
@ -568,8 +566,7 @@ CIFS2.FOpen jsr ReadSocket
>PUSHA
>SYSCALL2 mknod
.91 jsr FreeRespData
stz CIFS.Status
.91 jsr Exit.OK
bra .90
.9 jsr Exit.NODATA

View File

@ -808,7 +808,7 @@ Exit.OK lda hResp
>SYSCALL2 FreeMem
stz CIFS.Status
clc
* clc
rts
*--------------------------------------
Exit.KO pha

View File

@ -5,7 +5,11 @@ NEW
* address $FFCB (ROM rts opcode) for rom switching to function.
* $FF9B
*--------------------------------------
IRQ ldx #$FA save 6 bytes of page 0
IRQ pha
phx
phy
ldx #$FA save 6 bytes of page 0
.2 lda $00,x
sta IRQ.ZPSave-$FA,x
@ -63,6 +67,9 @@ IRQ.Done ldx #$FA
* lda IRQ.DoneCn+2
* sta mslot
ply
plx
pla
rti
*--------------------------------------
IRQ.GoX jmp (inttbl,x) interrupt routine x

View File

@ -362,14 +362,14 @@ LDR.ClkDevScan php
sta SETCXROM
sta $C300
* sta $C100
lda $C00B Workaround for Ultrawarp bug
ldx #8
.1 ldy #8
.2 lda $C304
.2 lda $C104
lsr
ror DS1216E.DATA1-1,x
dey
@ -381,11 +381,11 @@ LDR.ClkDevScan php
* sta $C300
lda $C00B Workaround for Ultrawarp bug
lda $C304 Reset DS1216E comparison register with READ A2=1
lda $C104 Reset DS1216E comparison register with READ A2=1
ldy #8 Read 8 bytes...
.3 lda DS1216E.SIG-1,x
.3 lda DS1216E.SIG-1,y
phy
ldy #8 ....of 8 bits
@ -396,7 +396,7 @@ LDR.ClkDevScan php
inx
.5 bit $C300,x Write Pattern bit in A0, with A2=0
.5 bit $C100,x Write Pattern bit in A0, with A2=0
dey
bne .4
@ -409,10 +409,9 @@ LDR.ClkDevScan php
.6 ldy #8
.7 lda $C304
.7 lda $C104
lsr
ror DS1216E.DATA2-1,x
dey
bne .7
@ -425,7 +424,7 @@ LDR.ClkDevScan php
sta CLRCXROM
.8 plp
*--------------------------------------
ldx #8
.9 lda DS1216E.DATA1-1,x

View File

@ -18,7 +18,7 @@ NCLK.START php
* sta $C300
lda $C00B Workaround for Ultrawarp bug
lda $C304 Reset DS1216E comparison register with READ A2=1
lda $C104 Reset DS1216E comparison register with READ A2=1
ldy #8 Read 8 bytes...
@ -33,7 +33,7 @@ NCLK.START php
inx
.3 bit $C300,x Write Pattern bit in A0, with A2=0
.3 bit $C100,x Write Pattern bit in A0, with A2=0
dey
bne .2
@ -47,7 +47,7 @@ NCLK.START php
.4 ldy #8
.5 pha
lda $C304 Read Byte...
lda $C104 Read Byte...
lsr
pla

View File

@ -784,11 +784,9 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
bne .1
jsr XRW.SeekPhOnY we are on 0/4 or 2/4 track : PhY on
bra .9 no wait, next operation will be phy/plx/Ph0On,y
.1 cmp XRW.TargetQTrack we are on 1/4 or 3/4
bcs .2 if CS, C > T, must move out
inc CC: C < T, ON next PH
@ -843,7 +841,7 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
bcc .90
lda IO.D2.Ph0Off,x
.90 clc Exit wit CC (recalibrate)
rts
*--------------------------------------

View File

@ -67,7 +67,7 @@ NSC.Detect php
.1 ldy #8
.2 lda $C304
.2 lda $C104
lsr
ror DS1216E.DATA1-1,x
dey
@ -79,7 +79,7 @@ NSC.Detect php
* sta $C300
lda $C00B Workaround for Ultrawarp bug
lda $C304 Reset DS1216E comparison register with READ A2=1
lda $C104 Reset DS1216E comparison register with READ A2=1
ldy #8 Read 8 bytes...
@ -94,7 +94,7 @@ NSC.Detect php
inx
.5 bit $C300,x Write Pattern bit in A0, with A2=0
.5 bit $C100,x Write Pattern bit in A0, with A2=0
dey
bne .4
@ -107,7 +107,7 @@ NSC.Detect php
.6 ldy #8
.7 lda $C304
.7 lda $C104
lsr
ror DS1216E.DATA2-1,x
dey
@ -202,44 +202,47 @@ NSC.MSG3 .AZ -"DS1216E Driver Successfully Installed."
DS1216E.DATA .EQ $200 Reverted YY MM DD Day HH mm SS CS
*--------------------------------------
NSCDRV.B.START .EQ *
NSCDRV lda RDCXROM
php
NSCDRV php
sei
lda RDCXROM
php
sta SETCXROM
sta $C300
* sta $C300
lda $C00B Workaround for Ultrawarp bug
lda $C304 Reset DS1216E comparison register with READ A2=1
lda $C104 Reset DS1216E comparison register with READ A2=1
ldx #8 Read 8 bytes...
ldy #8 Read 8 bytes...
NSCDRV.1 ldy #8 ....of 8 bits
NSCDRV.R1 lda DS1216E.PATTERN-1,x
NSCDRV.R1 lda DS1216E.PATTERN-1,y
phy
NSCDRV.2 lsr
bcs NSCDRV.21
ldy #8 ....of 8 bits
NSCDRV.20 bit $C300
bra NSCDRV.22
NSCDRV.2 ldx #0
lsr
bcc NSCDRV.3
inx
NSCDRV.21 bit $C301 Write Pattern bit in A0, with A2=0
NSCDRV.3 bit $C100,x Write Pattern bit in A0, with A2=0
NSCDRV.22 dey
dey
bne NSCDRV.2
dex
bne NSCDRV.1
ply
dey
bne NSCDRV.R1
ldx #8
NSCDRV.4 ldy #8
NSCDRV.5 pha
lda $C304 Read Byte...
lda $C104 Read Byte...
lsr
pla
@ -297,7 +300,8 @@ NSCDRV.R5 lda DS1216E.DATA+4 Get HH
sta CLRCXROM
.8 rts
.8 plp
rts
*--------------------------------------
DS1216E.PATTERN .HS 5CA33AC55CA33AC5 Reverted 7->0
*--------------------------------------