diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index aedba464..4ad2708a 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/ProDOS.203/ProDOS.S.CCLK.txt b/ProDOS.203/ProDOS.S.CCLK.txt index 965b1ea3..a2d4fba3 100644 --- a/ProDOS.203/ProDOS.S.CCLK.txt +++ b/ProDOS.203/ProDOS.S.CCLK.txt @@ -4,10 +4,7 @@ NEW * Cortland clock driver * $2F80-$2FFC moved to $D742 *-------------------------------------- -ofsC .EQ *-tclk_in offset to Cortland clock org - -cclock_0 - >SHORTMX 8 bit mode. +CCLK.START >SHORTMX 8 bit mode. lda statereg state register. sta savestate save for restore after tool call. and #$CF clear the read/write aux memory bits. @@ -30,11 +27,12 @@ cclock_0 pla sta p8time+1 hours pla year -H2FB1 cmp #100 out of range? - bcc H2FB9 no, go ahead and store +.1 cmp #100 out of range? + bcc .2 no, go ahead and store sbc #$64 else put back in range. - bra H2FB1 try again -H2FB9 sta p8date+1 year + bra .1 try again + +.2 sta p8date+1 year pla inc increment day for Prodos 8 format. sta p8date day @@ -53,13 +51,12 @@ H2FB9 sta p8date+1 year sec go back to emulation mode xce to continue with Prodos 8 rts -savestate .EQ *-ofsC - .HS 00 state of the state register +savestate .HS 00 state of the state register .AS "JIMJAYKERRY&MIKE" .HS 0000000000000000 pad 0's until length .HS 0000000000000000 of driver = 125 bytes. .HS 000000000000 -cclk_end .EQ * end of obj cclock_0. +CCLK.END .EQ * end of obj cclock_0. .HS 000000 pad to page boundary *-------------------------------------- MAN diff --git a/ProDOS.203/ProDOS.S.DiskII.txt b/ProDOS.203/ProDOS.S.DiskII.txt index b1594c46..71b4397a 100644 --- a/ProDOS.203/ProDOS.S.DiskII.txt +++ b/ProDOS.203/ProDOS.S.DiskII.txt @@ -3,8 +3,6 @@ NEW * disk ii driver. object code = xrw_0 * $5300-5A00 moved to language card bank 1 at $D000 *-------------------------------------- -ofsD .EQ *-rwts offset to disk ii driver or - blockio cld $D8 to flag language card bank 1 (main) jsr rsetphse lda q7l,x turn off write enable @@ -40,8 +38,7 @@ L5334 lda #$27 i/o error * read/write a track/sector -regrwts .EQ *-ofsD - ldy #$01 retry count +regrwts ldy #$01 retry count sty seekcnt only one recalibrate per call sta ibsect lda unitnum get slot # for this operation @@ -162,8 +159,7 @@ hndlerr sec lda motoroff,x turn off rts L53F4 jsr write16 write nibbles -statdne .EQ *-ofsD - bcc L53E7 if no errors. +statdne bcc L53E7 if no errors. lda #$2B disk write protected. bne hndlerr always L53FD ldx A2L @@ -172,8 +168,7 @@ L53FD ldx A2L rol write protect-->carry-->bit 0=1 lda q6l,x keep in read mode jmp statdne -myseek .EQ *-ofsD - asl assume two phase stepper +myseek asl assume two phase stepper sta track save destination track * 2 jsr alloff turn all phases off to be sure. jsr drvindx get index to previous track @@ -182,8 +177,7 @@ myseek .EQ *-ofsD lda track where to go next. sta iobpdn,x jsr seek move head there -alloff .EQ *-ofsD - ldy #$03 turn off all phases before returning. +alloff ldy #$03 turn off all phases before returning. L5427 tya (send phase in acc) jsr clrphase carry clear, phases should be turned off dey @@ -209,10 +203,9 @@ L5427 tya (send phase in acc) * * variables used: curtrk, trkn, countn, prior, A2L, montimel, montimeh -seek .EQ *-ofsD - sta trkn save target track. +seek sta trkn save target track. cmp curtrk on desired track ? - beq L5487 yes, energize phase and return + beq setphase yes, energize phase and return lda #$00 sta trkcnt half track count. L5440 lda curtrk save curtrk for delayed turnoff @@ -244,11 +237,11 @@ L5468 jsr setphase inc trkcnt count of 'tracks moved' bne L5440 always taken L5483 jsr mswait settle 25 msec + clc set for phase off -setphase .EQ *-ofsD -L5487 lda curtrk get current track -clrphase .EQ *-ofsD - and #$03 mask for 1 of 4 phases + +setphase lda curtrk get current track +clrphase and #$03 mask for 1 of 4 phases rol double for phaseon/off index ora A2L tax @@ -264,25 +257,20 @@ clrphase .EQ *-ofsD * 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 .EQ *-ofsD aligned to page boundary minus $96 - .HS 0004FFFF080CFF10 +dnibl .HS 0004FFFF080CFF10 aligned to page boundary minus $96 .HS 1418 -twobit3 .EQ *-ofsD used in fast prenib as lookup for - .HS 008040C0FFFF 2-bit quantities. +twobit3 .HS 008040C0FFFF used in fast prenib as lookup for 2-bit quantities. .HS 1C20FFFFFF24282C .HS 3034FFFF383C4044 .HS 484CFF5054585C60 .HS 6468 -twobit2 .EQ *-ofsD used in fast prenib. - .HS 00201030 -endmrks .EQ *-ofsD table using 'unused' nibbles: - .HS DEAAEBFF ($C4,$C5,$C6,$C7) +twobit2 .HS 00201030 used in fast prenib. +endmrks .HS DEAAEBFF table using 'unused' nibbles ($C4,$C5,$C6,$C7) .HS FFFFFF6CFF70 .HS 7478FFFFFF7CFFFF .HS 8084FF888C909498 .HS 9CA0 -twobit1 .EQ *-ofsD used in fast prenib. - .HS 0008040CFFA4 +twobit1 .HS 0008040CFFA4 used in fast prenib. .HS A8ACFFB0B4B8BCC0 .HS C4C8FFFFCCD0D4D8 .HS DCE0FFE4E8ECF0F4 @@ -297,20 +285,16 @@ twobit1 .EQ *-ofsD used in fast prenib. * origin = $D200 (page boundary) * page align the following tables: -dnibl2 .EQ *-ofsD - .HS 00 -dnibl3 .EQ *-ofsD - .HS 00 -dnibl4 .EQ *-ofsD - .HS 00 +dnibl2 .HS 00 +dnibl3 .HS 00 +dnibl4 .HS 00 * 6-bit to 7-bit nibl conversion table * * codes with more than one pair of adjacent zeroes * or with no adjacent ones (except B7) are excluded. -nibl .EQ *-ofsD - .HS 960200 +nibl .HS 960200 .HS 00970100009A0300 .HS 009B0002009D0202 .HS 009E0102009F0302 @@ -346,52 +330,34 @@ nibl .EQ *-ofsD * nibl buffer 'nbuf2' must be on a page boundary !!! -nbuf2 .EQ *-ofsD nibl buffer for read/write of low - .BS 86 2-bits of each byte. -ibtrk .EQ *-ofsD - .HS 00 -ibsect .EQ *-ofsD - .HS 00 -ibstat .EQ *-ofsD - .HS 00 -iobpdn .EQ *-ofsD - .HS 00 -curtrk .EQ *-ofsD - .HS 00 +nbuf2 .BS 86 nibl buffer for read/write of low 2-bits of each byte. +ibtrk .HS 00 +ibsect .HS 00 +ibstat .HS 00 +iobpdn .HS 00 +curtrk .HS 00 .HS 00000000000000 for slots 1 thru 7 .HS 00000000000000 drives 1 & 2 -retrycnt .EQ *-ofsD - .HS 00 -seekcnt .EQ *-ofsD - .HS 00 -trkcnt .EQ *-ofsD halftracks moved count. -countn .EQ *-ofsD 'must find' count. -last .EQ *-ofsD 'odd bit' nibls. - .HS 00 -csum .EQ *-ofsD used for address header cksum - .HS 00 -csstv .EQ *-ofsD - .HS 00 -sect .EQ *-ofsD - .HS 00 -track .EQ *-ofsD -montimel .EQ *-ofsD - .HS 00 -montimeh .EQ *-ofsD also 'volume' - .HS 00 -prior .EQ *-ofsD - .HS 00 -trkn .EQ *-ofsD - .HS 00 +retrycnt .HS 00 +seekcnt .HS 00 +trkcnt .EQ * halftracks moved count. +countn .EQ * 'must find' count. +last .HS 00 'odd bit' nibls. +csum .HS 00 used for address header cksum +csstv .HS 00 +sect .HS 00 +track .EQ * +montimel .HS 00 +montimeh .HS 00 also 'volume' +prior .HS 00 +trkn .HS 00 * phase on, off time tables * in 100 usec intervals (seek) -ontable .EQ *-ofsD - .HS 013028 +ontable .HS 013028 .HS 24201E1D1C1C -offtable .EQ *-ofsD - .HS 702C +offtable .HS 702C .HS 26221F1E1D1C1C * mswait subroutine @@ -402,16 +368,15 @@ offtable .EQ *-ofsD * montimel, montimeh are incremented once per 100 usec interval * for motor on timing. -mswait .EQ *-ofsD -L5685 ldx #$11 delay 86 usec -L5687 dex - bne L5687 +mswait ldx #$11 delay 86 usec +.1 dex + bne .1 inc montimel - bne L5692 + bne .2 inc montimeh -L5692 sec +.2 sec sbc #$01 - bne L5685 + bne mswait rts * read address field subroutine (16-sector format) @@ -425,8 +390,7 @@ L5692 sec * expects: original 10-sector normal density nibls (4-bit) odd bits then even. * observe 'no page cross' warnings on some branches !!! -rdadr16 .EQ *-ofsD - ldy #$FC +rdadr16 ldy #$FC sty countn 'must find' count L569D iny bne L56A5 low order of count. @@ -485,8 +449,7 @@ rderr sec * acc=$AA, x=unchanged, y=0, carry clear. * observe 'no page cross' on some branches !! -read16 .EQ *-ofsD - txa get slot # +read16 txa get slot # ora #$8C prepare mods to read routine. sta rd4+1 warning: the read routine is sta rd5+1 self modified !! @@ -529,54 +492,49 @@ L574A lda q6l,x ldy #$AA lda #$00 L5757 sta pcl use z-page for keeping checksum -rd4 .EQ *-ofsD -L5759 ldx q6l+$60 warning: self modified - bpl L5759 +rd4 ldx q6l+$60 warning: self modified + bpl rd4 lda dnibl-$96,x sta nbuf2-$AA,y save the two-bit groups in nbuf. eor pcl update checksum. iny next position in nbuf. bne L5757 loop for all $56 two-bit groups. ldy #$AA now read directly into user buffer. - bne L5772 always taken. + bne rd5 always taken. L576D sec error rts -ref1 .EQ *-ofsD -L576F sta $1000,y warning: self modified -rd5 .EQ *-ofsD -L5772 ldx q6l+$60 warning: self modified - bpl L5772 +ref1 sta $1000,y warning: self modified +rd5 ldx q6l+$60 warning: self modified + bpl rd5 eor dnibl-$96,x get actual 6-bit data from dnib table. ldx nbuf2-$AA,y get associated two-bit pattern eor dnibl2,x and combine to form whole byte. iny - bne L576F loop for $56 bytes. + bne ref1 loop for $56 bytes. pha save for now, no time to store... and #$FC strip low bits. ldy #$AA prepare for next $56 bytes -rd6 .EQ *-ofsD -L5788 ldx q6l+$60 warning: self modified - bpl L5788 + +rd6 ldx q6l+$60 warning: self modified + bpl rd6 eor dnibl-$96,x ldx nbuf2-$AA,y eor dnibl3,x -ref2 .EQ *-ofsD - sta $1000,y warning: self modified +ref2 sta $1000,y warning: self modified iny - bne L5788 loop unil this group of $56 read -rd7 .EQ *-ofsD -L579C ldx q6l+$60 warning: self modified - bpl L579C + bne rd6 loop unil this group of $56 read + +rd7 ldx q6l+$60 warning: self modified + bpl rd7 and #$FC ldy #$AC last group is $54 long L57A5 eor dnibl-$96,x ldx nbuf2-$AC,y eor dnibl4,x combine to form full byte -ref3 .EQ *-ofsD - sta $1000,y warning: self modified -rd8 .EQ *-ofsD -L57B1 ldx q6l+$60 warning: self modified - bpl L57B1 +ref3 sta $1000,y warning: self modified + +rd8 ldx q6l+$60 warning: self modified + bpl rd8 iny bne L57A5 and #$FC @@ -596,8 +554,7 @@ L57CD pla place last byte into user buffer * set the slot dependent track location -settrk .EQ *-ofsD - jsr drvindx get index to drive # +settrk jsr drvindx get index to drive # sta iobpdn,x rts @@ -606,23 +563,20 @@ settrk .EQ *-ofsD * if stopped, controller's shift register will not be changing. * return y = 0 and zero flag set if it is stopped. -chkdrv .EQ *-ofsD - ldx A2L -chkdrv0 .EQ *-ofsD - ldy #$00 init loop counter. -L57DE lda q6l,x read the shift register. +chkdrv ldx A2L +chkdrv0 ldy #$00 init loop counter. +.1 lda q6l,x read the shift register. jsr ckdrts delay pha pla more delay. cmp q6l,x has shift reg changed ? - bne L57F0 yes, motor is moving. + bne ckdrts yes, motor is moving. lda #$28 anticipate error. dey no, dec retry counter - bne L57DE and try 256 times. -ckdrts .EQ *-ofsD -L57F0 rts -drvindx .EQ *-ofsD - pha preserve acc across call + bne .1 and try 256 times. +ckdrts rts + +drvindx pha preserve acc across call lda A4L+1 lsr lsr @@ -645,8 +599,7 @@ drvindx .EQ *-ofsD * on exit: carry set if error (write protect violation). * if no error, acc=uncertain, x=unchanged, y=0, carry clear. -write16 .EQ *-ofsD - sec anticipate write protect error +write16 sec anticipate write protect error lda q6h,x lda q7l,x sense write protect flag bpl L580C @@ -694,21 +647,17 @@ L583D eor nbuf2-1,y (5) xor with current * end of write byte loop lda pcl (3) get prior nibl (from nbuf2) -wrefd1 .EQ *-ofsD - ldy #$00 (2) warning: load value modified by prenib. -wrefa1 .EQ *-ofsD -L5853 eor $1000,y (4) warning: address modified by prenib. +wrefd1 ldy #$00 (2) warning: load value modified by prenib. +wrefa1 eor $1000,y (4) warning: address modified by prenib. and #$FC (2) strip low 2 bits tax (2) index to nibl table lda nibl,x (4) -wrefd2 .EQ *-ofsD - ldx #$60 (2) warning: value modified by prenib. +wrefd2 ldx #$60 (2) warning: value modified by prenib. sta q6h,x (5) write nibl lda q6l,x (4) handshake -wrefa2 .EQ *-ofsD - lda $1000,y (4) prior nibl. warning: address modified by prenib. +wrefa2 lda $1000,y (4) prior nibl. warning: address modified by prenib. iny (2) all done with this page ? - bne L5853 (3-) loop until page end. + bne wrefa1 (3-) loop until page end. lda pch (3) get next (precalculated & translated) nibl. beq L58C0 (2+) branch if code written was page aligned. lda A2H (3) get byte address of last byte to be written. @@ -721,32 +670,26 @@ wrefa2 .EQ *-ofsD nop (2) above test set carry. iny (2) y=1 bcs L5899 (2+) branch if last byte to be odd. -wrefa3 .EQ *-ofsD -L5881 eor $1100,y (4) warning: address modified by prenib. +wrefa3 eor $1100,y (4) warning: address modified by prenib. and #$FC (2) strip low 2 bits. tax (2) index to nibl table lda nibl,x (4) get nibl -wrefd3 .EQ *-ofsD - ldx #$60 (2) restore slot index. warning: modified by prenib +wrefd3 ldx #$60 (2) restore slot index. warning: modified by prenib sta q6h,x (5) lda q6l,x (4) -wrefa4 .EQ *-ofsD - lda $1100,y (4) warning: modified by prenib +wrefa4 lda $1100,y (4) warning: modified by prenib iny (2) got prior nibl, point to next -wrefa5 .EQ *-ofsD - eor $1100,y (4) warning: modified by prenib +wrefa5 eor $1100,y (4) warning: modified by prenib L5899 cpy A2H (3) set carry if this is the last nibl and #$FC (2) strip low 2 bits tax (2) lda nibl,x (4) -wrefd4 .EQ *-ofsD - ldx #$60 (2) restore slot. warning: modified by prenib +wrefd4 ldx #$60 (2) restore slot. warning: modified by prenib sta q6h,x (5) lda q6l,x (4) -wrefa6 .EQ *-ofsD - lda $1100,y (4) get prior nibl. warning: modified by prenib +wrefa6 lda $1100,y (4) get prior nibl. warning: modified by prenib iny (2) - bcc L5881 (3-) branch if not the last. + bcc wrefa3 (3-) branch if not the last. bcs L58B1 (3) waste 3 cycles, branch always. L58B1 bcs L58C0 (3) branch always. L58B3 lda >pch (4) absolute reference to zero page @@ -758,8 +701,7 @@ L58B3 lda >pch (4) absolute reference to zero page pla (4) L58C0 ldx A1H (3) use last nibl (anded with $FC) for checksum lda nibl,x (4) -wrefd5 .EQ *-ofsD - ldx #$60 (2) restore slot. warning: modified by prenib +wrefd5 ldx #$60 (2) restore slot. warning: modified by prenib sta q6h,x (5) lda q6l,x (4) ldy #$00 (2) set y = index end mark table. @@ -773,20 +715,16 @@ L58D3 lda endmrks,y (4) dm4, dm5, dm6 and turn off byte. cpy #$04 (2) have all end marks been written ? bne L58D3 (3) if not. clc (2,9) -wexit .EQ *-ofsD - lda q7l,x out of write mode +wexit lda q7l,x out of write mode lda q6l,x to read mode. rts return from write. * 7-bit nibl write subroutines -wnibl9 .EQ *-ofsD - clc (2) 9 cycles, then write. -wnibl7 .EQ *-ofsD - pha (3) 7 cycles, then write. +wnibl9 clc (2) 9 cycles, then write. +wnibl7 pha (3) 7 cycles, then write. pla (4) -wnibl .EQ *-ofsD - sta q6h,x (5) nibl write +wnibl sta q6h,x (5) nibl write ora q6l,x (4) clobbers acc, not carry rts (6) @@ -800,8 +738,7 @@ wnibl .EQ *-ofsD * on exit: a,x,y undefined. write routine modified to do direct conversion * of high 6 bits of user's buffer data. -prenib16 .EQ *-ofsD - lda buf self-modify the addresses because of +prenib16 lda buf self-modify the addresses because of ldy buf+1 the fast timing required. clc all offsets are minus $AA. adc #$02 the highest set is buf+$AC. @@ -822,21 +759,18 @@ L5906 sta prn2+1 self mod 2 L5912 sta prn1+1 self mod 1 sty prn1+2 ldy #$AA count up to 0. -prn1 .EQ *-ofsD get byte from lowest group. -L591A lda $1000,y warning: self modified. +prn1 lda $1000,y warning: self modified. get byte from lowest group. and #$03 strip high 6 bits. tax index to 2 bit equivalent. lda twobit1,x pha save pattern -prn2 .EQ *-ofsD get byte from middle group. - lda $1056,y warning: self modified. +prn2 lda $1056,y warning: self modified. get byte from middle group. and #$03 tax pla restore pattern. ora twobit2,x combine 2nd group with 1st. pha save new pattern. -prn3 .EQ *-ofsD get byte from highest group. - lda $10AC,y warning: self modified. +prn3 lda $10AC,y warning: self modified. get byte from highest group. and #$03 tax pla restore new pattern @@ -848,7 +782,7 @@ prn3 .EQ *-ofsD get byte from highest group. pla sta nbuf2,x save in nibl buffer. iny inc to next set. - bne L591A loop until all $56 nibls formed. + bne prn1 loop until all $56 nibls formed. ldy buf now prepare data bytes for write16 subr. dey prepare end address. sty A2H @@ -890,8 +824,7 @@ L596F ldy #$FF index to last byte of data to write. stx wrefd4+1 stx wrefd5+1 rts -chkprev .EQ *-ofsD - eor iobpdn same slot as last ? +chkprev eor iobpdn same slot as last ? asl beq L59BD lda #$01 @@ -907,8 +840,7 @@ L59A6 lda iobpdn lda montimeh bne L59A6 L59BD rts -rsetphse .EQ *-ofsD - lda unitnum get unit number. +rsetphse lda unitnum get unit number. and #$7F mask off high bit. tax @@ -919,8 +851,7 @@ rsetphse .EQ *-ofsD lda phaseoff+4,x lda phaseoff+6,x rts -docheck .EQ *-ofsD - lda A4L command #. +docheck lda A4L command #. cmp #$04 is the command allowed ? bcs L59E6 if not. lda bloknml @@ -940,10 +871,8 @@ L59E8 clc * variables used by mli for smartport interface -spstatlist .EQ *-ofsD ref pathbuf-$14 - .HS 00000000 smartport status list buffer -spunit .EQ *-ofsD ref pathbuf-$10 - .HS 0000000000000000 smartport unit numbers +spstatlist .HS 00000000 ref pathbuf-$14 smartport status list buffer +spunit .HS 0000000000000000 ref pathbuf-$10smartport unit numbers .HS 0000000000000000 * pathname buffer starts at this page boundary (pathbuf = $D700) diff --git a/ProDOS.203/ProDOS.S.LDR.A.txt b/ProDOS.203/ProDOS.S.LDR.A.txt index f034dd69..f3e9d78e 100644 --- a/ProDOS.203/ProDOS.S.LDR.A.txt +++ b/ProDOS.203/ProDOS.S.LDR.A.txt @@ -440,14 +440,14 @@ H2367 .DA #$01 relocation table. 1=move src to dst * move thunderclock rlclk64 .DA #$01 relocation table. 1=move src to dst - .DA tclk_in destination - .DA tclk_end-tclock_0 length of thunderclock driver - .DA tclock_0 source + .DA $D742 destination + .DA TCLK.END-TCLK.START length of thunderclock driver + .DA TCLK source .DA #$04 4=relocate and move program - .DA tclk_in - .DA H2F69-tclock_0 - .DA tclk_in + .DA TCLK.START + .DA TCLK.CEND-TCLK.START + .DA TCLK.START .HS 00 .HS C1C1 clock64 .DA #$00 @@ -456,9 +456,9 @@ clock64 .DA #$00 * move cortland clock cortclock .DA #$01 relocation table. 1=move src to dst - .DA tclk_in destination - .DA cclk_end-cclock_0 length of cortland clock driver - .DA cclock_0 source + .DA $D742 destination + .DA CCLK.END-CCLK.START length of cortland clock driver + .DA CCLK source .HS FF done * load and run appletalk configuration file (atinit) if present diff --git a/ProDOS.203/ProDOS.S.LDR.B.txt b/ProDOS.203/ProDOS.S.LDR.B.txt index 2fcbbba9..aa948fa9 100644 --- a/ProDOS.203/ProDOS.S.LDR.B.txt +++ b/ProDOS.203/ProDOS.S.LDR.B.txt @@ -903,7 +903,7 @@ L2C4D lda 1,s sec rtl - .BS $2C80-* + .BS $2C80-* MAN SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.B diff --git a/ProDOS.203/ProDOS.S.SEL0.txt b/ProDOS.203/ProDOS.S.SEL0.txt index 49d35179..360330ed 100644 --- a/ProDOS.203/ProDOS.S.SEL0.txt +++ b/ProDOS.203/ProDOS.S.SEL0.txt @@ -9,9 +9,7 @@ NEW * must remain somewhere between $E000-$F7FF. this routine must be less * than 3 pages in length. -ofsS .EQ *-dispadr offset to dispatcher org - -disp1obj lda RROMBNK2 read ROM +SEL0.START lda RROMBNK2 read ROM sta CLR80DISP disable 80 col hardware sta CLRALTCHAR normal LC, flashing UC sta CLR80STORE disable 80 column store @@ -52,8 +50,7 @@ L5A52 lda pbuf,x display prefix directly to screen L5A5D ldx #$00 dec cv jsr crout -getkey .EQ *-ofsS - jsr rdkey input char with cursor +getkey jsr rdkey input char with cursor cmp #$8D cr ? beq L5ABD yes, accept what is entered. pha no, save the char. @@ -109,13 +106,11 @@ L5AD3 jsr home clear screen for application name. jsr crout ldx #disp1msg-dsp1msgs jsr prntmsg 'enter pathname...' -retryrich .EQ *-ofsS - lda #$03 line 3 +retryrich lda #$03 line 3 sta cv jsr crout ldx #$00 -loop1 .EQ *-ofsS - jsr rdkey input char with cursor. +loop1 jsr rdkey input char with cursor. cmp #$9B esc ? bne L5AF4 if not esc. lda ch esc pressed in column 0 ? @@ -191,11 +186,11 @@ L5B82 lda dsp1refn copy the reference number jsr MLI get eof .DA #$D1 .DA dsp1eof - bcs L5BE2 + bcs dsp1error lda dsp1eofb+2 3rd of 3 bytes. beq L5B9C if 0 then ok lda #$27 else i/o error because - bne L5BE2 file is too large. + bne dsp1error file is too large. L5B9C lda dsp1eofb move eof to # of bytes to read. sta dsp1cnt lda dsp1eofb+1 @@ -209,12 +204,11 @@ L5B9C lda dsp1eofb move eof to # of bytes to read. .DA dsp1cls bcc L5BBB L5BB7 plp get status (it is irrelevant now) - bne L5BE2 if close generated an error + bne dsp1error if close generated an error plp here if close was ok. L5BBB bcs L5BB7 error. jmp sysentry execute system file -delchar .EQ *-ofsS - lda ch is cursor in column 0 ? +delchar lda ch is cursor in column 0 ? beq L5BD3 yes, ignore it. dex lda #$A0 blank out the cursor @@ -224,18 +218,16 @@ delchar .EQ *-ofsS jsr cout and blank it too. dec ch point to that location. L5BD3 jmp loop1 get next char. -prntmsg .EQ *-ofsS -L5BD6 lda dsp1msgs,x +prntmsg lda dsp1msgs,x beq L5BE1 jsr cout inx - bne L5BD6 + bne prntmsg L5BE1 rts * dispatcher 1 error handler -dsp1error .EQ *-ofsS -L5BE2 sta errnum +dsp1error sta errnum lda #$0C display error message on line 13 sta cv jsr crout @@ -258,63 +250,44 @@ L5C09 ldx #dsp1err3-dsp1msgs otherwise display 'file/path not found' L5C0B jsr prntmsg jmp retryrich retry for application pathname -dsp1msgs .EQ *-ofsS -dsp1msg0 .EQ *-ofsS +dsp1msgs .EQ * +dsp1msg0 .EQ * .AS -'ENTER PREFIX (PRESS "RETURN" TO ACCEPT)' .HS 00 -disp1msg .EQ *-ofsS - .AS -"ENTER PATHNAME OF NEXT APPLICATION" +disp1msg .AS -"ENTER PATHNAME OF NEXT APPLICATION" .HS 00 -dsp1err1 .EQ *-ofsS - .DA #$87 +dsp1err1 .DA #$87 .AS -'NOT A TYPE "SYS" FILE' .HS 00 -dsp1err2 .EQ *-ofsS - .DA #$87 +dsp1err2 .DA #$87 .AS -"I/O ERROR " .HS 00 -dsp1err3 .EQ *-ofsS - .DA #$87 +dsp1err3 .DA #$87 .AS -"FILE/PATH NOT FOUND " .HS 00 -dsp1info .EQ *-ofsS get file info parms - .DA #$0A 10 parameters +dsp1info .DA #$0A 10 parameters .DA pbuf pathname buffer -dsp1acess .EQ *-ofsS - .HS 00 access -dsp1type .EQ *-ofsS - .HS 00 file type +dsp1acess .HS 00 access +dsp1type .HS 00 file type .BS 13 the rest are unimportant -dsp1open .EQ *-ofsS open file parms - .HS 03 3 parameters for open +dsp1open .HS 03 3 parameters for open .DA pbuf pathname buffer .DA fbuf fcb buffer -dsp1refn .EQ *-ofsS - .HS 00 reference # -dsp1cls .EQ *-ofsS close file parms - .DA #01 1 parameter for close -dsp1cln .EQ *-ofsS - .HS 00 reference # -dsp1read .EQ *-ofsS - .HS 04 4 parameters for read -dsp1rdn .EQ *-ofsS - .HS 00 reference # +dsp1refn .HS 00 reference # +dsp1cls .DA #01 1 parameter for close +dsp1cln .HS 00 reference # +dsp1read .HS 04 4 parameters for read +dsp1rdn .HS 00 reference # .DA sysentry .SYS load address -dsp1cnt .EQ *-ofsS - .HS 0000 byte count +dsp1cnt .HS 0000 byte count .HS 0000 -dsp1eof .EQ *-ofsS get eof parms - .HS 02 2 parameters -dsp1eofn .EQ *-ofsS - .HS 00 reference # -dsp1eofb .EQ *-ofsS - .HS 000000 3 byte eof -dsp1pfx .EQ *-ofsS get/set prefix parms - .DA #01 1 parameter +dsp1eof .HS 02 2 parameters +dsp1eofn .HS 00 reference # +dsp1eofb .HS 000000 3 byte eof +dsp1pfx .DA #01 1 parameter .DA pbuf prefix buffer -disp1end .EQ * - .BS $300-disp1end+disp1obj fill to page boundary + .BS $1300-* fill to page boundary * end of obj sel_0 *-------------------------------------- diff --git a/ProDOS.203/ProDOS.S.SEL1.txt b/ProDOS.203/ProDOS.S.SEL1.txt index fb140a20..770d394c 100644 --- a/ProDOS.203/ProDOS.S.SEL1.txt +++ b/ProDOS.203/ProDOS.S.SEL1.txt @@ -2,9 +2,7 @@ NEW AUTO 3,1 * object code = sel_1 * Bird's Better Bye at org = dispadr - -ofsB .EQ *-dispadr offset to Bird's Bye org - +*-------------------------------------- birdbye cld lda RROMBNK2 read ROM stz softev @@ -32,8 +30,8 @@ L5D16 stz memmap,x P8 memory bitmap stx lstpntr store in zero page. lda devnum get last slot/drive bne volname -ds2 .EQ *-ofsB -L5D32 ldx lstpntr get device list pointer. + +ds2 ldx lstpntr get device list pointer. lda devlist,x get unit number from list. cpx #$01 make sure it's real. bcs L5D3F if so, change list pointer. @@ -48,15 +46,14 @@ volname sta ol_unit store unit number for online. jsr MLI .DA #$C5 online call .DA ol_parms - bcs L5D32 error check. + bcs ds2 error check. stz dlevel haven't read root directory yet. lda pbuf+1 load description byte. and #$0F mask for name length. - beq L5D32 if 0, then try next unit. + beq ds2 if 0, then try next unit. adc #$02 add 2 to length. tax name length in x. -vnam1 .EQ *-ofsB - stx pbuf save the name length +vnam1 stx pbuf save the name length lda #$2F '/' sta pbuf+1 slash before and sta pbuf,x after name. @@ -69,7 +66,7 @@ vnam1 .EQ *-ofsB .DA op_parms bcc L5D7F good open. lda dlevel trying to open root directory ? - beq L5D32 yes, just move to next volume. + beq ds2 yes, just move to next volume. jsr bell1 no, generate bell tone jsr popdir and stay at same level. stx pbuf @@ -181,7 +178,7 @@ L5E48 lda pbuf+1,x showfiles stz valcnt stz topname init top filename index. lda filecount # of valid files. - beq L5EB0 if no files. + beq keyloop if no files. cmp #$15 more than what will fit on screen ? bcc L5E61 no. lda #$14 limit to 20 files on the screen. @@ -222,9 +219,8 @@ dnarrow jsr nameprnt print old name in normal. L5EA7 jsr cout L5EAA jsr setinv set inverse text mode. jsr nameprnt output last filename. -keyloop .EQ *-ofsB -L5EB0 lda kbd get keyboard input. - bpl L5EB0 loop until key pressed. +keyloop lda kbd get keyboard input. + bpl keyloop loop until key pressed. sta KBDSTROBE clear strobe. jsr setnorm set normal text mode. ldx filecount are any files displayed ? @@ -238,15 +234,14 @@ L5EB0 lda kbd get keyboard input. L5ECB cmp #$89 tab ? beq L5EED new volume. cmp #$9B esc ? - bne L5EB0 no, try again else pop up a directory. + bne keyloop no, try again else pop up a directory. * pop a directory level jsr popdir dec dlevel bra L5EF1 -popdir .EQ *-ofsB - ldx pbuf +popdir ldx pbuf L5EDD dex lda pbuf,x cmp #$2F slash @@ -303,20 +298,17 @@ L5F04 iny start at y = 1. * output messages. on entry: acc = horizontal position, * y = index to message teminated by 0. -sethorz .EQ *-ofsB - sta ch -msgout .EQ *-ofsB -L5F4C lda dsp2msg,y +sethorz sta ch +msgout lda dsp2msg,y beq L5F57 jsr cout iny - bne L5F4C + bne msgout L5F57 rts * name pointer calculator for name storage area -namecalc .EQ *-ofsB - stz fnstore+1 init high byte of 16-bit shift +namecalc stz fnstore+1 init high byte of 16-bit shift txa asl shift to high nibble rol fnstore+1 @@ -338,8 +330,7 @@ namecalc .EQ *-ofsB * output a filename line -nameprnt .EQ *-ofsB - lda #$02 +nameprnt lda #$02 sta ch80col horizontal position = 2. ldx valcnt filename number txa @@ -364,54 +355,40 @@ L5F9F iny y = 1 (first time). jsr output put on screen. cpy namelen end of name ? bcc L5F9F no. -outsp .EQ *-ofsB output a space. - lda #$A0 +outsp lda #$A0 bne L5FB1 branch always. -homecurs .EQ *-ofsB screen control - home cursor - lda #$99 -output .EQ *-ofsB - ora #$80 set high bit. +homecurs lda #$99 +output ora #$80 set high bit. L5FB1 jmp cout output to screen. -doread .EQ *-ofsB - jsr MLI mli read call +doread jsr MLI mli read call .DA #$CA .DA rd_parms rts * data area -dsp2msg .EQ *-ofsB - .AS -"RETURN: Select | TAB: Chg Vol | " +dsp2msg .AS -"RETURN: Select | TAB: Chg Vol | " .AS -"ESC: Back" .DA #$00 -fldrmsg .EQ *-ofsB - .DA #$0F inverse control code +fldrmsg .DA #$0F inverse control code .HS 1B enable mousetext .AS -"XY" folder characters .HS 18 disable mousetext .HS 0E normal control code .HS 00 -op_parms .EQ *-ofsB open parameters - .DA #$03 3 parms +op_parms .DA #$03 3 parms .DA pbuf pathname .DA op_buf file buffer -op_refn .EQ *-ofsB - .HS 00 reference number -cl_parms .EQ *-ofsB close parameters - .HS 01 1 parm +op_refn .HS 00 reference number +cl_parms .HS 01 1 parm .HS 00 reference number. -ol_parms .EQ *-ofsB online parameters - .HS 02 2 parms -ol_unit .EQ *-ofsB - .HS 60 unit number, default = s6, d1 +ol_parms .HS 02 2 parms +ol_unit .HS 60 unit number, default = s6, d1 .DA pbuf+1 data buffer -pf_parms .EQ *-ofsB set prefix parameters - .DA #01 one parm +pf_parms .DA #01 one parm .DA pbuf pathname -rd_parms .EQ *-ofsB read parameters - .DA #04 4 parms -rd_refn .EQ *-ofsB - .HS 01 reference number +rd_parms .DA #04 4 parms +rd_refn .HS 01 reference number .DA sysentry data buffer * these last 2 parms (4 bytes) may extend past $300 length limit since @@ -420,10 +397,7 @@ rd_refn .EQ *-ofsB * .HS 0000 requested length * .HS 0000 actual length -dhdr_len .EQ *-ofsB directory header length - .HS 00 (actually uses 2 bytes) - -* end of obj sel_1 +dhdr_len .HS 00 directory header length (actually uses 2 bytes) *-------------------------------------- MAN SAVE USR/SRC/PRODOS.203/PRODOS.S.SEL1 diff --git a/ProDOS.203/ProDOS.S.SEL2.txt b/ProDOS.203/ProDOS.S.SEL2.txt index 1288e852..8adcb893 100644 --- a/ProDOS.203/ProDOS.S.SEL2.txt +++ b/ProDOS.203/ProDOS.S.SEL2.txt @@ -13,8 +13,6 @@ NEW * (as other replacement quit code is supposed to do) because GQuit checks * this to see if this version of quit code is available. -ofsQ .EQ *-dispadr offset to GQuit dispatcher org - GQdisp lda RRAMWRAMBNK1 read/write LC bank 1 clc xce 16 bit native mode. @@ -121,8 +119,7 @@ L608B jsr dolaunch check for possible 2nd pathname. L6099 lda RROMBNK2 enable ROM jmp sysentry execute the system application -gqerror .EQ *-ofsQ - clc +gqerror clc xce 16 bit native mode >LONGMX jsr mountvol mount volume. @@ -166,8 +163,7 @@ L60AB clc native mode * on exit: carry clear if mount volume displayed and 'return' was pressed. * carry set if no window displayed or if had window and 'esc' pressed. -mountvol .EQ *-ofsQ - ldy ##$0000 volbuf>>16 +mountvol ldy ##$0000 volbuf>>16 ldx ##volbuf set up pointer to volume name. * if error is 'volume not found' or 'no disk in drive' then display the @@ -224,8 +220,7 @@ L613C sec indicate Escape was pressed. * inputs: x = length byte of complete pathname containing volume name. * output: volume name is stored in volbuf. -copyvol .EQ *-ofsQ - lda >1,x get the first slash +copyvol lda >1,x get the first slash sta volbuf+1 ldy ##$0002 initialize the length count. @@ -247,8 +242,7 @@ L6156 dey fix character count. * on exit, the z-flag is set if a filename was correctly passed to the * application elst the z-flag is clear if it couldn't be done. -dolaunch .EQ *-ofsQ - lda sysentry does the app start with a jump ? +dolaunch lda sysentry does the app start with a jump ? cmp #$4C bne L616F no, doesn't follow the convention. lda #$EE check for the signature bytes. @@ -359,8 +353,7 @@ L6231 rts and go launch the app. * carry clear = disk was found * carry set = disk not found -ckfordrv .EQ *-ofsQ -SEL2.ckfordrv clc native mode +ckfordrv clc native mode xce >LONGX 16-bit regs, 8-bit acc. ldx ##sysentry+6 point to pathname buffer. @@ -383,41 +376,28 @@ SEL2.ckfordrv clc native mode * Prodos 8 parameter lists -pfxparms .EQ *-ofsQ set prefix parms. - .DA #01 one parm. +pfxparms .DA #01 one parm. .DA inbuf address of prefix. -opnparms .EQ *-ofsQ open parms. - .DA #3 3 parms. +opnparms .DA #3 3 parms. .DA pbuf pathname .DA op_buf i/o buffer -oprefnum .EQ *-ofsQ - .HS 00 reference # -eofparms .EQ *-ofsQ - .DA #02 2 parms -eofrefn .EQ *-ofsQ - .HS 00 reference # -eofval .EQ *-ofsQ - .HS 000000 3 byte eof value -readparm .EQ *-ofsQ - .DA #04 4 parms -rdrefnum .EQ *-ofsQ - .HS 00 reference # +oprefnum .HS 00 reference # +eofparms .DA #02 2 parms +eofrefn .HS 00 reference # +eofval .HS 000000 3 byte eof value +readparm .DA #04 4 parms +rdrefnum .HS 00 reference # .DA sysentry read into $2000 (bank 0). -rdcount .EQ *-ofsQ - .HS 0000 # of bytes to read. +rdcount .HS 0000 # of bytes to read. .HS 0000 transfer count -closeprm .EQ *-ofsQ - .DA #1 1 parm -closeref .EQ *-ofsQ - .HS 00 reference # -quitparms .EQ *-ofsQ - .DA #04 4 parms. +closeprm .DA #1 1 parm +closeref .HS 00 reference # +quitparms .DA #04 4 parms. .HS 00 quit back to launcher (GQuit) .HS 0000 .HS 00 .HS 0000 -gfiparms .EQ *-ofsQ get file info parms. - .DA #$0A 10 parms +gfiparms .DA #$0A 10 parms .DA volbuf volume buffer .DA #0 access .DA #0 file type @@ -432,36 +412,27 @@ gfiparms .EQ *-ofsQ get file info parms. * messages for P8 fatal error. maximum length of message is 35 characters. * the error code will be displayed immediately after the final character. -quitstr1 .EQ *-ofsQ - .DA #$1B +quitstr1 .DA #$1B .AS "Can't run next application." -quitstr2 .EQ *-ofsQ - .DA #$14 +quitstr2 .DA #$14 .AS "ProDOS Error = $" -errval .EQ *-ofsQ hex error code gets stored here - .AS " " -quitbtn2 .EQ *-ofsQ null string (no 2nd button) - .HS 00 +errval .AS " " +quitbtn2 .HS 00 * messages for P8 mount volume. maximum length of message is 35 characters. * the button labels must not be more than 16 characters. -mountmsg .EQ *-ofsQ - .DA #$17 +mountmsg .DA #$17 .AS "Please insert the disk:" -button1 .EQ *-ofsQ - .DA #$0D +button1 .DA #$0D .AS "Accept: " .DA #$1B mousetext on .DA #$0F inverse on .DA #$4D mousetext return .DA #$0E normal on .DA #$18 mousetext off -button2 .EQ *-ofsQ - .DA #$0B +button2 .DA #$0B .AS "Cancel: Esc" - -* end of obj sel_2 (must be < GQdisp+$300) *-------------------------------------- MAN SAVE USR/SRC/PRODOS.203/PRODOS.S.SEL2 diff --git a/ProDOS.203/ProDOS.S.TCLK.txt b/ProDOS.203/ProDOS.S.TCLK.txt index 56da808e..88a60a00 100644 --- a/ProDOS.203/ProDOS.S.TCLK.txt +++ b/ProDOS.203/ProDOS.S.TCLK.txt @@ -6,16 +6,15 @@ NEW * $2F00-2F7C moved to $D742 -ofsT .EQ *-tclk_in offset to Thunderclock org +TCLK.START ldx TCLK.Cx2+2 clock slot = $C1. -tclock_0 ldx clkslt clock slot = $C1. lda clkmode,x save current mode pha lda #$A3 send numeric mode byte to Thunderclock - jsr wttcp -clkslt .EQ *-ofsT+2 points to $C1. -TCLK.clkslt jsr rdtcp read month, day of week, day of month +TCLK.Cx1 jsr wttcp + +TCLK.Cx2 jsr rdtcp read month, day of week, day of month clc and time into input buffer. ldx #$04 index for 5 values. ldy #$0C read minutes 1st, month last. @@ -64,15 +63,14 @@ TCLK.clkslt jsr rdtcp read month, day of week, day of month lda A2L minute sta p8time pla restore previous mode. - ldx clkslt clock slot = $C1 + ldx TCLK.Cx2+2 clock slot = $C1 sta clkmode,x -H2F69 rts +TCLK.CEND rts * this table contains entries for the cumulative # of days in a year, * one entry for each month. the values are modulo 256. -tdays .EQ *-ofsT - .DA #$00 January +tdays .DA #$00 January .DA #$1F February .DA #$3B March .DA #$5A April @@ -91,16 +89,15 @@ tdays .EQ *-ofsT * is the year which January 1st is Sunday, and so on backwards thru * the days of the week. -yradj .EQ *-ofsT - .DA #$07 Monday +yradj .DA #$07 Monday .DA #$0C Sunday .DA #$0B Saturday .DA #$0A Friday .DA #$09 Thursday .DA #$08 Wednesday .DA #$08 Tuesday -tclk_end .EQ * end of obj tclock_0. - .HS 000000 pad + +TCLK.END .HS 000000 pad *-------------------------------------- MAN SAVE USR/SRC/PRODOS.203/PRODOS.S.TCLK diff --git a/ProDOS.203/ProDOS.S.txt b/ProDOS.203/ProDOS.S.txt index 20fc74c7..293ad3c2 100644 --- a/ProDOS.203/ProDOS.S.txt +++ b/ProDOS.203/ProDOS.S.txt @@ -192,9 +192,14 @@ GP .PH $BF00 .INB USR/SRC/PRODOS.203/PRODOS.S.GP .EP +TCLK .PH $D742 .INB USR/SRC/PRODOS.203/PRODOS.S.TCLK - .INB USR/SRC/PRODOS.203/PRODOS.S.CCLK + .EP +CCLK .PH $D742 + .INB USR/SRC/PRODOS.203/PRODOS.S.CCLK + .EP + XDOS .PH $DE00 .INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.A .INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.B @@ -213,15 +218,15 @@ XRW .PH $D000 .INB USR/SRC/PRODOS.203/PRODOS.S.DISKII .EP -SEL0 .PH $D100 +SEL0 .PH $1000 .INB USR/SRC/PRODOS.203/PRODOS.S.SEL0 .EP -SEL1 .PH $D100 +SEL1 .PH $1000 .INB USR/SRC/PRODOS.203/PRODOS.S.SEL1 .EP -SEL2 .PH $D100 +SEL2 .PH $1000 .INB USR/SRC/PRODOS.203/PRODOS.S.SEL2 .EP *--------------------------------------