mirror of https://github.com/A2osX/A2osX.git
Kernel 0.93+
This commit is contained in:
parent
de2c018113
commit
45d20f5171
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -55,35 +55,46 @@ CS.INIT clc
|
|||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN stz ArgCount
|
||||
|
||||
lda #C.SPACE
|
||||
sta Separator
|
||||
|
||||
.10 jsr CS.RUN.NextArg
|
||||
bcs .8
|
||||
|
||||
lda (ZPPtr1)
|
||||
cmp #'-'
|
||||
beq .1
|
||||
|
||||
lda ArgCount
|
||||
sta ArgIndex
|
||||
bra .10
|
||||
|
||||
.1 ldy #1
|
||||
lda (ZPPtr1),y
|
||||
|
||||
ldx OptionList
|
||||
ldx #OptionList.Cnt-1
|
||||
|
||||
.2 cmp OptionList,x
|
||||
beq .3
|
||||
dex
|
||||
bne .2
|
||||
bpl .2
|
||||
|
||||
bra .97
|
||||
|
||||
.3 txa
|
||||
lsr
|
||||
beq .98 -H
|
||||
|
||||
cmp #4 -S
|
||||
bne .4
|
||||
|
||||
jsr CS.RUN.NextArg
|
||||
bcs .97
|
||||
lda (ZPPtr1)
|
||||
sta Separator
|
||||
bra .10
|
||||
|
||||
.4 sta OptionIdx
|
||||
jsr CS.RUN.NextArg
|
||||
bcs .97
|
||||
|
@ -96,6 +107,7 @@ CS.RUN stz ArgCount
|
|||
ldx OptionIdx
|
||||
sta FieldNum-1,x
|
||||
bra .10 scan for any other args
|
||||
|
||||
.97 lda #E.SYN
|
||||
.98 pha
|
||||
>PUSHBI 0
|
||||
|
@ -112,11 +124,18 @@ CS.RUN stz ArgCount
|
|||
stx hBuf
|
||||
lda ArgIndex
|
||||
beq .80
|
||||
|
||||
>SYSCALL ArgV
|
||||
>PUSHYA
|
||||
>LDYA ZPBufPtr
|
||||
>SYSCALL strcpy
|
||||
bra CS.RUN.OUT
|
||||
jsr CS.RUN.OUT
|
||||
bcs .9
|
||||
|
||||
lda #0 Exit with no Error
|
||||
sec
|
||||
rts
|
||||
|
||||
.80 ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
tax
|
||||
|
@ -126,25 +145,49 @@ CS.RUN stz ArgCount
|
|||
lda (ZPPtr1)
|
||||
cmp #S.FD.T.PIPE
|
||||
bne .97
|
||||
*--------------------------------------
|
||||
CS.RUN.LOOP >SLEEP
|
||||
|
||||
>PUSHWI 256
|
||||
>PUSHW ZPBufPtr
|
||||
ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
|
||||
>SYSCALL fgets
|
||||
bcc CS.RUN.OUT
|
||||
cmp #MLI.E.EOF
|
||||
bne .9
|
||||
CS.RUN.OUT lda FieldNum
|
||||
bcs .8
|
||||
|
||||
lda (ZPBufPtr)
|
||||
beq CS.RUN.LOOP
|
||||
|
||||
* >LDYA ZPBufPtr
|
||||
* >SYSCALL puts
|
||||
|
||||
jsr CS.RUN.OUT
|
||||
bcs .9
|
||||
bra CS.RUN.LOOP
|
||||
|
||||
.8 cmp #MLI.E.EOF
|
||||
bne .90
|
||||
|
||||
lda #0
|
||||
.90 sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.OUT ldx FieldNum
|
||||
beq CS.RUN.OUT.MN
|
||||
|
||||
ldy #$ff
|
||||
|
||||
.1 iny skip spaces
|
||||
lda (ZPBufPtr),y
|
||||
beq CS.RUN.PRINTCR
|
||||
|
||||
cmp Separator
|
||||
beq .1
|
||||
dec FieldNum
|
||||
|
||||
dex
|
||||
beq .4
|
||||
|
||||
.2 iny skip token
|
||||
lda (ZPBufPtr),y
|
||||
beq CS.RUN.PRINTCR
|
||||
|
@ -166,44 +209,45 @@ CS.RUN.OUT lda FieldNum
|
|||
|
||||
.8 >LDYA ZPBufPtr
|
||||
>SYSCALL puts
|
||||
lda #0 Exit with no Error
|
||||
sec
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.PRINTCR >PUSHBI 0
|
||||
>LDYA L.MSG.CRLF
|
||||
>SYSCALL printf
|
||||
bcs .9
|
||||
lda #0
|
||||
sec
|
||||
.9 rts
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.OUT.MN ldy #$ff
|
||||
|
||||
ldx StartChar
|
||||
beq .2
|
||||
|
||||
.1 iny
|
||||
lda (ZPBufPtr),y
|
||||
beq CS.RUN.PRINTCR
|
||||
dex
|
||||
bne .1
|
||||
|
||||
.2 ldx EndChar
|
||||
beq .8
|
||||
|
||||
.3 iny
|
||||
lda (ZPBufPtr),y
|
||||
beq .8
|
||||
|
||||
cpy EndChar
|
||||
bne .3
|
||||
|
||||
lda #0
|
||||
sta (ZPBufPtr),y
|
||||
|
||||
.8 ldy StartChar
|
||||
jsr CS.RUN.AddYToBufPtr
|
||||
|
||||
>LDYA ZPBufPtr
|
||||
>SYSCALL puts
|
||||
lda #0 Exit with no Error
|
||||
sec
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.NextArg inc ArgCount
|
||||
|
@ -236,7 +280,8 @@ CS.DOEVENT sec
|
|||
*--------------------------------------
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
OptionList >PSTR "HhFfMmNnSs"
|
||||
OptionList .AS "HhFfMmNnSs"
|
||||
OptionList.Cnt .EQ *-OptionList
|
||||
*--------------------------------------
|
||||
MSG.USAGE .AS "Usage : CUT "line of text"\r\n"
|
||||
.AS " -H : This help screen\r\n"
|
||||
|
@ -249,8 +294,7 @@ MSG.CRLF .AZ "\r\n"
|
|||
.DUMMY
|
||||
.OR 0
|
||||
DS.START
|
||||
DS.END
|
||||
.ED
|
||||
DS.END .ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/BIN/CUT.S
|
||||
|
|
|
@ -6,7 +6,7 @@ H2000 jmp prostart
|
|||
jmp p16start GQuit setup for gs/os
|
||||
|
||||
LDR.MSG.AppleII .AS -"Apple II"
|
||||
LDR.MSG.ProDOS .AS -"ProDOS 8 V2.0.3 "
|
||||
LDR.MSG.ProDOS .AS -"ProDOS 8 V2.0.3tc "
|
||||
.AS -"06-May-93"
|
||||
H202F .AS -" "
|
||||
LDR.MSG.Copyright
|
||||
|
|
|
@ -3,7 +3,7 @@ NEW
|
|||
.LIST OFF
|
||||
.OP 65816
|
||||
.OR $2000
|
||||
.TF PRODOS203,TSYS
|
||||
.TF PRODOS.203,TSYS
|
||||
*--------------------------------------
|
||||
.INB INC/ZP.I
|
||||
.INB INC/IO.I
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
NEW
|
||||
AUTO 3,1
|
||||
* object code = mli_1
|
||||
* global page
|
||||
|
||||
H2E00 jmp mlient1 $2E00-2EFF moved to $BF00
|
||||
*--------------------------------------
|
||||
H2E00 jmp GP.MLIENTRY $2E00-2EFF moved to $BF00
|
||||
jspare jmp * will be changed to point to dispatcher.
|
||||
clockv rts changed to jmp ($4C) if clock present.
|
||||
.DA tclk_in clock routine entry address.
|
||||
|
@ -31,26 +29,34 @@ numdevs .DA #$ff count (-1) active devices
|
|||
devlist .HS 00000000000000 up to 14 units may be active
|
||||
.HS 00000000000000
|
||||
.DA #0
|
||||
|
||||
*--------------------------------------
|
||||
.AS "(C)APPLE "
|
||||
mlient1 php
|
||||
*--------------------------------------
|
||||
GP.MLIENTRY php
|
||||
sei
|
||||
jmp mlicont
|
||||
aftirq sta RRAMWRAMBNK1 read/write RAM bank 1
|
||||
jmp fix45 restore $45 after interrupt in LC
|
||||
oldacc .DA #0
|
||||
afbank .HS 00
|
||||
|
||||
jmp GP.MLICONT
|
||||
*--------------------------------------
|
||||
*aftirq sta RRAMWRAMBNK1 read/write RAM bank 1
|
||||
* jmp fix45 restore $45 after interrupt in LC
|
||||
*oldacc .DA #0
|
||||
*afbank .HS 00
|
||||
*--------------------------------------
|
||||
.LIST ON
|
||||
GP.FREE1 .EQ $BF58-*
|
||||
.LIST OFF
|
||||
.BS GP.FREE1
|
||||
*--------------------------------------
|
||||
* memory map of lower 48k. each bit represents 1 page.
|
||||
* protected pages = 1, unprotected = 0
|
||||
|
||||
*--------------------------------------
|
||||
memmap .HS C000000000000000
|
||||
.HS 0000000000000000
|
||||
.HS 0000000000000001
|
||||
|
||||
*--------------------------------------
|
||||
* table of buffer addresses for currently open files.
|
||||
* these can only be changed thru the mli call setbuf.
|
||||
|
||||
*--------------------------------------
|
||||
buftbl .HS 0000 file #1
|
||||
.HS 0000 file #2
|
||||
.HS 0000 file #3
|
||||
|
@ -59,23 +65,27 @@ buftbl .HS 0000 file #1
|
|||
.HS 0000 file #6
|
||||
.HS 0000 file #7
|
||||
.HS 0000 file #8
|
||||
|
||||
*--------------------------------------
|
||||
* table of interrupt vectors. these can only be changed
|
||||
* by the mli call allocate_interrupt. values of the registers
|
||||
* at the time of the most recent interrupt are stored here along
|
||||
* with the address interrupted.
|
||||
|
||||
*--------------------------------------
|
||||
inttbl .HS 0000 int #1
|
||||
.HS 0000 int #2
|
||||
.HS 0000 int #3
|
||||
.HS 0000 int #4
|
||||
p8areg .DA #0 A register savearea
|
||||
p8xreg .DA #0 X register savearea
|
||||
p8yreg .DA #0 Y register savearea
|
||||
p8sreg .DA #0 S register savearea
|
||||
p8preg .DA #0 P register savearea
|
||||
bankid .DA #1 bank ID byte (ROM/RAM)
|
||||
intadr .HS 0000 interrupt return address
|
||||
*--------------------------------------
|
||||
*p8areg .DA #0 A register savearea
|
||||
*p8xreg .DA #0 X register savearea
|
||||
*p8yreg .DA #0 Y register savearea
|
||||
*p8sreg .DA #0 S register savearea
|
||||
*p8preg .DA #0 P register savearea
|
||||
*bankid .DA #1 bank ID byte (ROM/RAM)
|
||||
*intadr .HS 0000 interrupt return address
|
||||
*--------------------------------------
|
||||
.BS 8
|
||||
*--------------------------------------
|
||||
p8date .HS 0000 bits 15-9=yr, 8-5=mo, 4-0=day
|
||||
p8time .HS 0000 bits 12-8=hr, 5-0=min, low-hi format
|
||||
flevel .DA #0 current file level
|
||||
|
@ -89,11 +99,11 @@ mliact .DA #0 MLI active flag
|
|||
mliretn .DA 0 last MLI call return address
|
||||
mlix .DA #0 MLI X register savearea
|
||||
mliy .DA #0 MLI Y register savearea
|
||||
|
||||
*--------------------------------------
|
||||
* language card bank switching routines which must reside at $BFA0 because
|
||||
* workstation software patches this area
|
||||
|
||||
HBFA0 eor $E000 test for rom enable
|
||||
*--------------------------------------
|
||||
GP.MLIEXIT eor $E000 test for rom enable
|
||||
beq .1 taken if ram enabled
|
||||
sta RROMBNK2 read ROM
|
||||
bne .2 always
|
||||
|
@ -103,8 +113,8 @@ HBFA0 eor $E000 test for rom enable
|
|||
lda RRAMWRAMBNK2 else enable alt $D000
|
||||
.2 pla return code
|
||||
rti re-enable interrupts and return
|
||||
|
||||
mlicont sec
|
||||
*--------------------------------------
|
||||
GP.MLICONT sec
|
||||
ror mliact notify interrupt routines MLI active.
|
||||
lda $E000 preserve language card/rom orientation
|
||||
sta bnkbyt1 for proper restoration when mli exits.
|
||||
|
@ -113,30 +123,35 @@ mlicont sec
|
|||
lda RRAMWRAMBNK1 force ram card on
|
||||
lda RRAMWRAMBNK1 with write allowed
|
||||
jmp XDOS.MLI
|
||||
*--------------------------------------
|
||||
*GP.IrqExit lda bankid determine state of ram card (ROM/RAM)
|
||||
*irqxit0
|
||||
* beq .2 branch if ram card enabled.
|
||||
* bmi .1 branch if alternate $D000 enabled.
|
||||
|
||||
GP.IrqExit lda bankid determine state of ram card (ROM/RAM)
|
||||
* lsr determine if no ram card present.
|
||||
* bcc .3 branch if rom only system.
|
||||
|
||||
irqxit0 beq .2 branch if ram card enabled.
|
||||
bmi .1 branch if alternate $D000 enabled.
|
||||
* lda RROMWRAMBNK2 enable rom
|
||||
* bcs .3 always taken
|
||||
|
||||
lsr determine if no ram card present.
|
||||
bcc .3 branch if rom only system.
|
||||
*.1 lda RRAMWRAMBNK2 enable alternate $D000
|
||||
|
||||
lda RROMWRAMBNK2 enable rom
|
||||
bcs .3 always taken
|
||||
|
||||
.1 lda RRAMWRAMBNK2 enable alternate $D000
|
||||
|
||||
.2 lda #$01 preset bankid for rom.
|
||||
sta bankid (reset if ram card interrupt)
|
||||
|
||||
.3 lda p8areg restore acc
|
||||
rti exit
|
||||
|
||||
irqent bit RRAMWRAMBNK1 this entry only used when rom
|
||||
bit RRAMWRAMBNK1 was enabled at time of interrupt.
|
||||
jmp irqrecev
|
||||
*.2 lda #$01 preset bankid for rom.
|
||||
* sta bankid (reset if ram card interrupt)
|
||||
|
||||
*.3 lda p8areg restore acc
|
||||
* rti exit
|
||||
*--------------------------------------
|
||||
.LIST ON
|
||||
GP.FREE2 .EQ $BFEB-*
|
||||
.LIST OFF
|
||||
.BS GP.FREE2
|
||||
*--------------------------------------
|
||||
GP.IRQV bit RRAMWRAMBNK1 ***NEW ROM ONLY IRQ $fffe > $Cxxx space***
|
||||
bit RRAMWRAMBNK1 Entry used when rom/mainLC/auxLC
|
||||
jmp XDOS.IRQV
|
||||
*--------------------------------------
|
||||
bnkbyt1 .DA #0
|
||||
bnkbyt2 .DA #0
|
||||
.HS 00000000 pad to before $BFFA
|
||||
|
|
|
@ -5,53 +5,63 @@ NEW
|
|||
* address $FFCB (ROM rts opcode) for rom switching to function.
|
||||
* $2D9B-2DFF moved to $FF9B-FFFF
|
||||
*--------------------------------------
|
||||
lanirq .LIST ON
|
||||
OLDROM.IRQV
|
||||
* pha
|
||||
* lda accsav
|
||||
* sta oldacc
|
||||
* pla
|
||||
* sta accsav
|
||||
pla get status register from stack
|
||||
pha and put it back.
|
||||
and #$10 is it a break or interrupt?
|
||||
bne H2DC2 branch if break.
|
||||
|
||||
lda $D000 get ram bankid (LC1 = $D8, LC2=$EE)
|
||||
eor #$D8 is the system active? ($D8)
|
||||
beq sysactv branch if it is
|
||||
lda #$FF
|
||||
sysactv sta bankid
|
||||
sta afbank
|
||||
lda /aftirq setup return address
|
||||
pha
|
||||
lda #aftirq
|
||||
pha
|
||||
lda #$04 status reg with interrupt flag set
|
||||
pha
|
||||
H2DC2 lda /romirq setup ROM re-entry
|
||||
pha
|
||||
lda #romirq
|
||||
pha
|
||||
* pla get status register from stack
|
||||
* pha and put it back.
|
||||
* and #$10 is it a break or interrupt?
|
||||
* bne H2DC2 branch if break.
|
||||
|
||||
* lda $D000 get ram bankid (LC1 = $D8, LC2=$EE)
|
||||
* eor #$D8 is the system active? ($D8)
|
||||
* beq sysactv branch if it is
|
||||
|
||||
* lda #$FF
|
||||
|
||||
*sysactv sta bankid
|
||||
* sta afbank
|
||||
* lda /aftirq setup return address
|
||||
* pha
|
||||
* lda #aftirq
|
||||
* pha
|
||||
* lda #$04 status reg with interrupt flag set
|
||||
* pha
|
||||
|
||||
*H2DC2 lda /romirq setup ROM re-entry
|
||||
* pha
|
||||
* lda #romirq
|
||||
* pha
|
||||
|
||||
.LIST ON
|
||||
IRQ.FREE1 .EQ $ffc8-*
|
||||
.LIST OFF
|
||||
|
||||
.BS IRQ.FREE1
|
||||
|
||||
gorom sta RROMBNK2 hits ROM rts at $FFCB
|
||||
|
||||
* 'lreset' address must = $FFCB for rom switch i/o to work
|
||||
.BS *-$ffcb
|
||||
|
||||
lreset lda rreset+1
|
||||
lreset lda /resetv-1
|
||||
pha
|
||||
lda rreset
|
||||
lda #resetv-1
|
||||
pha
|
||||
jmp gorom
|
||||
|
||||
rreset .DA resetv-1 rts to resetv
|
||||
*rreset .DA resetv-1 rts to resetv
|
||||
|
||||
fix45 sta p8areg A register savearea
|
||||
*fix45 sta p8areg A register savearea
|
||||
* lda oldacc
|
||||
* sta accsav
|
||||
lda RRAMWRAMBNK1 read/write RAM bank 1
|
||||
lda RRAMWRAMBNK1
|
||||
lda afbank
|
||||
jmp irqxit0
|
||||
* lda RRAMWRAMBNK1 read/write RAM bank 1
|
||||
* lda RRAMWRAMBNK1
|
||||
* lda afbank
|
||||
* jmp irqxit0
|
||||
|
||||
stypfx sty newpfxptr fix appletalk PFI bug
|
||||
sty preflag prefix flag
|
||||
|
@ -60,12 +70,17 @@ stypfx sty newpfxptr fix appletalk PFI bug
|
|||
stapfx sta newpfxptr
|
||||
sta preflag
|
||||
rts
|
||||
|
||||
.BS *-$fffa
|
||||
|
||||
.LIST ON
|
||||
IRQ.FREE2 .EQ $fffa-*
|
||||
.LIST OFF
|
||||
|
||||
.BS IRQ.FREE2
|
||||
|
||||
.DA nmivect nmi handler
|
||||
.DA lreset reset handler
|
||||
irqv .DA lanirq irq handler
|
||||
irqv .DA * PATCHED with ROM vector by LDR
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/PRODOS.FX/PRODOS.S.IRQ
|
||||
|
|
|
@ -68,6 +68,7 @@ m64k ldx #H2367 yx=2367 relocation table
|
|||
sta xdosver save current version for dir use
|
||||
H20CE bcc H20D3
|
||||
jmp relocerr
|
||||
|
||||
H20D3 lda RROMBNK2 read ROM
|
||||
ldx version ROM id byte
|
||||
cpx #$06
|
||||
|
@ -175,7 +176,8 @@ noramdsk lda RROMWRAMBNK2 read ROM/write RAM bank 2
|
|||
ldx irqv+1 x = high byte
|
||||
jsr lc1in set language card bank 1 to r/w
|
||||
cpx #$D0 is it > $D000 (old roms)
|
||||
lda #$00
|
||||
|
||||
* lda #$00 was for setting removed IRQFLAG
|
||||
bcc .1
|
||||
|
||||
jmp H22EB need enhanced Roms
|
||||
|
@ -188,9 +190,9 @@ noramdsk lda RROMWRAMBNK2 read ROM/write RAM bank 2
|
|||
sta CLRALTZP use main zero page/stack
|
||||
stx irqv+1 save irq vector in main lc
|
||||
sty irqv
|
||||
lda #$01
|
||||
* lda #$01 was for setting removed IRQFLAG
|
||||
|
||||
H21C5 stz cortflag assume not Cortland system
|
||||
stz cortflag assume not Cortland system
|
||||
|
||||
lda cortland running on a Cortland ?
|
||||
beq H21D5 branch if not.
|
||||
|
@ -657,7 +659,7 @@ H257B .DA breakv
|
|||
jmp oldrst '&' vector
|
||||
jmp oldrst ctrl-y vector
|
||||
.HS 004000
|
||||
.DA irqent global page interrupt vector
|
||||
.DA GP.IRQV global page interrupt vector
|
||||
lc1in lda RRAMWRAMBNK1 read/write language card RAM bank 1
|
||||
lda RRAMWRAMBNK1
|
||||
rts
|
||||
|
|
|
@ -96,7 +96,7 @@ exitmli stz bubit clear backup bit
|
|||
ldy mliy MLI Y register savearea
|
||||
pha
|
||||
lda bnkbyt1 restore language card status
|
||||
jmp HBFA0 and return.
|
||||
jmp GP.MLIEXIT and return.
|
||||
|
||||
nodevice lda #MLI.E.NODEV no device connected.
|
||||
.HS 2C BIT ABS
|
||||
|
@ -195,13 +195,13 @@ dealcint ldy #$01 zero out interrupt vector
|
|||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
irqrecev
|
||||
XDOS.IRQV
|
||||
* lda accsav get acc from where old ROM put it.
|
||||
* sta p8areg
|
||||
stx p8xreg entry point on ram card interrupt
|
||||
sty p8yreg
|
||||
tsx
|
||||
stx p8sreg
|
||||
* stx p8xreg entry point on ram card interrupt
|
||||
* sty p8yreg
|
||||
* tsx
|
||||
* stx p8sreg
|
||||
|
||||
* lda irqflag irq flag = 0 if old roms
|
||||
* bne .1 and 1 if new roms.
|
||||
|
@ -213,7 +213,7 @@ irqrecev
|
|||
* pla
|
||||
* sta intadr+1
|
||||
*.1
|
||||
txs
|
||||
* txs
|
||||
* lda mslot set up to re-enable $Cn00 rom
|
||||
* sta irqdev+2
|
||||
|
||||
|
@ -265,8 +265,8 @@ H31AE lda svzerop-$FA,x restore the zero page
|
|||
* lda irqdev+2 restore device id.
|
||||
* sta mslot slot being accessed.
|
||||
|
||||
H31DD jmp GP.IrqExit do necessary bank switches and return.
|
||||
|
||||
*H31DD jmp GP.IrqExit do necessary bank switches and return.
|
||||
rti
|
||||
*irqflag .HS 00 0 = old roms. 1 = new roms.
|
||||
irqcount .HS 00 # of unclaimed interrupts.
|
||||
irqXindex .HS 00
|
||||
|
|
|
@ -828,7 +828,8 @@ L3B96 ldx vcbptr mark which block had 1st free space
|
|||
lda nofree
|
||||
bmi L3BBE if no free space was found.
|
||||
sta vcbbuf+28,x update the free count.
|
||||
lda scrtch+1 sta vcbbuf+21,x update volume control byte.
|
||||
lda scrtch+1
|
||||
sta vcbbuf+21,x update volume control byte.
|
||||
lda scrtch
|
||||
sta vcbbuf+20,x
|
||||
L3BAD lda vcbbuf+20,x compare total available free blocks
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
NEW
|
||||
AUTO 3,1
|
||||
* disk ii driver. object code = xrw_0
|
||||
* $5300-5A00 moved to language card bank 1 at $D000
|
||||
*--------------------------------------
|
||||
FASTSEEK .EQ 0
|
||||
*--------------------------------------
|
||||
blockio cld $D8 to flag language card bank 1 (main)
|
||||
jsr rsetphse
|
||||
|
@ -167,6 +167,7 @@ L53FD ldx A2L
|
|||
rol write protect-->carry-->bit 0=1
|
||||
lda q6l,x keep in read mode
|
||||
jmp statdne
|
||||
|
||||
myseek asl assume two phase stepper
|
||||
sta track save destination track * 2
|
||||
jsr alloff turn all phases off to be sure.
|
||||
|
@ -175,7 +176,9 @@ myseek asl assume two phase stepper
|
|||
sta curtrk current position.
|
||||
lda track where to go next.
|
||||
sta iobpdn,x
|
||||
|
||||
jsr seek move head there
|
||||
|
||||
alloff ldy #$03 turn off all phases before returning.
|
||||
L5427 tya (send phase in acc)
|
||||
jsr clrphase carry clear, phases should be turned off
|
||||
|
@ -184,7 +187,7 @@ L5427 tya (send phase in acc)
|
|||
lsr curtrk divide back down
|
||||
clc
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
* fast seek subroutine
|
||||
*
|
||||
* on entry:
|
||||
|
@ -201,53 +204,111 @@ L5427 tya (send phase in acc)
|
|||
* seek for motor on time overlap.
|
||||
*
|
||||
* variables used: curtrk, trkn, countn, prior, A2L, montimel, montimeh
|
||||
|
||||
*--------------------------------------
|
||||
.DO FASTSEEK=0
|
||||
seek sta trkn save target track.
|
||||
cmp curtrk on desired track ?
|
||||
beq setphase yes, energize phase and return
|
||||
beq setphase CS, yes, phase OFF and return
|
||||
|
||||
lda #$00
|
||||
sta trkcnt half track count.
|
||||
|
||||
L5440 lda curtrk save curtrk for delayed turnoff
|
||||
sta prior
|
||||
sec
|
||||
sbc trkn delta-tracks.
|
||||
beq L5483 branch if curtrk = destination
|
||||
|
||||
bcs mvout move out, not in.
|
||||
|
||||
eor #$FF calculate tracks to go.
|
||||
inc curtrk increment current track (in).
|
||||
bcc L545A always taken.
|
||||
|
||||
mvout adc #$FE calculate tracks to go.
|
||||
dec curtrk decrement current track (out).
|
||||
|
||||
L545A cmp trkcnt
|
||||
bcc L5462 and 'tracks moved'
|
||||
|
||||
lda trkcnt
|
||||
|
||||
L5462 cmp #$09
|
||||
bcs L5468 if trkcnt > 8 then leave y alone (y=8)
|
||||
tay else set acceleration index in y
|
||||
sec
|
||||
|
||||
L5468 jsr setphase
|
||||
lda ontable,y for 'ontime'
|
||||
jsr mswait (100us intervals)
|
||||
|
||||
lda prior
|
||||
clc for phaseoff
|
||||
jsr clrphase turn off prior phase
|
||||
|
||||
lda offtable,y then wait 'offtime'
|
||||
jsr mswait (100us intervals)
|
||||
|
||||
inc trkcnt count of 'tracks moved'
|
||||
bne L5440 always taken
|
||||
|
||||
L5483 jsr mswait settle 25 msec
|
||||
|
||||
clc set for phase off
|
||||
|
||||
setphase lda curtrk get current track
|
||||
|
||||
clrphase and #$03 mask for 1 of 4 phases
|
||||
rol double for phaseon/off index
|
||||
ora A2L
|
||||
rol double for phase on(CS)/off(CC) index
|
||||
ora A2L Slot $n0
|
||||
tax
|
||||
lda phaseoff,x turn on/off one phase
|
||||
ldx A2L restore x reg
|
||||
rts and return
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
.DO FASTSEEK=1
|
||||
XRW.NewSeek STA $26
|
||||
|
||||
.1 LDA $FF
|
||||
STA $27
|
||||
SEC
|
||||
SBC $26
|
||||
BEQ XRW.NewSeek.rts
|
||||
|
||||
BCS .2
|
||||
|
||||
INC $FF
|
||||
BCC .3
|
||||
|
||||
.2 DEC $FF
|
||||
|
||||
.3 JSR XRW.NewSeek.TrOff
|
||||
|
||||
JSR XRW.NewSeek.Wait
|
||||
XRW.NewSeek.TrOn
|
||||
LDA $27
|
||||
AND #$03
|
||||
ASL
|
||||
TAY
|
||||
LDA $C0E0,Y
|
||||
JSR XRW.NewSeek.Wait
|
||||
BEQ .1
|
||||
|
||||
XRW.NewSeek.TrOff
|
||||
LDA $FF
|
||||
AND #$03
|
||||
ASL
|
||||
TAY
|
||||
LDA $C0E1,Y
|
||||
XRW.NewSeek.rts
|
||||
rts
|
||||
|
||||
XRW.NewSeek.Wait
|
||||
LDA #$25
|
||||
JMP $FCA8 F8ROM:WAIT
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
* 7-bit to 6-bit 'deniblize' table (16-sector format)
|
||||
*
|
||||
* valid codes are $96 to $FF only. codes with more than one pair of
|
||||
|
@ -255,7 +316,7 @@ clrphase and #$03 mask for 1 of 4 phases
|
|||
*
|
||||
* nibles in the ranges of $A0-$A3, $C0-$C7, $E0-$E3 are used for
|
||||
* other tables since no valid nibles are in these ranges.
|
||||
|
||||
*--------------------------------------
|
||||
dnibl .HS 0004FFFF080CFF10 aligned to page boundary minus $96
|
||||
.HS 1418
|
||||
twobit3 .HS 008040C0FFFF used in fast prenib as lookup for 2-bit quantities.
|
||||
|
@ -350,15 +411,13 @@ montimel .HS 00
|
|||
montimeh .HS 00 also 'volume'
|
||||
prior .HS 00
|
||||
trkn .HS 00
|
||||
|
||||
.DO FASTSEEK=0
|
||||
* phase on, off time tables
|
||||
* in 100 usec intervals (seek)
|
||||
|
||||
ontable .HS 013028
|
||||
.HS 24201E1D1C1C
|
||||
offtable .HS 702C
|
||||
.HS 26221F1E1D1C1C
|
||||
|
||||
ontable .HS 01302824201E1D1C1C
|
||||
offtable .HS 702C26221F1E1D1C1C
|
||||
.FIN
|
||||
* mswait subroutine
|
||||
*
|
||||
* delays a specified number of 100 usec intervals for motor timing.
|
||||
|
|
|
@ -72,7 +72,7 @@ A3L .EQ $40
|
|||
A4L .EQ $42
|
||||
unitnum .EQ $43
|
||||
buf .EQ $44 2-byte data buffer pointer which
|
||||
accsav .EQ $45 overlaps accsav (temp acc save byte)
|
||||
*accsav .EQ $45 overlaps accsav (temp acc save byte)
|
||||
bloknml .EQ $46 used mostly as 16 bit block # pointer
|
||||
zpt .EQ $48 highly used zero page index pointer
|
||||
datptr .EQ $4A ptr to data area of buffer.
|
||||
|
|
Loading…
Reference in New Issue