diff --git a/DiskImg/Build.ps1 b/DiskImg/Build.ps1 index 9c7d0022..a86a167f 100644 --- a/DiskImg/Build.ps1 +++ b/DiskImg/Build.ps1 @@ -4,55 +4,30 @@ $CpmToolsPath = '..\tools\cpmtools' $env:PATH = $CpmToolsPath + ';' + $env:PATH -$ImgFile = "..\Output\Disk.img" +$ImgFile = "hd.img" $Blank = ([byte[]](0xE5) * (128KB * 65)) "Creating work file..." if (!(Test-Path('Blank.tmp'))) {Set-Content -Value $Blank -Encoding byte -Path 'Blank.tmp'} -"Adding files to partition 0..." -copy Blank.tmp hd0.tmp -if (Test-Path ('hd0\*')) {cpmcp -f hd0 hd0.tmp hd0/*.* 0:} - -"Adding files to partition 1..." -copy Blank.tmp hd1.tmp -if (Test-Path ('hd1\*')) {cpmcp -f hd0 hd1.tmp hd1/*.* 0:} - -"Adding files to partition 2..." -copy Blank.tmp hd2.tmp -if (Test-Path ('hd2\*')) {cpmcp -f hd0 hd2.tmp hd2/*.* 0:} - -"Adding files to partition 3..." -copy Blank.tmp hd3.tmp -if (Test-Path ('hd3\*')) {cpmcp -f hd0 hd3.tmp hd3/*.* 0:} - -"Adding slices to image..." -#gc hd0.tmp -Enc Byte -Read 512 | Add-Content -Enc Byte $ImgFile -#gc hd0.tmp -Enc Byte -Read 10240 | sc x.x -Enc Byte +for ($Dsk=0; $Dsk -lt 4; $Dsk++) +{ + "Adding files to disk ${Dsk}..." + copy Blank.tmp hd${Dsk}.tmp + for ($Usr=0; $Usr -lt 16; $Usr++) + { + if (Test-Path ("hd${Dsk}\u${Usr}\*")) + { + $Cmd = "cpmcp -f hd0 hd${Dsk}.tmp hd${Dsk}/u${Usr}/*.* ${Usr}:" + $Cmd + Invoke-Expression $Cmd + } + } +} + +"Adding disks to image..." &$env:COMSPEC /c copy /b hd*.tmp $ImgFile Remove-Item *.tmp -return - -"Adding files to partition 0..." -Set-Content -Value $Blank -Encoding byte -Path hd.img -if (Test-Path ('hd0\*')) {cpmcp -f hd0 hd.img hd0/*.* 0:} -Add-Content $ImgFile -Value ([System.IO.File]::ReadAllBytes('hd.img')) -Encoding byte - -"Adding files to partition 1..." -Set-Content -Value ([byte[]](0xE5) * (128KB * 65)) -Encoding byte -Path hd.img -if (Test-Path ('hd1\*')) {cpmcp -f hd0 hd.img hd1/*.* 0:} -Add-Content $ImgFile -Value ([System.IO.File]::ReadAllBytes('hd.img')) -Encoding byte - -"Adding files to partition 2..." -Set-Content -Value ([byte[]](0xE5) * (128KB * 65)) -Encoding byte -Path hd.img -if (Test-Path ('hd2\*')) {cpmcp -f hd0 hd.img hd2/*.* 0:} -Add-Content $ImgFile -Value ([System.IO.File]::ReadAllBytes('hd.img')) -Encoding byte - -"Adding files to partition 3..." -Set-Content -Value ([byte[]](0xE5) * (128KB * 65)) -Encoding byte -Path hd.img -if (Test-Path ('hd3\*')) {cpmcp -f hd0 hd.img hd3/*.* 0:} -Add-Content $ImgFile -Value ([System.IO.File]::ReadAllBytes('hd.img')) -Encoding byte - return \ No newline at end of file diff --git a/DiskImg/hd0/u0/ASM.COM b/DiskImg/hd0/u0/ASM.COM new file mode 100644 index 00000000..a63e5aec Binary files /dev/null and b/DiskImg/hd0/u0/ASM.COM differ diff --git a/DiskImg/hd0/u0/CLRDIR.COM b/DiskImg/hd0/u0/CLRDIR.COM new file mode 100644 index 00000000..d1f2a7d6 Binary files /dev/null and b/DiskImg/hd0/u0/CLRDIR.COM differ diff --git a/DiskImg/hd0/u0/CR.COM b/DiskImg/hd0/u0/CR.COM new file mode 100644 index 00000000..8a824bcc Binary files /dev/null and b/DiskImg/hd0/u0/CR.COM differ diff --git a/DiskImg/hd0/u0/DDT.COM b/DiskImg/hd0/u0/DDT.COM new file mode 100644 index 00000000..83f8603f Binary files /dev/null and b/DiskImg/hd0/u0/DDT.COM differ diff --git a/DiskImg/hd0/u0/DDTZ.COM b/DiskImg/hd0/u0/DDTZ.COM new file mode 100644 index 00000000..e30a34c0 Binary files /dev/null and b/DiskImg/hd0/u0/DDTZ.COM differ diff --git a/DiskImg/hd0/u0/DDTZ.DOC b/DiskImg/hd0/u0/DDTZ.DOC new file mode 100644 index 00000000..e4470528 --- /dev/null +++ b/DiskImg/hd0/u0/DDTZ.DOC @@ -0,0 +1,564 @@ + + DDTZ v2.7 + by C.B. Falconer + edited by George A. Havach + +Introduction: +============ +DDTZ v2.7 is a complete replacement for DDT, Digital Research's +famous Dynamic Debugging Tool, with improved functionality, bug +extermination, and full Z80 support. In general, DDTZ is fully +compatible with the original utility, but it has extra and +extended commands and many fewer quirks. All Z80-specific +instructions can be (dis)assembled, though in Intel rather then +Zilog format. Furthermore, DDTZ will correctly trace ('T' and 'U' +commands) both 8080 and Z80 instructions, depending on which CPU +is operating. On startup, the program announces which CPU it is +running on. + +DDTZ v2.7 now handles the 64180 added opcodes. It does NOT test +for a 64180 CPU, since this cannot be done without executing +illegal Z80 instructions, which in turn will crash some +simulators. However v2.7 does not execute any 64180 instructions +internally, only in the subject program. + +This issue supplies the "M" version assembled, to avoid errors +when switching between MSDOS and CPM systems. The command table +is updated accordingly. Most CPM users are also MSDOS users, but +not vice-versa. + +The program is invoked by typing + + ddtz +or + ddtz [d:]filespec + +In the second form, DDTZ will load the specified file into +memory starting at 0100H, unless it's a .HEX file that sets its +own load address. Besides reporting the NEXT free address and +the PC (program counter) after a successful load, DDTZ also shows +the number of memory pages needed for a SAVE. Instead of having +to write all this down, just use the 'X' command at any time to +redisplay these three values for the current application. + +NOTE: loading more code above the NEXT pointer revises these + values. + +As in DDT, when a program is loaded above the area holding the +'A' and 'U' (and now 'W') command code, these commands are +disabled, and the extra memory is released to the user. Thus, +DDTZ can occupy as little as 3K total memory space. Unlike DDT, +however, DDTZ will not overwrite itself or the system on program +loads (except .HEX files). + +At initialization, the stack pointer (SP) points to a return to +DDTZ, just like for the CCP. Thus, programs that normally return +to the CCP will be returned to DDTZ. The 'B' command +reinitializes this condition. + + +The intercept vector copies the BDOS version number, etc., so +an object program does not know that DDTZ is running (except +for BIOS-BDOS vector size). Thus, programs that check the version +number should execute correctly under DDTZ. + +All input parameters can now be entered in any of three formats: + + (1) hexadecimal (as in DDT), + (2) decimal, by adding a leading '#' character, + (3) ASCII, by enclosing between either single or double + quotes; either one or two characters are allowed. + +Leading blanks in command lines and parameters are absorbed. +Either a comma or a (single) space is a valid delimiter. +Either uppercase or lowercase input is accepted. + +The default command (for anything not otherwise recognizable) +is 'H'. This allows convenient calculation, along with the other +features described below. So, to convert a number, just enter +it! + +As in DDT, the prompt character is '-', and the only error +message is the query ('?'), which generally kicks you back to +command mode. + +New Commands (Over DDT): +======================= + +NOTE: letters in parenthesis, e.g. "(U)", show the equivalent + command for DDTZM version (compatible with MSDOS debug). + + @ Sets or shows (with no parameter) the internally stored + "base" value. Also used with the 'S' and 'D' commands as + an optional parameter (though without the '@') to display + memory from an arbitrary base marker (offset). When set to + zero (the default), it does not affect any screen displays. + + B B)egin: resets the USER stack pointer to its initial value, + such that any program that exits by an RET will return to + DDTZ. DDTZ provides a default stack space of + approximately 24 bytes for user programs. + + C C)ompare first_address,last_address,against_address: shows + all the byte differences between two memory areas, in the + format + + XXXX aa YYYY bb + + where XXXX and YYYY are the comparative memory addresses, + and aa and bb are the corresponding byte values. Can be + used to verify the identity of two files by first + loading them into different memory areas with the 'R' + command (see below). + + + W Write: stores the modified memory area to disk under the + (K) filename specified by the 'I' command, overwriting the + original file from which it was loaded (the user is queried + before doing so). By default, the image of memory from + 0100H through the "NEXT" value -1 is saved. "K first_addr, + last_address" overrides this and allows writing ANY memory + area to a file. Almost a necessity for CPM 3.0 (no SAVE!). + K)eep on DDTZ + + X eXamine: redisplays the "NEXT PC SAVE" report at any time. + (Q) Q)uery size on DDTZ. + + S S)earch first_address, last_addr, value: searches the + (W) specified memory area for the value (a 16-bit word, not a + byte) and shows the locations of all such. Very useful for + finding CALL's or JMP's to a particular address, etc. + W)here on DDTZ + + Y Y)our_option parm1,parm2,address: executes an arbitrary + routine at the specified address, with the BC and DE + registers set to parm1 and parm2, respectively. + + Z Displays (but does not alter) the Z80's alternate register + set, including the index registers (disabled if running on + an 8080). On Z80's, automatically included as the last + part of the display by the 'X' command. + + +Based (Offset) Displays: +======================= + +The 'D' and 'E' commands can use a stored base value (offset), +as set by the '@' command. The current @ value may be +overridden for a single execution of these commands by adding the +base as an extra parameter in the command line. The effect is +to add this value to the first/last address and display +accordingly. The address listing on the left becomes XXXX:YYYY, +where XXXX is the offset address and YYYY is the actual memory +address being displayed. For example, if you have a data area +located at 42B7H and wish to preserve easy access, just enter +"@42b7". Now, "d0,3f" will dump memory starting at 4237H. + + +Further Changes from DDT: +======================== + + A A)ssemble now accepts the full Z80 as well as 8080 + instruction set, although it expects them in Intel rather + than Zilog format (see notes below under the 'L' + command). When in doubt, see the mnemnonic list below. + + D D)isplay or D)ump will accept an optional third parameter + to set the base value for a single execution only. Format + has been cleaned up. + + H H)ex_arithmetic on two values also shows their + difference in decimal. With only one value, converts to + hexadecimal, decimal, and ASCII (low-order byte only). + + + N N)ame now allows drive specification (d:...) and sets up + (I) the complete command line, including both FCB's (at + addresses 005CH and 006CH). The tail (stored at 0081H up) + is NOT upshifted. + I)nput on DDTZ + + U U)nassemble now displays the raw hexcode, especially handy + (L) when examining non-code areas. Intel (8080 style) mnemonics + are used, so some disassembled instructions may look + strange. E.g., the Z80's 'IN B,(C)' and 'OUT (C),B' become + 'INP B' and 'OUTP B', respectively; 'LD (nnnn),BC' becomes + 'SBCD nnnn', 'ADD IX, BC' becomes 'DADX B', and 'JP (IX)' + becomes 'PCIX'. + L)ist on DDTZ + + L L)oad now permits loading a file into memory with an + (R) offset, which is added to the default load address of + 0100H. When reading in a .HEX file with a preset bias, + the 'R' command will not transfer control to an invalid + execution point. Another execution of the 'R' command will + reread the input file, e.g.: + + n blah + l + ...modify the code and generally mess about... + l + + The original file is reloaded, and the modifications are + removed. + R)ead on DDTZ + + E E)nter, like D)isplay, now accepts an optional second + (S) parameter to set the base value for a single execution + only. + S)ubstitute or S)et on DDTZ + + T T)rap/trace on termination now shows the complete CPU + state. Traps and traces no longer lock up when a user RST + 7 instruction is executed. Tracing of BDOS/BIOS calls is + heavily trun cated, avoiding clutter and preventing system + crashes. + +NOTE: Most of the UNDOCUMENTED Z80 op-codes are handled. Others + can crash the system. + + R R)egisters also shows what two-byte values the HL and SP + (X) registers are actually pointing to. On Z80's, displays the + alternate register set. + eX)amine on DDTZ + +NOTE: Any use of the 'W' or 'L' command resets the system DMA + transfer address to the standard default value of 0080H. + + +; This is the output of DDTZ when disassembling OPTYPE.TRY +NOP LDA 06A4 MOV M,H +LXI B,06A4 DCX SP MOV M,L +STAX B INR A HLT +INX B DCR A MOV M,A +INR B MVI A,20 MOV A,B +DCR B CMC MOV A,C +MVI B,20 MOV B,B MOV A,D +RLC MOV B,C MOV A,E +EXAF MOV B,D MOV A,H +DAD B MOV B,E MOV A,L +LDAX B MOV B,H MOV A,M +DCX B MOV B,L MOV A,A +INR C MOV B,M ADD B +DCR C MOV B,A ADD C +MVI C,20 MOV C,B ADD D +RRC MOV C,C ADD E +DJNZ 0134 MOV C,D ADD H +LXI D,06A4 MOV C,E ADD L +STAX D MOV C,H ADD M +INX D MOV C,L ADD A +INR D MOV C,M ADC B +DCR D MOV C,A ADC C +MVI D,20 MOV D,B ADC D +RAL MOV D,C ADC E +JR 0134 MOV D,D ADC H +DAD D MOV D,E ADC L +LDAX D MOV D,H ADC M +DCX D MOV D,L ADC A +INR E MOV D,M SUB B +DCR E MOV D,A SUB C +MVI E,20 MOV E,B SUB D +RAR MOV E,C SUB E +JRNZ 0134 MOV E,D SUB H +LXI H,06A4 MOV E,E SUB L +SHLD 06A4 MOV E,H SUB M +INX H MOV E,L SUB A +INR H MOV E,M SBB B +DCR H MOV E,A SBB C +MVI H,20 MOV H,B SBB D +DAA MOV H,C SBB E +JRZ 0134 MOV H,D SBB H +DAD H MOV H,E SBB L +LHLD 06A4 MOV H,H SBB M +DCX H MOV H,L SBB A +INR L MOV H,M ANA B +DCR L MOV H,A ANA C +MVI L,20 MOV L,B ANA D +CMA MOV L,C ANA E +JRNC 0134 MOV L,D ANA H +LXI SP,06A4 MOV L,E ANA L +STA 06A4 MOV L,H ANA M +INX SP MOV L,L ANA A +INR M MOV L,M XRA B +DCR M MOV L,A XRA C +MVI M,20 MOV M,B XRA D +STC MOV M,C XRA E +JRC 0134 MOV M,D XRA H +DAD SP MOV M,E XRA L + + +XRA M JPE 06A4 SLAR M +XRA A XCHG SLAR A +ORA B CPE 06A4 SRAR B +ORA C XRI 20 SRAR C +ORA D RST 5 SRAR D +ORA E RP SRAR E +ORA H POP PSW SRAR H +ORA L JP 06A4 SRAR L +ORA M DI SRAR M +ORA A CP 06A4 SRAR A +CMP B PUSH PSW SLLR B +CMP C ORI 20 SLLR C +CMP D RST 6 SLLR D +CMP E RM SLLR E +CMP H SPHL SLLR H +CMP L JM 06A4 SLLR L +CMP M EI SLLR M +CMP A CM 06A4 SLLR A +RNZ CPI 20 SRLR B +POP B RST 7 SRLR C +JNZ 06A4 RLCR B SRLR D +JMP 06A4 RLCR C SRLR E +CNZ 06A4 RLCR D SRLR H +PUSH B RLCR E SRLR L +ADI 20 RLCR H SRLR M +RST 0 RLCR L SRLR A +RZ RLCR M BIT 0,B +RET RLCR A BIT 0,C +JZ 06A4 RRCR B BIT 0,D +CZ 06A4 RRCR C BIT 0,E +CALL 06A4 RRCR D BIT 0,H +ACI 20 RRCR E BIT 0,L +RST 1 RRCR H BIT 0,M +RNC RRCR L BIT 0,A +POP D RRCR M BIT 1,B +JNC 06A4 RRCR A BIT 1,C +OUT 20 RALR B BIT 1,D +CNC 06A4 RALR C BIT 1,E +PUSH D RALR D BIT 1,H +SUI 20 RALR E BIT 1,L +RST 2 RALR H BIT 1,M +RC RALR L BIT 1,A +EXX RALR M BIT 2,B +JC 06A4 RALR A BIT 2,C +IN 20 RARR B BIT 2,D +CC 06A4 RARR C BIT 2,E +SBI 20 RARR D BIT 2,H +RST 3 RARR E BIT 2,L +RPO RARR H BIT 2,M +POP H RARR L BIT 2,A +JPO 06A4 RARR M BIT 3,B +XTHL RARR A BIT 3,C +CPO 06A4 SLAR B BIT 3,D +PUSH H SLAR C BIT 3,E +ANI 20 SLAR D BIT 3,H +RST 4 SLAR E BIT 3,L +RPE SLAR H BIT 3,M +PCHL SLAR L BIT 3,A + + +BIT 4,B RES 3,D SET 2,H +BIT 4,C RES 3,E SET 2,L +BIT 4,D RES 3,H SET 2,M +BIT 4,E RES 3,L SET 2,A +BIT 4,H RES 3,M SET 3,B +BIT 4,L RES 3,A SET 3,C +BIT 4,M RES 4,B SET 3,D +BIT 4,A RES 4,C SET 3,E +BIT 5,B RES 4,D SET 3,H +BIT 5,C RES 4,E SET 3,L +BIT 5,D RES 4,H SET 3,M +BIT 5,E RES 4,L SET 3,A +BIT 5,H RES 4,M SET 4,B +BIT 5,L RES 4,A SET 4,C +BIT 5,M RES 5,B SET 4,D +BIT 5,A RES 5,C SET 4,E +BIT 6,B RES 5,D SET 4,H +BIT 6,C RES 5,E SET 4,L +BIT 6,D RES 5,H SET 4,M +BIT 6,E RES 5,L SET 4,A +BIT 6,H RES 5,M SET 5,B +BIT 6,L RES 5,A SET 5,C +BIT 6,M RES 6,B SET 5,D +BIT 6,A RES 6,C SET 5,E +BIT 7,B RES 6,D SET 5,H +BIT 7,C RES 6,E SET 5,L +BIT 7,D RES 6,H SET 5,M +BIT 7,E RES 6,L SET 5,A +BIT 7,H RES 6,M SET 6,B +BIT 7,L RES 6,A SET 6,C +BIT 7,M RES 7,B SET 6,D +BIT 7,A RES 7,C SET 6,E +RES 0,B RES 7,D SET 6,H +RES 0,C RES 7,E SET 6,L +RES 0,D RES 7,H SET 6,M +RES 0,E RES 7,L SET 6,A +RES 0,H RES 7,M SET 7,B +RES 0,L RES 7,A SET 7,C +RES 0,M SET 0,B SET 7,D +RES 0,A SET 0,C SET 7,E +RES 1,B SET 0,D SET 7,H +RES 1,C SET 0,E SET 7,L +RES 1,D SET 0,H SET 7,M +RES 1,E SET 0,L SET 7,A +RES 1,H SET 0,M DADX B +RES 1,L SET 0,A DADX D +RES 1,M SET 1,B LXI X,06A4 +RES 1,A SET 1,C SIXD 06A4 +RES 2,B SET 1,D INX X +RES 2,C SET 1,E DADX X +RES 2,D SET 1,H LIXD 06A4 +RES 2,E SET 1,L DCX X +RES 2,H SET 1,M INR [X+05] +RES 2,L SET 1,A DCR [X+05] +RES 2,M SET 2,B MVI [X+05],20 +RES 2,A SET 2,C DADX SP +RES 3,B SET 2,D MOV B,[X+05] +RES 3,C SET 2,E MOV C,[X+05] + + +MOV D,[X+05] DSBC B DADY B +MOV E,[X+05] SBCD 06A4 DADY D +MOV H,[X+05] NEG LXI Y,06A4 +MOV L,[X+05] RETN SIYD 06A4 +MOV [X+05],B IM0 INX Y +MOV [X+05],C LDIA DADY Y +MOV [X+05],D INP C LIYD 06A4 +MOV [X+05],E OUTP C DCX Y +MOV [X+05],H DADC B INR [Y+05] +MOV [X+05],L LBCD 06A4 DCR [Y+05] +MOV [X+05],A RETI MVI [Y+05],2 +MOV A,[X+05] LDRA DADY SP +ADD [X+05] INP D MOV B,[Y+05] +ADC [X+05] OUTP D MOV C,[Y+05] +SUB [X+05] DSBC D MOV D,[Y+05] +SBB [X+05] SDED 06A4 MOV E,[Y+05] +ANA [X+05] IM1 MOV H,[Y+05] +XRA [X+05] LDAI MOV L,[Y+05] +ORA [X+05] INP E MOV [Y+05],B +CMP [X+05] OUTP E MOV [Y+05],C +POP X DADC D MOV [Y+05],D +XTIX LDED 06A4 MOV [Y+05],E +PUSH X IM2 MOV [Y+05],H +PCIX LDAR MOV [Y+05],L +SPIX INP H MOV [Y+05],A +RLCR [X+05] OUTP H MOV A,[Y+05] +RRCR [X+05] DSBC H ADD [Y+05] +RALR [X+05] shld 06A4 ADC [Y+05] +RARR [X+05] RRD SUB [Y+05] +SLAR [X+05] INP L SBB [Y+05] +SRAR [X+05] OUTP L ANA [Y+05] +SRLR [X+05] DADC H XRA [Y+05] +BIT 0,[X+05] lhld 06A4 ORA [Y+05] +BIT 1,[X+05] RLD CMP [Y+05] +BIT 2,[X+05] INP M POP Y +BIT 3,[X+05] OUTP M XTIY +BIT 4,[X+05] DSBC SP PUSH Y +BIT 5,[X+05] SSPD 06A4 PCIY +BIT 6,[X+05] INP A SPIY +BIT 7,[X+05] OUTP A RLCR [Y+05] +RES 0,[X+05] DADC SP RRCR [Y+05] +RES 1,[X+05] LSPD 06A4 RALR [Y+05] +RES 2,[X+05] LDI RARR [Y+05] +RES 3,[X+05] CCI SLAR [Y+05] +RES 4,[X+05] INI SRAR [Y+05] +RES 5,[X+05] OTI SRLR [Y+05] +RES 6,[X+05] LDD BIT 0,[Y+05] +RES 7,[X+05] CCD BIT 1,[Y+05] +SET 0,[X+05] IND BIT 2,[Y+05] +SET 1,[X+05] OTD BIT 3,[Y+05] +SET 2,[X+05] LDIR BIT 4,[Y+05] +SET 3,[X+05] CCIR BIT 5,[Y+05] +SET 4,[X+05] INIR BIT 6,[Y+05] +SET 5,[X+05] OTIR BIT 7,[Y+05] +SET 6,[X+05] LDDR RES 0,[Y+05] +SET 7,[X+05] CCDR RES 1,[Y+05] +INP B INDR RES 2,[Y+05] +OUTP B OTDR RES 3,[Y+05] + + +RES 4,[Y+05] SET 0,[Y+05] SET 4,[Y+05] +RES 5,[Y+05] SET 1,[Y+05] SET 5,[Y+05] +RES 6,[Y+05] SET 2,[Y+05] SET 6,[Y+05] +RES 7,[Y+05] SET 3,[Y+05] SET 7,[Y+05] + +; These are the result of disassembling 64180OPS.TRY +; These opcodes are available ONLY on the 64180 CPU +; DDTZ will both assemble and disassemble these. +IN0 B,20 TST E MLT B +OUT0 20,B IN0 H,20 MLT D +TST B OUT0 20,H TSTI 20 +IN0 C,20 TST H MLT H +OUT0 20,C IN0 L,20 TSIO 20 +TST C OUT0 20,L SLP +IN0 D,20 TST L MLT SP +OUT0 20,D TST M OTIM +TST D IN0 A,20 OTDM +IN0 E,20 OUT0 20,A OIMR +OUT0 20,E TST A ODMR + +; The following are UNDOCUMENTED z80 opcodes from XTDOPS.TRY. +; DDTZ will disassemble these, but will not assemble them. +; They use xh/xl (or yh/yl) as separate byte registers. +; Use these at your own risk. +INRX H ACXR H MOVY H,B +DCRX H ACXR L MOVY H,C +MVIX H,20 SUXR H MOVY H,D +INRX L SUXR L MOVY H,E +DCRX L SBXR H MOVY H,A +MVIX L,20 SBXR L MOVY L,B +MOVX B,H NDXR H MOVY L,C +MOVX B,L NDXR L MOVY L,D +MOVX C,H XRXR H MOVY L,E +MOVX C,L XRXR L MOVY L,A +MOVX D,H ORXR H MOVY A,H +MOVX D,L ORXR L MOVY A,L +MOVX E,H CPXR H ADYR H +MOVX E,L CPXR L ADYR L +MOVX H,B INRY H ACYR H +MOVX H,C DCRY H ACYR L +MOVX H,D MVIY H,20 SUYR H +MOVX H,E INRY L SUYR L +MOVX H,A DCRY L SBYR H +MOVX L,B MVIY L,20 SBYR L +MOVX L,C MOVY B,H NDYR H +MOVX L,D MOVY B,L NDYR L +MOVX L,E MOVY C,H XRYR H +MOVX L,A MOVY C,L XRYR L +MOVX A,H MOVY D,H ORYR H +MOVX A,L MOVY D,L ORYR L +ADXR H MOVY E,H CPYR H +ADXR L MOVY E,L CPYR L + + +Command Summary: +=============== + +DDTZM command DDTZ command +============= ============ +@ (base) +A)ssemble first_address A +B)egin {i.e., initialize stack and return} B +C)ompare first_address,last_address,against_address C +D)ump first_address[,last_address[,base]] D +E)nter_in_memory first_address[,base] S)ubstitute +F)ill first_address,last_address,value F +G)o_to [address][,trap1[,trap2]] G +H)ex_arithmetic value1(,value2) H +L)oad_file (offset) R)ead +M)ove first_address,last_address,destination M +N)nput FCBs_command_line I)nput +Q)uit (not avail) +R)egister examine/change [register|flag] X)amine +S)earch first_address,last_address,word W)hereis +T)race_execution [count] T + Untrace_execution [count] (i.e. do count instr) U)ntrace +U)nassemble_code first_address[,last_address] L)ist code +W)rite [first_address,last_address] K)eep +X)amine {i.e. display memory parameters for application} Q)uery +Y)our_option BC:=parm1,DE:=parm2,call_address Y +Z)80_register_display Z + + +If you find this program useful, contributions will be gratefully +accepted and will encourage further development and release of +useful CPM programs. My practice is to include source. + +C.B. Falconer +680 Hartford Turnpike, +Hamden, Conn. 06517 (203) 281-1438 + +DDTZ and its associated documentation and other files are +copyright (c) 1980-1988 by C.B. Falconer. They may be freely +copied and used for non-commercial purposes ONLY. + diff --git a/DiskImg/hd0/u0/DIF.COM b/DiskImg/hd0/u0/DIF.COM new file mode 100644 index 00000000..87b89d75 Binary files /dev/null and b/DiskImg/hd0/u0/DIF.COM differ diff --git a/DiskImg/hd0/u0/DIRX.COM b/DiskImg/hd0/u0/DIRX.COM new file mode 100644 index 00000000..413bceca Binary files /dev/null and b/DiskImg/hd0/u0/DIRX.COM differ diff --git a/DiskImg/hd0/u0/DUMP.COM b/DiskImg/hd0/u0/DUMP.COM new file mode 100644 index 00000000..03a77c3c Binary files /dev/null and b/DiskImg/hd0/u0/DUMP.COM differ diff --git a/DiskImg/hd0/u0/ED.COM b/DiskImg/hd0/u0/ED.COM new file mode 100644 index 00000000..a0f0f541 Binary files /dev/null and b/DiskImg/hd0/u0/ED.COM differ diff --git a/DiskImg/hd0/u0/LBREXT.COM b/DiskImg/hd0/u0/LBREXT.COM new file mode 100644 index 00000000..c0c950e3 Binary files /dev/null and b/DiskImg/hd0/u0/LBREXT.COM differ diff --git a/DiskImg/hd0/u0/LIB.COM b/DiskImg/hd0/u0/LIB.COM new file mode 100644 index 00000000..45d7fb21 Binary files /dev/null and b/DiskImg/hd0/u0/LIB.COM differ diff --git a/DiskImg/hd0/u0/LINK.COM b/DiskImg/hd0/u0/LINK.COM new file mode 100644 index 00000000..e188fb92 Binary files /dev/null and b/DiskImg/hd0/u0/LINK.COM differ diff --git a/DiskImg/hd0/u0/LOAD.COM b/DiskImg/hd0/u0/LOAD.COM new file mode 100644 index 00000000..b9601e00 Binary files /dev/null and b/DiskImg/hd0/u0/LOAD.COM differ diff --git a/DiskImg/hd0/u0/MAC.COM b/DiskImg/hd0/u0/MAC.COM new file mode 100644 index 00000000..f49e835a Binary files /dev/null and b/DiskImg/hd0/u0/MAC.COM differ diff --git a/DiskImg/hd0/u0/MBASIC.COM b/DiskImg/hd0/u0/MBASIC.COM new file mode 100644 index 00000000..c9ec3cd3 Binary files /dev/null and b/DiskImg/hd0/u0/MBASIC.COM differ diff --git a/DiskImg/hd0/u0/NULU.COM b/DiskImg/hd0/u0/NULU.COM new file mode 100644 index 00000000..fc5594b1 Binary files /dev/null and b/DiskImg/hd0/u0/NULU.COM differ diff --git a/DiskImg/hd0/u0/PIP.COM b/DiskImg/hd0/u0/PIP.COM new file mode 100644 index 00000000..4b2ce4b6 Binary files /dev/null and b/DiskImg/hd0/u0/PIP.COM differ diff --git a/DiskImg/hd0/u0/RMAC.COM b/DiskImg/hd0/u0/RMAC.COM new file mode 100644 index 00000000..9ab7206b Binary files /dev/null and b/DiskImg/hd0/u0/RMAC.COM differ diff --git a/DiskImg/hd0/u0/SID.COM b/DiskImg/hd0/u0/SID.COM new file mode 100644 index 00000000..3b073ba5 Binary files /dev/null and b/DiskImg/hd0/u0/SID.COM differ diff --git a/DiskImg/hd0/u0/STAT.COM b/DiskImg/hd0/u0/STAT.COM new file mode 100644 index 00000000..1de359f2 Binary files /dev/null and b/DiskImg/hd0/u0/STAT.COM differ diff --git a/DiskImg/hd0/u0/SUBMIT.COM b/DiskImg/hd0/u0/SUBMIT.COM new file mode 100644 index 00000000..2e788827 Binary files /dev/null and b/DiskImg/hd0/u0/SUBMIT.COM differ diff --git a/DiskImg/hd0/u0/SUPERSUB.COM b/DiskImg/hd0/u0/SUPERSUB.COM new file mode 100644 index 00000000..a25d60a6 Binary files /dev/null and b/DiskImg/hd0/u0/SUPERSUB.COM differ diff --git a/DiskImg/hd0/u0/UNARC.COM b/DiskImg/hd0/u0/UNARC.COM new file mode 100644 index 00000000..8cc90746 Binary files /dev/null and b/DiskImg/hd0/u0/UNARC.COM differ diff --git a/DiskImg/hd0/u0/UNCR.COM b/DiskImg/hd0/u0/UNCR.COM new file mode 100644 index 00000000..42385ddd Binary files /dev/null and b/DiskImg/hd0/u0/UNCR.COM differ diff --git a/DiskImg/hd0/u0/UNZIP.COM b/DiskImg/hd0/u0/UNZIP.COM new file mode 100644 index 00000000..afde7204 Binary files /dev/null and b/DiskImg/hd0/u0/UNZIP.COM differ diff --git a/DiskImg/hd3/VIDATT.Z80 b/DiskImg/hd0/u0/VIDATT.Z80 similarity index 100% rename from DiskImg/hd3/VIDATT.Z80 rename to DiskImg/hd0/u0/VIDATT.Z80 diff --git a/DiskImg/hd0/u0/WS.COM b/DiskImg/hd0/u0/WS.COM new file mode 100644 index 00000000..aa028bc3 Binary files /dev/null and b/DiskImg/hd0/u0/WS.COM differ diff --git a/DiskImg/hd3/WS.OVR b/DiskImg/hd0/u0/WS.OVR similarity index 100% rename from DiskImg/hd3/WS.OVR rename to DiskImg/hd0/u0/WS.OVR diff --git a/DiskImg/hd3/WSCHANGE.COM b/DiskImg/hd0/u0/WSCHANGE.COM similarity index 100% rename from DiskImg/hd3/WSCHANGE.COM rename to DiskImg/hd0/u0/WSCHANGE.COM diff --git a/DiskImg/hd3/WSCHANGE.OVR b/DiskImg/hd0/u0/WSCHANGE.OVR similarity index 100% rename from DiskImg/hd3/WSCHANGE.OVR rename to DiskImg/hd0/u0/WSCHANGE.OVR diff --git a/DiskImg/hd3/WSCHHELP.OVR b/DiskImg/hd0/u0/WSCHHELP.OVR similarity index 100% rename from DiskImg/hd3/WSCHHELP.OVR rename to DiskImg/hd0/u0/WSCHHELP.OVR diff --git a/DiskImg/hd3/WSHELP.OVR b/DiskImg/hd0/u0/WSHELP.OVR similarity index 100% rename from DiskImg/hd3/WSHELP.OVR rename to DiskImg/hd0/u0/WSHELP.OVR diff --git a/DiskImg/hd3/WSMSGS.OVR b/DiskImg/hd0/u0/WSMSGS.OVR similarity index 100% rename from DiskImg/hd3/WSMSGS.OVR rename to DiskImg/hd0/u0/WSMSGS.OVR diff --git a/DiskImg/hd3/WSPRINT.OVR b/DiskImg/hd0/u0/WSPRINT.OVR similarity index 100% rename from DiskImg/hd3/WSPRINT.OVR rename to DiskImg/hd0/u0/WSPRINT.OVR diff --git a/DiskImg/hd3/WSREADME.TXT b/DiskImg/hd0/u0/WSREADME.TXT similarity index 100% rename from DiskImg/hd3/WSREADME.TXT rename to DiskImg/hd0/u0/WSREADME.TXT diff --git a/DiskImg/hd3/WSSHORT.OVR b/DiskImg/hd0/u0/WSSHORT.OVR similarity index 100% rename from DiskImg/hd3/WSSHORT.OVR rename to DiskImg/hd0/u0/WSSHORT.OVR diff --git a/DiskImg/hd3/WSU.COM b/DiskImg/hd0/u0/WSU.COM similarity index 100% rename from DiskImg/hd3/WSU.COM rename to DiskImg/hd0/u0/WSU.COM diff --git a/DiskImg/hd0/u0/XSUB.COM b/DiskImg/hd0/u0/XSUB.COM new file mode 100644 index 00000000..15e86abf Binary files /dev/null and b/DiskImg/hd0/u0/XSUB.COM differ diff --git a/DiskImg/hd0/u0/ZAP.COM b/DiskImg/hd0/u0/ZAP.COM new file mode 100644 index 00000000..47ffcbb8 Binary files /dev/null and b/DiskImg/hd0/u0/ZAP.COM differ diff --git a/DiskImg/hd0/u0/ZDE.COM b/DiskImg/hd0/u0/ZDE.COM new file mode 100644 index 00000000..9bc493c3 Binary files /dev/null and b/DiskImg/hd0/u0/ZDE.COM differ diff --git a/DiskImg/hd0/u0/ZDENST.COM b/DiskImg/hd0/u0/ZDENST.COM new file mode 100644 index 00000000..8ccc9767 Binary files /dev/null and b/DiskImg/hd0/u0/ZDENST.COM differ diff --git a/DiskImg/hd0/u1/SAMPKEY.DOC b/DiskImg/hd0/u1/SAMPKEY.DOC new file mode 100644 index 00000000..911c4a11 --- /dev/null +++ b/DiskImg/hd0/u1/SAMPKEY.DOC @@ -0,0 +1,134 @@ +SAMPKEY.DOC: +Sample Macros for ZDE, 01 June 90 by Carson Wilson. + +This file describes the sample macros contained in SAMPKEY.ZDK +and SAMPKEY.ZDT. As distributed, ZDE contains no Macro Key +definitions. I have included the SAMPKEY.* files both to give +you an idea of the versatility available through ZDE's macro +capability and to provide you with some useful choresaving +routines. Many of the sample Macros come directly from the ZDE +Manual, and illustrate the use of conditional testing, jumps, and +control key entry from within Macros. In addition to being +educational, most of these "sample" Macros do useful work. While +you may (and should) define ZDE's Macros to do anything you wish +(or nothing, if you wish), I think you may find one or more of +these samples useful just as they are. + +To install the macros in SAMPKEY.ZDK (or any .ZDK file) into your +copy of ZDE, just type "ZDENSTAL ZDE SAMPKEY.ZDK." Then exit +ZDENSTAL with the ave option. This produces a working copy of +ZDE.COM with Macro Keys 0 to 9 as defined in the .ZDK file. + +To alter or replace the Macros in SAMPKEY.ZDK, first edit the +text file SAMPKEY.ZDT with ZDE. Then translate SAMPKEY.ZDT into +a new macro file with the command "ZDKCOM SAMPKEY.ZDT." You can +also translate .ZDK files back into .ZDT files if you wish; see +ZDKCOM.DOC for more information. + +The following briefly describes each of the Macros in the SAMPKEY +files: + + +MACRO 0 - SWAP CHARACTERS. + + Macro Text: + q^S^S^G^D^U^U^D^G + + Purpose: + Swaps the character behind the cursor with the previous + character. Useful for catching typos. + + +MACRO 1 - SOFTEN PARAGRAPH. + + Macro Text: + q^QS^X^[=^M]^S^V ^V^D^[![ + + Purpose: + "Softens" Hard Carriage Returns from the line the cursor + is on to the end of the paragraph. This allows + reformatting with ^B of files from other word + processors. + + +MACRO 2 - MOVE TO START OF SENTENCE. + + Macro Text: + q^[~.1^S^[1^[~.<^[2^D^[= 2^[=^M2 + + Purpose: + Moves the cursor to the beginning of the sentance the + cursor is currently on. + + +MACRO 3 - MOVE TO START OF PARAGRAPH. + + Macro Text: + q^QS^S^S^[= [^D^D + + Purpose: + Moves the cursor to the beginning of the paragraph the + cursor is currently on. + + +MACRO 4 - REFORM AND RETURN. + + Macro Text: + q^B^QP + + Purpose: + Reformat beginning with the line the cursor is on and + return cursor to current location. Useful when + revising text in the middle of a paragraph. + + +MACRO 5 - BROWSE FILE. + + Macro Text: + n^[;^C^[![ + + Purpose: + Move through file a screen at a time. Press ESC to + stop. + + +MACRO 6 - DELETE WORD LEFT. + + Macro Text: + n^A^T + + Purpose: + Erases the word to the left of the cursor. + + +MACRO 7 - UNDERLINE WORD RIGHT. + + Macro Text: + n^V^PS^F^PS + + Purpose: + Brackets the word to the right of the cursor with the + control code ^S, causing the word to be underlined when + printed (NOTE: printer must be installed). + + +MACRO 8 - SWAP LINES. + + Macro Text: + q^QS^KB^S^X^KK^S^E^E^KV + + Purpose: + Swaps the current line with the previous line, moving + the cursor with it. Can be used to move a single line + up any distance within your file. + + +MACRO 9 - HELP MESSAGE. + + Macro Text: n^QE^QS^N^N0=SwCh 1=Soft 2=SentBg 3=ParaBg + 4=Reform 5=Browse 6=DelLft 7=Undl 8=SwLn 9=Hlp + ^[;^[;^[;^Y^Y^QP + + Purpose: + Briefly displays help message at top of screen. + \ No newline at end of file diff --git a/DiskImg/hd0/u1/SAMPKEY.ZDK b/DiskImg/hd0/u1/SAMPKEY.ZDK new file mode 100644 index 00000000..9bb5971f Binary files /dev/null and b/DiskImg/hd0/u1/SAMPKEY.ZDK differ diff --git a/DiskImg/hd0/u1/SAMPKEY.ZDT b/DiskImg/hd0/u1/SAMPKEY.ZDT new file mode 100644 index 00000000..d41b3db3 --- /dev/null +++ b/DiskImg/hd0/u1/SAMPKEY.ZDT @@ -0,0 +1,11 @@ +q^S^S^G^D^U^U^D^G +q^QS^X^[=^M]^S^V ^V^D^[![ +q^[~.1^S^[1^[~.<^[2^D^[= 2^[=^M2 +q^QS^S^S^[= [^D^D +q^B^QP +n^[;^C^[![ +n^A^T +n^V^PS^F^PS +q^QS^KB^S^X^KK^S^E^E^KV +n^QE^QS^N^N0=SwCh 1=Soft 2=SentBg 3=ParaBg 4=Reform 5=Browse 6=DelLft 7=Undl 8=SwLn 9=Hlp ^[;^[;^[;^Y^Y^QP + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE10.DOC b/DiskImg/hd0/u1/ZDE10.DOC new file mode 100644 index 00000000..83ce8cc9 --- /dev/null +++ b/DiskImg/hd0/u1/ZDE10.DOC @@ -0,0 +1,1049 @@ +..You must print this file in "W" mode with page length set to 54 +..(the default) so that page numbers correspond with the Table of +..Contents and the Index. Use the "L" option for a left margin +..("L8" centers standard pitch on 8.5" wide paper), and the "" +..option to number pages. + + ZDE + + Z-System Display Editor + + Version 1.0 10 Mar 89 + + ZDE and its documentation are copyright 1989 by Carson Wilson, + all rights reserved. They may not be circulated in any + incomplete or modified form without written permission of the + author. Any commercial use of ZDE, defined as any situation + where the duplicator receives revenue by duplicating or + distributing ZDE by itself or in conjunction with any hardware + or software product, is expressly prohibited unless authorized + in writing by Carson Wilson. + + +1. Introduction. + + ZDE, the Z-System Display Editor, is a small, fast, powerful +text editor based Eric Meyer's famous Video Display Editor (VDE). +ZDE retains all features of VDE, but removes defects and supports +special ZCPR and ZSDOS features such as named directories, +register variables, automatic disk relog, and file datestamp +support. The install program has also been improved (see +ZDE10.NEW for a complete rundown of improvements). At the same +time, I have tried to be conscientious about the balance between +features and memory usage. If I added every new feature or +convenience that came to mind, we would soon have a luxurious +in-memory editor for 2 kilobyte files! Much of the following is +adapted with permission from Eric Meyer's VDE.DOC. + + ZDE's native ASCII mode and definable macros make it an ideal +programmer's editor; its full formatting and printing features +also make it an efficient word processor. Written entirely in Z80 +assembler, ZDE is F-A-S-T. There are no disk overlays, and all +editing is done in memory. As a result, finding a string near the +end of a 50K file takes WordStar 3.3 about 14 seconds (8MHz Z80); +ZDE does it in under a second. This is like moving through air +instead of molasses: you will find that you can do more of your +work on screen, and less on paper. + +Among ZDE's features are: + +Full-screen editing User area and named directory support +Block operations Wordwrap and reformat +File datestamp support Macro programs +Disk file operations Margins, tabs, spacing +Find and replace WordStar compatibility +Many print features Undeletion +Configurable options Support for all CP/M terminals + + +2. Installing ZDE. + + ZDE works with Z80 CP/M 2.2 and 3.0 and compatible systems. +It is ideal for portable computers with limited disk space. There +are many user configurable options, and ZDE can be installed for +all CP/M terminals. If you are running ZCPR, ZSDOS or Z3PLUS, ZDE +offers features not available with less advanced system software, +but these system enhancements are not required. + + To install ZDE, use the ZDENSTAL configuration program; see +the accompanying file ZDENSTAL.DOC. You should install ZDE for +your computer's terminal at the earliest convenience, since this +greatly enhances performance. There are many other installable +options; you will discover how you want everything set in the +course of using ZDE, so don't worry about going through all of it +at first. For ease of reference, portions of this manual +referring to installable options and settings are enclosed in +square brackets ("[" and "]"). + + +3. Invoking ZDE. + + ZDE is invoked from your system's command prompt using the +following syntax ("ufn" means "unambiguous file name"): + + ZDE Begin working on a new file. + + ZDE ufn Edit a new or already existing file. + + ZDE dir:ufn Edit a new or existing file from another + directory. + + ZDE ufn m Edit a file using mode "m." + ZDE ufn[m + +"m" above can be either W, A, or N (see File Modes, below), and +"dir" can be either a drive, a user area, a drive followed by a +user area, or a ZCPR named directory. For example: + + ZDE A4:MYFILE.TXT N Begin working on MYFILE.TXT at user + area 4, drive A, in non-document + mode. + + The size of the file to be edited is limited by available +memory. This will vary for different systems, but normally the +maximum size will be between 45 and 55k. If a file is too large +to edit, you must break it up and edit the pieces separately. +Numerous CP/M utilities are available which will break up and +rejoin ASCII files. + + +4. ZDE's Command Set. + + ZDE's commands consist of simple one- or two-key +combinations, easily found by the touch typist without +distraction. Most commands are the same as WordStar's. If you +have questions that this file can't answer, a WordStar manual may +be a useful reference. But ZDE is not a WordStar "clone"; there +are significant differences, including an extended set of +ESC-commands for functions such as macros (see below). + Virtually complete compatibility with the WordStar command +(sub)set can be achieved UNLESS the keys ^J, ^K, and ^L are used +as arrow keys (as on many CP/M computers). In this event ZDE +synonyms must be used: ESC- for the ^K- prefix; ESC-H for ^J; and +^\ for ^L (see ZDENSTAL.DOC for terminal installation). + +4.1. Command Summary. + + Below, the "^" character indicates use of the Ctrl key: ^K = +Ctrl+K. The ESC (^K), ^O, and ^Q prefixes require pressing two +keys in sequence: ^O C, for instance means press ^O, then C (or +^C). Any prefix may be canceled by typing ESC or Space. + +4.1.1. Control Keys: Single Keystroke Commands. + + ^J (ESC H) = display Help menus. + + CR = Carriage return (^M). Marks a paragraph end. + BS = Backspace (^H). + TAB = Hard Tab mode: insert tab (^I). Variable Tab mode: move + to next stop. + + Arrow keys: WordStar: ^E up, ^X down, ^S left, ^D right. + Alternate: configurable, default ^K, ^J, ^H, ^L. + + ^F = move to start of next word right. + ^A = move to start of next word left. + ^R = scroll back one screen. + ^C = scroll forward one screen. + ^W = scroll back one line. + ^Z = scroll forward one line. + + ^G = delete character to the right of the cursor. + DEL = delete character to the left (configurable). + ^U = undelete a character. + ^T = delete word to right of cursor. + ^Y = delete current line. + + ^N = insert a carriage return (break line) at present + position. + ^V = toggle INSERT mode on and off. + ^^ = toggle case (upper/lower) of character at cursor. + ^P = insert following control code in text. + ^B = reformat current paragraph. + ^L (^\) = repeat find/replace (repeats last ^QF or ^QA + command). + +4.1.2. File and Block Commands: first hit ^K (or ESC), then the + key shown. + + ^K I = display file/memory Information message. + + ^K F = List files in disk directory. + ^K E = Erase a disk file. + + ^K L = Load a brand new file to begin editing. + ^K N = change the current file Name (affects Save, eXit). + ^K S = Save the current file to disk, and continue editing. + ^K D = Done. Save the file, then load a new one. + ^K X = eXit: Save the file, then Quit to CP/M. + ^K Q = Quit to CP/M, abandoning current file. + + ^K R = Read a disk file into text at cursor position. + ^K P = Print the text (whole file or block). + + ^K B = mark the start of a Block. + ^K K = mark the end of a block. + ^K U = Unmark the block. + ^K Y = Delete the marked block. + ^K C = Copy the block text at present cursor position. + ^K V = moVe the block text to the present cursor position. + ^K W = Write the marked block to a disk file. + +4.1.3. Escape and Macro Commands: first hit ESC, then the key + shown. + + ESC arrows: Left/Right (including ^S/D) = shift screen + horizontally + by 32 columns. + Up/Down (including ^E/X) = shift screen + vertically + by 1/4 screen. + ESC TAB = move back to last tab stop. + + ESC M = execute a Macro string of commands. + ESC # = store macro on numeric key for later recall. + ESC 0..9 = use stored key. (In macro mode: jump label.) + ESC !,=,~,+ = used in Macro programming (see below). + ESC ; = brief pause, during Macro execution only. + +4.1.4. Quick Commands: first hit ^Q, then the key shown. + + ^Q Arrows: Left/Right (including ^S/D) = go to start or end + of line. + Up/Down (including ^E/X) = go to top or bottom + of screen. + ^Q R = move to top of file. + ^Q C = move to end of file. + ^Q I = move to specified page or line number. + ^Q B = move to marked block. + ^Q Q = move to next line in queue (ZCPR only). + ^Q Z = move to next place marker. + + ^Q F = find next occurrence of a string. + ^Q A = find and replace a string. + + ^Q Y = delete from cursor to end of current line. + ^Q DEL = delete from cursor to beginning of current line. + ^Q T = delete until specified character (caution--powerful!). + ^Q U = undelete a line. + +4.1.5. Onscreen Commands: first hit ^O, then the key shown. + + ^O Arrow: Up (including ^E) = make current line top of + screen. + + ^O R = set right margin (column 1 turns off + wordwrap/formatting). + ^O L = set left margin. + ^O X = toggle Margin Release on/off. + ^O C = center current line. + ^O F = align current line flush with the right margin. + + ^O Q = toggle header on/off. + ^O T = toggle ruler line on/off. + ^O D = toggle display of hard CRs on/off. + + ^O A = toggle Auto Indent on/off. + ^O S = toggle Double Spacing on/off. + ^O H = toggle hyphenation on/off. + ^O V = toggle tab mode Hard/Variable. + ^O I = set variable tab stop. + ^O N = clear variable tab stop. + + ^O P = set page length (0 turns off pagination). + ^O W = toggle windowing on/off (see below). + ^O Z = temporarily blank the entire screen. + + +5. Command Descriptions. + +5.1. Auto-Indent Mode (^O-A). + + Auto-Indent is useful for typing outlines, structured program +source code, and other text where the "left margin" varies. +Auto-Indent causes the RETURN key to act differently: If you are +entering new text, it will be indented to match the previous line. +If you are just moving through the file, the cursor advances past +any existing indentation. + +5.2. Block Commands (^K-B, -K, -U, -R, -Y, -W, -C, -V, -P-B, + ^Q-B). + + A "block" of text is normally delimited by two markers +[default: ^@] which remain in memory until reset or deleted. + ^K-B marks the beginning of the block; ^K-K marks its end. +Markers are inserted in the text. The two markers are identical; +the first one present is the start. + ^K-U unmarks the block, removing any marker(s) set (block +markers can also be deleted individually as ordinary characters). +Markers are automatically removed as appropriate when ^K-B/-K are +used again. + ^K-R reads in the contents of a disk file, inserting it as a +block after the current cursor position. You will be asked for +the name (and, optionally, mode) of the file. Other block +operation commands all require a Block to be marked: + ^K-Y deletes the block (including markers). + ^K-W writes the block text to a disk file; you will be asked +for the filename (and optional mode). + ^K-V moves the Block text to the present cursor location, +deleting the original; ^K-C copies it and leaves the original. +Sometimes ZDE will run out of memory when moving blocks within a +large file. If this occurs, just write the block to a file, +delete it, and read it back in as: "^K-W, ^K-Y, ^K-R". + ^K-P-B (^K-P with B option) prints the block text only. + The ^Q-B command, from wherever you are in the file, moves +the cursor to the Block start. + +5.3. Cursor Movement (Arrow keys; ^F; ^A; ^Q-R, -C, -I). + + ZDE supports three sets of Arrow keys, which function +interchangeably. The two built-in sets support the WordStar +"arrow key diamond" ^E, ^X, ^D, ^S, and the ANSI standard 3-byte +sequences (ESC-[-A, etc.). The third set is user-configurable, +and must be installed with ZDENSTAL. These keys move the cursor +up, down, right, and left respectively. Note: if you install ^J, +^K, and ^L as arrow keys, you must use ESC- commands for help, +file operations, and repeat find/replace, respectively. + Preceded by ^Q-, any arrow key (except ANSI) moves more +quickly: to the top or bottom of the screen, to the left or right +end of the line. + There are also two word movement commands: ^F moves right, to +the start of the next word; ^A moves left, to the start of the +previous (or current) word. Both have maximum ranges of 255 +characters. + For quickly covering large distances, the commands ^Q-R and +^Q-C go all the way to the beginning and end of the file, +respectively, and ^Q-I goes to any specified page (or line, in +non-documents). + +5.4. Deleting (^G, DEL, ^T, ^Y, ^Q-Y, -DEL, -T). + + You can delete text one CHARACTER at a time: ^G deletes to +the right of the cursor, and DEL to the left. [If you have no DEL +key, you can install another equivalent.] Note that the ordinary +BS (^H) does not normally delete. + ^T deletes an entire WORD to the right (up to 255 characters) + ^Y deletes the entire current LINE. ^Q-Y deletes only the +part of the line to the right of the cursor; ^Q-DEL deletes the +part to the left. + ^Q-T deletes UP TO a specified character. Example: "^Q-T." +deletes to the end of the sentence. Special case: "^Q-T-CR" +deletes to the next HARD CR, the end of the paragraph. This is a +powerful command, so use it with caution. + Accidentally deleted text can usually be recovered (see +Undelete, below). + +5.5. Disk Operations (^K-F, -E). + + ^K-F gives an unsorted list of disk FILES: hit CR to list the +directory specified by the current file, or specify a drive, user, +or named directory (colon optional). If there is not enough room +to fit all the files on the screen, you will see "..." at the end +to indicate that there were still more. Press ESC or Space to +continue. + ^K-E will ERASE a single disk file to provide more room on +the disk (no wildcards allowed). + +5.6. File Commands (^K-N, -S, -X, -Q, -D, -L). + + ^K-N NAMES your work or changes the current file mode. You +can change the filename in the header before saving, and/or change +its mode to WordStar, ASCII, or Nondocument. To set the file +mode, introduce the mode character with the left square bracket, +e.g., "Name: MYFILE.WS [W". + ^K-S SAVES your work: what's in memory is written to disk +under the file name in the header (you must have a file name; one +will be requested if necessary). If that file already existed, a +backup (.BAK) file may be preserved [configurable; see +installation guide]. If you haven't changed the file, ZDE prompts +you to confirm that you want to resave it anyway. + There are several different commands for finishing up: + ^K-X saves your work and then EXITS to CP/M. + ^K-Q just QUITS. If the file has been modified, ZDE asks if +you want to abandon the changes. + ^K-D (DONE) saves your work, then loads a new file to edit. + ^K-L quits the current file and LOADS a new one to begin +editing. + +5.7. Find, Replace (^Q-F, -A, ^L, ^\). + + ^Q-F is the command to FIND a string. The search normally +proceeds from the cursor position forward, and is case +(upper/lower) insensitive. There are two options: "B" = search +backwards; "C" = case sensitive search. If used, the options +must be enclosed in slashes (eg, "/bc/") before the search string. +(If you want to search for a string beginning with a slash, use an +empty (//) option first.) In addition, a ^P-Z [this can be +reconfigured] functions as a wildcard matching any single +character. Other control codes, like ^M for newline, can be +included (with the ^P prefix where needed). Examples: + + Find: /c/^MLABEL matches "LABEL" at start of line only; + Find: 4^Z^Z01 matches "42201", "47401", etc; + Find: wordstar matches "WORDSTAR", "WordStar" etc; + Find: ///88 matches "/88"; + Find: /b/esc looks backwards for "Esc", "esc", etc. + + ^Q-A is the FIND/REPLACE command. It asks for a string to +find, and what to change it to (all options above apply to the +search string only). The cursor will be placed on each occurrence +of the string successively, starting at the cursor location. You +will see the prompt "Chg?" in the header. To replace the old +string with the new one, press "Y"; anything else skips to the +next. To change all further occurrences without being asked, +press "*". ESC cancels at any time. (Note: if ^Q-A is used in a +Macro, it will automatically assume "*" with no further input +required.) + ^L (or ^\, if ^L is an arrow key) repeats the last ^Q-F or +^Q-A command. For ^Q-A, you will be asked whether you want to +replace the found string. For both, direction and case options +remain unchanged. + +5.8. Header (^O-Q). + + ZDE normally gives you a header, or status line, at the top +of the screen. However, if you like you can toggle the header +display on and off with the ^O-Q (QUIET) command. [The header may +also be suppressed by default.] This lets you see more file text. +It can also speed up operation on some slower terminals, as the +position doesn't have to be continually updated. + + A typical header line looks something like: +------------------------------------------------------------------ +B0/WORK:ZDE.DOC [A Pg 8 Ln 31 Cl 53 INS vt hy AI DS MR ^Q_ +------------------------------------------------------------------ + "B0/WORK:ZDE.DOC [A" = Current directory, filename, and mode. + "Pg 8, etc" = Current position in file by page, line, column. +For "N"ondocuments, there is no page number display. If +pagination (^O-P) is off, you will see "Pg 0" (document) or "OP" +(nondocument) here. + "INS" = Insert mode on (^V). + "vt" = Variable tabs on (^O-V). + "hy" = Hyphenation enabled. (^O-H) Doesn't display in "N" + mode. + "AI" = Auto indent mode on (^O-A). + "DS" = Double spacing (^O-S). + "MR" = Margins released (^O-X). Doesn't display in "N" mode. + "^Q_": Prefix keys (and some prompts) display here. + +5.9. Information (^K-I). + + ^KI displays an Information message with: + + - the ZDE version and date; + - whether (Y/N) the file has been changed since last saved; + - the current size of the file in bytes; + - the number of bytes of text memory used and free (1024 + bytes = 1K). + + You will note that the file uses about 20-25% less memory +than its actual length; this is due to ZDE's compression of text. +(Note: ZDE is limited to 16-bit arithmetic. In the unlikely event +that file size should exceed 64K it will be shown mod 64K; just +add 65536.) + Block moves and copying are limited by the amount of free +memory. Further, when there is less than 1K free, response time +can get very slow. + +5.10. Insert Mode (^V). + + ^V toggles insertion on and off. If insert is OFF, any text +to the right of the cursor is overwritten as you type. If insert +is ON, what you type is inserted, and existing text moves to the +right. + +5.11. Line Spacing (^O-S). + + The ^O-S command toggles between single and double line +spacing. In double space mode, the following functions generate +double carriage returns: CR (^M), Insert CR (^N), Reform (^B), +Wordwrap. You can easily mix single and double spacing; the ^B +command can convert between the two. Note: if you prefer to keep +your actual file single spaced, you can still get a double-spaced +printout by using the "D" option of the ^K-P command (see +Printing). + +5.12. Margins (^O-R, -L, -X, -C, -F). + + ^O-R sets the RIGHT margin, enabling wordwrap, reformatting, +and centering. A right margin of 1 disables all formatting +functions (same as in "N"ondocument mode). At the prompt +"Column:" enter the column number (1-255), or just hit CR for the +current cursor column. If the value entered conflicts with the +current left margin, ZDE sets the left margin to 1. + ^O-L sets the LEFT margin in an identical fashion; of course, +the value must always be less than the current right margin, +meaning it's best to set the right margin first. + ^O-X temporarily RELEASES the margins (resets them to 1), +allowing you to type outside them. Use ^O-X again to restore the +margins. + ^O-C CENTERS the current line with respect to the margins, if +set. ^O-F sets the current line FLUSH right, if the right margin +is set. + +5.13. Pagination (^O-P). + + The ^O-P command sets the page length. Enter a value from 0 +to 255, or just hit CR to restore the default value [normally 54]. + When the value is nonzero, it determines the page and line +shown in the document header ("Pg xx Ln xx"), and page-oriented +Print functions (formfeeds, headers, start/stop print) are enabled. + When the value is zero, pagination is off. The header will +say "Pg 0 Ln xxxx", showing you the absolute line number in the +file. Also, printing occurs with no page breaks or formfeeds. +This can be useful for printing small things right after each +other on the same sheet; or, in conjunction with the "*" print +option, can be used to print out multiple copies of index cards, +labels, etc. + ZDE never sends a formfeed before printing; begin your file +with a ^P-L character if you need one. Otherwise, use of ^P-L is +not recommended in document files as it renders ZDE's page count +inaccurate. + +5.14. Place Markers and Line Queue (^P-Z, ^Q-Z, ^Q-Q). + + You can set any number of temporary PLACE MARKERS in the text +with ^P-Z (they will appear as ^Z). The ^Q-Z command moves the +cursor to the next place marker in the file, cycling back to the +top of the file if needed. Place markers are NOT saved to disk. + ZCPR users may also store a QUEUE of up to eight line numbers +in their user-defined messages (a set of sixteen bytes of +protected memory "available for user definition"). The ^Q-Q +command will then cycle through the queue of line numbers, +returning to the first location when it reaches a value of zero. +A value greater than the number of lines in the file takes the +cursor to the end of the file. The numbers are stored as two-byte +inverted hexadecimal words. This facility is intended as an +interface between other programs and ZDE for such purposes as +storing the locations of compiler errors, however ZCPR users may +also find it useful to POKE these locations directly before +invoking ZDE. + +5.15. Printer Codes (^P). + + Control codes for special effects in printing can be entered +in the text with the ^P prefix. Thus pressing ^P-^H (or ^P-H) +embeds a ^H, etc. Several standard codes are: + + ^H - backspace - overstrike previous character + ^I - hard (ASCII) tab - printers respond variously to this + ^L - formfeed (Not recommended unless pagination (^O-P) + disabled) + + The Block marker, normally ^@, cannot be embedded, and ^Z is +reserved for use as a place marker. Control codes display on +screen as capital letters, highlighted if possible. ZDE assumes +they are not characters, so they are not counted when reformatting +text. + For greater convenience, you can also arrange to have a +single ^P-code produce an entire string of bytes for commonly used +printing effects. ZDE supports a subset of WordStar's printer +installation, seven definable codes: four toggles, four switches. +The Printer Installation in ZDENSTAL allows you to choose what +codes you want to use, and install the actual control sequences +your printer needs. The defaults are: + + toggles: ^B, ^D, ^S, ^Y + switches: ^Q, ^W, ^E, ^R + + In WordStar these toggles are Boldface, Doublestrike, +Underline, and Ribbon/Italic respectively, but you can make them +anything you like. "Toggles" are good for features like underline +and bold that are turned on and off. "Switches" are better for +multivalued parameters like character pitch. + Example: your printer uses ESC-U-01 (and 00) to turn +underlining on (and off). If you install these codes with +ZDENSTAL: + ^S toggle on: (03)1B5501 + ...and off: (03)1B5500 + +then all you have to type in ZDE to get underlined text is: +^PSunderlined text^PS. + +5.16. Printing (^K-P). + + The ^K-P command PRINTS all or part of the file in memory. +You will be asked for a set of "Options:", at which point you may +enter zero or more of the following, in any order: + + B prints only the currently marked BLOCK. + P PAUSES for your keystroke before each page (sheet + feed). + D DOUBLE SPACES all text to be printed. + Lnn sets the printer LEFT MARGIN to nn columns [the + default value can be set with ZDENSTAL]. + ^ FILTERS control characters ^X to text "^X". + *nn prints the job out nn TIMES (nn=1..255). + @nn begins printing AT the nn'th page. + =nn renumbers the pages beginning with nn. + #nn prints only (up to) a TOTAL of nn pages. + "..." uses the quoted string as a HEADER. The string, + followed immediately by the page number, will print + at the top right of each page near the margin (maxi- + mum length is 50 characters; an empty string, "", + gives numbered pages with no header text.) + +The last four options (@,=,#,"") are NOT allowed if pagination is +disabled (^O-P), or if "B"lock print was chosen. Examples: + +Options: L12P + - Print the file with a left margin of 12 columns, pausing + before each page for you to press a key (other than Esc). + +Options: @6#2=14"Instructions, page " + - Print the sixth and seventh pages of the file, but numbered + 14 and 15, with the header shown. + +Options: BD^*2 + - Print out the current marked Block twice, double spaced, + with control filtering. + + In "W" mode, lines beginning with a "." will be regarded as +WordStar dot commands, and will neither print out nor affect the +page count (they have no other effect either). + You can abort printing at any time with ESC (this may take a +moment, or a few keystrokes, depending on your BIOS). + +5.17. Ruler Line (^O-T). + + To help you align text properly, ^O-T toggles display of a +"ruler line" above the text on and off. + In each column you will see one of several symbols: "[]" +designate the current margins (if set); "-" indicates areas within +the current margins, "." outside them. Also, tab stops are marked +by either "T" (Variable) or "I" (Hard). Examples: + +("A" mode) [-----T-----T-----------T--------------]........ +("N" mode) I.......I.......I.......I.......I.......I....... + +5.18. Tabs (^I, ESC-TAB, ^O-V, ^O-I, ^O-N). + + There are two Tab modes: Variable and Hard, and the ^O-V +command toggles between them. In Hard Tab mode the Tab key +produces an actual ^I (ASCII 09); whether this overwrites any +existing text depends on the Insert toggle. Hard Tabs display by +default at fixed intervals of 8 screen columns [this is +configurable to any multiple of 2]. + In Variable Tab mode, the Tab key moves the cursor to the +next variable tab stop (you can always get a Hard Tab by typing +^P-I). If Insert is on, spaces are inserted up to the next tab +stop. Otherwise, existing text is skipped over, but spaces are +still added at the end of a line as needed. Up to eight tab stops +may be set with ^O-I and cleared with ^O-N; the defaults are in +columns 6, 11, 16, and 21 [these are configurable]. At the +prompt, enter the column number desired, or hit RETURN for the +cursor column. + The ^O-I command also accepts two multiple-set inputs: "@nn" +sets tab stops every "nn" columns, while "#n1,n2,..." sets tabs at +columns "n1,n2, ...". Both remove any pre-existing tabs, and +typing "@" or "#" alone simply clears all tabs. + The ESC-TAB command moves backward (left) to the previous +variable or hard tab stop. + +5.19. Undelete (^U, ^Q-U). + + The undelete functions may be used (repeatedly if necessary) +to recover a reasonable amount of text deleted either by +overtyping, or with any of ZDE's delete commands, IF the cursor +has not yet been moved away. ^U undeletes one character; ^Q-U +does a whole line. + Restrictions: undelete may not recover all of a Block delete +unless the cursor was in or near the block deleted, and it may +work imperfectly if DEL has been used several times in sequence. + Further use after all deleted text is recovered will produce +junk (usually duplicates of text above the cursor, which is +sometimes useful). + +5.20. Upper/Lower Case (^^). + + The ^^ (ctl-caret) command changes the case of the character +at the cursor, if it was a letter, and moves the cursor one +character to the right. Useful for capitalizing a string of +lowercase text, or vice versa. + +5.21. Window and Screen (^W, ^Z, ESC-Arrows, ^O-Up, -W, -Z). + + ZDE supports several functions to move and alter the display +screen. + The ^W and ^Z commands scroll the screen up and down a line +at a time, without moving the cursor (unless necessary). + Preceded by ESC, any arrow (except ANSI) moves the screen +rather than the cursor: the text as a whole shifts up/down 1/4 +screen, or right/left 32 columns, while the cursor stays put (the +cursor must be past column 32 for horizontal shifts to work). + Preceded by ^O-, any UP arrow key (except ANSI) makes the +current text line the top of the screen. + The ^O-W command creates a WINDOW in the bottom half of the +screen, which retains a copy of the file text starting at the +current line, plus the current status and/or ruler line(s), if +any. Editing continues normally in the top half of the screen. +This is useful for comparing different sections of text within a +file, or even between different files. Typing ^O-W again removes +the Window. Note: Windowing is only supported for screens of 15 +or more lines. + The ^O-Z command temporarily zaps (blanks) the entire screen; +good for avoiding CRT burn-in, or just protecting work from prying +eyes or fingers. Restore the screen by pressing ESC or SPACE. +Note: if Windowing was in effect, any text in the window will be +lost. + +5.22. Wordwrap, Reformat (^B, ^O-D). + + WORDWRAP is automatic in Document ("W" or "A") modes whenever +the right margin is set. Any text entered will be formatted to +the current margin settings as you type. The end of a paragraph +is marked by a "HARD CR", which occurs when you press the RETURN +key (this is a CR immediately following a character of text). In +contrast, when wordwrap occurs you get a "SOFT CR" (which is +actually a CR with a space before it). You can change a hard CR +into a soft one, or vice versa, by deleting or adding a space at +the end of the line. Hitting RETURN also hardens a soft CR. The +distinction between hard and soft CRs is only important when +reformatting. + ^B REFORMATS from the line the cursor is on, to the end of +the paragraph, according to the current margin settings and line +spacing. ^B may be used not only to reshape a paragraph after +editing, but also to change its margins and line spacing. +Indentation can be tricky if you have a left margin set. If the +current line is indented relative to the next one, ZDE assumes +that amount as your paragraph indentation. + ^O-D toggles DISPLAY OF HARD CRs. Hard CRs, otherwise +invisible, can be caused to display as a "<" character. This can +be useful; some may find it distracting, so it turns off. + + +6. Macros. + +6.1. Macro (ESC-M). + + A MACRO is a string of ZDE commands and text that, once +defined, can be repeated automatically. When you type ESC-M you +will be asked for the string, then a "Repeat count". Usually you +will simply type a number for the repeat count (0-9, or "*" for +"indefinitely"). You will see the results as the macro executes, +and you can abort it at any time by pressing ESC. If you are sure +you know what you're doing, you can speed up Macro execution by +specifying "Quiet" mode: press "Q" before the repeat count. Only +the header, if present, will be updated as the Macro runs. + Macros also stop any time an error occurs; the error message +will be visible, and can be cleared by pressing ESC. Many +commands (like Find or Reformat) are designed to generate errors +at the end of the file so that indefinite ("*") Macros containing +them halt there. You may need to abort other indefinite Macros +manually. + ZDE turns INSERT OFF before running a macro, so that the same +key sequence will always have the same effect. INSERT status is +restored when the macro terminates. + In order to include any input line editing characters (BS, +CR, etc.) in a macro, you must prefix them with ^P. (NOTE: To +make them easier to read and understand, Macro listings are given +here as they function, not as they are typed in. ^P prefixes as +needed are NOT shown. Keystrokes are separated by dashes or +commas for clarity, and "_" means a space or blank.) Here are some +sample Macros: + + 1. View a file by scrolling slowly through it: + + ESC-;, ^C + + This will pause, then scroll down. (Use a repeat count + of "*".) + + 2. Can you figure out what this one does? + + ^QR, ^QF, (, CR, ^G, ^KB, ^QF, ), CR, ^G, ^KK, ^QC, CR, ^KV + + (Answer: .elif eht fo dne eht ta meht fo tsil a gnikam + elif a fo tuo sesehtnerap ni stnemmoc ekat lliw tI) + + ZDE Macros are very powerful tools, particularly given their +programmability and storage on function keys. + +6.2. Macro Key (ESC-#, ESC-0..9). + + Up to 10 MACRO KEYS can be stored (0..9), by entering them +with the ESC-M command, then using ESC-# to save them. They can +then be recalled and used simply by typing ESC-number. Example: +typing ESC-#-0 will store the last Macro used in the ESC-0 command +so that it can be recalled and reused at any future time simply by +typing ESC-0. + Ordinarily, Macro Keys operate just like the original Macro, +asking for a "Repeat count" when executed. If you want to +suppress this prompt (resulting in a "function key" that executes +just once) you can type "N" (for No repeat) before storing the key +number. Example: ESC-#-N-0 makes ESC-0 a no-repeat macro key. +If you also don't need to see the Macro work, and want to make it +faster, you can make it QUIET as well by typing "Q" instead (for +Quiet) before the key number. Example: ESC-#-Q-0 stores ESC-0 as +a quiet no-repeat key sequence. + If the Macro (ESC-M) string is empty, using ESC-# will delete +a Macro Key. Using a defined Key makes it the last macro used, so +it can be stored again in another key if desired. Trying to use +an undefined Macro Key results in an error. + There are 500 bytes total available for all 10 keys, and a +128 byte limit for any one Key (ZDE's own input line will only +accept 65 bytes, but ZDENSTAL can handle up to the full 128.) + USAGE HINT: If you want to re-use a macro without having to +type it in again, use ESC-# to assign it to a key, then call it up +by number. + Besides simply storing Macros, here are some useful Macro +Keys: + + 1. Storing different sets of margins (e.g., for quotes). + For example, + ^OL, 12, CR, ^OR, 66, CR + + 2. Typing any frequently repeated phrase; "ESC-6" is much + more convenient than "^PSWorld Wide Widgets Ltd. (N.A.)^PS". + + 3. Swap the two characters preceding the cursor: + ^S, ^S, ^G, ^D, ^U, ^U, ^D, ^G + +[ZDENSTAL allows you to install defaults for all ten Macro Keys. +Thus a copy of ZDE can be customized for any task, such as the +formatting requirements of specialized writing or programming +languages.] + +6.3. Macro Programming (ESC-0..9, ESC-!,=,~,+,;). + + ZDE has several commands which function only in a Macro +string, and give you control over the execution of a macro, +allowing true programming. + ESC-0..9 function as LABELS 0..9 when entered as part of a +Macro. They have no effect, but can be "jumped" to by other +commands. + ESC-! followed by 0..9 is a JUMP instruction, and causes +macro execution to resume with the command following the label +ESC-0..9. Example: ESC!2 jumps to label 2. As two special cases, +ESC-![ jumps to the beginning of the Macro, and ESC-!] jumps to +the end (aborts). + ESC-= and ESC-~, followed by a character and then a label +0..9 (or "[","]"), are CONDITIONAL JUMPS: they jump to the label +or the start or end of the macro IF the character at the cursor +position matches (ESC-=) or doesn't match (ESC-~) the character +specified. Example: ESC~^M2 jumps to ESC-2 if the current +character is NOT a CR. + ESC-= and ESC-~, followed by a character and then ">" or "<", +are SEARCH LOOPS. They will continue to move the cursor right +(">") or left ("<") AS LONG AS the character at the cursor matches +(ESC-=) or doesn't match (ESC-~) the specified character. Both +search loops terminate automatically at the beginning or end of +the file. Example: ESC=_> moves right as long as the current +character is a space. + ESC-+, followed by 0..9, CHAINS to another macro key, +allowing you to build macros strings longer than the storage limit +of any one key. It does not "call" the key; there is no +returning. Example: ESC+9 chains to Key 9. + ESC-; (semicolon) gives a brief pause, presumably so the user +can see what's happening on screen. + Macro programs are stored just like any other macro string +(usually with "N"o repeat count). If you program in an endless +loop, you will at some point have to abort with ESC. Don't make +macro programs "Q"uiet until you're sure they work. + Example: here is a good macro program (best stored as a Quiet +Key) to move the cursor to the start of the current sentence: + + ESC~.1, ^S, ESC1, ESC~.<, ESC2, ^D, ESC=_2, ESC=^M2 + +You could write this out in programmer's pseudo-code as: + + If not "." goto label1 + Move left ;move left if already on period +label1: While not "." move Left ;move left to previous period +label2: Move right ;now move back right + If " " goto label2 ; as long as you see a space + If "^M" goto label2 ; or a Return + (all done) + + +7. General Information. + +7.1. Disk Space. + + ZDE isn't disk-bound; if you run out of disk space, just +insert another disk (always keep a blank FORMATTED disk around). +Alternatively, you can use the ESC-F and ESC-E commands to purge +unneeded files. [If you have small disks, you can also install +ZDE not to preserve BAK files.] + Let ZDE's filesize limits encourage you to break work up into +files of 50K or less; larger files make inefficient use of floppy +disks. + +7.2. Error Messages. + + Press ESC or Space to continue. "Error" alone means the +command used just won't work in this situation. (Example: a block +command was used with no block marked.) More specific errors are: + + "Out of Memory" - the file, block, or key string won't fit in + RAM. + "Invalid Key" - an illegal command key sequence was pressed. + "I/O Error" - file not found, disk full, empty/invalid + drive, etc. +"Cannot Reformat" - word too long, or margins invalid. + "Not Found" - the object of a search was not found. + "Syntax Error" - a macro programming command was misused. + +7.3. File Modes. + + ZDE has three FILE MODES: "W"ordStar document, "A"SCII +document, and "N"on-document. The basic difference concerns the +format of disk files. + In "W" mode, ZDE reads and writes WordStar-compatible files. +ZDE can edit a WordStar document, except that any right +justification will be lost. WordStar can edit any ZDE "W" file in +Document mode. + In "A" or "N" mode, ZDE reads and writes text as standard +ASCII 7-bit characters, a universal format accepted by virtually +all software. The only difference between "A" and "N" modes lies +in the default settings on loading a new file. Typically "A" mode +is used for word processing, and "N" mode for programming and +other technical applications. + +DEFAULTS FOR: Margins Tabs Hard CR disp. +------------ ------- ---- ------------ +"A"SCII or "W"ordStar mode ACTIVE VARIABLE [ON] +"N"on-document DISABLED HARD OFF + + The file mode option can be specified along with the filename +at any ZDE file function prompt, allowing you to mix WordStar and +ASCII disk files as needed (see Invoking ZDE, above). You can +also change the current mode with the ^K-N function by entering a +new mode (e.g., "[W") with or without a filename. + [ZDENSTAL allows you to select a default file mode, to be +used when no mode is specified (originally this is "A"). Further, +you can specify two filetype masks for automatic mode selection +(e.g., all "ASM" files as "N" mode) to override that default.] + NOTE ON ASCII FILES - The "A"SCII-document file format used +since VDE 2.50, to allow accurate formatting and WordStar +compatibility, distinguishes between HARD and SOFT CRs (see +Wordwrap, above). Consequently, if you edit an ASCII file created +by other software (including earlier versions of VDE), it may +appear to be full of hard CRs, making text impossible to reformat. +There are two easy ways to solve this problem: first, you can use +^Q-A to find "^M"s and selectively replace them with " ^M". +Alternatively, the following Macro (best stored as a Quiet macro +Key) does a good job of "softening up" paragraphs for reformatting: + + ^QS,^X,ESC=_],ESC=CR],^S,^V_^V,^D,ESC![ + +7.4. Hyphenation (^O-H). + + ZDE can't introduce hyphens, but it does recognize them in +the text, treating them as a legitimate place to break a line, so +if you have a long word close to the margin, you can insert a +hyphen where you'd like the word to be broken. + Similarly, ZDE can't unhyphenate. If it is trying to +reformat and finds a hyphen at the end of a line, it will pause to +ask you what to do with it. You will see the prompt "Chg?" in the +header, and can: + Press "Y" to remove the hyphen and space, joining the word; + "N" to leave the hyphen, but still join the word; + "ESC" to leave both the hyphen and the space alone. +Typically you would choose "Y" for "soft" hyphens that you +introduced to break up a word ("intro-duction"); "N" for hard +hyphens that are part of a word ("vis-a-vis"); and "ESC" for +punctuation (dashes "--", etc.). After your choice, reformatting +will proceed automatically. + You can toggle hyphenation on and off with ^O-H. If off, +hyphens are not treated differently from any other text character. +[The ^O-H default can be changed with ZDENSTAL.] + +7.5. Interruption. + + If ZDE is interrupted by messages from other software (BIOS +error, resident utilities, etc.), it may lose control of the +screen. The best way to return it to normal is by blanking and +restoring the screen (^O-Z, ESC). + +7.6. Prompts. + + First, ZDE has several simple prompts requiring you to +confirm an action by typing "Y" or "N": + + "Abandon changes?" - warns the file you want to Quit has + been changed. +"Unchanged; save anyway?" - reminds the file you want saved isn't + changed. + "Delete original?" - do you want to delete block copied + from 2nd file? + "Chg?" - do you want to change this instance of + a string? + +Then, there are a few special purpose prompts: + + "Repeat count:" - enter (optional "Q" and) repeat count + for Macro. + "Key number:" - enter (optional "N/Q" and) key number + for Key. + "Rdy" - press any key to print next page (ESC + quits). + +Finally, there are a variety of prompts for either numeric or +string input, like "Column:" or "Find string:". You are expected +to type in a string (up to 65 characters). The following control +keys operate: + + Correct mistake: BS (^H), ^S, or Del + Erase entire entry: ^X + Abort operation: ^U + +Note that to get any of these codes, or a CR, into the string +itself, you must precede it with ^P (this includes ^P). Examples: +to find a line beginning with a "*" (find "^M,*") type + + ^Q-F, ^P-CR, *, CR. + +Now to get this into a Macro with ESC-M, you would have to type + + ESC-M, ^Q-F, ^P-P, ^P-CR, *, ^P-CR, CR. + +7.7. WordStar Compatibility. + + In most respects ZDE operates much like WordStar; one big +difference is the absence of a "No-File" menu. You are always in +edit mode; use ^K-L to select a new file to edit. + If the keys ^J, ^K, ^L are in use as CP/M arrow keys, you +must use ZDE's original command set to substitute for them as +follows: + + Block prefix (^K-)... ESC- + Help menu (^J)....... ESC-H + Repeat find (^L)..... ^\ + + If these keys are NOT installed as arrow keys, they retain +their WordStar functions. Then, of course, ZDE lacks some +WordStar commands, and has some of its own. Aside from these, +there are the following differences in common commands: + +COMMON USE WORDSTAR 4 ZDE ZDE NOTES +Hide block ^K-H ^K-U Actually unmarks block. +Erase disk file ^K-J ^K-E +Set Place Mark ^K-0..9 ^P-Z Not individually numbered. +Go to Place Mark ^Q-0..9 ^Q-P Cyclic. + +COMMON COMMAND WORDSTAR 4 USE ZDE USE + ^^ Soften hard CR Transpose upper/lowercase + ^K-N Column block mode Rename current work + ^O-D Display ^P codes Display hard CRs + ^O-F Ruler from text Flush right + ^O-P Preview mode Page length + ^Q-U Repeat align Repeat undelete + +Note that ZDE does not implement WordStar "dot commands" in text, +though in "W" mode it avoids printing them. + + +8. Disclaimer. + + You use ZDE at your own risk. The author accepts no +liability for any damages resulting from its use or misuse. +Direct problem reports and suggestions to the author; include a +stamped return envelope for a reply if desired. Thanks to the +many users of ZDE whose feedback has led to improvements and bug +fixes in the past. + + Carson Wilson Sysop: Antelope Freeway RAS + 1359 W. Greenleaf 312-764-5162, Chicago + Chicago, IL 60626 24 hours, 3-12-2400 baud + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE10.FOR b/DiskImg/hd0/u1/ZDE10.FOR new file mode 100644 index 00000000..79b4dd02 --- /dev/null +++ b/DiskImg/hd0/u1/ZDE10.FOR @@ -0,0 +1,7 @@ +Z-System Display Editor is Eric Meyer's famous VDE improved and +enhanced for Z-System. ZCPR named directory and line queue +capabilities, preserves file datestamps and runs faster under ZSDOS, +improved install program and documentation, and key compiler +included. Over twenty flaws in VDE 2.66 corrected. Also runs under +vanilla CP/M 2.2 and CP/M Plus. + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE10.NEW b/DiskImg/hd0/u1/ZDE10.NEW new file mode 100644 index 00000000..4c568f0d --- /dev/null +++ b/DiskImg/hd0/u1/ZDE10.NEW @@ -0,0 +1,304 @@ + New in ZDE + + Z-System Display Editor + + Version 1.0 10 Mar 89 + + ZDE and its documentation are copyright 1989 by Carson Wilson, + all rights reserved. They may not be circulated in any + incomplete or modified form without written permission of the + author. Any commercial use of ZDE, defined as any situation + where the duplicator receives revenue by duplicating or + distributing ZDE by itself or in conjunction with any hardware + or software product, is expressly prohibited unless authorized + in writing by Carson Wilson. + + + CONTENTS + + 1. Functional Enhancments. + 1.1. File Datestamp Capability. + 1.2. Named Directory Capability. + 1.3. Line Queue Capability. + 1.4. Other Enhancements. + 2. Bugs Fixed. + 3. ZDENSTAL. + 4. Notes to DosDisk Users. + 5. Planned Enhancements. + 6. Development History. + + +1. Functional Enhancments. + +1.1. File Datestamp Capability. + + Under ZSDOS, the Create date and time of files edited with +ZDE are maintained across editions. If .BAK files are being +created, the create dates of new files will be the same as their +.BAK files. Note that if a file with the name of a block being +saved with ^KW or ESC-W already exists, the saved block will have +the same Create stamp as the (previously) existing file. I hope +to address this side-effect in future versions by prompting before +erasing existing files during ^KW commands. + +1.2. Named Directory Capability. + + ZDE will now accept ZCPR named directories when loading, +renaming, and erasing files, and when requesting a directory +listing with the ^KF command. The named directory (if available) +is also displayed as part of the current file name in the status +line. + Since ZCPR directory names can occupy up to eight columns on +the status line, it was necessary to move the rest of the status +line over by eight columns. I was able to gain an extra column by +putting only one space between the filetype and the "[x" +specifier, but the result is that if your terminal displays less +than 55 columns the current column number will not be visible in +your status line. + This is unfortunate, but the status line is already about as +compressed as possible. To include all of the information I would +have to add a second status line for narrow terminals, which would +add a good deal of code and complexity to what is already a +complicated program. Since most CP/M terminals (including my own) +have 80 columns, I have decided in favor of the majority in this +instance. + You may also notice that the ^QA prompt "Chg? (Y/N/*)" has +been shortened to "Chg?" and the "Wait..." message is now "Wait". +These changes were also necessary because of the decrease in +available space on the status line. + +1.3. Line Queue Capability. + + A third functional enhancment is the new ^QQ command, which +causes ZDE to skip to line numbers stored in ZCPR's user-defined +message bytes. Under ZCPR3, up to eight line or page numbers may +be passed to ZDE. The original idea was to use the interface to +produce a Turbo Pascal-like integrated environment for program +development, but the interface is certainly not limited to +programmers. + The numbers are stored in ZCPR's 16 user-defined message +bytes, and ZDE treats these bytes as a packed array of up to eight +elements. ^QQ causes ZDE to cycle through the array, going to the +stored locations sequentially until the end of the array or a zero +element is reached, at which point ZDE returns to the first stored +location. + The numbers are stored as inverted 2-byte hex words (LSB +first), so for example to store the lines 12, 44, and 108 a +program would set the 16 user-defined bytes as follows: + + 0C 00 2C 00 6C 00 00 00 00 00 00 00 00 00 00 00 + +In this example, when ZDE reaches the fourth word (00 00) it +returns to the start of the array and goes to line 12 (0C 00). + Any ZCPR program, or even an alias (using Jay Sage's powerful +ARUNZ parameters) can now give ZDE the locations of up to eight +line numbers of interest. With a little imagination we could +probably create an integrated text search/edit environment which +searches multiple files for a string and points ZDE to the exact +location of each match for editing. Thanks to Cameron Cotrill and +Al Grabauskas for suggesting this feature. + +1.4. Other Enhancements. + + In response to a suggestion by Phil Newman, ZDE now properly +accepts and displays user areas between 16 and 31. While I do not +normally suggest storing files in these areas because many CP/M +programs do not handle them properly, they are useful occasionally +on very large disks or for security purposes, and are supported by +ZCPR and ZSDOS, so I have included them in ZDE. + For NewWord compatibility, I have changed the "To Mark" +command from ^QP to ^QZ. This is also better mnemonically, since +the "place mark" command is ^PZ. + The search and replace functions now match upper or lower +case by default. To search for an exact match by case, you must +enter "/c/" or "/C/" (for Case) before the search string. The +"/i/" option is no longer active. I have changed default +find/replace wildcard character to ^Z so that ZDE can find strings +with literal '_' characters. Use the ^QZ command to find a +literal ^Z. + ^KB, ^KK, ^KU and ^QY no longer cause unnecessary redisplays. + For faster operation, ZDE no longer resets drives under ZSDOS +(same as CP/M Plus). + Under ZSDOS and CP/M Plus, ZDE sets the error mode to 0FEh. +All BDOS errors are displayed on the screen, but ZDE retains +control. + For your protection, ZSDOS Path and Public files are Read +Only under ZDE. That is, you can access files via Path or Public +but you cannot erase Path or Public files. If you get a ZSDOS +"File W/P" error when saving data with the ^KS, ^KD, ^KX, or ^KW +commands or when erasing a file with ^KE, you may have given the +name of a ZSDOS Path or Public file. Try again with a new name. + + +2. Bugs Fixed. + + If just a drive letter in given during the ^KF (display +files) command, files in the current user area are displayed +rather than files in user area 0 (thanks to Ben Cohen). + ZDE no longer crashes if no name is given in response to the +^KW prompt (thanks to Eric Meyer for finding this one). + ^KB and ^KK now behave properly when entered at the rightmost +column of the screen. + The "Chg?" prompt is now properly erased in all circumstances. + Full disk errors caused CP/M Plus and ZSDOS systems to report +the wrong amount of free space. This has been corrected by +closing the output file after full disk errors (thanks to Howard +Goldstein for this idea). + File read-only errors no longer set the drive byte to "^@" +under CP/M 2.2 (thanks again to Phil Newman for finding this one). + Backwards replace now finds the first occurrence of the +string before the cursor even if the cursor is only one character +to the right of the string. If the string is replaced, the cursor +now returns to the START of the new string instead of one after it +as before (this may change the effects of some ZDE key macros). + Ben Cohen noticed that VDE's left margin (Lnn) print option +sometimes failed to indent the first line. This has been fixed. +ZDE also prints the header text at the same location no matter +what left margin is used, rather than indenting the header and +causing it to wrap to the next line. Print option verification is +also much more rigorous now than in previous versions. + ^KS, ^KD, and ^KX file name requests now abort with a +carriage return as well as ^U, and ^U now returns you to ZDE in +response to the ^KX filename request. + The bug fix published in VDE266.FIX has been incorporated. + Several ZDE bugs affecting use with DosDisk have been +eliminated (see below for bugs IN DosDisk 1.00, however). + Tabs displayed in the last column of the last row no longer +cause the screen to scroll. + Virtual screen displays no longer show garbage at the end of +the line if the cursor is at the left side of the screen, and +moving to the left edge of the screen with ^A no longer causes +redisplay. + ^A now moves to the first character on line 2 before jumping +to line 1 when line 1 is empty. + ^PZ now causes a horizontal scroll if it moves the cursor +beyond the right edge of the screen. + Block and place markers no longer set file status to +"Changed." + The cursor no longer jumps around when moving left from +columns after 254. The cursor now stops at column 254 instead of +255, and the status line says "Col 255" for any column past 254. +Text past column 254 CAN actually be edited, but it will not be +displayed by ZDE. + Strings can now be found with ^QA even if they are the very +last item in the file (credit goes to Cameron W. Cotrill for +finding this one). + "^OI@" now removes all soft tab stops "as advertised" in +VDE266.DOC instead of setting them all to 1, making it possible to +set new tabs after entering "^OI@". "^OI#" has the same effect. + ^^ now sets file status to "Changed" when converting from +lower-to-upper case as well as upper-to-lower. + "Wait..." message now disappears after disk operations with +ruler on and status line off. VDE266 forgot to erase the message +in this situation. + Backwards find and replace operations now work properly +instead of repeating the prompt indefinitely when the replace +string is shorter than the find string (thanks to Ben Cohen for +pointing this out). + VDE restored INSert to its entry status just BEFORE the final +byte of the macro, resulting in irregular behavior and sometimes +causing macro elements to appear after the "INS" indicator in the +status line. ZDE waits until the entire macro has executed before +restoring entry status. Due to ZDE's code structure, the INS +status line indicator does not change during macro execution. + ZDE restores INSert to entry status when macros abort due to +errors (e.g., "[[[ Not Found ]]]"). + + +3. ZDENSTAL. + + Included in this library is ZDENSTAL.COM, the new install +program for ZDE. ZDENSTAL it is very similar to VINST in +operation, but adds the feature of displaying the actual print +toggles and switches at all prompts, rather than the default ones. +So if you change the first default print toggle character to ^K +for example, all other prompts referring to that toggle now +reflect the change. + Files for use with ZDENSTAL must have the type ".ZDE" (option +installation), ".ZDP" (printer installation), or ".ZDK" (macro +keys), but are otherwise compatible with files used to install VDE +2.66. With Fred Haines' permission, I have adapted his wonderful +VDKCOM.COM utility for use with ZDE, and renamed it (what else?) +ZDKCOM.COM (see ZDKCOM.DOC). + ZDENSTAL also corrects the bug which prevented VINST from +loading installation files whose archive bits were set. + + +4. Notes to DosDisk Users. + +DosDisk users are advised of a bug in DosDisk 1.00 which appeared +during the development of ZDE. Calling Reset 13 while DosDisk is +active can cause DosDisk to think other active drives are all +drive A:. Bridger Mitchell, author of DosDisk, is aware of this +bug and is working on a fix. In the meantime, users of CP/M 2.2 +and ZRDOS who wish to edit files on MS-DOS disks should NOT log +into the MS-DOS drive while editing with ZDE, as this causes ZDE +to do a Reset 13 when writing to the MS-DOS drive. To edit files +on the MS-DOS drive, run ZDE from drive A: or another non-MS-DOS +drive. + +Users of ZSDOS and CP/M Plus need not worry about this problem +with ZDE, as ZDE never resets disks under ZSDOS or CP/M Plus. By +the same token, however, ZSDOS and CP/M Plus users must not change +disks in the MS-DOS drive from within ZDE, because DosDisk (like +CP/M 2.2) requires a disk reset or warm boot when disks are +changed (see DosDisk manual, p. 7). + + +5. Planned Enhancements. + + If time permits, future versions of ZDE may contain the +following enhancements: + An improved ZDENSTAL which directly accepts ASCII files for +key definitions, along the lines of ZDKCOM. + Bridger Mitchell has suggested command "bindings" which would +allow any control key or meta key sequence to be linked to any ZDE +command. This idea will be familiar to users of Perfect Writer. +Key bindings would allow ZDE to simulate EMACS, for example. + Bruce Morgen and others have suggested automatic terminal +installation under ZCPR, allowing the same copy of ZDE to be used +with any terminal. + Allow more than two default filetypes available and fixed +disks. + It may be possible to preserve file create datestamps under +CP/M Plus and Z3PLUS. + + +6. Development History. + +1984: VDE began as Eric Meyer's set of improvements on the tiny + (4k) "VDO" memory- mapped editor by Fritz Schneider (1982), + as adapted by George Peace (1984) for the Osborne Executive. + +1985: The first terminal adaptation, VDE-PX for the Epson PX-8. + Ongoing improvements also in parallel Osborne versions + VDE-OS. + +1986: The unified VDE(M) version 2.00, with generic terminal + installation. Versions 2.1-2.3 added new features + including macros; global replace; tighter compression; many + Print options; file directory; undelete. + +1987: 2.4 (1/87): Improved scrolling and screen functions; more + screen sizes supported; WordStar file mode; + place markers; ^OZ; block print; larger macro + keys; VINSTALL terminal menu. + + 2.5 (3/87): User area support; variable tabs; double + spacing; search wildcards; more standard block + functions; improved format- ting; many + additions to VINSTALL. + + 2.6 (7/87): Greater WordStar compatibility; many new + functions; more free RAM; faster scrolling; + search options; keyboard buffer. + +1988: Development through v2.64, with new functions; top margin; + doublespaced printing; auto mode filetypes. + + 2.65 (4/88): Auto indent; tab set enhancements; small fixes. + + 2.66 (6/88): Printer left margin; small fixes. + +1989: First version of ZDE. + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE10.QRF b/DiskImg/hd0/u1/ZDE10.QRF new file mode 100644 index 00000000..3256a079 --- /dev/null +++ b/DiskImg/hd0/u1/ZDE10.QRF @@ -0,0 +1,55 @@ + QUICK REFERENCE FOR ZDE 1.0 +------- [Note: the ^K- and ESC- prefixes are nearly interchangeable.] -------- + + + CURSOR AND SCREEN: + + = ^E = ^D ^Q, start, end of line + = ^X = ^S or ^H ^Q, top, end of screen + [Note: An alternate arrow key set can also be installed.] + + ^F word right ^QR to top of file ^QB to block start + ^A word left ^QC to end of file ^QZ to place marker + ^R page back ^QI to page/line no. ^QQ to queue line + ^C page forward + ^W scroll back line ESC, shift up, down 1/4 screen + ^Z scroll down line ESC, shift right, left 32 cols + ^O make current line top + + DELETING: MISCELLANY: FIND and REPLACE: + + ^G delete char right ^V INSERT on/off ^QF find string + DEL delete char left ^N insert a CR ^QA find and replace + ^T delete word right TAB Tab or move to stop /B/ackwards + ^Y delete line ^^ upper/lower case /C/ase-specific + ^QY del to end of ln ^KI information message /// quote "/" +^Q-DEL " to beg of ln ^PZ set place marker ^Z = wildcard +^QT_ del to character ^OD HCR display on/off ^L [^\] repeat last + ^U UNdelete char ^OQ header on/off find/repl + ^QU UNdelete line ^OW make window + ^OZ blank screen + + DISK FILES: BLOCKS: PRINTING: + + ^KN change filename ^KB block start ^KP print text + ^KL load new file ^KK block end (Options: P,B,T,L, + ^KR read in disk file ^KU unmark block ^,"",*nn,@nn,#nn) + ^KF show disk files ^KC copy block ^OP set page length + ^KE erase disk file ^KV move block ^P- insert ^-code: + ^KS save work, continue ^KY delete block B,D,S,Y toggles + ^KD save, load new file ^KW write block to disk Q,W,E,R switches + ^KX save and exit + ^KQ quit without save + + FORMATTING: + + ^OR,L set rt, lf margins ^OI,N tab set, clear ^B reform text + ^OX margin release ^OV tabs variable/fixed ^OT ruler line + ^OC center line ^OA auto indent mode + ^OF flush line right ^OS double spacing + + MACROS: + + ESC-M define macro ESC-# store macro key ESC-!,=,~,+ + ESC-; wait (pause) ESC-0..9 use key macro programming + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE10.TOC b/DiskImg/hd0/u1/ZDE10.TOC new file mode 100644 index 00000000..3b54a99c --- /dev/null +++ b/DiskImg/hd0/u1/ZDE10.TOC @@ -0,0 +1,67 @@ +..Print in Wordstar mode, using the "L8" option for normal pitch +..printers and 8.5" paper. + + ZZZZZZZZ DDDDDDD EEEEEEEE + ZZ DD DD EE + ZZ DD DD EE + ZZ DD DD EEEEEE + ZZ DD DD EE + ZZ DD DD EE + ZZZZZZZZ DDDDDDD EEEEEEEE + + Z-System Display Editor + + + Table of Contents + +1. Introduction. . . . . . . . . . . . . . . . . . . . . . 1 +2. Installing ZDE. . . . . . . . . . . . . . . . . . . . . 2 +3. Invoking ZDE. . . . . . . . . . . . . . . . . . . . . . 2 +4. ZDE's Command Set. . . . . . . . . . . . . . . . . . . 2 +4.1. Command Summary. . . . . . . . . . . . . . . . . . . 3 +4.1.1. Control Keys: . . . . . . . . . . . . . . . . . . . 3 +4.1.2. File and Block Commands: . . . . . . . . . . . . . 3 +4.1.3. Escape and Macro Commands . . . . . . . . . . . . . 4 +4.1.4. Quick Commands . . . . . . . . . . . . . . . . . . 4 +5. Command Descriptions. . . . . . . . . . . . . . . . . . 5 +5.1. Auto-Indent Mode (^O-A). . . . . . . . . . . . . . . 5 +5.2. Block Commands . . . . . . . . . . . . . . . . . . . 5 +5.3. Cursor Movement . . . . . . . . . . . . . . . . . . . 6 +5.4. Deleting . . . . . . . . . . . . . . . . . . . . . . 6 +5.5. Disk Operations . . . . . . . . . . . . . . . . . . . 7 +5.6. File Commands . . . . . . . . . . . . . . . . . . . . 7 +5.7. Find, Replace . . . . . . . . . . . . . . . . . . . . 7 +5.8. Header . . . . . . . . . . . . . . . . . . . . . . . 8 +5.9. Information . . . . . . . . . . . . . . . . . . . . . 8 +5.10. Insert Mode . . . . . . . . . . . . . . . . . . . . 9 +5.11. Line Spacing . . . . . . . . . . . . . . . . . . . . 9 +5.12. Margins . . . . . . . . . . . . . . . . . . . . . . 9 +5.13. Pagination . . . . . . . . . . . . . . . . . . . . . 9 +5.14. Place Markers and Line Queue . . . . . . . . . . . . 10 +5.15. Printer Codes . . . . . . . . . . . . . . . . . . . 10 +5.16. Printing . . . . . . . . . . . . . . . . . . . . . . 11 +5.17. Ruler Line . . . . . . . . . . . . . . . . . . . . . 12 +5.18. Tabs . . . . . . . . . . . . . . . . . . . . . . . . 12 +5.19. Undelete . . . . . . . . . . . . . . . . . . . . . . 12 +5.20. Upper/Lower Case . . . . . . . . . . . . . . . . . . 13 +5.21. Window and Screen . . . . . . . . . . . . . . . . . 13 +5.22. Wordwrap, Reformat . . . . . . . . . . . . . . . . . 13 +6. Macros. . . . . . . . . . . . . . . . . . . . . . . . . 14 +6.1. Macro . . . . . . . . . . . . . . . . . . . . . . . . 14 +6.2. Macro Key . . . . . . . . . . . . . . . . . . . . . . 15 +6.3. Macro Programming . . . . . . . . . . . . . . . . . . 15 + + + + + +7. General Information. . . . . . . . . . . . . . . . . . 16 +7.1. Disk Space. . . . . . . . . . . . . . . . . . . . . . 16 +7.2. Error Messages. . . . . . . . . . . . . . . . . . . . 17 +7.3. File Modes. . . . . . . . . . . . . . . . . . . . . . 17 +7.4. Hyphenation . . . . . . . . . . . . . . . . . . . . . 18 +7.5. Interruption. . . . . . . . . . . . . . . . . . . . . 18 +7.6. Prompts. . . . . . . . . . . . . . . . . . . . . . . 18 +7.7. WordStar Compatibility. . . . . . . . . . . . . . . . 19 +8. Disclaimer. . . . . . . . . . . . . . . . . . . . . . . 20 + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE13.FOR b/DiskImg/hd0/u1/ZDE13.FOR new file mode 100644 index 00000000..7b0f2694 --- /dev/null +++ b/DiskImg/hd0/u1/ZDE13.FOR @@ -0,0 +1,8 @@ +Update to Z System Display Editor, a small, fast editor for assembly +language and light word processing. Z System required for optimal +performance; also works with CP/M 2.2 and CP/M Plus. This version +adds hardware video handling, auto-return to file position under +ZCPR, WordStar-like ruler line, cursor on/off, and generally +F-A-S-T-E-R performance. Ten little bugs also fixed. See ZDE10.LBR +for full documentation. 26 Aug 89 by Carson Wilson. + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE13.NEW b/DiskImg/hd0/u1/ZDE13.NEW new file mode 100644 index 00000000..1e8517a1 --- /dev/null +++ b/DiskImg/hd0/u1/ZDE13.NEW @@ -0,0 +1,241 @@ + + New in ZDE + + Z-System Display Editor + + Version 1.3 26 Aug 89 + + + ZDE and its documentation adapted with permission from Eric + Meyer's VDE version 2.66, and are now copyright 1989 by Carson + Wilson, all rights reserved. They may not be circulated in any + incomplete or modified form without the written permission of + Carson Wilson. Any commercial use of ZDE, defined as any + situation where the duplicator receives revenue by duplicating + or distributing ZDE by itself or in conjunction with any + hardware or software product, is expressly prohibited unless + authorized in writing by Carson Wilson. + + + This file describes changes to ZDE since version 1.0. I have + decided not to release a revision of the documents while ZDE is + still in active development. For now, please obtain ZDE10.DOC + and ZDENSTAL.DOC from ZDE10.LBR, available on Antelope Freeway + and many other remote CP/M systems. Except for the changes + detailed below, these files provide a thorough explanation of + how to use and install ZDE. Alternatively, send a contribution + of $6 or more to support further work on ZDE, and I will mail + you a high quality printed manual. See section 4 of this file + for details. + + + - CONTENTS - + + 1. FUNCTIONAL ENHANCMENTS. + 1.1. Hardware Codes for Faster Scrolling. + 1.2. ZCPR Auto-Return to Previous Position. + 1.3. WordStar-like Ruler line. + 1.4. ZCPR-like Option Lead-in Character. + 1.5. Cursor Dance Eliminated. + 1.6. Other Minor Enhancments. + 2. BUGS FIXED. + 3. INSTALLATION. + 4. FOR MORE INFORMATION. + + +1. FUNCTIONAL ENHANCEMENTS. + + 1.1. Hardware Codes for Faster Scrolling. + +ZDE now uses "hardware" video scrolling in its delete line (^Y) +command, if your terminal has a delete line capability (see +ZDENSTAL's Terminal Installation). If hardware insert line is +available, hardware scrolling is also implemented in the insert +line (^N) command when used at the beginning of a line. For most +terminals these are considerably faster than repainting all or +part of the screen, especially if more than one line is being +inserted or deleted. + +On many ASCII terminals a pause is needed after giving a hardware +scroll string so that the screen can catch up with the keyboard. +As distributed the same value of 38 hex is used for both +horizontal and vertical scrolls. To determine the optimal setting +for your terminal, load a large text file and execute "scroll up" +or "scroll down" (^W or ^Z) continuously. If your terminal beeps +at you or if garbage characters appear you probably need to +install a larger "Horizontal & vertical scroll delay" value with +ZDENSTAL. + + 1.2. ZCPR Auto-Return to Previous Position. + +ZDE now loads ZCPR's user-defined message bytes 0 and 1 (if +available) with the absolute line number of your position in a +file on exit. This allows you to exit to ZCPR, perform some other +commands, then return to the same line in your file using the ^QQ +command. You can also use this feature to jump to the equivalent +line in another file. Since the line number is absolute, it does +not vary with page length or file mode settings. + + 1.3. WordStar-like Ruler line. + +New in this version is the appearance of ZDE's ASCII/WordStar mode +ruler line. As with WordStar and NewWord, the left margin is now +marked with "L", the right margin with "R", and soft tabs with +"!". The appearance of ZDE's Non-Document mode ruler line remains +unchanged. + + 1.4. ZCPR-like Option Lead-in Character. + +ZDE now accepts ZCPR's familiar "/" slash character instead of +CP/M Plus's "[" character as an option signifier. For example, to +change to non-document mode the command is now "^KN/N" instead of +"^KN[N". To load a file in ASCII mode (for example) the command +is now "ZDE filename /A". This is more consistent with Z-System +programs as well as the MS-DOS version of VDE. It's also a lot +easier to find the slash character (at least on my keyboard)! + +ZDE allows you to "quote" the slash character in filenames in the +same way you quote it in ZDE find/replace strings, by doubling the +slash to give a literal slash. So for example the command "^KN +12//12//89.FIL" will change the current filename to +"12/12/89.FIL," and "ZDE ////MYFILE" loads //MYFILE for editing. + + 1.5. Cursor Dance Eliminated. + +Several users mentioned that ZDE's cursor often seemed to "dance" +for no apparent reason. Actually, this was due to the fact that +ZDE repaints the screen somewhat more often than larger word +processing programs, but in looking through NewWord's User Area +Listing for version 2.17, I found something I had never noticed +before. It is possible to install NewWord to turn your cursor off +and on by putting short routines in the MORPAT area and installing +jumps to your routines at 77D and 77A hex, respectively. This +reduces eyestrain by telling NW to turn off your cursor while it +repaints your screen. + +It turns out that it was fairly simple to add a similar routine to +ZDE, so this version has cursor on/off routines similar to +NewWord's. To make use of these routines, you must install ZDE +with the cursor on/off codes for your terminal. ZDENSTAL 1.3 +allows up to six bytes each for cursor on and cursor off. I have +only been able to find codes for a few of the terminals in +ZDENSTAL's library. If the codes for your terminal are not +included in ZDENSTAL, perhaps you could leave a short message to +me describing them (see below for address), and I will include +them in the next release. + + 1.6. Other Minor Enhancments. + +The cursor now turns off with the ^OZ command, giving a completely +blank screen if cursor on/off is installed (see 1.5, above). + +Version 1.0 repainted the whole screen after copying a block. Now +ZDE repaints only from the block to the bottom of the screen for +faster operation in most circumstances. I have also optimized +ZDE's general screen output routines somewhat for speed, though +this isn't noticable on terminals operating at less than 38.4 +kbaud. + +File input/output code has also been optimized for slightly +greater speed. + +And, last but not least, "quiet" operations now work up to 300 +percent faster! Both "quiet" macros and the "*" option of +find/replace boast greatly increased speed due to improved program +logic. + + +2. BUGS FIXED. + +If you did a backwards find/replace with ZDE 1.0 and responded to +the "Y/N" prompt with "*", the screen stayed off until you gave an +illegal command. The screen now comes back when replacement is +complete. + +ZCPR's GO restart now works after exitting when ZDE's window (^OW) +is active. Previously restarting with GO caused ZDE to limited +the number of lines of display available by 1/2. + +I fixed a bug with block markers failing to scroll the entire +display if entered in the last screen column. This was apparently +introduced when I made block marker displays more efficient in ZDE +1.0. + +If the cursor is to the left of the left margin, block markers now +move the cursor to the left margin instead of marking the blank +space between cursor and left margin as part of the block. + +For greater safety, ZDE now checks for free memory space before +adding a block marker with ^KK or ^KB. + +Place markers no longer cause words to "wrap" to the next line +when wordwrap is active. + +I fixed a minor bug ZDE 1.0 introduced to the ^OR command. Typing +^OR in non-document mode no longer produces the strange result of +setting the right margin to column seven. + +A display bug which occurred when the cursor was in column one of +a virtual screen with a tab to its left has been fixed. + +Previously, if only a drive letter was given in response to the +^KF command's "Dir:" prompt, ZDE searched user zero of the +specified drive, no matter what the current user number was. ZDE +now searches for files at the current user number of the specified +drive in these circumstances. + +The installed "output filter limit" was allowing one character +higher than the limit to be sent to the screen. Now only +characters equal to or less than the limit are sent. + + +3. INSTALLATION. + +You MUST use ZDENSTAL 1.3 to install this version of ZDE. Older +.ZDK and .ZDP files will still work; due to extra installation +codes, older .ZDE files will not work with this version. + +Version 1.0 of ZDENSTAL skipped the last few bytes of .ZDK key +overlay files, preventing a full 512-byte .ZDK key file overlay +from being installed. ZDENSTAL now installs the full 512 bytes. + +ZDENSTAL now allows four instead of just two default file types. + +Several new terminal definitions have been added to ZDENSTAL, as +well as some additional terminal codes (see 1.5, above). + + +4. FOR MORE INFORMATION. + +Finally, let me take this opportunity to thank the community of +users without whose efforts this version of ZDE would be far less +than what it is. Most of the above improvements and many of the +bugs fixed in this version result from comments and insights by +ZDE enthusiasts from around the country. Please let me know your +thoughts on this most recent version. + +Besides writing computer programs and working on a degree in +political science, I operate the Antelope Freeway Remote Access +Systems for CFOG, Chicago's First Osborne Group. These dual +remote systems are available at the same number, 312/764-5162, +Chicago. Antelope 1 covers CP/M and Z System, while Antelope 2 is +dedicated to MS-DOS support. The best way to contact me is +through this board. Registration is free. If you are not a +registered member, you can leave me a note as part of your +application. + +Alternatively, my mailing address is: + + 1359 W. Greenleaf, #1D + Chicago, IL 60626 + USA + +As I mentioned above, I don't plan to reissue the ZDE manuals with +the library while ZDE is still in development. For those who wish +an updated manual and/or wish to support ZDE, I offer instead a +pre-printed User's Manual and Installation Guide with Table of +Contents and Index for a contribution of $6 or more, postpaid. +The manual is printed in handsome proportional type on both sides +of 8.5 x 11 inch sheets and punched for a three-hole ring binder. +My costs for printing and mailing are about $3. + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE16.COM b/DiskImg/hd0/u1/ZDE16.COM new file mode 100644 index 00000000..55c492a5 Binary files /dev/null and b/DiskImg/hd0/u1/ZDE16.COM differ diff --git a/DiskImg/hd0/u1/ZDE16.DIR b/DiskImg/hd0/u1/ZDE16.DIR new file mode 100644 index 00000000..a6e85025 --- /dev/null +++ b/DiskImg/hd0/u1/ZDE16.DIR @@ -0,0 +1,25 @@ +ZDE16.DIR: +Files in ZDE16.LBR, 01 June 90 by Carson Wilson: + +Filename Purpose +------------ --------------------------------------- +SAMPKEY.DZC Sample key file for use with ZDENSTAL. +SAMPKEY.ZDK +SAMPKEY.ZDT + +ZDE16.CZM ZDE itself. + +ZDE16.DZR This file. + +ZDE16.FOR Short RCP/M description of ZDE. + +ZDE16.NZW New in ZDE version 1.6. + +ZDENST16.CZM Installer for ZDE version 1.6. + +ZDEPROP.DZC Proportional formatting support files. +ZDEPROP.ZZ0 + +ZDKCOM13.DZC Key compiler for ZDENSTAL. +ZDKCOM13.CZM + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE16.FIX b/DiskImg/hd0/u1/ZDE16.FIX new file mode 100644 index 00000000..9b48f026 Binary files /dev/null and b/DiskImg/hd0/u1/ZDE16.FIX differ diff --git a/DiskImg/hd0/u1/ZDE16.FOR b/DiskImg/hd0/u1/ZDE16.FOR new file mode 100644 index 00000000..024183a7 --- /dev/null +++ b/DiskImg/hd0/u1/ZDE16.FOR @@ -0,0 +1,8 @@ +Z System Display Editor, version 1.6. A small, fast, powerful +WordStar-type text editor for all CP/M and compatible systems with +the Z80 processor. In some ways superior to its big brother VDE, +this version of ZDE adds fully functional Auto-Indent capabilities, +Proportional Formatting, Auto-Recall of last response to prompts, +Global Find/Replace, Return to Previous Position (^QP) and more to +what many felt was already the best editor available for CP/M. + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDE16.NEW b/DiskImg/hd0/u1/ZDE16.NEW new file mode 100644 index 00000000..a6d3de24 --- /dev/null +++ b/DiskImg/hd0/u1/ZDE16.NEW @@ -0,0 +1,498 @@ + + New in ZDE + + Z-System Display Editor + + Version 1.6 02 Jun 90 + + ZDE is copyright 1990 by Carson Wilson, all rights reserved. + You use ZDE at your own risk. The author accepts no liability + for any damages resulting from its use or misuse. The files in + this library may not be circulated in any incomplete or + modified form without the written permission of Carson Wilson. + Any commercial use of ZDE, defined as any situation where the + duplicator receives revenue by duplicating or distributing ZDE + by itself or in conjunction with any hardware or software + product, is expressly prohibited unless authorized in writing + by Carson Wilson. + + This file describes changes to ZDE since version 1.3. I have + decided not to release document revisions while ZDE is still in + active development. For now, please obtain ZDE10.DOC and + ZDENSTAL.DOC from ZDE10.LBR, and ZDE13.NEW from ZDE13.LBR, + available on Antelope Freeway and many other remote CP/M + systems. Except for the changes detailed below, these text + files provide a thorough explanation of how to use and install + ZDE. Alternatively, send a contribution to support further + work on ZDE, and I will mail you a high quality, up-to-date + printed manual for ZDE version 1.6. See section 6.3 of this + file for details. + + + - CONTENTS - + + 1. FUNCTIONAL ENHANCEMENTS. + 1.1. Proportional Formatting. + 1.2. Last Entry Recall. + 1.3. Enhanced Operation Under CP/M Plus and ZSDOS. + 1.4. Control-U now Aborts "Delete To" Function. + 1.5. Fully Operational Auto-Indent (^OA). + 1.6. Chain to ZCPR Error Handler. + 1.7. Return to Previous Position Command (^QP). + 1.8. Global Find/Replace Option. + 1.9. Semicolons are now Characters in Nondocuments. + + 2. BUGS FIXED. + 2.1. More Robust Space Calculation. + 2.2. ZCPR Line Queue Bug Fixed. + 2.3. Other Minor Nuisances Corrected. + + 3. INSTALLATION. + 3.1. New in ZDENSTAL Version 1.6. + + 4. USAGE HINTS. + 4.1. Saving Macros. + 4.2. Creating a Smaller ZDE. + 4.3. Using GET and GO with ZDE. + + 5. DEVELOPMENT HISTORY. + + 6. FURTHER INFORMATION. + 6.1. About Z System. + 6.2. About the Author. + 6.3. Pre-Printed Manuals. + + +1. FUNCTIONAL ENHANCEMENTS. + + 1.1. Proportional Formatting. + +ZDE can now format your text for use with proportional printer +fonts! See the files ZDEPROP.DOC and ZDEPROP.Z80 (included in +ZDE16.LBR) for full details. + + 1.2. Last Entry Recall. + +The following commands (among others) cause ZDE to prompt +you for information: + + COMMAND PROMPT + ^KD "Load:" + ^KE "Erase:" + ^KN "Name:" + ^KL "Load:" + ^KR "Read:" + ^QF "Find:" + ^QA "Find:" and "Change to:" + ESC-M "Macro:" + +You can often save typing time and prevent errors by using +control-R or your right arrow key [as installed] to Recall your +last response to any of the above prompts. For example, to read +in a file and then erase it, you could enter "^KR, , +RETURN" followed by "^KE, ^R, RETURN". The ^R command will +automatically recalls the filename you entered in response to the +"Read:" prompt. The Find, Replace, and Macro prompts work in a +similar manner. ^R Recalls your entire response; right arrow +recalls your last response one character at a time to allow +further editing. + +The Recall keys can also be used to recall the last used macro, +even if it wasn't entered manually. + + 1.3. Enhanced Operation Under CP/M Plus and Z3PLUS. + +ZDE takes advantage of advanced BDOS error handling to provide +slightly faster file output under CP/M Plus and Z3PLUS. In +addition, file Create stamps are now preserved under CP/M Plus +based systems as well as ZSDOS and ZDDOS systems. + + 1.4. Control-U now Aborts "Delete To" Function. + +Control-U can now be used to abort a "Delete To" (^QT) operation. +Previously, ZDE would attempt to delete up to the next literal ^U +character in the file, often causing frustration. + + 1.5. Fully Operational Auto-Indent (^OA). + +Auto-Indent is useful for typing outlines, structured program +source code, and other text where the "left margin" varies. When +the Insert (^V) toggle is on, Auto-Indent aligns the left margin +with that of the previous line. When Insert is off, it causes +the RETURN key to act differently: RETURN advances the cursor +past any indentation when moving through a file. + +When a new line is begun either by wordwrap or reformat (see +below) or by hitting RETURN with Insert on, Auto-Indent indents +the following line or lines to equal the previous one. It does +this by counting the number of spaces or Hard TABs (whichever +came first) before the text of the previous line, and indenting, +wrapping, or reformatting using this number of spaces or Hard +TABs. This entails certain possible conflicts, most of which ZDE +itself automatically prevents: + +First, if you mix Hard TABs and spaces when indenting a line, AI +may give strange results, as it will count and use the first +character only. For example, if your line is indented as +, AI will indent the next line with +only. + +To avoid conflicts, enabling AI sets the left margin to 1, and +setting the left margin greater than 1 disables AI. Also, Double +Spacing (^O S) is disabled by Auto-Indent, and Auto-Indent +disables Double Spacing. + +Auto-indent status also now defaults to ON in Nondocument mode, +and OFF otherwise. + + 1.6. Chain to ZCPR Error Handler. + +ZDE 1.6 will chain to the installed Error Handler under ZCPR 3.4 +with error #12 (TPA overflow) if there was not enough memory for +ZDE to edit the file you specified on the command line. ZDE does +this because the flow of logic in a multiple command line +sometimes dictates that the editor complete its task before +succeeding commands are carried out. For example, I use the +a multiple command alias similar to the following + + ZDE file;echo erase;if in;era file;else;mv file newdir:;fi + +to process modem capture files. After processing each file with +ZDE I generally want either to erase it (if it contained nothing +worth saving) or move it to another directory. But on occasion +the capture file is too large to process with ZDE. If the script +were allowed to proceed, it would force me either to erase the +capture file or move it elsewhere, neither of which would be +appropriate if I hadn't even looked at its contents yet. + +This is where Z System's error handler comes it handy: it +provides a means of dealing with an offending command line before +unwanted commands cause harm. When ZDE chains to the error +handler, I can _edit_ commands beginning with ZDE's invocation, +either removing unwanted commands or inserting further commands +as the situation may dictate (it is also possible to abort the +command or multiple command script altogether). In the above +case, I would revise my command line to the following: + + NW file;echo erase;if in;era file;else;mv file newdir:;fi + +By substituting the ZDE command with NW I have invoked NewWord +for this instance only of the command, which in turn will edit +the larger file. + +Without question the finest ZCPR error handler now available is +Rob Friefeld's ZERR. There are even provisions within ZERR for +automatically editing LSH scripts and for automatically chaining +to transient versions when resident (RCP, CCP) commands fail; all +of this is described in ZERR13.LBR. + + 1.7. Return to Previous Position Command (^QP). + +This function is basically the same as the WordStar command: +hitting ^Q-P takes you to the position the cursor was at before +the previous command (including the ^QP command itself - try +it!). For instance, the sequence "^B, ^Q-P" reformats beginning +with the current line then restores the cursor to its original +position within the paragraph. ^Q-P is also useful for moving +long distances within a file without losing one's place: for +example you can move to the top of the file with ^Q-R, then come +back with ^Q-P. + +Within Macros, the previous cursor location is preserved: ^Q-P +will always return you to your place in the text BEFORE you +invoked the Macro. This not only allows you to resume editing at +the same location after using Macros; you can also build one or +more ^Q-P commands into the Macro itself. See SAMPKEY.* files +for one example; I'm sure there are lots of other ways to use +^Q-P within a Macro. Thanks to Howard Schwartz for keeping on my +case about this feature until I finally discovered an easy way to +implement it. + + + 1.8. Global Find/Replace Option. + +Besides "B" (backwards search) and "C" (case-sensitive search), +ZDE now sports a THIRD find/replace option: "G" for Global +search. ZDE normally begins your (backward or forward) search at +the current cursor location. Specifying "G" causes ZDE to start +at the BEGINNING of the file when searching forward for strings, +or at the END when searching backwards. Otherwise, the search or +replace command proceeds exactly as it does normally. The "G" +option is used in the same way as the other options, by enclosing +it in slashes as a prefix to the string being searched for (e.g., +to find "Carson" globally, enter "/gc/Carson" in response to +^Q-F's "Find: " prompt). + + 1.9. Semicolons are now Characters in Nondocuments. + +ZDE now counts the ";" (semicolon) character as a normal +character in "N" mode, whereas it counts the semicolon as a +punctuation mark in the "W" and "A" modes. This is mainly of +interest to assembly language programmers, as the semicolon is +often used alone to mark the beginnings of comments in source +code. Treating the semicolon as a normal character in "N" files +simply makes it easier to manipulate assembly language comments. +Thanks to Rob Friefeld for his thoughts on this. + + +2. BUGS FIXED. + + 2.1. More Robust Space Calculation. + +ZDE's calculation of memory space remaining is now more robust. +In past versions of ZDE (and VDE), certain editing commands could +cause a crash when only a few bytes of free memory were +available (thanks to Rob Friefeld). + + 2.2. ZCPR Line Queue Bug Fixed. + +The ^QQ (go to next line in ZCPR queue) command of previous +versions of ZDE failed if ZCPR's 16-byte user-defined buffer was +filled. Version 1.6 fixes this problem, properly returning to +the first line in the queue after the last value in has been +reached. This allows Turbo Pascal-like interactive programming +of Z80 assembly language when used under Z System with Al +Hawley's ZMAC Z80 Macro Compiler ($50 including ZML and ZMLIB; +contact Al Hawley at Ladera Z-Node, 213/670-9465 (modem), Ladera +Heights, CA). + + 2.3. Other Minor Nuisances Corrected. + +ZDE now turns alternate video off when placing the cursor at the +string to change during ^QA prompts. + +A bug which allowed an extra character or hyphen on the last line +of a paragraph if the line's length was one character beyond the +right margin has been fixed (thanks to Larry Schnitger for +spotting these). + +A bug which occurred if you set the block end marker to the last +byte in the file then did a block delete has been fixed (thanks +to Ben Cohen for finding this). + +One or more bug(s) which occurred while printing have been +cleared up. ZDE should now always give a correct left margin +with or without a page header or top margin. The printout is +also slightly faster when left and top margins are used together. + +ZDE now always finds strings located exactly at the end of a +file. + +When searching with the /c/ option, erroneous results occurred if +a non-matching string of the same length as the search string +beginning with the same first character as the search string was +located at the very end of a file. This has been fixed. + +Fixed minor bug in proportional formatting that caused repeated +^B commands to give inconsistent results under some +circumstances. + +Fixed bug which set margins spuriously if an illegal number was +entered. ZDE also now disallows setting margins to zero, which +caused formatting problems. + +^B (reformat) no longer absorbs following commands, allowing ^B +to be embedded in key redefinitions with SmartKey, etc. + + +3. INSTALLATION. + +You MUST use ZDENSTAL 1.6 to install this version of ZDE. Older +ZDK and .ZDP files will still work. Due to extra installation +codes, .ZDE files created with version 1.0 of ZDE will not work +with this version of ZDENSTAL. + + 3.1. New in ZDENSTAL Version 1.6. + +The proportional formatting (^OJ) toggle can be disabled with +ZDENSTAL to allow use of ZDE's proportional spacing table as a +patch area. When proportional spacing is disabled, an additional +96 bytes of space is released for custom user patching. ZDENSTAL +also allows you to set the proportional formatting toggle to ON +or OFF at startup [this can also be toggled while operating ZDE]. + +ZDENSTAL's "R" option now restores ZDE's proportional spacing +table to its default (as distributed) values. + +ZDENSTAL's "F" option now gives the locations of all FIVE key +definition tables (former versions left out the ESC- table). The +"F" option also gives the location of ZDE's proportional spacing +table for use when patching ZDE. + +The Osborne 1 and Vixen terminal definitions are now separate due +to different screen width requirements (thanks to Ben Cohen for +sorting this out). + +ZDENSTAL previously would overwrite .ZDK and .ZDP files with the +wrong information if the .ZDK or .ZDP file had been archived (bit +7 of filetype character 3 set). This problem has been corrected +in version 1.6. + +Some ZDENSTAL messages have been improved. + + +4. USAGE HINTS. + +The following are just some miscellania that I have picked up +from using and working on ZDE. + + 4.1. Saving Macros to Disk. + +Under Z System version 3.4, it is possible to "save your work" +after creating a working Macro. First, be sure to save your new +Macros as Macro Keys using ZDE's ESC-# command (see ZDE Manual). +Then exit ZDE and type + + POKE 310 02 50;ZSAVE 310-490 filename.ZDK + +You have just used Z System's type-4 SAVE program to create a new +.ZDK file, which can now be examined and installed permanently +into ZDE with ZDENSTAL, or further revised using ZDKCOM. [NOTE: +the addresses and values given above will work for ZDE version +1.6, but may change with future versions of ZDE.] + + 4.2. Creating a Smaller ZDE. + +If you are SURE you will never want to enable the Help Menus, you +can create a slightly smaller copy of ZDE. First use ZDENSTAL to +disable ZDE's Help Menus. Then issue the Z System command, + + GET 100 ZDE.COM;ZSAVE 100-3E7F filename.COM + +This creates a copy of ZDE that is about 1 kilobyte smaller than +the distributed package, and loads somewhat faster on slower +systems. This procedure is specific to ZDE 1.6; do NOT assume +that it will work on future versions. + + 4.3. Using GET and GO with ZDE. + +Some users have discovered that the Z System GET and GO commands +can be used to extend ZDE's versatility or save disk space. +Since the .ZDE, .ZDP, and .ZDK files used by ZDENSTAL are simply +binary images of various portions of ZDE, you can achieve the +versatility of having several copies of ZDE without the added +disk overhead by using Z System commands that "install" one or +more of ZDENSTAL's files on the fly. + +For example, if you used ZDE with a particular terminal most of +the time, but occasionally switched to another terminal that was +incompatible with the first one, you might want to create a Z +System Alias which would overlay the default copy of ZDE with +your second terminal's characteristics at startup. You could +achieve this by first using ZDENSTAL to configure ZDE for your +second terminal, saving the terminal's characteristics into a +.ZDE file (see the ZDE Manual for details on this). You would +then ZDE for your normal terminal, and write an Alias to +auto-install this copy of ZDE for your occasional terminal on the +fly: + + GET 100 ZDE.COM;GET 180 term2.ZDE;GO $* + +This command loads the file term2.ZDE over ZDE before proceeding, +providing a temporary copy of ZDE that works with your second +terminal. + +This approach can also be used to generate "virtual" copies of +ZDE with different printer codes and Macro Key definitions. The +addresses of the various overlays for ZDE version 1.6 are: + + 180 hex - Terminal codes (.ZDE files) + 1F0 hex - Printer codes (.ZDP files) + 310 hex - Macro Keys (.ZDK files) + +[These addresses may well change in future versions of ZDE.] + +Obviously, this involves some "homework:" if you get the +addresses wrong or use an incompatible .ZDx file (from a previous +version of ZDE, for example), you will likely cause yourself +grief. For these reasons I generally recommend simply creating +multiple copies of ZDE. But under some circumstances (e.g., +laptop computer with limited disk or ROM space) this approach may +be quite rewarding. + + +5. DEVELOPMENT HISTORY. + +ZDE is a descendant of Eric Meyer's famous VDE (Video Display +Editor) program for CP/M. In 1988, Eric produced his final +version of VDE for CP/M (2.66). Eric now maintains VDE for +MS-DOS only; ZDE continues VDE's evolution on Z80 systems. ZDE +removes many of the CP/M VDE's defects and adds such features as +support for ZCPR, ZSDOS, and CP/M Plus, improved terminal and +disk I/O performance, proportional formatting, file datestamp +support, and improved installation. Meanwhile, the MS-DOS +version of VDE has continued to evolve, now boasting multiple +file buffers, auto-save, auto-number, and much more. VDE for +MS-DOS is available on computer bulletin boards (including +Antelope Freeway; see below) as VDE152.ZIP. + + +6. FURTHER INFORMATION. + + 6.1. About Z System. + +If you are using CP/M equipment, you have probably heard of Z +System. Basically this is a downward compatible replacement for +the system software distributed with Z80 CP/M equipment. By +utilizing Z80 opcodes and advanced design techniques, the authors +of Z System have expanded the versatility of the CP/M operating +system far beyond its original limitations. To learn more about +Z System, log into the bulletin board listed below, or contact +one of the following: + + Plu*Perfect Systems Sage Microsystems East + 410 23rd St. 1435 Centre St. + Santa Monica, CA 90402 Newton Centre, MA 02159-2469 + (213)-393-6105 (eves.) (617)-965-3552 (9am-11pm) + + 6.2. About the Author + +First, let me take this opportunity to thank the community of +users without whose support this version of ZDE would not have +been possible. You have made ZDE what it is through your +generous contributions of time and/or money. Without those who +appreciate (and criticize) my work I doubt I could justify the +time and energy I've spent on ZDE. In addition, many of the +improvements and bug fixes in version 1.6 result directly from +specific comments and insights by users. Please continue to +share your thoughts and experiences with ZDE; I'm listening. + +I am a doctoral student trying to keep from starving while +working on my dissertation in Political Science at Loyola +University of Chicago. I am a coauthor of ZSDOS, a commercial +replacement for the BDOS portion of CP/M, and have authored +numerous CP/M and Z System programs. My interests include +computer programming, telecommunications, the Soviet Union, +Political Theory, and bicycling (not necessarily in that order). +I am also looking for part- or full-time work. To this end I am +skilled in political analysis, know the Russian language and the +Z80, C, BASIC, and Pascal computer languages, and have +comprehensive knowledge of CP/M and Z System and working +knowledge of Unix and MS-DOS. If you know of a gainful opening +in the computer field, I would like to hear from you. + +Among other things I operate the Antelope Freeway Remote Access +Systems for CFOG, Chicago's First Osborne Group. These dual +remote systems are available at the same number, 312/764-5162, +Chicago. Antelope 1 covers CP/M and Z System while Antelope 2 is +dedicated to MS-DOS support. The best way to contact me is +through this board. Registration is free. If you are not a +registered member, you can leave me a note as part of your +application. + +Alternatively, my mailing address is: + + 1359 W. Greenleaf, #1D + Chicago, IL 60626 + USA + + 6.3. Pre-Printed Manuals. + +As I mentioned above, I don't plan to reissue the ZDE manuals +with the library while ZDE is still in development. For those +who wish an updated manual and/or wish to support ZDE, I offer +instead a pre-printed 40-page User's Manual and Installation +Guide with Table of Contents and Index, postpaid, for those who +make contributions of $6 or more to support further development +of ZDE. + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDENST16.COM b/DiskImg/hd0/u1/ZDENST16.COM new file mode 100644 index 00000000..8ccc9767 Binary files /dev/null and b/DiskImg/hd0/u1/ZDENST16.COM differ diff --git a/DiskImg/hd0/u1/ZDEPROP.DOC b/DiskImg/hd0/u1/ZDEPROP.DOC new file mode 100644 index 00000000..5d3cd676 --- /dev/null +++ b/DiskImg/hd0/u1/ZDEPROP.DOC @@ -0,0 +1,139 @@ +ZDEPROP.DOC +Proportional Spacing with ZDE +June 2, 1990 +Carson Wilson + + 1. INTRODUCTION. + 2. USING ZDE'S PROPORTIONAL FORMATTING FEATURE + 3. INSTALLATION AND CUSTOMIZATION. + + +1. INTRODUCTION. + +ZDE version 1.6 incorporates an elemental proportional formatting +feature. This option is useful only to those whose printers have +proportional spacing capabilities. Proportional formatting allows +you to format ragged right text properly for proportional output. +Centering and right justification of proportional text are not +available. + + +2. USING ZDE'S PROPORTIONAL FORMATTING FEATURE + +Proportionally spaced printing gives a more professional look, +allowing more characters to be printed on a line without +crowding. This is because less space is allocated to narrow +characters like "i" and more to wide characters like "M." Most +computer printers do NOT allow proportional spacing; only laser +printers, some daisy-wheel equipment, and newer dot-matrix +printers have this ability. Typically, there is a special set of +instructions which when sent to the printer, cause it to use +proportional spacing rather than monospacing. On some models +(the Silver Reed SR550 for example), DIP switches also control +this feature. + +ZDE does not itself perform proportional spaced printing; it +simply allows you to format your text for use with a printer that +has this capability. You must instruct your printer to space +proportionally before sending text to it. If you have tried using +the proportional capability of your printer, you probably have +noticed that LINES WITH LOTS OF WIDE CHARACTERS IN THEM +print out much wider than lines comprised of narrow characters. +ZDE 1.6 allows you to compensate for this by counting the width +of each character when it formats a paragraph (^B command), and +wrapping each line when its width count reaches the equivalent +of the current right margin setting. + +The ^OJ command toggles this feature on and off [the default may +also be installed with ZDENSTAL]. When proportional spacing is +active, the legend "PS" appears in ZDE's status line (this is +overwritten by "MR" when the margins are released). +Proportional spacing occurs only during the ^B reformat command, +not during wordwrap, so to format a document proportionally, you +must use ^B at the beginning of each paragraph after you key it +in. Still, the results are well worth the extra trouble, especially +for material that will be reproduced. + + +3. INSTALLATION AND CUSTOMIZATION. + +ZDE comes preconfigured to format text for proportional spacing +with Epson's new LQ510 dot matrix printer. Since most printers +allocate roughly the same ratios of space to the various +characters, there is a good chance you won't need to install ZDE +for your printer. This file has been formatted for proportional +output by ZDE; try printing it proportionally to see the results. + +If you should decide to change ZDE's proportional spacing to +match your printer, you can patch ZDE's offset values for +individual characters. The offsets are stored in a sequential +ASCII table whose location is given by ZDENSTAL's "F" option. +The table consists of positive and negative (2's compliment) byte +values, one for each character beginning with " " and going +through "~". As distributed, all of the values are either -12, -6, +0, +6, or +12. The negative numbers are expressed as (256+n), +where n is the negative number. So for example, -6 is expressed +as (256+(-6)) or 250 (FA hex). + +ZDE uses its ASCII table as follows. When reformatting a line, +ZDE counts each character as (30+table value)/30 of a column +wide. So if the offset is zero, the character is one column wide +(30/30 = 1) and ZDE increments the current column by one. If +the character's offset is -6, it counts as only (30+(-6)/30) or +24/30 columns wide, and ZDE increments the current column by +only 24/30. If the character's offset is +12, it counts as 42/30 +columns wide, and so on. When a full column is "lost" due to +characters with negative offsets, ZDE adds the next character to +the line without incrementing the column count. Similarly, when +enough "extra" columns are counted to equal a full character, ZDE +increments its column count without actually adding another +character to the line. + +To see the effects of this, try reformatting a paragraph or two, +first with PS on, then with it off. Lines of wide characters are +shortened on screen, while lines of narrow characters are allowed +to extend beyond the right margin. When the text is printed +proportionally, your printer reverses the process. Lines of wide +characters are lengthened and lines of narrow characters are +shortened, the net result being proportionally spaced text with an +even right margin. + +If your printer's proportional output is not properly compensated +for by ZDE, it is possible to install another offset table within +ZDE to suit your needs. The current table's address is given by +ZDENSTAL's "F" option. To find the location of a character's +offset, add its ASCII value to ZDE's table address and subtract +32. For example, the ASCII value for "A" is 65, so the location of +"A"'s offset is (table address+65-32) or (table address+33). + +You may adjust a character's offset to any value between -34 and ++35 decimal, but keep in mind that offsets if less than -29 may +result in lines that _never_ reformat since characters with +offsets of -30 or less take up no virtual space or less! To +calculate the proportional ratios used by your printer, it is best +to print out a line of thirty of each character in proportional +mode and compare the length of each line to the others. Most +characters should result in lines of roughly the same length; this +is your "base" length, and you should set the offsets of these +characters in ZDE to 00. Other lines will probably fall into four +or so other lengths; hopefully these lengths will correspond to an +even xx/30ths of the "base" length. To get the proper offset +value, just subtract the number of characters equal in length to +a line of "base" characters from 30. For example, if only 18 +capital "M"'s take up the same length as 30 base characters, the +offset for "M" is 30-18 or +12. If it takes 42 "i"'s to equal the +length of 30 base characters, the offset for "i" is 30-42 or -12. + +Once you have determined the offsets in 30ths of each +character's width from the base length, just plug these values +into ZDE's proportional table. You can use a patcher to alter a +few characters. For extensive modification, I have provided the +assembly language file ZDEPROP.Z80 which can be assembled to a +.HEX file overlay file for ZDE. Before assembling ZDEPROP.HEX, +you must edit the file and set the equate TABLE to the current +address of ZDE's proportional spacing table as given by +ZDENSTAL. Then overlay ZDE with ZDEPROP.HEX using MLOAD, +SID, or DDT. + +- End of ZDEPROP.DOC - + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDEPROP.Z80 b/DiskImg/hd0/u1/ZDEPROP.Z80 new file mode 100644 index 00000000..715adcb0 --- /dev/null +++ b/DiskImg/hd0/u1/ZDEPROP.Z80 @@ -0,0 +1,119 @@ +; +; File: ZDEPROP.Z80 - Default proportional width table for ZDE. +; Author: Carson Wilson +; Date: 02 Jun 90 +; Notes: Assembles to a .HEX file which overlays ZDE's native table. + +; EQUATES + +TABLE equ ????h ; Change "????" to the value given by ZDENSTAL + ; ..for "proportional table." +; + ORG TABLE + +; Offset Corresponding character + + db 0 ; space + db -12 ; ! + db 0 ; " + db 0 ; # + db 0 ; $ + db 6 ; % + db 6 ; & + db -12 ; ' + db -6 ; ( + db -6 ; ) + db 0 ; * + db 0 ; + + db -12 ; , + db 0 ; - + db -12 ; . + db 0 ; / +; + db 0 ; 0 + db 0 ; 1 + db 0 ; 2 + db 0 ; 3 + db 0 ; 4 + db 0 ; 5 + db 0 ; 6 + db 0 ; 7 + db 0 ; 8 + db 0 ; 9 +; + db -12 ; : + db -12 ; ; + db 0 ; < + db 0 ; = + db 0 ; > + db 0 ; ? +; + db 6 ; @ + db 6 ; A + db 6 ; B + db 6 ; C + db 6 ; D + db 6 ; E + db 6 ; F + db 6 ; G + db 6 ; H + db -6 ; I + db 0 ; J + db 6 ; K + db 6 ; L + db 12 ; M + db 6 ; N + db 6 ; O + db 6 ; P + db 6 ; Q + db 6 ; R + db 6 ; S + db 6 ; T + db 12 ; U + db 6 ; V + db 12 ; W + db 6 ; X + db 6 ; Y + db 0 ; Z + db -6 ; [ + db 0 ; \ + db -6 ; ] + db 0 ; ^ + db 0 ; _ + db -12 ; ` +; + db 0 ; a + db 6 ; b + db 0 ; c + db 6 ; d + db 0 ; e + db -6 ; f + db 6 ; g + db 6 ; h + db -12 ; i + db -6 ; j + db 6 ; k + db -12 ; l + db 12 ; m + db 6 ; n + db 0 ; o + db 6 ; p + db 6 ; q + db 0 ; r + db 0 ; s + db -6 ; t + db 6 ; u + db 6 ; v + db 12 ; w + db 0 ; x + db 6 ; y + db 0 ; z + db -6 ; { + db -12 ; | + db -6 ; } + db 0 ; ~ + + end + +; End ZDEPROP.Z80 + \ No newline at end of file diff --git a/DiskImg/hd0/u1/ZDKCOM13.COM b/DiskImg/hd0/u1/ZDKCOM13.COM new file mode 100644 index 00000000..040fd1c4 Binary files /dev/null and b/DiskImg/hd0/u1/ZDKCOM13.COM differ diff --git a/DiskImg/hd0/u1/ZDKCOM13.DOC b/DiskImg/hd0/u1/ZDKCOM13.DOC new file mode 100644 index 00000000..75b83079 --- /dev/null +++ b/DiskImg/hd0/u1/ZDKCOM13.DOC @@ -0,0 +1,209 @@ + + ZDKCOM + + Key File Compiler for ZDE + + Version 1.3 01 Jun 90 + + ZDKCOM and its documentation are adapted with permission from + VDKCOM12.LBR, by Fred Haines, Glendale Littera RCPM/QBBS, 818 + 956-6164. VDKCOM version 1.2 is copyright 1988 by Fred Haines, + and is released by the author to the CP/M community for all + reasonable noncommercial purposes. For the Z80 source code to + ZDKCOM, see ZDKCOM13.LBR. + + + CONTENTS + + 1. How to Use ZDKCOM. + 2. Programmer's Note. + + +1. How to Use ZDKCOM. + + ZDKCOM compiles an ASCII text file into a *.ZDK file of key +macros which ZDENSTAL will install in ZDE. It alsos convert an +existing ZDK file into a text file with the extension ZDT. It +allows you to create, edit, and re-edit complicated key macros +with a full-featured word processor - ZDE itself - instead of the +backspace-only line editor in ZDENSTAL. The syntax is: + + ZDKCOM .ZDT + converts text file to ZDK overlay + + ZDKCOM .ZDK + converts overlay to ZDT text file + + Use ZDE in NONDOCUMENT mode to type a file that looks like +what you see when you use the K option of ZDENSTAL, substituting +lower case "n" or "q" for the No Repeat and Quiet option +indicators and : + + qThis line would be for key 0 in Quiet mode.^M + nThis line would be for key 1 in No Repeat mode.^M + + This line would be key 3, with key 2 unassigned. + n^M^M^M + The line above, key 4, prints with two blank lines following it. + q"This is in quotes, but no carriage return at the end." + "This line is ^P^BMacro Key 7^P^B with embedded boldface codes."^M + q^VThis line turns insert on before printing the line.^A^A^A^A_^F^D_^M + n ^A^A^A^A + +...and so on. Lines correspond to the number keys in 0 to 9 +order, with blank lines for unassigned keys. Do NOT embed control +codes. Type everything in ASCII. For instance, to underline, +type out '^P^Swords underlined^P^S'. It's a good idea to make +hard carriage returns visible by toggling them on with the ^OD +command. ZDKCOM accepts trailing spaces as part of the macro, +even though you can't see them, so, if you don't want them, make +sure each line is terminated by a hard carriage return. + Individual key macro strings may not exceed 127 bytes in the +ZDK file, though they may in the ZDT text file, since ASCII +representations of single-byte control codes require two bytes, +and option flags and slashes don't contribute to the length of the +string. + The total of all strings may not exceed 498 output bytes. +This is two bytes less than allowed by ZDE and ZDENSTAL, but, +under the program's present logic, it would require an inordinate +amount of code to make those last two bytes available. If you +really need them, add them to the ZDK file with ZPATCH or any +other patcher, locate the last string-length byte, and add 2 (in +hex) to it. + For a quick demo, remove the leading spaces from the lines +below, mark them as a block, and write them out to .ZDT. Run +ZDKCOM .ZDT. Then load the resulting ZDK file into ZDE with +the command ZDENSTAL ZDE .ZDK. + + q^C^C^C^E^E^E^E^E^[^E + q^[b^[0^Qs^X^[=^M1^[= 1^S^V ^D^[!0^[1^Qb^B^Ku + ^[=^M0^V^I^V^B^G^[![^[0^X + ^[=^M0^T^B^N^[0^X + q^P^[^P^I^P^K^P^[9 + q^V^KrA0:LH.FMT^M + q^G^G^G^G^X + q^A^A^S + q^A^A^S + q^KrHEADER^M + +Key macro 0 measures off one full page if the top margin is 0 and +the page length is 58 lines. Adjust for different page lengths by +adding or subtracting ^E's. I use this macro to move from line 1 +of a page to line 1 of the next page. I then use key macro 9 to +read in a page header from a separate file that contains nothing +but the properly spaced header text with a # in place of the page +number. I search for # with a ^Qf and replace it with the +appropriate page numbers. + This happens so quickly on a 9 mhz SB180 with hard disk that +it is virtually unnoticeable, but there is a faster way to do it. +Just make up a header at the top of the first page, or, if you +want to start page headers only on page two, at the foot of the +file, and mark it as a block. Use key macro 0 to move from the +top line of a page to the top line of the next, and copy the +header into place with the ^KC command. Don't forget to erase the +original of the header at the foot of the file when you get there. + Key macro 1 softens and reforms a paragraph by removing the +hard carriage returns from the ends of each line. + Key macro 2 changes a document in flush left block format +(like this one) to indented paragraph form, and key macro 3 +changes it back again. + Key macro 4 embeds my DIABLO 1610-compatible printer's code +for setting a left margin in column 11 (^K=0Bh) in the document. +If I want another margin I add or subtract from 0Bh and overwrite +the ^K with the appropriate control character. You may well be +able to substitute your own printer's set left margin code for +this one. + Key macro 5 reads in a previously prepared letterhead stored +as LH.FMT on drive/user A0. + Key macro 6 removes four spaces or characters from the +beginning of each line, used to remove line numbers from the +beginnings of messages in modem capture files. + + +2. Programmer's Note. + + A ZDK file is a data structure four records long. The first +two bytes are an ID number which ZDENSTAL checks to ensure that it +is working with the correct version. The current number, 0250h, +is valid for several recent versions of ZDE. + These two bytes are followed by up to ten strings, each +preceded by a string-length byte which ZDE uses to index the +string's location. Each string is limited by the size of a buffer +in ZDE to 127 bytes. + An empty string is indicated by a string-length byte of 00h. +After the last byte of the last string, the remainder of the 512 +bytes are filled with 00h. + It is a peculiarity of ZDKCOM that it needs to write two null +bytes at the end of the file, which means that it will accept only +498 bytes for the total length of all strings (512, less two ID +bytes, less 10 string-length bytes, less these two more) rather +than the 500 that ZDE and ZDENSTAL allow. + When you look at the key macro buffer of ZDE using the K +option of ZDENSTAL, you see something that looks like this: + + <0>This line would be for key 0 in Quiet mode.^M + <1>This line would be for key 1 in No Repeat mode.^M + <2><> + <3>This line would be key 3, with key 2 unassigned. + <4>^M^M^M + <5>The line above, key 4, prints with two blank lines following it. + <6>"This is in quotes, but no carriage return at the end." + <7>"This line is ^P^BMacro Key 7^P^B with embedded boldface codes."^M + <8><> + <9><> + +The numbers down the side and the option indicators , , and +<> (no option) are supplied by ZDENSTAL. The ZDT text file +version of the same macro keys would omit the string numbers and +no option indicators, and convert the and to simple lower +case 'n' and 'q'. If you need lower case 'n' or 'q' as the first +character of a key macro, just precede it with a slash, which will +be ignored. + ZDKCOM recognizes blank lines as unassigned keys. These +produce an "error" message when invoked by ZDE. + ZDE recognizes a No Repeat option if the the high bit is set +on the first byte of the macro string after the length byte, and a +Quiet option if the high bit is set on both of the first two bytes +of the string. + The translation procedure from text to overlay requires: + + Enter two-byte ID string 02h 50h in output file. + + Enter 00h to save a place for a string length byte. + + Check for "n" or "q" as first three bytes of new string and add + 80h to the next byte or next two bytes input as required. + + Read in the rest of the string byte by byte and output each byte + to the output file. If "^" appears in the string, drop it and + subtract 40h from next byte to make it into a real control + character. If "/" appears, ignore it and print the next + character literally. "/^" prints "^" rather than turn the + character following the carat into a control code, and "//" + prints a single slash. A single input slash is ignored. + + When the CRLF pair is encountered in the input text file, + convert it to a 00h place marker for the length of the next + string. Get the number of bytes output in the last string and + write it to the position of the string-length byte at the head + of the preceding string. + + When the text file's ^Z EOF is encountered, fill the remainder + of the total 512 bytes with 00h and close the files. + +When converting ZDK overlays to ZDT text files, the procedure is +more or less reversed. ZDKCOM converts the string length bytes to +CRLF pairs, the control code bytes to two-byte ASCII strings '^c', +and finishes off the file when all strings are accounted for by +inserting an EOF ^Z. + In addition, ZDKCOM has error checking for file opening and +closing and for individual and overall string length, and it +reports activity to keep the user from thinking the program has +hung, though the counters on the screen are otherwise meaningless. + The structure of the four-sector ZDK file in CP/M is so +similar to the eight-sector MS/DOS version that you can use +ZDKCOM, along with a patcher, to create a VDK file for +installation in VDE12, the MS/DOS version of ZDE. Make up the ZDT +file as you would for CP/M, then patch the second ID byte from 50h +to 60h and add four records of nulls. + \ No newline at end of file diff --git a/DiskImg/hd0/u2/VIDATT.Z80 b/DiskImg/hd0/u2/VIDATT.Z80 new file mode 100644 index 00000000..073bb84f --- /dev/null +++ b/DiskImg/hd0/u2/VIDATT.Z80 @@ -0,0 +1,69 @@ + title WordStar 4.0 Video Attributes Driver + +strngout equ 0283h + +esc equ 1bh +dim equ 1 +blink equ 2 +invert equ 4 +uline equ 8 + + aseg + org 03c1h + +vidatt: + xor a + ld hl,funtbl + ld b,8 +getloop: + rr c + jr nc,getnext + or a,(hl) +getnext: + inc hl + djnz getloop +; + ld hl,string+2 ; attribute #1 on/off indicator + push hl + ld b,4 + ld de,'?!' ; ? = attribute off, ! = attribute on +setloop: + rra + jr nc,attroff + ld (hl),e ; attribute on + jr setnext +attroff: + ld (hl),d ; attribute off +setnext: + inc hl + inc hl + inc hl ; advance to next on/off indicator + djnz setloop +; + pop hl ; hl --> dim on/off + ld a,d ; attribute off + cp (hl) ; dim off? + jr nz,setdim + ld a,e ; attribute on +setdim: + ld (hl),a + ld hl,string + jp strngout ; ws string routine +; +; +funtbl: + defb dim ; strike out + defb invert or blink ; warnings & errors + defb invert ; block + defb uline ; underline + defb blink ; subscript + defb blink or uline ; superscript + defb invert ; menu, headline, bold, double + defb invert or uline ; italics, RET, backspace +; +string: + defb 12,esc,' 2',esc,' 3',esc,' 4',esc,' 5' +; +finis equ $ + end + \ No newline at end of file diff --git a/DiskImg/hd0/u2/WS.OVR b/DiskImg/hd0/u2/WS.OVR new file mode 100644 index 00000000..5e3c8773 Binary files /dev/null and b/DiskImg/hd0/u2/WS.OVR differ diff --git a/DiskImg/hd0/u2/WSCHANGE.COM b/DiskImg/hd0/u2/WSCHANGE.COM new file mode 100644 index 00000000..bc85c1fc Binary files /dev/null and b/DiskImg/hd0/u2/WSCHANGE.COM differ diff --git a/DiskImg/hd0/u2/WSCHANGE.OVR b/DiskImg/hd0/u2/WSCHANGE.OVR new file mode 100644 index 00000000..4f707c63 Binary files /dev/null and b/DiskImg/hd0/u2/WSCHANGE.OVR differ diff --git a/DiskImg/hd0/u2/WSCHHELP.OVR b/DiskImg/hd0/u2/WSCHHELP.OVR new file mode 100644 index 00000000..49becf77 Binary files /dev/null and b/DiskImg/hd0/u2/WSCHHELP.OVR differ diff --git a/DiskImg/hd0/u2/WSHELP.OVR b/DiskImg/hd0/u2/WSHELP.OVR new file mode 100644 index 00000000..02634675 Binary files /dev/null and b/DiskImg/hd0/u2/WSHELP.OVR differ diff --git a/DiskImg/hd0/u2/WSMSGS.OVR b/DiskImg/hd0/u2/WSMSGS.OVR new file mode 100644 index 00000000..84625d8e Binary files /dev/null and b/DiskImg/hd0/u2/WSMSGS.OVR differ diff --git a/DiskImg/hd0/X0.DAT b/DiskImg/hd0/u2/WSPRINT.OVR similarity index 100% rename from DiskImg/hd0/X0.DAT rename to DiskImg/hd0/u2/WSPRINT.OVR diff --git a/DiskImg/hd3/WSPRINT.TST b/DiskImg/hd0/u2/WSPRINT.TST similarity index 100% rename from DiskImg/hd3/WSPRINT.TST rename to DiskImg/hd0/u2/WSPRINT.TST diff --git a/DiskImg/hd0/u2/WSREADME.TXT b/DiskImg/hd0/u2/WSREADME.TXT new file mode 100644 index 00000000..7a75b22c --- /dev/null +++ b/DiskImg/hd0/u2/WSREADME.TXT @@ -0,0 +1,880 @@ + --THE README FILE-- + ------------------------ + +README contains late-breaking news and tips about WordStar, +and information about printers. + + +THE DISKS THAT CAME IN YOUR PACKAGE +----------------------------------- + +The file HOMONYMS.TXT is included on the Speller disk +contrary to what is listed in Appendix D. + + +INSTALLATION +------------ + +WINSTALL and WSCHANGE + + WordStar has two installation programs: + + o WINSTALL contains the basic choices to install WordStar. + It is recommended for all users. + + Be sure and install your valid disk drives since WordStar + running under CP/M cannot recover from attempts to access non- + existent disk drives. + + o WSCHANGE contains every installation and customization + choice. It is designed for advanced users and users who + want to customize WordStar after they're familiar with it. + Use the menu listing below for a directory of the menus + in WSCHANGE. + +Directory of WSCHANGE Menus + + The chart below shows the organization of menus in WSCHANGE. + Print it out and refer to it as you customize WordStar. + + Main Installation Menu + + A Console + A Monitor + A Monitor selection + B Monitor name + C Screen sizing + B Function keys + C Monitor patches + A Special characters + B Cursor control + C Screen control + D Keyboard patches + A Function keys + B Save function keys + E Interface patches + A Console busy handshaking + B Special I/O subroutines + B Printer + A Printer choices + A Printer selection + B Printer name + C Default printer driver + B Printer driver library + A Select library file + B Create smaller library + C Add new printer driver + D Change printer driver data + C WS printer patches + A Custom print controls, printer initialization + + NOTE: Disregard the "CUSTOM & SIMPLE Controls Save CUSTOM/SIMPLE + Controls" option shown. This is not available from this menu. + + D Printing defaults + E Printer interface + A Printer port selection + B Printer busy handshaking + C Printer subroutines + C Computer + A Disk drives + A Valid disk drives + B Maximum valid user number + C Delay disk access if typing + B Operating system + A Single-user system + B Multi-user MP/M + C Multi-user Turbo DOS + D ZCPR3 + C Memory usage + D WordStar files + E Directory display + F Computer patches + D WordStar + A Page layout + A Page sizing & margins + B Headers & footers + C Tabs + B Editing settings + A Edit screen & help level + B Typing + C Paragraph alignment + D Blocks + E Erase & unerase + F Lines & characters + G Find & replace + H WordStar 3.3 compatibility + I Printing defaults + C Other features + A Spelling checks + B Nondocument mode + C Indexing + D Shorthand (key macros) + E Merge printing + F Miscellaneous + E Patching + A Auto patcher + B Save settings + C Reset all settings + +MEMORY USAGE +------------ + + WordStar requires a minimum TPA size of 50 kbytes to run + using the factory defaults. The TPA is the amount of memory + available in your computer for use by programs that have a + file type of COM. To see how big the TPA is in your computer, + press the question mark key (?) at the Opening Menu. + + The amount of memory required by WordStar can be reduced by + approximately 3 kbytes if necessary. Use the WSCHANGE program + to select the minimum memory configuration option. The menu + will show you what capabilities are being reduced. + + WordStar uses a general-purpose buffer for a variety of + tasks. WordStar allocates memory to this buffer for editing, + for merge printing, and at the Opening Menu (see BFSIZE in + PATCH.LST). The buffer used for editing is usually the most + sensitive to a reduced TPA size. (You may be able to use the + Opening Menu and print, but there may be insufficient memory + for editing.) + + The merge print buffer is used only to hold merge print + variable names and data. Increase it if you run out of memory + while merge printing. + + The Opening Menu buffer is used primarily to hold the file + directory, and for miscellaneous tasks. + + +LOW-MEMORY INDICATOR IN STATUS LINE +----------------------------------- + + If the Low-Memory indicator appears in the status line, it + means that WordStar was unable to complete some function. + The most common symptoms are: the line number in the + status line is wrong, or a paragraph alignment could not be + completed. You may correct the line counter by saving your + file, exiting WordStar, and re-loading your file. To correct + the paragraph alignment, move your cursor to the point where + paragraph alignment stopped, and then press ^B again. + + The reason this comes up is that WordStar was not able to fit + a big enough chunk of text into memory at one time. + + When you first begin editing, WordStar uses the value from + EDSIZE in the user area to determine the minimum amount + of memory required for a page of text. The default + is set for approximately a 55 line by 66 column page. If + your page size is routinely larger than this, you may want + to increase EDSIZE. Multiply the number of lines by the + number of columns, and divide by 128. + + If the Low-Memory indicator comes on while printing, it is due + to either the same reasons as for editing, or there is + insufficient memory to print the text proportionally spaced. + The amount of memory required depends on which printer + driver you are using. If you aren't using the .PS ON dot + command to turn proportional spacing on in your document, + low memory won't be a problem. Also, WordStar uses more + memory for merge printing than it does for regular printing + (around 2.5 kbytes more). + + The Low-Memory indicator will also appear when a full disk error + is encountered during editing. Treat the disk-full error as you + would normally. + + +RAM-RESIDENT PROGRAMS +--------------------- + + RAM-resident programs, such as SmartKey, reduce the amount of + working memory (TPA) that WordStar can use. The new features in + WordStar, such as shorthand, may reduce the need for these + RAM-resident programs, thus freeing memory for WordStar. + + +ZCPR3 SUPPORT +------------- + + In order to enable the ZCPR facilities within WordStar, the user + must use the Z3INS utility provided with ZCPR to install the + address of the ZCPR "environment" into WordStar. The environment + contains information that WordStar uses to support ZCPR-specific + functions. + + Generally, the user should log onto the drive containing the file + WS.COM, and issue the command: + + Z3INS SYS.ENV WS.COM + + The user should also run either WINSTALL or WSCHANGE to further + install WordStar for ZCPR. However, this is not mandatory because + the only thing that happens is that the WordStar sign-on says + "ZCPR3," and the LGLUSR location in the user area is changed for a + maximum user number of 31. (The normal default for LGLUSR is 15.) + + Once the user has installed WordStar for use with ZCPR, the user + will be able to use the following ZCPR features: + + - A named directory may be used when logging onto a new drive/user. + + - A named directory may be used instead of a drive/user as part + of any file name. + + - The drive/user always appears above file directories. (For CP/M + only the drive letter is shown if the user number is zero.) + + - The directory name also appears above the directory if one has + been defined for the currently logged drive/user. + + - If WordStar does not find its OVR files on the current drive and + user, it will search the drives and user numbers in the ZCPR + search path rather than using its standard search pattern. + + - WordStar installs itself as a ZCPR "shell" process which lets the + user enter any legal ZCPR command when running a program. (CP/M + can only run programs that are COM files.) + + +OSBORNE USERS +------------- + + The command to change a hard carriage return to a soft carriage + return (document mode) or to turn Auto-indent ON (nondocument + mode) does not function on the Osborne because of a limitation + in its BIOS. The following patch can be applied to change the + command from ^^ to ^- (Ctrl-Hyphen): + + Using DDT or SID in the file WSMSGS.OVR: + + At 02DA replace 1E with a 1D + At 02EF replace 1E with a 1D + At 0359 replace 1E with a 1D + At 06B2 replace 1E with a 1D + At 06C9 replace 1E with a 1D + + At the system prompt type SAVE 53 WSMSGS.OVR + + For more information on how to use SID or DDT, see your CP/M + reference guide. As always, be sure and apply the patch to a + COPY of the file. + + +INSTRUCTIONS FOR TWO FLOPPY DISK COMPUTERS +------------------------------------------ + + Do not remove the Program disk while you are using WordStar. + + The Printer Driver Library file (WSPRINT.OVR) on the WordStar + program disk is much smaller than the Printer Driver Library + file contained on the disk labeled PRINTER. Be sure to read the + section in "Starting" that discusses the printer library file. + + +RUN A PROGRAM +------------- + + Once you press R you can type the drive and user number for the + program you want to run. You may run only .COM files. CCP commands, + such as DIR cannot be used. + + +INDEXING +-------- + +Using StarIndex + + StarIndex 1.01 works with files created with this release of + WordStar. + +"Can't Use That Printer" Message + + When WordStar creates an index or table of contents, it uses + the printer drivers $INDEX and $TOC. If you created a smaller + WSPRINT.OVR file, you may have left these drivers out. To + return them to the file, copy the original WSPRINT.OVR file + onto your disk. When you create a smaller file again, be sure + to save these drivers. See Appendix C in the WordStar manual + for a list of other drivers to save. + + +SPELL CHECKING +-------------- + + Dual floppy disk users: + + Unless you have sufficient room on your working WordStar program + disk for the files TW.COM, SPELL.COM, MARKFIX.COM, REVIEW.COM and + MAINDICT.CMP you will not be able to run a spell check from the + Opening Menu. You will need to exit WordStar and replace the + working WordStar program disk with the dictionary disk you created + during installation. This disk should contain the files listed + above. Make sure the disk in drive B has the file you want to + spell-check. + + Follow the directions for running a spell check in The WORD Plus + manual. + + +UPGRADING FROM A PREVIOUS RELEASE +--------------------------------- + + This release of WordStar contains many new features and commands. + See the "What's New" booklet for a complete list. The following + changes came in too late to be included in the documentation. + +Printer Patches + + Previous versions of WordStar treat most dot matrix printers + and other non-daisy wheel printers as a DRAFT printer with a + few patchable items. Because of this, many users have used + these patches to be able to use certain features of their + printers. Sometimes the patches have been quite extensive, and + some users have many files that count on them. + + The printer drivers of WordStar Release 4, on the other hand, + are very powerful. Almost every driver recognizes all the print + controls and all the dot commands. In fact, if a document is + written to be printed on one kind of printer, it is likely that + it will also print fine on some other printer. + + However, if you want to use your existing files with WordStar + 4, and those files rely on the user area being patched in a + special way, you can probably do so by moving the patches into + WordStar 4, and using the CUSTOM or SIMPLE printer driver. + + On the INSTALL disk is a program called MOVEPRN.COM that + copies the printer driver portion of the previous release's + user area into files that can be installed into Release 4 with + the "auto patcher" feature. + + Copy the program MOVEPRN.COM onto the disk containing the + WS.COM file for the previous version. Type + + MOVEPRN WS.COM FILE1.PAT FILE2.PAT + + MOVEPRN extracts the proper portions of the user area and + writes them into two files that may then be used with the "auto + patcher" feature of WSCHANGE. + + FILE1.PAT is to be used with the general patching menu + (Choose E "Patching" on the WSCHANGE Main Menu, then A "Auto + Patcher"). FILE2.PAT should be used to install strings first + into the SIMPLE driver, and then into the CUSTOM driver (choose + B "Printer" on the WSCHANGE Main Menu, then B "Printer driver + library", D "Change printer driver data" and D "Driver auto + patcher"). + + Test print your document first with the SIMPLE driver, and then + with the CUSTOM driver to see which one produces the most + satisfactory results. + + Also read Appendix C for more information on using the Auto + Patcher. + + +Hanging Indents + + For WordStar Professional Release 4, MailMerge reformats indented + text created with ^OG to the current margins. If you want the text + to remain indented, use embedded ruler lines or the .RM, .LM, + and .PM commands. See the "Reference Guide" for more information. + + Pressing ^OG to wrap back to the first tab on the ruler line after + having reached the last tab works the same way it did in previous + versions of WordStar, contrary to what is stated in the manual. + + +TERMINALS +--------- + + WordStar comes installed for an "idealized" special terminal. + WINSTALL and WSCHANGE allow you to install many terminals by + name, thus allowing WordStar to take advantage of the special + features that the terminal might support, such as underlining + or the function keys. + + Use either WINSTALL or WSCHANGE to pick your specific terminal + or computer screen from the Monitor menu. If your terminal + isn't on the menu, it probably emulates one of those that is + there. Look in your terminal documentation to find out. + + After you install WordStar for the proper terminal, run + WordStar and open the file PRINT.TST to see which attributes + (such as bold and underline) work on your screen. + WordStar will highlight the following in some way... + + Bold (^PB) + Underline (^PS) + Strike-out (^PX) + Subscript (^PV) + Superscript (^PT) + Doublestrike (^PD) + Italics (^PY) + Blocks (^KB, ^KK) + Error messages + + Most of the time, normal text will be shown in dim intensity, + and highlighted text will be shown in bright intensity. You + may have to use a brightness and/or contrast knob to adjust + your screen the first time you use WordStar this way. + + If your dim intensity is too dim to see well, and you can't + adjust it, you can change the BRITE flag to ON using WSCHANGE. + This will invert bright and dim in your text, so that regular + text is displayed bright, and highlighted text will be + displayed as dim. However, text in the menus is not affected. + + +DISPLAY PROBLEMS WITH TERMINALS +------------------------------- + + Once you have installed WordStar for the proper terminal, you + may still experience display problems. + + If text from the previous screen remains after WordStar + displays a new screenful of text, the most likely cause is + cursor wrap. Basically, WordStar must know what happens to the + cursor when a character is displayed at the rightmost position + of the screen. It can either remain at the right edge, or it + can wrap to the beginning of the next line. The WRAP flag in + WordStar must be set either on or off to correspond to the + way the terminal works. (It is generally set for the + terminal's factory default, but the default can usually be + changed using the terminal's setup mode.) + + Another possible cause for display problems is your terminal's + incomplete emulation of some other terminal. The most + common differences are... + + Line insert (LININS), line delete (LINDEL), + Erase to end of screen (ERAEOS), + Erase to end of line (ERAEOL), + And, erase screen (ERASCR). + + Look in the manual for your terminal and use WSCHANGE to see + if the control sequences match. + + +PRINTERS +-------- + +WHAT'S IN THIS SECTION + + This section contains the following information: + + Choosing a Printer + Setting Up Your Printer + Printer Drivers + Proportional Printing + Laser Printers + Information on Specific Printers + +CHOOSING A PRINTER + + WordStar is ready to work with over 100 printers. The printer you + choose during installation becomes your default printer. However, + when you print a document, you can choose any other printer. To + choose a default printer, follow these steps: + + 1. Look at the Printer Information brochure that came in your + package. The first chart shows the printers listed on the + Printer Selection Menus. If your printer is on the menu, + simply choose it during installation. + + 2. If your printer isn't listed on the menu, it may work like a + printer that is. Refer to the second chart in the Printer + Information brochure for a list of printers that work like + printers on the menu. When WordStar asks you to choose a + printer, choose the printer that works like yours. + + 3. If neither chart lists your printer, choose Typewriter Printer + (if your printer can backspace) or Draft Printer (if it can't). + These choices may not take advantage of all your printer's + features, but they will work with almost any printer. + + Note: If you choose Draft or Typewriter, you can modify custom + print controls and printer initialization. + + If you want to make more modifications to take advantage of your + printer's feature, choose the Custom or Simple drivers, then use + the WS Printer Patches section of WSCHANGE to tell WordStar the + codes for your printer. Refer to your printer manual for these + codes. Some printers work better with the Custom driver and some + with the Simple driver. Try using both and see which works better + with your printer. See the "Reference Guide" for more information. + +SETTING UP YOUR PRINTER + +Choosing a Printer Port + + Each printer is connected to a printer port at the back of + the computer. WordStar looks for printers on the LST: port. + If your printer is connected to a different port, use + WSCHANGE to tell WordStar the correct port. + +Testing Your Printer Connection + + At the operating system prompt, type "PIP LST:=READ.ME." This + file should be printed by your printer. If it is not, your printer + may be connected to a different port. See your computer reference + manual, and the section on the STAT command in your CP/M + reference manual for more information. + + +PRINTER DRIVERS + + The WSPRINT.OVR file on the Printers disk contains a printer + driver for each printer on the Printer Selection Menu. The printer + driver for a printer contains all the codes WordStar needs to work + with that printer. + + Each printer driver has a short name. If you choose a printer when + you print a document, you see the names of the printer drivers, not + the names of the printers. + +PROPORTIONAL PRINTING + + WordStar supports proportional printing on a number of printers. + To turn on proportional printing, either install WordStar to + default to proportional printing, or place a ".PS on" command + in your document. At print time, WordStar selects the + appropriate proportional font based on the character width + (.CW) currently in effect. + + The specific printer descriptions later in this section show + recommended character widths for proportional typefaces. + These widths are for a normal mix of upper- and lowercase + letters. If you have many words or phrases all in uppercase + or if you want your text less densely printed, choose a larger + character width. + + While WordStar mostly sets character widths based on the + proportional-width table in the driver, on the more advanced + daisy wheel printers, WordStar uses the printer's proportional- + spacing mode. WordStar determines how much white space is needed + to right-justify the line based on its own proportional width + tables. If the table values don't match the wheel installed, + WordStar won't be able to justify the line correctly. + + WordStar sends standard ASCII characters; if a proportional wheel + uses a different spoke mapping, set up the printer to handle this. + +LASER PRINTERS + + WordStar supports laser printer features such as font changes + and proportional spacing. + + WordStar supports several laser printers: the Canon LPB-8 A1 & A2; + the Hewlett-Packard LaserJet, LaserJet+, and LaserJet 500+; + and the Ricoh LP4080. Refer to the "Specific Printer + Information" section of this file for information on these + printers. General notes about using laser printers are given below. + +Paper Size and Margins + + Laser printers come with preset page margins. You need to + compensate for these margins by changing page length in your + WordStar documents. The chart below shows the recommended + settings for 8 1/2 X 11 inch paper for both portrait and landscape + orientations. These settings allow 55 lines of text for portrait + orientation and 40 lines of text for landscape orientation (at 6 + lines per inch). They also allow for a footer of up to 3 lines + and a one-line header. If you use multiple-line headers, adjust + the top margin accordingly. + + Dot Default Portrait Landscape + Setting Command Value Orientation Orientation + ------- ------- ------- ----------- ----------- + page length .PL 66 62 47 + top margin .MT 3 2 2 + bottom margin .MB 8 5 5 + header margin .HM 2 1 1 + footer margin .FM 2 2 2 + + If the laser printer is your primary printer, you can use WSCHANGE + to make these settings the defaults. + + Because laser printers leave small margins at the left and right + sides of the page, you may want to use a smaller page offset + setting (the default is .PO 8). + +Form Feeds + + When you print with a laser printer, answer Y for yes to the "Use + form feeds (Y/N)?" prompt at print time. (The default is NO.) If + the laser printer is your primary printer, you can use WSCHANGE to + change the default to yes. + +WordStar Commands for Font Selection + + The WordStar dot commands and print control commands listed below + determine the fonts used for printing a document. + + .PR .PR OR=L selects landscape orientation; .PR OR=P (or just + .PR OR) selects portrait orientation (the default). If + either of these commands appears after the first printing + line on a page, the orientation will not change until the + following page. + + .PS .PS ON selects proportionally spaced characters; .PS OFF + (the default) selects fixed-spaced characters. + + .CW The character-width setting (.CW followed by the width in + 120ths of an inch) determines the character pitch and font + selected for fixed-width printing. For proportional fonts, it + determines the point size and proportional-width table + selected. + + .LQ .LQ ON selects near letter quality print (if supported by + your printer). LQ OFF selects draft quality print. Default + is ON. + + ^PY The italic print control toggles between normal and italic + characters when the appropriate italic font is available. + + ^PB The boldface print control toggles between normal and bold + characters when the appropriate bold font is available. + + ^PD The double strike print control used with the laser printers + toggles overprinting with a horizontal offset of 1/120" + between the two character images. This allows a bold effect + where no bold font is available. + + ^PA ^PA turns alternate pitch on. Use .CW to assign different + character widths to normal pitch (see ^PN below) and alternate + pitch so that each pitch accesses a different font. You can + then change fonts by switching between the two pitches. This + is the only way to use two fonts on the same line. + (See "Character width" and "Pitch" in the "Reference Guide.") + + ^PN ^PN turns normal pitch on. You can use it with ^PA as + described above. + + ^P@ When working with columns, if you use alternate and normal + pitch for two fonts, or if you use proportional spacing, you + may need to use ^P@ to make sure the columns line up. + Remember that the column position set with ^P@ is determined + by the normal pitch character width. (See "Columns" and + "Proportional spacing" in the "Reference Guide." + +INFORMATION ON SPECIFIC PRINTERS + + This section describes the capabilities of each printer listed on + the Printer Selection Menu. The printers are listed in alphabetical + order (except for the generic printers such as "Draft," + "Typewriter," "Custom," "Simple," and the various print-to-disk + options, which are listed first). + + There is a chart for each printer explaining how features work and + listing any special notes about the printer. Each printer is + described in the following format: + +PRINTER NAME ----- Driver: (short name) + + ^PY Effect of italics/ribbon color print control + ^PT/V Subscript/superscript information + .CW Information on available character widths and fonts. The + chart shows the .CW, .LQ, and .PS settings required to use + different fonts. + + .LQ OFF .LQ ON .PS ON Font Name + ------- ------ ------ --------- + .cw val .cw val recommended value (range) font 1 + .cw val .cw val recommended value (range) font 2 + + .UL Continuous-underline information (if restrictions) + .UJ Microspace-justification information (if restrictions) + + N/A means a command has no effect on this printer. + + NOTES Switch settings, special features, anomalies. + +DRAFT PRINTER (nonbackspacing) ----- Driver: DRAFT + + ^PD Overprints the line twice + ^PB Overprints the line three times + ^PS Overprints the underscore character in a separate pass + ^PT/V Prints super/subscripts with a full line between + super/subscript and text + .LH Sets line height only in multiples of full lines + .CW N/A + .PS N/A + .LQ N/A + .UJ N/A + + NOTES This driver works with any printer that doesn't automatically + perform a line feed when it receives a carriage return command. All + overprinting is done by returning the carriage and passing over the + line again. + +TYPEWRITER PRINTER (backspacing) ----- Driver: TYPEWR + + ^PD Backspaces and overprints each character twice + ^PB Backspaces and overprints each character three times + ^PS Backspaces and overprints the underscore character + ^PT/V Prints super/subscripts with a full line between + super/subscript and text + .LH Sets line height only in multiples of full lines + .CW N/A + .PS N/A + .LQ N/A + .UJ N/A + + NOTES This driver works with any printer that doesn't automatically + perform a line feed when a it receives a carriage return command, + and responds to a backspace character. Overprinting is done by + backspacing. + +AUTO LINE FEED PRINTER (backspacing) ----- Driver: AUTOLF + + ^PD Backspaces and overprints each character twice + ^PB Backspaces and overprints each character three times + ^PS Backspaces and overprints the underscore character + ^PT/V Prints super/subscripts with a full line between + super/subscript and text + .LH Sets line height only in multiples of full lines + .CW N/A + .PS N/A + .LQ N/A + .UJ N/A + + NOTES This driver works with any printer that automatically + performs a line feed when it receives a carriage return character, + and responds to a backspace command. Overprinting is done by + backspacing. + +SIMPLE CUSTOMIZABLE PRINTERS ----- Driver: SIMPLE + + All print controls cause control strings (on and off) in + the user area to be sent to the printer. These strings + are used by both the SIMPLE and CUSTOM drivers. They can + be installed with the WSCHANGE program. + + .LQ Controlled by user area strings + .PS Controlled by user area strings + .CW N/A + .UJ N/A + .LH N/A + + NOTES This printer driver prints the line in one pass, sending + control strings from the user area to select print enhancements. + +CUSTOMIZABLE PRINTERS ----- Driver: CUSTOM + + All print controls cause control strings (on and off) in + the user area to be sent to the printer. These strings + are used by both the SIMPLE and CUSTOM drivers. They can + be installed with the WSCHANGE program. + + .LQ ON/OFF controlled by user area strings + .PS ON/OFF controlled by user area strings + .LH Sets line height only in multiples of full lines + .UJ N/A + .CW N/A + + NOTES This driver prints the line in multiple passes, sending + control strings from the user area to select print enhancements. + +PREVIEW TO DISK ----- Driver: PRVIEW + + This driver prints documents to the PREVIEW.WS file to allow + you to preview the format and appearance of a document before + printing. Headers, footers, and pagination are shown correctly + and print controls remain in the file to display onscreen + attributes. Dot commands are not printed. + +PRINT TO DISK WITHOUT PRINT CONTROLS ----- Driver: ASCII + + This driver prints to the ASCII.WS file, stripping headers and + footers, high bits, and print controls. + +PRINT TO DISK WITHOUT HEADERS AND FOOTERS ----- Driver: XTRACT + + This driver prints to the XTRACT.WS disk file, stripping headers + and footers, but preserving high bits and print controls. + +ANADEX 9500A, 9500B ----- Driver: 9500 + + ^PY N/A + ^PT/V Even superscript roll + + .CW .CW Font name + --- --------- + 9 13.3 cpi + 10 12 cpi + 12 10 cpi + 18 6.7 cpi + 20 6 cpi + 24 5 cpi + + .LH 1/24" resolution, use even values + .UJ This printer has no incremental horizontal positioning + .PS N/A + .LQ N/A + +ANADEX 9501B, INTEQ 5100B ----- Driver: 9501B + + ^PY N/A + ^PT/V Even superscript roll + + .CW .CW Font name + --- --------- + 7 16.7 cpi + 8 15 cpi + 10 12.5 cpi + 12 10 cpi + 14 8.3 cpi + 16 7.5 cpi + 20 6.2 cpi + 24 5 cpi + + .LH 1/24" resolution, use even values + .UJ This printer has no incremental horizontal positioning + .PS N/A + .LQ N/A + +C. ITOH STARWRITER 1550 AND 8510 ----- Driver: C1550 + + ^PY N/A + ^PT/V Prints full-size characters with roll + + .CW .CW Font Name + --- --------- + 7 compressed + 10 elite + 12 pica + 14 expanded compressed + 20 expanded elite + 24 expanded pica + + .LQ N/A + .PS N/A + .UL Continuous underlining suppresses microspace justification + +C. ITOH F10 STARWRITER ----- Driver: QUME + + See Diablo 630, 1610, 1620 Daisy Wheel. + + Note: Proportional printing was tested with a Theme 10 wheel. + +CANON LBP-8A1 AND LBP-8A2 LASER PRINTER ----- Driver: LBP8 + + ^PY Selects italics if appropriate font installed + ^PT/V Prints full-size characters with roll + .PS .PS + .CW OFF ON Font Name + --- -- --------- + 6 - 20 cpi + 8 - 15 cpi + 9 - 13.3 cpi + 10 - 12 cpi (elite) + 12 - 10 cpi + 20 - 6 cpi + 24 - 5 cpi + 16 - 7.5 cpi + - 7 (0-8) Garland 8 point + - 10 (9-11) Garland 12 point + - 14 (12-17) Expanded 8 point + - 20 (18-30) Expand \ No newline at end of file diff --git a/DiskImg/hd0/u2/WSSHORT.OVR b/DiskImg/hd0/u2/WSSHORT.OVR new file mode 100644 index 00000000..b44f1480 Binary files /dev/null and b/DiskImg/hd0/u2/WSSHORT.OVR differ diff --git a/DiskImg/hd0/u2/WSU.COM b/DiskImg/hd0/u2/WSU.COM new file mode 100644 index 00000000..39830fdf Binary files /dev/null and b/DiskImg/hd0/u2/WSU.COM differ diff --git a/DiskImg/hd1/X1.DAT b/DiskImg/hd1/X1.DAT deleted file mode 100644 index 83bef6ea..00000000 Binary files a/DiskImg/hd1/X1.DAT and /dev/null differ diff --git a/DiskImg/hd1/u0/CLOCKS.DAT b/DiskImg/hd1/u0/CLOCKS.DAT new file mode 100644 index 00000000..f44fa3c0 Binary files /dev/null and b/DiskImg/hd1/u0/CLOCKS.DAT differ diff --git a/DiskImg/hd1/u0/COPY.CFG b/DiskImg/hd1/u0/COPY.CFG new file mode 100644 index 00000000..3d5310ac Binary files /dev/null and b/DiskImg/hd1/u0/COPY.CFG differ diff --git a/DiskImg/hd1/u0/COPY.COM b/DiskImg/hd1/u0/COPY.COM new file mode 100644 index 00000000..87c0c2fb Binary files /dev/null and b/DiskImg/hd1/u0/COPY.COM differ diff --git a/DiskImg/hd1/u0/COPY.UPD b/DiskImg/hd1/u0/COPY.UPD new file mode 100644 index 00000000..3725b0e8 --- /dev/null +++ b/DiskImg/hd1/u0/COPY.UPD @@ -0,0 +1,43 @@ + 11 Dec 88 + +Some changes have been made to COPY since the manual was written. +Comparison of dates with Existence testing ON has been changed to +use the Creation date when no Modified date exists, and print +"Undated" when neither exists, yet both source and destination +disks support file date stamping. Additionally, the /X option +has been re-defined, and a new /R option has been added to +Version 1.4. Please replace Paragraph 4.1.2.9 on page 55 of your +ZSDOS manual with the following two paragraphs describing the new +options. + + +4.1.2.9.1 ERASE SOURCE FILE AFTER COPY. + +When you want to "move" a file from one area to another, the "X" +option may be used. This option causes a file or group of files +to be copied in the manner described by the default or specified +options, but after the copy and optional verify, the source file +or files are erased. You will be notified that the file has been +erased by the status "(X)" being printed on your console. To +minimize the possibility of deleting a good file when errors +exist in the copy, the Verify option should always be active, +either by default, or specified. When Verify is active, any +errors detected will disable the "X" option for that file so that +a good source file will not be deleted. The "X" option has no +configurable value, and is always assumed to be "Off" requiring +the option in the command line list to be effective. + + +4.1.2.9.2 COPY ONLY FILES WHICH EXIST (REPLACE). + +Occasionally, you may wish to update selected files to a destina- +tion in a simpler manner than naming each file, or using the +Inspect option. The "R" (Replace) option, when active, tells +COPY to transfer only files which exist on the destination direc- +tory. If the Archive option (A) is added in conjunction with the +Replace option, only files which have not been archived, AND +already exist on the destination will be archived. It should be +noted that the No Replacement (N) option is incompatible with +both the Replace and Archive options, and is disabled when either +"R" or "A" are active. + \ No newline at end of file diff --git a/DiskImg/hd1/u0/DATSWEEP.COM b/DiskImg/hd1/u0/DATSWEEP.COM new file mode 100644 index 00000000..5d298c0b Binary files /dev/null and b/DiskImg/hd1/u0/DATSWEEP.COM differ diff --git a/DiskImg/hd1/u0/DSCONFIG.COM b/DiskImg/hd1/u0/DSCONFIG.COM new file mode 100644 index 00000000..b77dd008 Binary files /dev/null and b/DiskImg/hd1/u0/DSCONFIG.COM differ diff --git a/DiskImg/hd1/u0/FA16.CFG b/DiskImg/hd1/u0/FA16.CFG new file mode 100644 index 00000000..b7974d36 Binary files /dev/null and b/DiskImg/hd1/u0/FA16.CFG differ diff --git a/DiskImg/hd1/u0/FA16.DOC b/DiskImg/hd1/u0/FA16.DOC new file mode 100644 index 00000000..08b46875 --- /dev/null +++ b/DiskImg/hd1/u0/FA16.DOC @@ -0,0 +1,264 @@ + + FILEATTR + Version 1.6 + + Gene Pizzetta + January 18, 1992 + A ZSDOS utility, copyright (c) 1988 by Carson Wilson. + + +FILEATTR (FA) is a utility that allows rapid settin, resetting, +or displaying of file attributes under ZSDOS, ZRDOS, and CP/M +2.2. Several additional features are available under ZCPR3, +including error flag setting, error handler invocation, an +enhanced display, and better error detection. + +FA will not run under CP/M 3.0 or Z3PLUS. + +USAGE: + + FILEATTR {dir:}{afn} {{/}options} + +If a DIR or DU specification is not given, the current directory +is assumed (under vanilla CP/M only the drive is significant). +If no ambiguous or unambiguous filename is given, all files +("*.*") are matched. + +If no attribute options are given, FILEATTR merely displays the +current state of each file's attributes. Files are displayed in +the order that they appear in the directory. + +Once operation begins, FA cannot be aborted by the user. If a ^C +is entered at the keyboard, all screen output stops, but file +attribute operations continue to completion. If that was not the +case, attributes might be set on some entries for a file and not +on others. Nevertheless, suppressing screen output speeds things +up a bit. + +OPTIONS: A leading slash is required unless the option list is +the second parameter on the command line. Options may be +separated by spaces, commas, or nothing at all. + +ATTRIBUTE OPTIONS: These options set (turn on) corresponding +attributes on files matching the file specification. Attributes +not specified by an attribute option remain unchanged. + +If the option is preceded by a minus ("-") or by an "N", the +corresponding attribute is reset (turned off). + + 1 F1. This is a user attribute which has no predefined + meaning. + + P Public (f2). Under ZSDOS, when this attribute is set, + a file is available from any user area of the disk on + which it resides. A file cannot be made public if + another file with the same name exists in any other + user area on that drive. In that case FA will issue an + error message and leave the attribute off. + + D Inhibit access datestamp (f3). Under ZSDOS, when this + attribute is set, the file's access datestamp will not + be updated, which may speed file access slightly. If + the attribute is turned off, normal access datestamping + resumes. + + 4 F4. This is a user attribute which has no predefined + meaning. + + W Wheel protect (f8). Under ZSDOS, when this attribute + is set, the file becomes read-only when the wheel byte + is off and cannot be erased. If the wheel byte is on, + the file can be erased normally. + + R Read only (t1). When this attribute is set, the file + cannot be erased or modified by most programs. + + S System (t2). When this attribute is set, the file + becomes a "hidden" file that will not be found by most + directory programs or by most well-behaved utilities + that accept ambiguous filenames. (FA must find system + files, of course.) + + A Archive (t3). When this attribute is set, it signals + some archival programs that the file has not been + modified since it was last backed up. If a file is + modified, ZSDOS and ZRDOS turn this attribute off. + CP/M does not fully support this attribute, however. + +OTHER OPTIONS: These options affect only the screen display. + + Q Quiet mode. Console output is suppressed unless there + is an error. All other operations are performed + normally. + + X Screen paging off. With this option, screen paging is + turned off. The screen can still be paused by pressing + any key except ^C. + +ERRORS: Under ZCPR3, errors will cause FA to set the program +error flag and to invoke the error handler. The error flag will +be set to the following values: + 2 invalid directory specification + 4 miscellaneous (conflicting file, no files on disk) + 10 no matching files found (no error handler) + 18 Disk read-only + 19 Invalid option + +For error code 10 (no matching files found), the error flag is +set, but the error handler is not called. + +In addition, under ZCPR 3.3 and above, an invalid directory +specification will abort FA to the error handler, but no message +is printed. + +The following error messages may be seen: + +Conflicting entry, can't set public attribute + If there are files with the same name in other user areas of + the disk, the public attribute cannot be set. + +No files on disk + The disk directory is empty. + +Bad Option: /o + The command line option shown is unknown to FILEATTR. + +Drive R/O + The drive is set to read-only by the operating system and + attributes cannot be changed. + +CP/M version 2.x required + FILEATTR will not run on this system. + +BIOS write error near directory sector n + An error occurred at or near the given directory sector, + which is expressed as a decimal offset from the beginning of + the directory. + +BIOS set track detected - FA aborting + A background program is attempting to modify the current + track setting. The background program must be removeed + before running FA again. + +Not Wheel + Under ZCPR3 the wheel byte must be set before FILEATTR can + be run. + +CONFIGURATION: While no installation is necessary, all options +can be set as defaults, if you prefer, using ZCNFG. The +configuration options are fully explained on the ZCNFG help +screens. + +It is best not to change the name of the configuration file. Its +special name assures that ZCNFG will always find the correct CFG +file, even if the name of FA has been changed or if more than one +version of FA is online. + +HISTORY: + +Version 1.6 -- April 14, 1991 -- Gene Pizzetta + Now displays target DU and directory name in summary. Fixed + bug that caused "GO" to be displayed as program name, if it + was re-invoked with the GO command. + +Version 1.5 -- March 27, 1991 -- Gene Pizzetta + Now calls CP/M version checking routine (it was there, but + it wasn't called). Changed error codes: 10, no matching + files found. "No files on disk" error now gets + miscellaneous error code (4). Error 10 does not invoke + error handler. Not released. + +Version 1.4 -- March 20, 1991 -- Gene Pizzetta, Howard Goldstein + Code to check module data byte (S2) was replaced by Howard + Goldstein's elegant solution which uses a "true" extent + number: ((data_mod * 32) + extent). Entering a ^C no + longer really aborts FILEATTR; instead FA immediately prints + "Wait..." on the screen, turns off paging, turns on quiet + mode, sets the results flag, and finishes what it was doing. + All this is to prevent unexpected results when only some of + a file's directory entries are changed. All errors + including a conflicting file found during a PUBLIC request, + now set the program error flag and invoke the error handler + so an active SUBMIT or ZEX script can be aborted. The error + flag will have the following values: 2, invalid directory; + 10, no files on disk; 18, disk is read-only; 19, invalid + option; 4, all other errors. If no matching files are + found, the program error flag will be set to FFh, but the + error handler will not be invoked. A few other code changes + were made, including a check for CP/M-Plus, under which + FILEATTR will not work. Not released. + +Version 1.3 -- February 22, 1991 -- Gene Pizzetta + Corrected bug that caused faulty operation on large files: + The module data byte (S2) byte was not being checked, so + such files appeared 2 or more times in the directory display + and the public routine was often not finding conflicting + files. Added configuration byte and command line option (X) + for screen paging (paging is suppressed in quiet mode). + Made quiet mode responsive to ZCPR quiet flag and changed Q + command line option to toggle. Usage screen reflects + current effect of X and Q toggles. Attribute configuration + area changed to be compatible with ZCNFG TOGL3 routine. + Actions of D and ND options reversed so they work the same + as the others. Added configuration byte for printing + summary line even in quiet mode, as suggested by Howard + Goldstein. Removed blank lines from screen display, + allowing three more filenames to be shown. Removed tabs + from usage screen so PRINT and PSTR are not needed. + Eliminated leading zero from user number display. Now + prints "file" instead of "files" in summary when only 1 + matching file is found. Ditto for attribute(s) altered. + +Version 1.2 -- November 30, 1988 -- Carson Wilson + Fixed bug of no program name display when FILEATTR's name + was 8 characters long. + +Version 1.1 -- October 30, 1988 -- Carson Wilson + Now wildcards the command forms "FA d: /options" and "FA d: + options." + +Version 1.0 -- September 26, 1988 -- Carson Wilson + If a filespec is given, no leading slash is required before + the options. Link with version 4 libraries. Removed /X + option--ZSDOS 10T always closes the first extent when a file + is written to. Changed summary to read "files matched". + +Version 0.9 -- July 7, 1988 -- Carson Wilson + Increased length of search FCB (AMBFIL) by one byte. Set up + AMBFIL as '?' + 35 binary 0's. ZRDOS and CP/M zero the + drive byte (FCB+0) during search next calls, so reinitialize + it to '?' before rescanning the directory. PROGID now + prints stored name on GO/JUMP. + +Version 0.8 -- June 26, 1988 -- Carson Wilson + Use SYSLIB PRINT for help display. VPRINT does not expand + tabs. Now traps disk track changes at the BIOS level. + Allows '-' as well as 'N' for "negate option." Auto- + wildcards FCB1 for attribute set as well as display. + +Version 0.7 -- May 24, 1988 -- Carson Wilson + Cosmetic changes to help, display. Made public routines + faster by 1/2 directory scan average. Consolidated file + attribute setting/resetting routines for efficiency and + clarity. + +Version 0.6 -- May 14, 1988 -- Carson Wilson + Changed "Publ" to "Publc" and "Priv" to "Privt". Added Q + and X options, made options installable. Added test for bad + ZCPR directory & chain to error handler. + +Version 0.5 -- May 4, 1988 -- Carson Wilson + Fixed bug at CHKRO inherited from MAKE.ASM. Uses Bridger + Mitchell's FRESET to reset disks. Uses ZCPR invocation name + in signon, help, etc. Added F4 attribute. Now includes all + valid ZSDOS attributes. Help now fully "smart" under ZCPR. + Reworked VID3.Z80 and VID4.Z80 from VLIB11 and moved them + into FA.Z80 (see end of file). Put STNDOUT mode ON by + default at beginning of each attribute display sequence for + faster ZCPR displays. + +Version 0.4 -- April 27, 1988 -- Carson Wilson + Tests for matching files at other user areas before setting + the public attribit. + +Version 0.3 -- April 26, 1988 -- Carson Wilson diff --git a/DiskImg/hd1/u0/FA16A.FOR b/DiskImg/hd1/u0/FA16A.FOR new file mode 100644 index 00000000..e9ed3d43 --- /dev/null +++ b/DiskImg/hd1/u0/FA16A.FOR @@ -0,0 +1,6 @@ +An update and bug-fix of FILEATTR (FA), a ZSDOS utility that +allows rapid setting, resetting, or displaying of file attributes +under ZSDOS, ZRDOS, and CP/M 2.2. Several additional features +are available under ZCPR3, including error flag setting, error +handler invocation, and an enhanced display. Version 1.6A adds +documentation; otherwise, same as 1.6. diff --git a/DiskImg/hd1/u0/FA16CFG.TXT b/DiskImg/hd1/u0/FA16CFG.TXT new file mode 100644 index 00000000..4067b9ba --- /dev/null +++ b/DiskImg/hd1/u0/FA16CFG.TXT @@ -0,0 +1,39 @@ + +Option Q -- If the ZCPR quiet flag is set, FILEATTR will always default to +quiet mode. To make quiet mode the default at all times, even when running +under CP/M, set this configuration option to "Yes". Whatever is selected +here can be toggled with the command line "Q" option. + +Option X -- A "Yes" will cause FILEATTR to page screen output by default. +A "No" will default to continuous scrolling. The chosen default can be +toggled with the command line "X" option. Screen paging is always turned +off in quiet mode. + +Option R -- As distributed, FILEATTR prints nothing to the screen when it +is operating in quiet mode. If this configuration option is "Yes", the +results summary line that gives the number of matching files found and the +number of attributes changed will be printed even in quiet mode. + +Option S -- Enter the number of lines on your video display screen. Under +ZCPR 3.3 and higher, the number of screen lines for paging is obtained from +the environment descriptor. This configuration parameter is used only if +running under CP/M. + + + Attribute Configuration Options + +As distributed, FILEATTR will not change any file attribute unless +explicitly commanded to do so by a command line option. To configure +FILEATTR to turn a file attribute ON or OFF by default, toggle the +appropriate configuration selection. + +For example, to make FILEATTR set all matching files to Public by default, +change the "Public attribute" setting to "Turn On". Then FILEATTR will set +the specified files to Public unless the /NP command line option is given +(which would cause the files to be set to Private). Since there is no +command which tells FILEATTR not to change an attribute, however, the +program will now insist on turning the Public attribute either on (default) +or off (through the /NP option). + +Most users will have neither need nor desire to change the configuration +default as distributed which will "Leave As-Is" all matching files. diff --git a/DiskImg/hd1/u0/FILEATTR.COM b/DiskImg/hd1/u0/FILEATTR.COM new file mode 100644 index 00000000..4527d090 Binary files /dev/null and b/DiskImg/hd1/u0/FILEATTR.COM differ diff --git a/DiskImg/hd1/u0/FILEDATE.CFG b/DiskImg/hd1/u0/FILEDATE.CFG new file mode 100644 index 00000000..da1ca45f Binary files /dev/null and b/DiskImg/hd1/u0/FILEDATE.CFG differ diff --git a/DiskImg/hd1/u0/FILEDATE.COM b/DiskImg/hd1/u0/FILEDATE.COM new file mode 100644 index 00000000..11b83616 Binary files /dev/null and b/DiskImg/hd1/u0/FILEDATE.COM differ diff --git a/DiskImg/hd1/u0/INITDIR.CFG b/DiskImg/hd1/u0/INITDIR.CFG new file mode 100644 index 00000000..96baa986 Binary files /dev/null and b/DiskImg/hd1/u0/INITDIR.CFG differ diff --git a/DiskImg/hd1/u0/INITDIR.COM b/DiskImg/hd1/u0/INITDIR.COM new file mode 100644 index 00000000..fd46387a Binary files /dev/null and b/DiskImg/hd1/u0/INITDIR.COM differ diff --git a/DiskImg/hd1/u0/PUTBG.COM b/DiskImg/hd1/u0/PUTBG.COM new file mode 100644 index 00000000..970e2d8a Binary files /dev/null and b/DiskImg/hd1/u0/PUTBG.COM differ diff --git a/DiskImg/hd1/u0/PUTDS.COM b/DiskImg/hd1/u0/PUTDS.COM new file mode 100644 index 00000000..c0ceba64 Binary files /dev/null and b/DiskImg/hd1/u0/PUTDS.COM differ diff --git a/DiskImg/hd1/u0/RELOG.COM b/DiskImg/hd1/u0/RELOG.COM new file mode 100644 index 00000000..13ffc62e Binary files /dev/null and b/DiskImg/hd1/u0/RELOG.COM differ diff --git a/DiskImg/hd1/u0/SETTERM.COM b/DiskImg/hd1/u0/SETTERM.COM new file mode 100644 index 00000000..eca19bf9 Binary files /dev/null and b/DiskImg/hd1/u0/SETTERM.COM differ diff --git a/DiskImg/hd1/u0/SETUPZST.COM b/DiskImg/hd1/u0/SETUPZST.COM new file mode 100644 index 00000000..35e4b589 Binary files /dev/null and b/DiskImg/hd1/u0/SETUPZST.COM differ diff --git a/DiskImg/hd1/u0/STAMPS.DAT b/DiskImg/hd1/u0/STAMPS.DAT new file mode 100644 index 00000000..23cd9bd7 Binary files /dev/null and b/DiskImg/hd1/u0/STAMPS.DAT differ diff --git a/DiskImg/hd1/u0/TD.CFG b/DiskImg/hd1/u0/TD.CFG new file mode 100644 index 00000000..ab44bab9 Binary files /dev/null and b/DiskImg/hd1/u0/TD.CFG differ diff --git a/DiskImg/hd1/u0/TD.COM b/DiskImg/hd1/u0/TD.COM new file mode 100644 index 00000000..552aba67 Binary files /dev/null and b/DiskImg/hd1/u0/TD.COM differ diff --git a/DiskImg/hd1/u0/TERMBASE.DAT b/DiskImg/hd1/u0/TERMBASE.DAT new file mode 100644 index 00000000..358d61c0 Binary files /dev/null and b/DiskImg/hd1/u0/TERMBASE.DAT differ diff --git a/DiskImg/hd1/u0/TESTCLOK.COM b/DiskImg/hd1/u0/TESTCLOK.COM new file mode 100644 index 00000000..d547e2b8 Binary files /dev/null and b/DiskImg/hd1/u0/TESTCLOK.COM differ diff --git a/DiskImg/hd1/u0/ZCAL.COM b/DiskImg/hd1/u0/ZCAL.COM new file mode 100644 index 00000000..a5add241 Binary files /dev/null and b/DiskImg/hd1/u0/ZCAL.COM differ diff --git a/DiskImg/hd1/u0/ZCNFG.COM b/DiskImg/hd1/u0/ZCNFG.COM new file mode 100644 index 00000000..ae423dc5 Binary files /dev/null and b/DiskImg/hd1/u0/ZCNFG.COM differ diff --git a/DiskImg/hd1/u0/ZCNFG24.CFG b/DiskImg/hd1/u0/ZCNFG24.CFG new file mode 100644 index 00000000..1bfe49bf Binary files /dev/null and b/DiskImg/hd1/u0/ZCNFG24.CFG differ diff --git a/DiskImg/hd1/u0/ZPATH.COM b/DiskImg/hd1/u0/ZPATH.COM new file mode 100644 index 00000000..5c0aa503 Binary files /dev/null and b/DiskImg/hd1/u0/ZPATH.COM differ diff --git a/DiskImg/hd1/u0/ZSCONFIG.COM b/DiskImg/hd1/u0/ZSCONFIG.COM new file mode 100644 index 00000000..2cc26074 Binary files /dev/null and b/DiskImg/hd1/u0/ZSCONFIG.COM differ diff --git a/DiskImg/hd1/u0/ZSVSTAMP.COM b/DiskImg/hd1/u0/ZSVSTAMP.COM new file mode 100644 index 00000000..026d5d7a Binary files /dev/null and b/DiskImg/hd1/u0/ZSVSTAMP.COM differ diff --git a/DiskImg/hd1/u0/ZSVSTAMP.DOC b/DiskImg/hd1/u0/ZSVSTAMP.DOC new file mode 100644 index 00000000..2a8a7c1e --- /dev/null +++ b/DiskImg/hd1/u0/ZSVSTAMP.DOC @@ -0,0 +1,118 @@ + ZSVSTAMP USAGE NOTES + + + +1.0 INTRODUCTION + + ZSVSTAMP is a utility program that saves the create +date/time stamp of a given file in memory. At a later time, +ZSVSTAMP can restore the create stamp to a file. This can be +useful when modifying a file with an editor that actually creates +a new copy of the file rather than modifying it in place. +ZSVSTAMP allows the original creation date of the document to be +retained. + + In order to support all types of date stamping under ZSDOS, +ZSVSTAMP uses the get/set stamp functions of ZSDOS (or ZDDOS) and +thus may only be run under these operating systems. It also +requires ZCPR3 with multiple command line, external FCB and +message buffer. If an attempt is made to run ZSVSTAMP on a +system that does not meet these requirements, the program will +abort with an error message. + + + +2.0 OPERATION + + ZSVSTAMP has two modes of operation -- Manual and Automatic. + + + +2.1 Automatic Mode + + This mode is the most commonly used. It is extremely well +suited for use in alias scripts and can make the whole process of +saving and restoring date stamps virtually transparent to the +user. The syntax is: + + ZSVSTAMP approg [ufn] + +where "approg" is the program, such as an editor, that you wish +to run and "ufn" is an unambiguous file name to be modified by +"approg." When a command of this type is given, ZSVSTAMP saves +"ufn"'s creation date in protected memory. It then causes +"approg" to be run, and when "approg" finishes, ZSVSTAMP is +automatically run again to restore the original create stamp to +"ufn." If "ufn" does not exist, or if the disk does not support +date stamping, ZSVSTAMP displays a warning message and +immediately passes control to "approg" without attempting to save +a stamp. In this situation, ZSVSTAMP is not rerun when "approg" +completes execution. + + Some editors allow a syntax such as + + EDIT oldfile newfile + +When ZSVSTAMP is invoked with more than one parameter following +the application name, no stamps are saved or restored. This +feature can be disabled if desired, (see the section on +customization). + + + +2.2 Manual Mode + + Manual mode can be used to save or restore a file's create +stamp. The syntax is: + + ZSVSTAMP ufn /G or /S + +to Get or Save a file's create stamp, or: + + ZSVSTAMP ufn /P or /R + +to Put or Restore a saved stamp back onto a file. + + + +3.0 CUSTOMIZING ZSVSTAMP + +There are five configuration flags located near the beginning of +the program. Each flag is preceeded by an ASCII string to help +identify its function. These flags may be patched to customize +ZSVSTAMP as desired. + + The first four flags determine whether or not various +warning messages can be displayed when ZSVSTAMP is being run in +Automatic Mode. Setting a flag to 0 disables its associated +message; any other value enables the message. The flags are +labeled "NOSTMP," "NOFILE," "READERR," and "UPDTERR," and they +affect the "Disk has no time/date stamps," "File not found," +"Can't read time/date stamp," and "Can't update time/date stamp" +messages respectively. The program is distributed with all four +messages enabled. Please note that these flags have no effect in +Manual Mode where error messages are always enabled. + + The fifth and final configuration flag is labeled +"REPLALWS." It determines what ZSVSTAMP will do when more than +one parameter follows the application name in an Automatic Mode +command. If the byte following the "REPLALWS" label equals 0, +ZSVSTAMP checks to see if there is more than one parameter +following the application program name. If there is, ZSVSTAMP +simply exits to the application without saving or updating any +stamps. (This is the default setting in the distributed +version.) If the "REPLALWS" flag is non-zero, no such check is +made. + + + +4.0 CONTACTING THE AUTHOR + + Howard Goldstein may be contacted at: + + Newton Centre Z-Node, (Z-Node 3): 617/965-7259 + + Ladera Z-Node, (Z-Node 2): 213/670-9465 + + Home phone, (voice): 203/787-1918 + \ No newline at end of file diff --git a/DiskImg/hd1/u0/ZXD.CFG b/DiskImg/hd1/u0/ZXD.CFG new file mode 100644 index 00000000..f202ae59 Binary files /dev/null and b/DiskImg/hd1/u0/ZXD.CFG differ diff --git a/DiskImg/hd1/u0/ZXD.COM b/DiskImg/hd1/u0/ZXD.COM new file mode 100644 index 00000000..20395673 Binary files /dev/null and b/DiskImg/hd1/u0/ZXD.COM differ diff --git a/DiskImg/hd2/X2.DAT b/DiskImg/hd2/X2.DAT deleted file mode 100644 index 83bef6ea..00000000 Binary files a/DiskImg/hd2/X2.DAT and /dev/null differ diff --git a/RomDsk/CPM_1024KB/ZDE.COM b/RomDsk/CPM_1024KB/ZDE.COM index 8814a523..9bc493c3 100644 Binary files a/RomDsk/CPM_1024KB/ZDE.COM and b/RomDsk/CPM_1024KB/ZDE.COM differ diff --git a/RomDsk/CPM_512KB/ZDE.COM b/RomDsk/CPM_512KB/ZDE.COM index 8814a523..9bc493c3 100644 Binary files a/RomDsk/CPM_512KB/ZDE.COM and b/RomDsk/CPM_512KB/ZDE.COM differ diff --git a/RomDsk/ZSYS_1024KB/ZDE.COM b/RomDsk/ZSYS_1024KB/ZDE.COM index 8814a523..9bc493c3 100644 Binary files a/RomDsk/ZSYS_1024KB/ZDE.COM and b/RomDsk/ZSYS_1024KB/ZDE.COM differ diff --git a/RomDsk/ZSYS_512KB/ZDE.COM b/RomDsk/ZSYS_512KB/ZDE.COM index 8814a523..9bc493c3 100644 Binary files a/RomDsk/ZSYS_512KB/ZDE.COM and b/RomDsk/ZSYS_512KB/ZDE.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/1200.COM b/RomDsk/cfg_n8vem_dsd/1200.COM new file mode 100644 index 00000000..d00960b0 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/1200.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/38400.COM b/RomDsk/cfg_n8vem_dsd/38400.COM new file mode 100644 index 00000000..6d81bc17 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/38400.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/9600.COM b/RomDsk/cfg_n8vem_dsd/9600.COM new file mode 100644 index 00000000..4727badf Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/9600.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/FLASHZ.COM b/RomDsk/cfg_n8vem_dsd/FLASHZ.COM new file mode 100644 index 00000000..853ae7d9 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/FLASHZ.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/LDTIM.COM b/RomDsk/cfg_n8vem_dsd/LDTIM.COM new file mode 100644 index 00000000..1b3e2d10 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/LDTIM.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/RTC.COM b/RomDsk/cfg_n8vem_dsd/RTC.COM new file mode 100644 index 00000000..da0aebc1 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/RTC.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/T5.COM b/RomDsk/cfg_n8vem_dsd/T5.COM new file mode 100644 index 00000000..ab55d759 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/T5.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/VT3.COM b/RomDsk/cfg_n8vem_dsd/VT3.COM new file mode 100644 index 00000000..6290a6d3 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/VT3.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/XM.COM b/RomDsk/cfg_n8vem_dsd/XM.COM new file mode 100644 index 00000000..abcc6828 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/XM.COM differ diff --git a/RomDsk/cfg_n8vem_dsd/XM5.COM b/RomDsk/cfg_n8vem_dsd/XM5.COM new file mode 100644 index 00000000..8ea2b661 Binary files /dev/null and b/RomDsk/cfg_n8vem_dsd/XM5.COM differ diff --git a/Source/cbios.asm b/Source/cbios.asm index d7cd2569..2a419d7f 100644 --- a/Source/cbios.asm +++ b/Source/cbios.asm @@ -33,7 +33,7 @@ WBOOTE JP WBOOT ; #1 - WARM START JP CONOUT ; #4 - CONSOLE CHARACTER OUT JP LIST ; #5 - LIST CHARACTER OUT JP PUNCH ; #6 - PUNCH CHARACTER OUT - JP READER ; #7 - READER CHARACTER OUT + JP READER ; #7 - READER CHARACTER OUT JP HOME ; #8 - MOVE HEAD TO HOME POSITION JP SELDSK ; #9 - SELECT DISK JP SETTRK ; #10 - SET TRACK NUMBER @@ -721,14 +721,6 @@ UNA_INI: LD A,(HL) ; GET IT LD (UNACNT),A ; SAVE IT -; CALL NEWLINE ; *DEBUG* -; CALL PRTHEXBYTE ; *DEBUG* -; CALL PC_SPACE ; *DEBUG* -; CALL PRTHEXWORD ; *DEBUG* -; CALL PC_SPACE ; *DEBUG* -; LD BC,(UNASPT) ; *DEBUG* -; CALL PRTHEXWORD ; *DEBUG* - RET ; ;__________________________________________________________________________________________________ @@ -1522,7 +1514,7 @@ MDDPH0 .DW 0000,0000 .DW DIRBF,DPB_ROM .DW MDCSV0,MDALV0 ; -CKS_ROM .EQU 0 ; CKS: 0 FOR NON-REMOVABLE MEDIA +CKS_ROM .EQU 0 ; CKS: 0 FOR NON-REMOVABLE MEDIA ALS_ROM .EQU ((ROMBLKS + 7) / 8) ; ALS: BLKS / 8 (ROUNDED UP) ; ; MEMORY DISK 01: RAM DISK @@ -1535,7 +1527,7 @@ MDDPH1 .DW 0000,0000 .DW DIRBF,DPB_RAM .DW MDCSV1,MDALV1 ; -CKS_RAM .EQU 0 ; CKS: 0 FOR NON-REMOVABLE MEDIA +CKS_RAM .EQU 0 ; CKS: 0 FOR NON-REMOVABLE MEDIA ALS_RAM .EQU ((RAMBLKS + 7) / 8) ; ALS: BLKS / 8 (ROUNDED UP) ; MDCSV0: .FILL 0 ; NO DIRECTORY CHECKSUM, NON-REMOVABLE DRIVE @@ -1544,63 +1536,63 @@ MDCSV1: .FILL 0 ; NO DIRECTORY CHECKSUM, NON-REMOVABLE DRIVE MDALV1: .FILL ALS_RAM,00H ; MAX OF 256 DATA BLOCKS ; #IF (FDENABLE) -ORG_FD_DATA .EQU $ - #INCLUDE "fd_data.asm" -SIZ_FD_DATA .EQU $ - ORG_FD_DATA - .ECHO "FD_DATA occupies " - .ECHO SIZ_FD_DATA +ORG_FD_DPH .EQU $ + #INCLUDE "fd_dph.asm" +SIZ_FD_DPH .EQU $ - ORG_FD_DPH + .ECHO "FD DPH occupies " + .ECHO SIZ_FD_DPH .ECHO " bytes.\n" #ENDIF #IF (IDEENABLE) -ORG_IDE_DATA .EQU $ - #INCLUDE "ide_data.asm" -SIZ_IDE_DATA .EQU $ - ORG_IDE_DATA - .ECHO "IDE_DATA occupies " - .ECHO SIZ_IDE_DATA +ORG_IDE_DPH .EQU $ + #INCLUDE "ide_dph.asm" +SIZ_IDE_DPH .EQU $ - ORG_IDE_DPH + .ECHO "IDE DPH occupies " + .ECHO SIZ_IDE_DPH .ECHO " bytes.\n" #ENDIF #IF (PPIDEENABLE) -ORG_PPIDE_DATA .EQU $ - #INCLUDE "ppide_data.asm" -SIZ_PPIDE_DATA .EQU $ - ORG_PPIDE_DATA - .ECHO "PPIDE_DATA occupies " - .ECHO SIZ_PPIDE_DATA +ORG_PPIDE_DPH .EQU $ + #INCLUDE "ppide_dph.asm" +SIZ_PPIDE_DPH .EQU $ - ORG_PPIDE_DPH + .ECHO "PPIDE DPH occupies " + .ECHO SIZ_PPIDE_DPH .ECHO " bytes.\n" #ENDIF #IF (SDENABLE) -ORG_SD_DATA .EQU $ - #INCLUDE "sd_data.asm" -SIZ_SD_DATA .EQU $ - ORG_SD_DATA - .ECHO "SD_DATA occupies " - .ECHO SIZ_SD_DATA +ORG_SD_DPH .EQU $ + #INCLUDE "sd_dph.asm" +SIZ_SD_DPH .EQU $ - ORG_SD_DPH + .ECHO "SD DPH occupies " + .ECHO SIZ_SD_DPH .ECHO " bytes.\n" #ENDIF #IF (PRPENABLE & PRPSDENABLE) -ORG_PRPSD_DATA .EQU $ - #INCLUDE "prp_data.asm" -SIZ_PRPSD_DATA .EQU $ - ORG_PRPSD_DATA - .ECHO "PRPSD_DATA occupies " - .ECHO SIZ_PRPSD_DATA +ORG_PRPSD_DPH .EQU $ + #INCLUDE "prp_dph.asm" +SIZ_PRPSD_DPH .EQU $ - ORG_PRPSD_DPH + .ECHO "PRPSD DPH occupies " + .ECHO SIZ_PRPSD_DPH .ECHO " bytes.\n" #ENDIF #IF (PPPENABLE & PPPSDENABLE) -ORG_PPPSD_DATA .EQU $ - #INCLUDE "ppp_data.asm" -SIZ_PPPSD_DATA .EQU $ - ORG_PPPSD_DATA - .ECHO "PPPSD_DATA occupies " - .ECHO SIZ_PPPSD_DATA +ORG_PPPSD_DPH .EQU $ + #INCLUDE "ppp_dph.asm" +SIZ_PPPSD_DPH .EQU $ - ORG_PPPSD_DPH + .ECHO "PPPSD DPH occupies " + .ECHO SIZ_PPPSD_DPH .ECHO " bytes.\n" #ENDIF #IF (HDSKENABLE) -ORG_HDSK_DATA .EQU $ - #INCLUDE "hdsk_data.asm" -SIZ_HDSK_DATA .EQU $ - ORG_HDSK_DATA - .ECHO "HDSK_DATA occupies " - .ECHO SIZ_HDSK_DATA +ORG_HDSK_DPH .EQU $ + #INCLUDE "hdsk_dph.asm" +SIZ_HDSK_DPH .EQU $ - ORG_HDSK_DPH + .ECHO "HDSK DPH occupies " + .ECHO SIZ_HDSK_DPH .ECHO " bytes.\n" #ENDIF ; @@ -1968,25 +1960,25 @@ LD_CRT .SET CIODEV_PPPCON CIO_MAP: ; ; CONSOLE - .DB LD_TTY ; CON:=TTY: (IOBYTE XXXXXX00) - .DB LD_CRT ; CON:=CRT: (IOBYTE XXXXXX01) - .DB LD_BAT ; CON:=BAT: (IOBYTE XXXXXX10) - .DB LD_UC1 ; CON:=UC1: (IOBYTE XXXXXX11) + .DB LD_TTY ; CON:=TTY: (IOBYTE XXXXXX00) + .DB LD_CRT ; CON:=CRT: (IOBYTE XXXXXX01) + .DB LD_BAT ; CON:=BAT: (IOBYTE XXXXXX10) + .DB LD_UC1 ; CON:=UC1: (IOBYTE XXXXXX11) ; READER - .DB LD_TTY ; RDR:=TTY: (IOBYTE XXXX00XX) - .DB LD_PTR ; RDR:=PTR: (IOBYTE XXXX01XX) - .DB LD_UR1 ; RDR:=UR1: (IOBYTE XXXX10XX) - .DB LD_UR2 ; RDR:=UR2: (IOBYTE XXXX11XX) + .DB LD_TTY ; RDR:=TTY: (IOBYTE XXXX00XX) + .DB LD_PTR ; RDR:=PTR: (IOBYTE XXXX01XX) + .DB LD_UR1 ; RDR:=UR1: (IOBYTE XXXX10XX) + .DB LD_UR2 ; RDR:=UR2: (IOBYTE XXXX11XX) ; PUNCH - .DB LD_TTY ; PUN:=TTY: (IOBYTE XX00XXXX) - .DB LD_PTP ; PUN:=PTP: (IOBYTE XX01XXXX) - .DB LD_UP1 ; PUN:=UP1: (IOBYTE XX10XXXX) - .DB LD_UP2 ; PUN:=UP2: (IOBYTE XX11XXXX) + .DB LD_TTY ; PUN:=TTY: (IOBYTE XX00XXXX) + .DB LD_PTP ; PUN:=PTP: (IOBYTE XX01XXXX) + .DB LD_UP1 ; PUN:=UP1: (IOBYTE XX10XXXX) + .DB LD_UP2 ; PUN:=UP2: (IOBYTE XX11XXXX) ; LIST - .DB LD_TTY ; LST:=TTY: (IOBYTE 00XXXXXX) - .DB LD_CRT ; LST:=CRT: (IOBYTE 01XXXXXX) - .DB LD_LPT ; LST:=LPT: (IOBYTE 10XXXXXX) - .DB LD_UL1 ; LST:=UL1: (IOBYTE 11XXXXXX) + .DB LD_TTY ; LST:=TTY: (IOBYTE 00XXXXXX) + .DB LD_CRT ; LST:=CRT: (IOBYTE 01XXXXXX) + .DB LD_LPT ; LST:=LPT: (IOBYTE 10XXXXXX) + .DB LD_UL1 ; LST:=UL1: (IOBYTE 11XXXXXX) ; ;================================================================================================== ; SECTOR AND CONFIG BUFFER; @@ -1998,10 +1990,10 @@ CIO_MAP: ; A) SYSTEM CONFIGURATION DATA BUFFER ; B) CBIOS INIT CODE THAT CAN BE DISCARDED AFTER INIT ; - .FILL 0FD00H - $,00H ; MAKE SURE SEC/CFGBUF STARTS AT FD00 + .FILL 0FD00H - $,00H ; MAKE SURE SEC/CFGBUF STARTS AT FD00 ; -SECBUF: ; START OF 512 BYTE DISK SECTOR -CFGBUF: ; START OF 256 BYTE CONFIG BUFFER +SECBUF: ; START OF 512 BYTE DISK SECTOR +CFGBUF: ; START OF 256 BYTE CONFIG BUFFER .FILL 256,0 ; INIT: @@ -2028,13 +2020,13 @@ INIT: LD (IOBYTE),A ; STORE IT #IF ((PLATFORM != PLT_N8) & (PLATFORM != PLT_S100)) - IN A,(RTC) ; RTC PORT, BIT 6 HAS STATE OF CONFIG JUMPER - BIT 6,A ; BIT 6 HAS CONFIG JUMPER STATE - LD A,DEFIOBYTE ; ASSUME WE WANT DEFAULT IOBYTE VALUE - JR NZ,INIT1 ; IF BIT6=1, NOT SHORTED, CONTINUE WITH DEFAULT - LD A,ALTIOBYTE ; LOAD ALT IOBYTE VALUE + IN A,(RTC) ; RTC PORT, BIT 6 HAS STATE OF CONFIG JUMPER + BIT 6,A ; BIT 6 HAS CONFIG JUMPER STATE + LD A,DEFIOBYTE ; ASSUME WE WANT DEFAULT IOBYTE VALUE + JR NZ,INIT1 ; IF BIT6=1, NOT SHORTED, CONTINUE WITH DEFAULT + LD A,ALTIOBYTE ; LOAD ALT IOBYTE VALUE INIT1: - LD (IOBYTE),A ; SET THE ACTIVE IOBYTE + LD (IOBYTE),A ; SET THE ACTIVE IOBYTE #ENDIF ; DEFAULT DRIVE @@ -2110,7 +2102,7 @@ DEFDRV1: JR NZ,DEFDRV1 ; NOPE, NEXT DRIVE DEFDRV2: - ; WE HAVE A MATCH MATCHED, RECORD NEW DEFAULT DRIVE + ; WE HAVE A MATCH, RECORD NEW DEFAULT DRIVE LD A,C ; C HAS MATCHING DRIVE, MOVE TO A LD (DEFDRIVE),A ; SAVE IT ; diff --git a/Source/cnfgdata.inc b/Source/cnfgdata.inc index c6657b92..30a78d24 100644 --- a/Source/cnfgdata.inc +++ b/Source/cnfgdata.inc @@ -140,7 +140,7 @@ BOOTLU .DW 0 ; logical unit on dev/unit for boot ;SDCAPACITY .EQU 64 ; DEVICE SIZE IN MEGABYTES .DW SDCAPACITY - .DB SDCSIO ; USE CSI/O PORT (boolean) + .DB SDMODE ; USE CSI/O PORT (boolean) .DB SDCSIOFAST ; USE FAST CSI/O ALGORITHM (boolean) #ELSE .DB 0E5h ; placeholder for Z180_CLKDIV diff --git a/Source/config_n8_2312.asm b/Source/config_n8_2312.asm index 13104efd..ee62df50 100644 --- a/Source/config_n8_2312.asm +++ b/Source/config_n8_2312.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU TRUE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU TRUE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_CSIO ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU TRUE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8_2511.asm b/Source/config_n8_2511.asm index 44f2a34a..3e422c96 100644 --- a/Source/config_n8_2511.asm +++ b/Source/config_n8_2511.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU TRUE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_N8 ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_cvdu.asm b/Source/config_n8vem_cvdu.asm index 99a99b86..1c9a53e9 100644 --- a/Source/config_n8vem_cvdu.asm +++ b/Source/config_n8vem_cvdu.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_JUHA ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_dide.asm b/Source/config_n8vem_dide.asm index 0eb33d08..346ecf10 100644 --- a/Source/config_n8vem_dide.asm +++ b/Source/config_n8vem_dide.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_NONE ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_diskio.asm b/Source/config_n8vem_diskio.asm index 2c3fc748..daad8e37 100644 --- a/Source/config_n8vem_diskio.asm +++ b/Source/config_n8vem_diskio.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_NONE ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_diskio3.asm b/Source/config_n8vem_diskio3.asm index ae3014bc..55163120 100644 --- a/Source/config_n8vem_diskio3.asm +++ b/Source/config_n8vem_diskio3.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_NONE ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_dsd.asm b/Source/config_n8vem_dsd.asm new file mode 100644 index 00000000..a77503a8 --- /dev/null +++ b/Source/config_n8vem_dsd.asm @@ -0,0 +1,92 @@ +; +;================================================================================================== +; ROMWBW 2.X CONFIGURATION FOR N8VEM SBC 5/8/2012 +;================================================================================================== +; +; BUILD CONFIGURATION OPTIONS +; +CPUFREQ .EQU 8 ; IN MHZ, USED TO COMPUTE DELAY FACTORS +; +DEFCON .EQU CIODEV_UART ; DEFAULT CONSOLE DEVICE (LOADER AND MONITOR): CIODEV_UART, CIODEV_VDU, DIODEV_PRPCON +ALTCON .EQU DEFCON ; ALT CONSOLE DEVICE (USED WHEN CONFIG JUMPER SHORTED) +DEFVDA .EQU VDADEV_NONE ; DEFAULT VDA (VDADEV_NONE, VDADEV_VDU, VDADEV_CVDU, VDADEV_UPD7220, VDADEV_N8V) +DEFEMU .EQU EMUTYP_TTY ; DEFAULT EMULATION TYPE (EMUTYP_TTY, EMUTYP_ANSI, ...) +; +RAMSIZE .EQU 512 ; SIZE OF RAM IN KB, MUST MATCH YOUR HARDWARE!!! +CLRRAMDISK .EQU CLR_AUTO ; CLR_ALWAYS, CLR_NEVER, CLR_AUTO (CLEAR IF INVALID DIR AREA) +; +DSKMAP .EQU DM_RAM ; DM_ROM, DM_RAM, DM_FD, DM_IDE, DM_PPIDE, DM_SD, DM_PRPSD, DM_PPPSD +; +DSKYENABLE .EQU FALSE ; TRUE FOR DSKY SUPPORT (DO NOT COMBINE WITH PPIDE) +; +UARTENABLE .EQU TRUE ; TRUE FOR UART SUPPORT (ALMOST ALWAYS WANT THIS TO BE TRUE) +UARTFIFO .EQU TRUE ; TRUE ENABLES UART FIFO (16550 ASSUMED, N8VEM AND ZETA ONLY) +UARTAFC .EQU FALSE ; TRUE ENABLES AUTO FLOW CONTROL (YOUR TERMINAL/UART MUST SUPPORT RTS/CTS FLOW CONTROL!!!) +; +VDUENABLE .EQU FALSE ; TRUE FOR VDU BOARD SUPPORT +CVDUENABLE .EQU FALSE ; TRUE FOR CVDU BOARD SUPPORT +UPD7220ENABLE .EQU FALSE ; TRUE FOR uPD7220 BOARD SUPPORT +N8VENABLE .EQU FALSE ; TRUE FOR N8 (TMS9918) VIDEO/KBD SUPPORT +; +DEFIOBYTE .EQU $00 ; DEFAULT INITIAL VALUE FOR CP/M IOBYTE, $00=TTY, $01=CRT (MUST HAVE CRT HARDWARE) +ALTIOBYTE .EQU DEFIOBYTE ; ALT INITIAL VALUE (USED WHEN CONFIG JUMPER SHORTED) +WRTCACHE .EQU TRUE ; ENABLE WRITE CACHING IN CBIOS (DE)BLOCKING ALGORITHM +DSKTRACE .EQU FALSE ; ENABLE TRACING OF CBIOS DISK FUNCTION CALLS +; +FDENABLE .EQU FALSE ; TRUE FOR FLOPPY SUPPORT +FDMODE .EQU FDMODE_DIO ; FDMODE_DIO, FDMODE_ZETA, FDMODE_DIDE, FDMODE_N8, FDMODE_DIO3 +FDTRACE .EQU 1 ; 0=SILENT, 1=FATAL ERRORS, 2=ALL ERRORS, 3=EVERYTHING (ONLY RELEVANT IF FDENABLE = TRUE) +FDMEDIA .EQU FDM144 ; FDM720, FDM144, FDM360, FDM120 (ONLY RELEVANT IF FDENABLE = TRUE) +FDMEDIAALT .EQU FDM720 ; ALTERNATE MEDIA TO TRY, SAME CHOICES AS ABOVE (ONLY RELEVANT IF FDMAUTO = TRUE) +FDMAUTO .EQU TRUE ; SELECT BETWEEN MEDIA OPTS ABOVE AUTOMATICALLY +; +IDEENABLE .EQU FALSE ; TRUE FOR IDE SUPPORT +IDEMODE .EQU IDEMODE_DIO ; IDEMODE_DIO, IDEMODE_DIDE +IDETRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) +IDE8BIT .EQU FALSE ; USE IDE 8BIT TRANSFERS (PROBABLY ONLY WORKS FOR CF CARDS!) +IDECAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) +; +PPIDEENABLE .EQU FALSE ; TRUE FOR PPIDE SUPPORT (DO NOT COMBINE WITH DSKYENABLE) +PPIDEMODE .EQU PPIDEMODE_STD ; PPIDEMODE_STD, PPIDEMODE_DIO3 +PPIDETRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF PPIDEENABLE = TRUE) +PPIDE8BIT .EQU FALSE ; USE IDE 8BIT TRANSFERS (PROBABLY ONLY WORKS FOR CF CARDS!) +PPIDECAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) +PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPIDE IS UNRELIABLE) +; +SDENABLE .EQU TRUE ; TRUE FOR SD SUPPORT +SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) +SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) +SDMODE .EQU SDMODE_DSD ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER +; +PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) +PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) +PRPSDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF PRPSDENABLE = TRUE) +PRPSDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) +PRPCONENABLE .EQU TRUE ; TRUE FOR PROPIO CONSOLE SUPPORT (PS/2 KBD & VGA VIDEO) +; +PPPENABLE .EQU FALSE ; TRUE FOR PARPORTPROP SUPPORT +PPPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) +PPPSDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF PPPENABLE = TRUE) +PPPSDCAPACITY .EQU 64 ; CAPACITY OF PPP SD DEVICE (IN MB) +PPPCONENABLE .EQU TRUE ; TRUE FOR PROPIO CONSOLE SUPPORT (PS/2 KBD & VGA VIDEO) +; +HDSKENABLE .EQU FALSE ; TRUE FOR SIMH HDSK SUPPORT +HDSKTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) +HDSKCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) +; +PPKENABLE .EQU FALSE ; TRUE FOR PARALLEL PORT KEYBOARD +PPKTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF PPKENABLE = TRUE) +KBDENABLE .EQU FALSE ; TRUE FOR PS/2 KEYBOARD ON I8242 +KBDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF KBDENABLE = TRUE) +; +TTYENABLE .EQU FALSE ; INCLUDE TTY EMULATION SUPPORT +ANSIENABLE .EQU FALSE ; INCLUDE ANSI EMULATION SUPPORT +ANSITRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF ANSIENABLE = TRUE) +; +BOOTTYPE .EQU BT_MENU ; BT_MENU (WAIT FOR KEYPRESS), BT_AUTO (BOOT_DEFAULT AFTER BOOT_TIMEOUT SECS) +BOOT_TIMEOUT .EQU 20 ; APPROX TIMEOUT IN SECONDS FOR AUTOBOOT, 0 FOR IMMEDIATE +BOOT_DEFAULT .EQU 'R' ; SELECTION TO INVOKE AT TIMEOUT +; +BAUDRATE .EQU 38400 ; IN BPS: 1200, 9600, 38400, ..., 115200 +TERMTYPE .EQU TERM_ANSI ; TERM_TTY=0, TERM_ANSI=1, TERM_WYSE=2 diff --git a/Source/config_n8vem_ppide.asm b/Source/config_n8vem_ppide.asm index f2ad1ccb..36ee2d3c 100644 --- a/Source/config_n8vem_ppide.asm +++ b/Source/config_n8vem_ppide.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_NONE ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_ppisd.asm b/Source/config_n8vem_ppisd.asm index 180fa3b5..43054fa7 100644 --- a/Source/config_n8vem_ppisd.asm +++ b/Source/config_n8vem_ppisd.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU TRUE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU TRUE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_PPI ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_propio.asm b/Source/config_n8vem_propio.asm index ce30d22f..5c90bed6 100644 --- a/Source/config_n8vem_propio.asm +++ b/Source/config_n8vem_propio.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_NONE ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_simh.asm b/Source/config_n8vem_simh.asm index 57ec9929..656e1fe5 100644 --- a/Source/config_n8vem_simh.asm +++ b/Source/config_n8vem_simh.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_NONE ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_std.asm b/Source/config_n8vem_std.asm index 609a9cf3..c48ee10c 100644 --- a/Source/config_n8vem_std.asm +++ b/Source/config_n8vem_std.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_JUHA ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_n8vem_vdu.asm b/Source/config_n8vem_vdu.asm index 77a1b9d1..a4ccd6a5 100644 --- a/Source/config_n8vem_vdu.asm +++ b/Source/config_n8vem_vdu.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_JUHA ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_zeta_ppp.asm b/Source/config_zeta_ppp.asm index 0660067c..c393bdda 100644 --- a/Source/config_zeta_ppp.asm +++ b/Source/config_zeta_ppp.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_NONE ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/config_zeta_std.asm b/Source/config_zeta_std.asm index 6c051e5f..e17efafb 100644 --- a/Source/config_zeta_std.asm +++ b/Source/config_zeta_std.asm @@ -56,10 +56,8 @@ PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPI SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) -SDCSIO .EQU FALSE ; TRUE IF USING THE CSIO PORT (N8 ONLY) -SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) -PPISD .EQU TRUE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) -S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) +SDMODE .EQU SDMODE_PPI ; SDMODE_JUHA, SDMODE_CSIO, SDMODE_UART, SDMODE_PPI, SDMODE_DSD +SDCSIOFAST .EQU FALSE ; TABLE-DRIVEN BIT INVERTER ; PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) diff --git a/Source/fd_data.asm b/Source/fd_data.asm deleted file mode 100644 index f1ddff25..00000000 --- a/Source/fd_data.asm +++ /dev/null @@ -1,173 +0,0 @@ -; -;================================================================================================== -; FLOPPY DISK DRIVER - DATA -;================================================================================================== -; -#IF (FDMEDIA == FDM720) - #DEFINE FDDPB DPB_FD720 ; DPB_FD720 OR DPB_FD144 - #DEFINE FDCKS CKS_FD720 - #DEFINE FDALS ALS_FD720 -#ENDIF -#IF (FDMEDIA == FDM144) - #DEFINE FDDPB DPB_FD144 ; DPB_FD720 OR DPB_FD144 - #DEFINE FDCKS CKS_FD144 - #DEFINE FDALS ALS_FD144 -#ENDIF -#IF (FDMEDIA == FDM360) - #DEFINE FDDPB DPB_FD360 ; DPB_FD720 OR DPB_FD144 - #DEFINE FDCKS CKS_FD360 - #DEFINE FDALS ALS_FD360 -#ENDIF -#IF (FDMEDIA == FDM120) - #DEFINE FDDPB DPB_FD120 ; DPB_FD720 OR DPB_FD144 - #DEFINE FDCKS CKS_FD120 - #DEFINE FDALS ALS_FD120 -#ENDIF -#IF (FDMEDIA == FDM111) - #DEFINE FDDPB DPB_FD111 ; DPB_FD720 OR DPB_FD144 - #DEFINE FDCKS CKS_FD111 - #DEFINE FDALS ALS_FD111 -#ENDIF -; -; -; - .DB DIODEV_FD + 0 -FDDPH0: .DW 0000, 0000 - .DW 0000, 0000 - .DW DIRBF, FDDPB - .DW FDCSV0, FDALV0 - .DB DIODEV_FD + 1 -FDDPH1: .DW 0000, 0000 - .DW 0000, 0000 - .DW DIRBF, FDDPB - .DW FDCSV1, FDALV1 -; .EXPORT FDDPH0, FDDPH1 -;; -;; DISK PARAMETER BLOCKS USED FOR FLOPPY DRIVER -;; -;; IBM 720KB 3.5" FLOPPY DRIVE, 80 TRKS, 36 SECS/TRK, 512 BYTES/SEC -;; BLOCKSIZE (BLS) = 2K, DIRECTORY ENTRIES = 128 -;; -;#IF ((FDMEDIA == FDM720) | (FDMEDIAALT == FDM720)) -;DPB_FD720: -; .DW 36 ; SPT: SECTORS PER TRACK -; .DB 4 ; BSH: BLOCK SHIFT FACTOR -; .DB 15 ; BLM: BLOCK MASK -; .DB 0 ; EXM: EXTENT MASK -; .DW 350 ; DSM: TOTAL STORAGE IN BLOCKS - 1 BLK = ((720K - 18K OFF) / 2K BLS) - 1 = 350 -; .DW 127 ; DRM: DIR ENTRIES - 1 = 128 - 1 = 127 -; .DB 11000000B ; AL0: DIR BLK BIT MAP, FIRST BYTE -; .DB 00000000B ; AL1: DIR BLK BIT MAP, SECOND BYTE -; .DW 32 ; CKS: DIRECTORY CHECK VECTOR SIZE = 128 / 4 -; .DW 4 ; OFF: RESERVED TRACKS = 4 TRKS * (512 B/SEC * 36 SEC/TRK) = 18K -;#ELSE -;DPB_FD720 .EQU 0 -;#ENDIF -CKS_FD720 .EQU 32 ; CKS: DIR ENT / 4 = 128 / 4 = 32 -ALS_FD720 .EQU 44 ; ALS: BLKS / 8 = 351 / 8 = 44 (ROUNDED UP) -; .EXPORT DPB_FD720 -;#ENDIF -;; -;; IBM 1.44MB 3.5" FLOPPY DRIVE, 80 TRKS, 72 SECS/TRK, 512 BYTES/SEC -;; BLOCKSIZE (BLS) = 2K, DIRECTORY ENTRIES = 256 -;; -;#IF ((FDMEDIA == FDM144) | (FDMEDIAALT == FDM144)) -;DPB_FD144: -; .DW 72 ; SPT: SECTORS PER TRACK -; .DB 4 ; BSH: BLOCK SHIFT FACTOR -; .DB 15 ; BLM: BLOCK MASK -; .DB 0 ; EXM: EXTENT MASK -; .DW 710 ; DSM: TOTAL STORAGE IN BLOCKS - 1 BLK = ((1,440K - 18K OFF) / 2K BLS) - 1 = 710 -; .DW 255 ; DRM: DIR ENTRIES - 1 = 256 - 1 = 255 -; .DB 11110000B ; AL0: DIR BLK BIT MAP, FIRST BYTE -; .DB 00000000B ; AL1: DIR BLK BIT MAP, SECOND BYTE -; .DW 64 ; CKS: DIRECTORY CHECK VECTOR SIZE = 256 / 4 -; .DW 2 ; OFF: RESERVED TRACKS = 2 TRKS * (512 B/SEC * 72 SEC/TRK) = 18K -;#ELSE -;DPB_FD144 .EQU 0 -;#ENDIF -CKS_FD144 .EQU 64 ; CKS: DIR ENT / 4 = 256 / 4 = 64 -ALS_FD144 .EQU 89 ; ALS: BLKS / 8 = 711 / 8 = 89 (ROUNDED UP) -; .EXPORT DPB_FD144 -;#ENDIF -;; -;; IBM 360KB 5.25" FLOPPY DRIVE, 40 TRKS, 9 SECS/TRK, 512 BYTES/SEC -;; BLOCKSIZE (BLS) = 2K, DIRECTORY ENTRIES = 128 -;; -;#IF ((FDMEDIA == FDM360) | (FDMEDIAALT == FDM360)) -;DPB_FD360: -; .DW 36 ; SPT: SECTORS PER TRACK -; .DB 4 ; BSH: BLOCK SHIFT FACTOR -; .DB 15 ; BLM: BLOCK MASK -; .DB 0 ; EXM: EXTENT MASK -; .DW 170 ; DSM: TOTAL STORAGE IN BLOCKS - 1 BLK = ((360K - 18K OFF) / 2K BLS) - 1 = 170 -; .DW 127 ; DRM: DIR ENTRIES - 1 = 128 - 1 = 127 -; .DB 11110000B ; AL0: DIR BLK BIT MAP, FIRST BYTE -; .DB 00000000B ; AL1: DIR BLK BIT MAP, SECOND BYTE -; .DW 32 ; CKS: DIRECTORY CHECK VECTOR SIZE = 128 / 4 -; .DW 4 ; OFF: RESERVED TRACKS = 4 TRKS * (512 B/SEC * 36 SEC/TRK) = 18K -;#ELSE -;DPB_FD360 .EQU 0 -;#ENDIF -CKS_FD360 .EQU 32 ; CKS: DIR ENT / 4 = 128 / 4 = 32 -ALS_FD360 .EQU 89 ; ALS: BLKS / 8 = 171 / 8 = 22 (ROUNDED UP) -; .EXPORT DPB_FD360 -;#ENDIF -;; -;; IBM 1.20MB 5.25" FLOPPY DRIVE, 80 TRKS, 60 SECS/TRK, 512 BYTES/SEC -;; BLOCKSIZE (BLS) = 2K, DIRECTORY ENTRIES = 256 -;; -;#IF ((FDMEDIA == FDM120) | (FDMEDIAALT == FDM120)) -;DPB_FD120: -; .DW 60 ; SPT: SECTORS PER TRACK -; .DB 4 ; BSH: BLOCK SHIFT FACTOR -; .DB 15 ; BLM: BLOCK MASK -; .DB 0 ; EXM: EXTENT MASK -; .DW 591 ; DSM: TOTAL STORAGE IN BLOCKS - 1 BLK = ((1,200K - 15K OFF) / 2K BLS) - 1 = 591 -; .DW 255 ; DRM: DIR ENTRIES - 1 = 256 - 1 = 255 -; .DB 11110000B ; AL0: DIR BLK BIT MAP, FIRST BYTE -; .DB 00000000B ; AL1: DIR BLK BIT MAP, SECOND BYTE -; .DW 64 ; CKS: DIRECTORY CHECK VECTOR SIZE = 256 / 4 -; .DW 2 ; OFF: RESERVED TRACKS = 2 TRKS * (512 B/SEC * 60 SEC/TRK) = 15K -;#ELSE -;DPB_FD120 .EQU 0 -;#ENDIF -CKS_FD120 .EQU 64 ; CKS: DIR ENT / 4 = 256 / 4 = 64 -ALS_FD120 .EQU 74 ; ALS: BLKS / 8 = 592 / 8 = 74 (ROUNDED UP) -; .EXPORT DPB_FD120 -;#ENDIF -;; -;; IBM 1.11MB 8" FLOPPY DRIVE, 74 TRKS, 60 SECS/TRK, 512 BYTES/SEC -;; BLOCKSIZE (BLS) = 2K, DIRECTORY ENTRIES = 256 -;; -;#IF ((FDMEDIA == FDM111) | (FDMEDIAALT == FDM111)) -;DPB_FD111: -; .DW 60 ; SPT: SECTORS PER TRACK -; .DB 4 ; BSH: BLOCK SHIFT FACTOR -; .DB 15 ; BLM: BLOCK MASK -; .DB 0 ; EXM: EXTENT MASK -; .DW 546 ; DSM: TOTAL STORAGE IN BLOCKS - 1 BLK = ((1,110K - 15K OFF) / 2K BLS) - 1 = 546 -; .DW 255 ; DRM: DIR ENTRIES - 1 = 256 - 1 = 255 -; .DB 11110000B ; AL0: DIR BLK BIT MAP, FIRST BYTE -; .DB 00000000B ; AL1: DIR BLK BIT MAP, SECOND BYTE -; .DW 64 ; CKS: DIRECTORY CHECK VECTOR SIZE = 256 / 4 -; .DW 2 ; OFF: RESERVED TRACKS = 2 TRKS * (512 B/SEC * 60 SEC/TRK) = 15K -CKS_FD111 .EQU 64 ; CKS: DIR ENT / 4 = 256 / 4 = 64 -ALS_FD111 .EQU 69 ; ALS: BLKS / 8 = 592 / 8 = 74 (ROUNDED UP) -; .EXPORT DPB_FD111 -;#ENDIF -; -; -; -#IF (FDMAUTO) -; ASSUME WORST CASE SIZES -FDCSV0: .FILL CKS_FD144 -FDALV0: .FILL ALS_FD144 -FDCSV1: .FILL CKS_FD144 -FDALV1: .FILL ALS_FD144 -#ELSE -FDCSV0: .FILL FDCKS -FDALV0: .FILL FDALS -FDCSV1: .FILL FDCKS -FDALV1: .FILL FDALS -#ENDIF diff --git a/Source/fd_dph.asm b/Source/fd_dph.asm new file mode 100644 index 00000000..7cab05ba --- /dev/null +++ b/Source/fd_dph.asm @@ -0,0 +1,72 @@ +; +;================================================================================================== +; FLOPPY DISK DRIVER - DATA +;================================================================================================== +; +#IF (FDMEDIA == FDM720) + #DEFINE FDDPB DPB_FD720 ; DPB_FD720 OR DPB_FD144 + #DEFINE FDCKS CKS_FD720 + #DEFINE FDALS ALS_FD720 +#ENDIF +#IF (FDMEDIA == FDM144) + #DEFINE FDDPB DPB_FD144 ; DPB_FD720 OR DPB_FD144 + #DEFINE FDCKS CKS_FD144 + #DEFINE FDALS ALS_FD144 +#ENDIF +#IF (FDMEDIA == FDM360) + #DEFINE FDDPB DPB_FD360 ; DPB_FD720 OR DPB_FD144 + #DEFINE FDCKS CKS_FD360 + #DEFINE FDALS ALS_FD360 +#ENDIF +#IF (FDMEDIA == FDM120) + #DEFINE FDDPB DPB_FD120 ; DPB_FD720 OR DPB_FD144 + #DEFINE FDCKS CKS_FD120 + #DEFINE FDALS ALS_FD120 +#ENDIF +#IF (FDMEDIA == FDM111) + #DEFINE FDDPB DPB_FD111 ; DPB_FD720 OR DPB_FD144 + #DEFINE FDCKS CKS_FD111 + #DEFINE FDALS ALS_FD111 +#ENDIF +; +; +; + .DB DIODEV_FD + 0 +FDDPH0: .DW 0000, 0000 + .DW 0000, 0000 + .DW DIRBF, FDDPB + .DW FDCSV0, FDALV0 +; + .DB DIODEV_FD + 1 +FDDPH1: .DW 0000, 0000 + .DW 0000, 0000 + .DW DIRBF, FDDPB + .DW FDCSV1, FDALV1 +; +CKS_FD720 .EQU 32 ; CKS: DIR ENT / 4 = 128 / 4 = 32 +ALS_FD720 .EQU 44 ; ALS: BLKS / 8 = 351 / 8 = 44 (ROUNDED UP) +; +CKS_FD144 .EQU 64 ; CKS: DIR ENT / 4 = 256 / 4 = 64 +ALS_FD144 .EQU 89 ; ALS: BLKS / 8 = 711 / 8 = 89 (ROUNDED UP) +; +CKS_FD360 .EQU 32 ; CKS: DIR ENT / 4 = 128 / 4 = 32 +ALS_FD360 .EQU 89 ; ALS: BLKS / 8 = 171 / 8 = 22 (ROUNDED UP) +; +CKS_FD120 .EQU 64 ; CKS: DIR ENT / 4 = 256 / 4 = 64 +ALS_FD120 .EQU 74 ; ALS: BLKS / 8 = 592 / 8 = 74 (ROUNDED UP) +; +CKS_FD111 .EQU 64 ; CKS: DIR ENT / 4 = 256 / 4 = 64 +ALS_FD111 .EQU 69 ; ALS: BLKS / 8 = 592 / 8 = 74 (ROUNDED UP) +; +#IF (FDMAUTO) +; ASSUME WORST CASE SIZES +FDCSV0: .FILL CKS_FD144 +FDALV0: .FILL ALS_FD144 +FDCSV1: .FILL CKS_FD144 +FDALV1: .FILL ALS_FD144 +#ELSE +FDCSV0: .FILL FDCKS +FDALV0: .FILL FDALS +FDCSV1: .FILL FDCKS +FDALV1: .FILL FDALS +#ENDIF diff --git a/Source/hdsk_data.asm b/Source/hdsk_dph.asm similarity index 88% rename from Source/hdsk_data.asm rename to Source/hdsk_dph.asm index 2e52e51c..12f5e267 100644 --- a/Source/hdsk_data.asm +++ b/Source/hdsk_dph.asm @@ -7,10 +7,10 @@ HDSK_SLICETRKS .EQU 65 ; TRACKS PER SLICE HDSK_TRKSIZE .EQU 128 ; SIZE OF TRACK (IN KB) HDSK_SLICESIZE .EQU ((HDSK_SLICETRKS * HDSK_TRKSIZE) + 1023) / 1024 ; SIZE OF EACH SLICE (IN MB) HDSK_NUMSLICES .EQU HDSKCAPACITY / HDSK_SLICESIZE ; TOTAL SLICES IN DEVICE -HDSK0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR UNIT 0 -HDSK1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR UNIT 1 -HDSK2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR UNIT 0 -HDSK3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR UNIT 1 +HDSK0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR LOGICAL UNIT 0 +HDSK1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR LOGICAL UNIT 1 +HDSK2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR LOGICAL UNIT 2 +HDSK3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR LOGICAL UNIT 3 ; .DB DIODEV_HDSK + 0 HDSKDPH0 .DW 0000,0000 diff --git a/Source/ide_data.asm b/Source/ide_dph.asm similarity index 87% rename from Source/ide_data.asm rename to Source/ide_dph.asm index d4c20c90..895909ac 100644 --- a/Source/ide_data.asm +++ b/Source/ide_dph.asm @@ -7,10 +7,10 @@ IDE_SLICETRKS .EQU 65 ; TRACKS PER SLICE IDE_TRKSIZE .EQU 128 ; SIZE OF TRACK (IN KB) IDE_SLICESIZE .EQU ((IDE_SLICETRKS * IDE_TRKSIZE) + 1023) / 1024 ; SIZE OF EACH SLICE (IN MB) IDE_NUMSLICES .EQU IDECAPACITY / IDE_SLICESIZE ; TOTAL SLICES IN DEVICE -IDE0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR UNIT 0 -IDE1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR UNIT 1 -IDE2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR UNIT 0 -IDE3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR UNIT 1 +IDE0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR LOGICAL UNIT 0 +IDE1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR LOGICAL UNIT 1 +IDE2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR LOGICAL UNIT 2 +IDE3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR LOGICAL UNIT 3 ; .DB DIODEV_IDE + 0 IDEDPH0 .DW 0000,0000 diff --git a/Source/ppide_data.asm b/Source/ppide_dph.asm similarity index 85% rename from Source/ppide_data.asm rename to Source/ppide_dph.asm index 2fb4c2b3..f4b5e534 100644 --- a/Source/ppide_data.asm +++ b/Source/ppide_dph.asm @@ -6,11 +6,11 @@ PPIDE_SLICETRKS .EQU 65 ; TRACKS PER SLICE PPIDE_TRKSIZE .EQU 128 ; SIZE OF TRACK (IN KB) PPIDE_SLICESIZE .EQU ((PPIDE_SLICETRKS * PPIDE_TRKSIZE) + 1023) / 1024 ; SIZE OF EACH SLICE (IN MB) -PPIDE_NUMSLICES .EQU PPIDECAPACITY / PPIDE_SLICESIZE ; TOTAL SLICES IN DEVICE -PPIDE0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR UNIT 0 -PPIDE1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR UNIT 1 -PPIDE2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR UNIT 0 -PPIDE3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR UNIT 1 +PPIDE_NUMSLICES .EQU PPIDECAPACITY / PPIDE_SLICESIZE ; TOTAL SLICES IN DEVICE +PPIDE0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR LOGICAL UNIT 0 +PPIDE1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR LOGICAL UNIT 1 +PPIDE2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR LOGICAL UNIT 2 +PPIDE3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR LOGICAL UNIT 3 ; .DB DIODEV_PPIDE + 0 PPIDEDPH0 .DW 0000,0000 diff --git a/Source/ppp.asm b/Source/ppp.asm index 9d4cb29a..3d8937a6 100644 --- a/Source/ppp.asm +++ b/Source/ppp.asm @@ -350,10 +350,12 @@ PPPSD_PRT: RET Z #ENDIF PUSH AF + PUSH DE ; SAVE PTR TO FUNC STRING CALL NEWLINE LD DE,PPPSTR_PREFIX ; PRINT DRIVER PREFIX CALL WRITESTR CALL PC_SPACE + POP DE ; RECOVER PTR TO FUNC STRING CALL WRITESTR ; PRINT FUNCTION CALL PPPSD_PRTBLK ; PRINT BLOCK NUMBER CALL PC_SPACE diff --git a/Source/ppp_data.asm b/Source/ppp_dph.asm similarity index 88% rename from Source/ppp_data.asm rename to Source/ppp_dph.asm index 94e0ccc1..ef6cc45d 100644 --- a/Source/ppp_data.asm +++ b/Source/ppp_dph.asm @@ -7,10 +7,10 @@ PPPSD_SLICETRKS .EQU 65 ; TRACKS PER SLICE PPPSD_TRKSIZE .EQU 128 ; SIZE OF TRACK (IN KB) PPPSD_SLICESIZE .EQU ((PPPSD_SLICETRKS * PPPSD_TRKSIZE) + 1023) / 1024 ; SIZE OF EACH SLICE (IN MB) PPPSD_NUMSLICES .EQU PPPSDCAPACITY / PPPSD_SLICESIZE ; TOTAL SLICES IN DEVICE -PPPSD0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR UNIT 0 -PPPSD1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR UNIT 1 -PPPSD2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR UNIT 0 -PPPSD3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR UNIT 1 +PPPSD0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR LOGICAL UNIT 0 +PPPSD1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR LOGICAL UNIT 1 +PPPSD2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR LOGICAL UNIT 2 +PPPSD3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR LOGICAL UNIT 3 ; .DB DIODEV_PPPSD + 0 PPPSDDPH0 .DW 0000,0000 diff --git a/Source/prp_data.asm b/Source/prp_dph.asm similarity index 88% rename from Source/prp_data.asm rename to Source/prp_dph.asm index 34041c1c..61b2fa73 100644 --- a/Source/prp_data.asm +++ b/Source/prp_dph.asm @@ -7,10 +7,10 @@ PRPSD_SLICETRKS .EQU 65 ; TRACKS PER SLICE PRPSD_TRKSIZE .EQU 128 ; SIZE OF TRACK (IN KB) PRPSD_SLICESIZE .EQU ((PRPSD_SLICETRKS * PRPSD_TRKSIZE) + 1023) / 1024 ; SIZE OF EACH SLICE (IN MB) PRPSD_NUMSLICES .EQU PRPSDCAPACITY / PRPSD_SLICESIZE ; TOTAL SLICES IN DEVICE -PRPSD0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR UNIT 0 -PRPSD1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR UNIT 1 -PRPSD2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR UNIT 0 -PRPSD3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR UNIT 1 +PRPSD0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR LOGICAL UNIT 0 +PRPSD1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR LOGICAL UNIT 1 +PRPSD2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR LOGICAL UNIT 2 +PRPSD3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR LOGICAL UNIT 3 ; .DB DIODEV_PRPSD + 0 PRPSDDPH0 .DW 0000,0000 diff --git a/Source/sd.asm b/Source/sd.asm index e5b99875..291002c6 100644 --- a/Source/sd.asm +++ b/Source/sd.asm @@ -1,6 +1,7 @@ ; +; ;============================================================================= -; SD DISK DRIVER +; SD/SDHC/SDXC CARD STORAGE DRIVER ;============================================================================= ; ; - CATER FOR THE VARIOUS SDCARD HARDWARE VERSIONS @@ -11,34 +12,103 @@ ; - PERFORM BOOT INITIALIZATION OF RTC SOMEWHERE ELSE??? ; - PUT RELEVANT RTC BITS TO A KNOWN STATE AT ALL I/O ENTRY POINTS ; -; CONTROL BITS ; -#IF (PLATFORM==PLT_N8) -SD_CS .EQU $04 ; RTC BIT 2, SD CARD SELECT (ACTIVE HI) - #IF (!SDCSIO) -SD_CLK .EQU $02 ; RTC BIT 1, SD CLOCK -SD_DOUT .EQU $01 ; RTC BIT 0, SD DATA OUT -SD_DIN .EQU $40 ; RTC BIT 6, SD DATA IN - #ENDIF -#ELSE - #IF (PPISD) -SD_CS .EQU $10 ; PC4, SD CARD SELECT (ACTIVE LO) -SD_CLK .EQU $02 ; PC1, SD CLOCK -SD_DOUT .EQU $01 ; PC0, SD DATA OUT -SD_DIN .EQU $80 ; PB7, SD DATA IN - #ELSE - #IF (S2ISD) -SD_CS .EQU $08 ; MCR:3 OUT2, CD, ACT=LO=0 -SD_CLK .EQU $04 ; MCR:2 OUT1, CLK, ACT=LO=1 -SD_DOUT .EQU $20 ; MSR:5 DSR, DAT0, ACT=HI=0 (INV) -SD_DIN .EQU $01 ; MCR:0 DTR, CMD, ACT=HI=0 (INV) - #ELSE -SD_CS .EQU $04 ; RTC BIT 2, SD CARD SELECT (ACTIVE HI) -SD_CLK .EQU $40 ; RTC BIT 6, SD CLOCK -SD_DOUT .EQU $80 ; RTC BIT 7, DATA OUT TO SD-CARD -SD_DIN .EQU $40 ; RTC BIT 6, DATA IN FROM SD-CARD - #ENDIF - #ENDIF +;---------------------------------------------------------------------- +; SD Signal Act JUHA N8 CSIO PPI UART DSD +; ------------ ------- ------- ------- ------- ------- ------- ------- +; CS (DAT3) LO -> RTC:2 RTC:2 RTC:2 ~PC:4 MCR:3 OPS:2 +; CLK HI -> RTC:1 RTC:1 N/A PC:1 ~MCR:2 OPS:1 +; DI (CMD) HI -> RTC:0 RTC:0 N/A PC:0 ~MCR:0 OPS:0 +; DO (DAT0) HI -> RTC:7 RTC:6 N/A PB:7 ~MSR:5 OPS:0 +;---------------------------------------------------------------------- +; +; CS = CHIP SELECT (AKA DAT3 FOR NON-SPI MODE) +; CLK = CLOCK +; DI = DATA IN (HOST -> CARD, AKA CMD FOR NON-SPI MODE) +; DO = DATA OUT (CARD -> HOST, AKA: DAT0 FOR NON-SPI MODE) +; +; NOTES: +; 1) SIGNAL NAMES ARE FROM THE SD CARD SPEC AND ARE NAMED FROM THE +; PERSPECTIVE OF THE SD CARD: +; DI = DATA IN: HOST -> CARD = MOSI (MASTER OUT/SLAVE IN) +; DO = DATA OUT: CARD -> HOST (MASTER IN/SLAVE OUT) +; +; 2) THE QUIESCENT STATE OF THE OUTPUT SIGNALS (HOST -> CARD) IS: +; CS = HI (NOT SELECTED) +; CLK = LO +; DI = HI (ACTIVE IS THE NATURAL/DEFAULT STATE FOR DATA IN) +; +; 3) SPI MODE 0 IMPLEMENTATION IS USED (CPOL=0, CPHA=0) +; THE DATA MUST BE AVAILABLE BEFORE THE FIRST CLOCK SIGNAL RISING. +; THE CLOCK IDLE STATE IS ZERO. THE DATA ON MISO AND MOSI LINES +; MUST BE STABLE WHILE THE CLOCK IS HIGH AND CAN BE CHANGED WHEN +; THE CLOCK IS LOW. THE DATA IS CAPTURED ON THE CLOCK'S LOW-TO-HIGH +; TRANSITION AND PROPAGATED ON HIGH-TO-LOW CLOCK TRANSITION. +; +; 4) DI SHOULD BE LEFT HI (ACTIVE) WHENEVER UNUSED (FOR EXAMPLE, WHEN +; HOST IS RECEIVING DATA (CARD -> HOST)). +; +#IF (SDMODE == SDMODE_JUHA) ; JUHA MINI-BOARD +SD_OPSREG .EQU RTC ; USES RTC LATCHES FOR OPERATION +SD_OPSDEF .EQU %00000001 ; QUIESCENT STATE??? +SD_INPREG .EQU RTC ; INPUT REGISTER IS RTC +SD_CS .EQU %00000100 ; RTC:2 IS SELECT +SD_CLK .EQU %00000010 ; RTC:1 IS CLOCK +SD_DI .EQU %00000001 ; RTC:0 IS DATA IN (CARD <- CPU) +SD_DO .EQU %10000000 ; RTC:7 IS DATA OUT (CARD -> CPU) +#ENDIF +; +#IF (SDMODE == SDMODE_N8) ; UNMODIFIED N8-2511 +SD_OPSREG .EQU RTC ; USES RTC LATCHES FOR OPERATION +SD_OPSDEF .EQU %00000001 ; QUIESCENT STATE??? +SD_INPREG .EQU RTC ; INPUT REGISTER IS RTC +SD_CS .EQU %00000100 ; RTC:2 IS SELECT +SD_CLK .EQU %00000010 ; RTC:1 IS CLOCK +SD_DI .EQU %00000001 ; RTC:0 IS DATA IN (CARD <- CPU) +SD_DO .EQU %01000000 ; RTC:6 IS DATA OUT (CARD -> CPU) +#ENDIF +; +#IF (SDMODE == SDMODE_CSIO) ; N8-2312 +SD_OPSREG .EQU RTC ; USES RTC LATCHES FOR OPERATION +SD_OPSDEF .EQU %00000000 ; QUIESCENT STATE +SD_CS .EQU %00000100 ; RTC:2 IS SELECT +SD_CNTR .EQU CPU_CNTR +SD_TRDR .EQU CPU_TRDR +#ENDIF +; +#IF (SDMODE == SDMODE_PPI) ; PPISD +SD_PPIBASE .EQU PPIBASE ; BASE IO PORT FOR PPI +SD_PPIB .EQU PPIBASE + 1 ; PPI PORT B (INPUT: DOUT) +SD_PPIC .EQU PPIBASE + 2 ; PPI PORT C (OUTPUT: CS, CLK, DIN) +SD_PPIX .EQU PPIBASE + 3 ; PPI CONTROL PORT +SD_OPSREG .EQU SD_PPIC ; PPI PORT C IS OPS REG +SD_OPSDEF .EQU %00110001 ; CS HI, DI HI +SD_INPREG .EQU SD_PPIB ; INPUT REGISTER IS PPI PORT B +SD_CS .EQU %00010000 ; PPIC:4 IS SELECT +SD_CLK .EQU %00000010 ; PPIC:1 IS CLOCK +SD_DI .EQU %00000001 ; PPIC:0 IS DATA IN (CARD <- CPU) +SD_DO .EQU %10000000 ; PPIB:7 IS DATA OUT (CARD -> CPU) +#ENDIF +; +#IF (SDMODE == SDMODE_UART) +SD_MCR .EQU SIO_MCR ; UART MCR PORT (OUTPUT: CS, CLK, DIN) +SD_MSR .EQU SIO_MSR ; UART MSR PORT (INPUT: DOUT) +SD_CS .EQU %00001000 ; UART MCR:3 IS SELECT +SD_CLK .EQU %00000100 ; UART MCR:2 IS CLOCK +SD_DI .EQU %00000001 ; UART MCR:0 IS DATA IN (CARD <- CPU) +SD_DO .EQU %00100000 ; UART MSR:5 IS DATA OUT (CARD -> CPU) +#ENDIF +; +#IF (SDMODE == SDMODE_DSD) ; DUAL SD +SD_OPSREG .EQU $08 ; DEDICATED OPERATIONS REGISTER +SD_OPSDEF .EQU %00000001 ; QUIESCENT STATE +SD_INPREG .EQU SD_OPSREG ; INPUT REGISTER IS OPSREG +SD_SELREG .EQU SD_OPSREG + 1 ; DEDICATED SELECTION REGISTER +SD_SELDEF .EQU %00000000 ; SELECTION REGISTER DEFAULT +SD_CS .EQU %00000100 ; RTC:2 IS SELECT +SD_CLK .EQU %00000010 ; RTC:1 IS CLOCK +SD_DI .EQU %00000001 ; RTC:6 IS DATA IN (CARD <- CPU) +SD_DO .EQU %00000001 ; RTC:0 IS DATA OUT (CARD -> CPU) #ENDIF ; ; SD CARD COMMANDS @@ -58,23 +128,35 @@ SD_ACMD41 .EQU $40 | 41 ; SD_APP_OP_COND ; ; SD CARD TYPE ; -SD_TYPEUNK .EQU 0 -SD_TYPEMMC .EQU 1 -SD_TYPESDSC .EQU 2 -SD_TYPESDHC .EQU 3 +SD_TYPEUNK .EQU 0 ; CARD TYPE UNKNOWN/UNDETERMINED +SD_TYPEMMC .EQU 1 ; MULTIMEDIA CARD (MMC STANDARD) +SD_TYPESDSC .EQU 2 ; SDSC CARD (V1) +SD_TYPESDHC .EQU 3 ; SDHC/SDXC CARD (V2) +; +; SD CARD STATUS (SD_STAT) +; +SD_STOK .EQU 0 ; OK +SD_STNOTRDY .EQU -1 ; NOT READY (INITIALIZATION PENDING) +SD_STRDYTO .EQU -2 ; TIMEOUT WAITING FOR CARD TO BE READY +SD_STINITTO .EQU -3 ; INITIALIZATOIN TIMEOUT +SD_STCMDTO .EQU -4 ; TIMEOUT WAITING FOR COMMAND RESPONSE +SD_STCMDERR .EQU -5 ; COMMAND ERROR OCCURRED (REF SD_RC) +SD_STDATAERR .EQU -6 ; DATA ERROR OCCURRED (REF SD_TOK) +SD_STDATATO .EQU -7 ; DATA TRANSFER TIMEOUT +SD_STCRCERR .EQU -8 ; CRC ERROR ON RECEIVED DATA PACKET ; ; ; SD_DISPATCH: LD A,B ; GET REQUESTED FUNCTION AND $0F - JR Z,SD_READ + JP Z,SD_READ DEC A - JR Z,SD_WRITE + JP Z,SD_WRITE DEC A - JR Z,SD_STATUS + JP Z,SD_STATUS DEC A - JR Z,SD_MEDIA + JP Z,SD_MEDIA CALL PANIC ; ; @@ -82,42 +164,78 @@ SD_DISPATCH: SD_MEDIA: ; INITIALIZE THE SD CARD TO ACCOMMODATE HOT SWAPPING CALL SD_INITCARD - LD A,MID_NONE ; ASSUME FAILURE - RET NZ ; INIT FAILED, RETURN WITH HL=0 - - ; SET READY AND RETURN - XOR A - LD (SD_STAT),A ; SD_STAT = 0 = OK - LD A,MID_HD + LD A,MID_HD ; ASSUME SUCCESS + RET Z ; RETURN IF GOOD INIT + CALL SD_PRT + LD A,MID_NONE ; IF FAILURE, RETURN NO MEDIA RET ; SD_INIT: - PRTS("SD: IO=0x$") -#IF (!SDCSIO) - LD A,RTC -#ELSE - LD A,CPU_CNTR + PRTS("SD:$") +#IF (SDMODE == SDMODE_JUHA) + PRTS(" MODE=JUHA$") + PRTS(" IO=0x$") + LD A,SD_OPSREG + CALL PRTHEXBYTE + PRTS(" UNITS=1$") +#ENDIF +; +#IF (SDMODE == SDMODE_N8) + PRTS(" MODE=N8$") + PRTS(" IO=0x$") + LD A,SD_OPSREG + CALL PRTHEXBYTE + PRTS(" UNITS=1$") #ENDIF +; +#IF (SDMODE == SDMODE_CSIO) + PRTS(" MODE=CSIO$") + #IF (SDCSIOFAST) + PRTS(" FAST$") + #ENDIF + PRTS(" IO=0x$") + LD A,SD_OPSREG + CALL PRTHEXBYTE + PRTS(" CNTR=0x$") + LD A,SD_CNTR + CALL PRTHEXBYTE + PRTS(" TRDR=0x$") + LD A,SD_TRDR CALL PRTHEXBYTE PRTS(" UNITS=1$") +#ENDIF ; - LD A,20H ; PUT RTC LATCH TO IDLE - OUT (RTC),A -#IF (PPISD) - LD A,82H ; PPI PORT A=OUT, B=IN, C=OUT - OUT (PPIX),A - LD A,30H ; PC4,5 /CS HIGH - OUT (PPIC),A +#IF (SDMODE == SDMODE_PPI) + PRTS(" MODE=PPI$") + PRTS(" BASEIO=0x$") + LD A,SD_PPIBASE + CALL PRTHEXBYTE + PRTS(" UNITS=1$") #ENDIF -#IF (S2ISD) - IN A,(SIO_MCR) - OR SD_CS ; DEASSERT = HI = 1 - AND ~SD_DIN ; DEASSERT DIN = LO = 1 - AND ~SD_CLK ; DEASSERT CLK = LO = 1 - OUT (SIO_MCR),A +; +#IF (SDMODE == SDMODE_UART) + PRTS(" MODE=UART$") + PRTS(" MCR=0x$") + LD A,SD_MCR + CALL PRTHEXBYTE + PRTS(" MSR=0x$") + LD A,SD_MSR + CALL PRTHEXBYTE + PRTS(" UNITS=1$") #ENDIF - XOR A - DEC A +; +#IF (SDMODE == SDMODE_DSD) + PRTS(" MODE=DSD$") + PRTS(" OPS=0x$") + LD A,SD_OPSREG + CALL PRTHEXBYTE + PRTS(" SEL=0x$") + LD A,SD_SELREG + CALL PRTHEXBYTE + PRTS(" UNITS=1$") +#ENDIF +; + LD A,SD_STNOTRDY LD (SD_STAT),A RET ; @@ -127,227 +245,217 @@ SD_STATUS: RET ; SD_READ: - JP SD_RDSEC + CALL SD_RDSEC + JR SD_PRT ; SD_WRITE: - JP SD_WRSEC + CALL SD_WRSEC + JP SD_PRT +; +SD_PRT: +#IF (SDTRACE >= 1) + RET Z + PUSH AF + CALL SD_PRTPREFIX + CALL PC_SPACE + CALL SD_PRTSTAT + POP AF +#ENDIF + RET ; ;============================================================================= -; SD INTERFACE ROUTINES +; SD HARDWARE INTERFACE ROUTINES ;============================================================================= ; -; SD_SENDCLKS: A=RTC MASK, B=# OF CLK TRANSITIONS -; For bit bang versions B is number of transitions -; For PPISD B is number of bits -; For CSIO B is number of bytes -SD_SENDCLKS: -#IF (!SDCSIO) - #IF (PPISD) - LD A,03 ;PC1=1, TOGGLE CLOCK - OUT (PPIX),A - NOP - LD A,02 ;PC1=0, RESET CLOCK +; +; PERFORM HARDWARE SPECIFIC INITIALIZATION +; +SD_SETUP: +; +#IF ((SDMODE == SDMODE_JUHA) | (SDMODE == SDMODE_N8)) + LD A,SD_OPSDEF + LD (SD_OPSVAL),A + OUT (SD_OPSREG),A +#ENDIF +; +#IF (SDMODE == SDMODE_CSIO) + ; CSIO SETUP +; LD A,02 ; 18MHz/20 <= 400kHz + LD A,06 ; ??? + OUT0 (SD_CNTR),A + LD A,SD_OPSDEF + LD (SD_OPSVAL),A + OUT (SD_OPSREG),A +#ENDIF +; +#IF (SDMODE == SDMODE_PPI) + LD A,82H ; PPI PORT A=OUT, B=IN, C=OUT OUT (PPIX),A - #ELSE - #IF (S2ISD) - OUT (SIO_MCR),A - XOR SD_CLK - #ELSE - OUT (RTC),A - XOR SD_CLK ; TOGGLE CLOCK BIT - #ENDIF - #ENDIF - DJNZ SD_SENDCLKS + ;LD A,30H ; PC4,5 /CS HIGH + LD A,SD_OPSDEF + LD (SD_OPSVAL),A + OUT (SD_OPSREG),A +#ENDIF +; +#IF (SDMODE == SDMODE_UART) + IN A,(SD_MCR) + OR SD_CS ; DEASSERT = HI = 1 + AND ~SD_DI ; ASSERT DIN = LO = 0 (INVERTED) + AND ~SD_CLK ; DEASSERT CLK = HI = 1 (INVERTED) + OUT (SD_MCR),A +#ENDIF +; +#IF (SDMODE == SDMODE_DSD) + LD A,SD_SELDEF + OUT (SD_SELREG),A + LD A,SD_OPSDEF + LD (SD_OPSVAL),A + OUT (SD_OPSREG),A +#ENDIF + XOR A RET +; +; +;; PULSE CLOCK SIGNAL B TIMES +;; DO NOT MODIFY ANY SIGNALS BUT CLOCK SIGNAL +;; LEAVE WITH ALL SIGNALS IN ORIGINAL STATE +;; +;SD_SENDCLKS: +;; +;#IF ((SDMODE == SDMODE_JUHA) | (SDMODE == SDMODE_DSD)) +; LD A,(SD_OPSVAL) +;SD_SENDCLKS1: +; XOR SD_CLK +; OUT (SD_OPSREG),A +; XOR SD_CLK +; OUT (SD_OPSREG),A +; DJNZ SD_SENDCLKS1 +; RET +;#ENDIF +;; +;#IF (SDMODE == SDMODE_CSIO) +;#ENDIF +;#IF (SDMODE == SDMODE_PPI) +;#ENDIF +;#IF (SDMODE == SDMODE_UART) +;#ENDIF +; +; SELECT CARD +; +SD_SELECT: + LD A,(SD_OPSVAL) +#IF (SDMODE == SDMODE_PPI) + AND ~SD_CS ; SET SD_CS (CHIP SELECT) #ELSE -SD_SENDCLKS1: - CALL SD_WAITTX ; MAKE SURE WE ARE DONE SENDING - LD A,0FFH - OUT0 (CPU_TRDR),A ; put byte in buffer - IN0 A,(CPU_CNTR) - SET 4,A ; set transmit enable - OUT0 (CPU_CNTR),A - DJNZ SD_SENDCLKS + OR SD_CS ; SET SD_CS (CHIP SELECT) +#ENDIF + LD (SD_OPSVAL),A + OUT (SD_OPSREG),A RET - +; +; DESELECT CARD +; +SD_DESELECT: + LD A,(SD_OPSVAL) +#IF (SDMODE == SDMODE_PPI) + OR SD_CS ; RESET SD_CS (CHIP SELECT) +#ELSE + AND ~SD_CS ; RESET SD_CS (CHIP SELECT) +#ENDIF + LD (SD_OPSVAL),A + OUT (SD_OPSREG),A + RET +; +; +; +#IF (SDMODE == SDMODE_CSIO) SD_WAITTX: ; WAIT FOR TX EMPTY - IN0 A,(CPU_CNTR) ; get CSIO status + IN0 A,(SD_CNTR) ; get CSIO status BIT 4,A ; Tx empty? JR NZ,SD_WAITTX RET - +; +; +; SD_WAITRX: - IN0 A,(CPU_CNTR) ; wait for receiver to finish + IN0 A,(SD_CNTR) ; wait for receiver to finish BIT 5,A JR NZ,SD_WAITRX RET -#ENDIF ; -; COMPLETE A TRANSACTION - PRESERVE AF ; -SD_DONE: - PUSH AF -#IF (!SDCSIO) - #IF (PPISD) - LD A,30H - OUT (PPIC),A ;PC4=1 /CS INACTIVE - LD B,16 - #ELSE - #IF (S2ISD) - IN A,(SIO_MCR) - OR SD_CS ; TURN OFF CS - OUT (SIO_MCR),A - LD B,17 - #ELSE - XOR A - LD B,17 - #ENDIF +; +MIRROR: ; MSB<-->LSB mirror bits in A, result in C + #IF (!SDCSIOFAST) ; slow speed, least code space + LD B,8 ; bit counter +MIRROR1: + RLA ; rotate bit 7 into carry + RR C ; rotate carry into result + DJNZ MIRROR1 ; do all 8 bits + RET + #ELSE ; fastest but uses most code space + LD BC,MIRTAB ; 256 byte mirror table + ADD A,C ; add offset + LD C,A + JR NC,MIRROR2 + INC B +MIRROR2: + LD A,(BC) ; get result + LD C,A ; return result in C + RET #ENDIF - CALL SD_SENDCLKS -#ELSE - CALL SD_WAITTX ; MAKE SURE WE ARE DONE SENDING - IN A,(RTC) - AND ~SD_CS ; CLEAR CS - OUT (RTC),A - LD B,2 - CALL SD_SENDCLKS +; +MIRTAB: .DB 00H, 80H, 40H, 0C0H, 20H, 0A0H, 60H, 0E0H, 10H, 90H, 50H, 0D0H, 30H, 0B0H, 70H, 0F0H + .DB 08H, 88H, 48H, 0C8H, 28H, 0A8H, 68H, 0E8H, 18H, 98H, 58H, 0D8H, 38H, 0B8H, 78H, 0F8H + .DB 04H, 84H, 44H, 0C4H, 24H, 0A4H, 64H, 0E4H, 14H, 94H, 54H, 0D4H, 34H, 0B4H, 74H, 0F4H + .DB 0CH, 8CH, 4CH, 0CCH, 2CH, 0ACH, 6CH, 0ECH, 1CH, 9CH, 5CH, 0DCH, 3CH, 0BCH, 7CH, 0FCH + .DB 02H, 82H, 42H, 0C2H, 22H, 0A2H, 62H, 0E2H, 12H, 92H, 52H, 0D2H, 32H, 0B2H, 72H, 0F2H + .DB 0AH, 8AH, 4AH, 0CAH, 2AH, 0AAH, 6AH, 0EAH, 1AH, 9AH, 5AH, 0DAH, 3AH, 0BAH, 7AH, 0FAH + .DB 06H, 86H, 46H, 0C6H, 26H, 0A6H, 66H, 0E6H, 16H, 96H, 56H, 0D6H, 36H, 0B6H, 76H, 0F6H + .DB 0EH, 8EH, 4EH, 0CEH, 2EH, 0AEH, 6EH, 0EEH, 1EH, 9EH, 5EH, 0DEH, 3EH, 0BEH, 7EH, 0FEH + .DB 01H, 81H, 41H, 0C1H, 21H, 0A1H, 61H, 0E1H, 11H, 91H, 51H, 0D1H, 31H, 0B1H, 71H, 0F1H + .DB 09H, 89H, 49H, 0C9H, 29H, 0A9H, 69H, 0E9H, 19H, 99H, 59H, 0D9H, 39H, 0B9H, 79H, 0F9H + .DB 05H, 85H, 45H, 0C5H, 25H, 0A5H, 65H, 0E5H, 15H, 95H, 55H, 0D5H, 35H, 0B5H, 75H, 0F5H + .DB 0DH, 8DH, 4DH, 0CDH, 2DH, 0ADH, 6DH, 0EDH, 1DH, 9DH, 5DH, 0DDH, 3DH, 0BDH, 7DH, 0FDH + .DB 03H, 83H, 43H, 0C3H, 23H, 0A3H, 63H, 0E3H, 13H, 93H, 53H, 0D3H, 33H, 0B3H, 73H, 0F3H + .DB 0BH, 8BH, 4BH, 0CBH, 2BH, 0ABH, 6BH, 0EBH, 1BH, 9BH, 5BH, 0DBH, 3BH, 0BBH, 7BH, 0FBH + .DB 07H, 87H, 47H, 0C7H, 27H, 0A7H, 67H, 0E7H, 17H, 97H, 57H, 0D7H, 37H, 0B7H, 77H, 0F7H + .DB 0FH, 8FH, 4FH, 0CFH, 2FH, 0AFH, 6FH, 0EFH, 1FH, 9FH, 5FH, 0DFH, 3FH, 0BFH, 7FH, 0FFH #ENDIF - POP AF - RET ; ; SEND ONE BYTE ; SD_PUT: -#IF (PPISD) -; CALL PRTHEXBYTE ; *DEBUG* - LD C,A ; C=BYTE TO SEND - LD B,8 ; SEND 8 BITS (LOOP 8 TIMES) - LD A,08H ;PC4=0, /CS ACTIVE - OUT (PPIX),A -SD_PUT1: - RL C ;ROTATE NEXT BIT FROM C INTO CF - LD A,01 ;PC0=1, DATA OUT=1 - JR C,SD_PUT2 - LD A,00 ;PC0=0, DATA OUT =0 -SD_PUT2: - OUT (PPIX),A ;SEND DATA OUT - LD A,03 ;PC1=1, TOGGLE CLOCK - OUT (PPIX),A - LD A,02 ;PC1=0, RESET CLOCK - OUT (PPIX),A - DJNZ SD_PUT1 ;REPEAT FOR ALL 8 BITS - RET +#IF (SDMODE == SDMODE_CSIO) + CALL MIRROR ; MSB<-->LSB mirror bits, result in C + CALL SD_WAITTX ; MAKE SURE WE ARE DONE SENDING + OUT0 (SD_TRDR),C ; put byte in buffer + IN0 A,(SD_CNTR) + SET 4,A ; set transmit enable + OUT0 (SD_CNTR),A #ELSE - #IF (S2ISD) -; CALL PRTHEXBYTE ; *DEBUG* - XOR $FF ; INVERT FOR S2ISD INTERFACE LD C,A ; C=BYTE TO SEND LD B,8 ; SEND 8 BITS (LOOP 8 TIMES) - IN A,(SIO_MCR) ; START WITH CURRENT MCR REG VAUE + LD A,(SD_OPSVAL) ; LOAD CURRENT OPS VALUE SD_PUT1: - RRA ; PREPARE A FOR ROTATE - RL C ; ROTATE NEXT DATA BIT FROM C INTO CF - RLA ; ROTATE DATA BIT INTO A:0 - OR SD_CLK ; ASSERT CLOCK - OUT (SIO_MCR),A ; SEND IT - AND ~SD_CLK ; DEASSERT CLOCK - OUT (SIO_MCR),A ; SEND IT - DJNZ SD_PUT1 ; REPEAT FOR ALL 8 BITS - RET - #ELSE - #IF (!SDCSIO) -; CALL PRTHEXBYTE ; *DEBUG* - LD C,A ; C=BYTE TO SEND - LD B,8 ; SEND 8 BITS (LOOP 8 TIMES) -SD_PUT1: - #IF (PLATFORM==PLT_N8) - LD A,2 ; SD_CS >> 1 (SD_CS WILL BE SET AFTER ROTATE) - RL C ; ROTATE NEXT BIT FROM C INTO CF - RLA ; ROTATE CF INTO A:0, SD_DOUT is RTC:0 - #ELSE - LD A,8 ; SD_CS WILL BE IN BIT2 AFTER ROTATE + RRA ; PREPARE TO GET DATA BIT FROM CF RL C ; ROTATE NEXT BIT FROM C INTO CF - RRA ; ROTATE CARRY INTO A:7, SD_DOUT is RTC:7 - #ENDIF - OUT (RTC),A ; CLOCK LOW (ABOUT TO SEND BIT) - OR SD_CLK ; SET CLOCK BIT - OUT (RTC),A ; CLOCK HIGH (SEND BIT) + RLA ; ROTATE CF INTO A:0, SD_DO is OPS:0 + ;OUT (SD_OPSREG),A ; ASSERT DATA BIT + XOR SD_CLK ; TOGGLE CLOCK + OUT (SD_OPSREG),A ; UPDATE CLOCK AND ASSERT DATA BIT + XOR SD_CLK ; TOGGLE CLOCK + OUT (SD_OPSREG),A ; UPDATE CLOCK DJNZ SD_PUT1 ; REPEAT FOR ALL 8 BITS - AND ~SD_CLK ; RESET CLOCK - OUT (RTC),A ; LEAVE WITH CLOCK LOW - RET - #ELSE - CALL MIRROR ; MSB<-->LSB mirror bits, result in C - CALL SD_WAITRX ; MAKE SURE WE ARE DONE SENDING - OUT0 (CPU_TRDR),C ; put byte in buffer - IN0 A,(CPU_CNTR) - SET 4,A ; set transmit enable - OUT0 (CPU_CNTR),A - RET ; let it do the rest - #ENDIF - #ENDIF + LD A,(SD_OPSVAL) ; LOAD CURRENT OPS VALUE + OUT (SD_OPSREG),A ; LEAVE WITH CLOCK LOW #ENDIF + RET ; let it do the rest ; ; RECEIVE ONE BYTE ; SD_GET: -#IF (PPISD) - LD B,8 ; RECEIVE 8 BITS (LOOP 8 TIMES) -SD_GET1: - IN A,(PPIB) ; GET BIT FROM SD-CARD - RLA ; ROTATE PB7 INTO CARRY - RL C ; ROTATE CARRY INTO C - LD A,03 ; PC1=1, TOGGLE CLOCK - OUT (PPIX),A - LD A,02 ; PC1=0, RESET CLOCK - OUT (PPIX),A - DJNZ SD_GET1 ; REPEAT FOR ALL 8 BITS - LD A,C ; GET BYTE RECEIVED INTO A -; CALL PRTHEXBYTE ; *DEBUG* - RET -#ELSE - #IF (S2ISD) - LD B,8 ; SEND 8 BITS (LOOP 8 TIMES) -SD_GET1: - IN A,(SIO_MCR) ; GET CURRENT MCR TO TOGGLE CLK - OR SD_CLK ; SET CLK - OUT (SIO_MCR),A ; SEND IT - - NOP - - IN A,(SIO_MSR) ; MSR:5 HAS DATA BIT - RLA ; ROTATE DATA BIT TO A:6 - RLA ; ROTATE DATA BIT TO A:7 - RLA ; ROTATE DATA BIT TO CF - RL C ; NOW ROTATE CF INTO C:0 - - IN A,(SIO_MCR) ; GET CURRENT MCR TO TOGGLE CLK - AND ~SD_CLK ; CLEAR CLK - OUT (SIO_MCR),A ; SEND IT - - DJNZ SD_GET1 ; REPEAT FOR ALL 8 BITS - LD A,C ; GET BYTE RECEIVED INTO A - XOR $FF ; INVERT FOR S2ISD INTERFACE -; CALL PC_PERIOD ; *DEBUG* -; CALL PRTHEXBYTE ; *DEBUG* - RET - #ELSE - #IF (!SDCSIO) - LD B,8 ; RECEIVE 8 BITS (LOOP 8 TIMES) -SD_GET1: - IN A,(RTC) ; GET RTC BITS - RLA ; ROTATE RTC:6 (SD_IN) INTO CF - RLA - RL C ; ROTATE CF INTO C:0 - LD A,SD_CS | SD_DOUT | SD_CLK - OUT (RTC),A ; CLOCK HIGH (ACK BIT RECEIVED) - AND ~SD_CLK ; RESET CLOCK BIT - OUT (RTC),A ; CLOCK LOW (READY FOR NEXT BIT) - DJNZ SD_GET1 ; REPEAT FOR ALL 8 BITS - LD A,C ; GET BYTE RECEIVED INTO A -; CALL PRTHEXBYTE ; *DEBUG* - RET - #ELSE +#IF (SDMODE == SDMODE_CSIO) CALL SD_WAITTX ; MAKE SURE WE ARE DONE SENDING IN0 A,(CPU_CNTR) ; get CSIO status SET 5,A ; start receiver @@ -356,72 +464,65 @@ SD_GET1: IN0 A,(CPU_TRDR) ; get received byte CALL MIRROR ; MSB<-->LSB mirror bits LD A,C ; keep result - RET - #ENDIF +#ELSE + LD B,8 ; RECEIVE 8 BITS (LOOP 8 TIMES) + LD A,(SD_OPSVAL) ; LOAD CURRENT OPS VALUE +SD_GET1: + XOR SD_CLK ; TOGGLE CLOCK + OUT (SD_OPSREG),A ; UPDATE CLOCK + IN A,(SD_INPREG) ; READ THE DATA WHILE CLOCK IS ACTIVE + #IF ((SDMODE == SDMODE_JUHA) | (SDMODE == SDMODE_PPI)) + RLA ; ROTATE INP:7 INTO CF #ENDIF -#ENDIF - -#IF (SDCSIO) -MIRROR: ; MSB<-->LSB mirror bits in A, result in C - #IF (!SDCSIOFAST) ; slow speed, least code space - LD B,8 ; bit counter -MIRROR1: - RLA ; rotate bit 7 into carry - RR C ; rotate carry into result - DJNZ MIRROR1 ; do all 8 bits - RET - #ELSE ; fastest but uses most code space - LD BC,MIRTAB ; 256 byte mirror table - ADD A,C ; add offset - LD C,A - JR NC,MIRROR2 - INC B -MIRROR2: - LD A,(BC) ; get result - LD C,A ; return result in C - RET + #IF (SDMODE == SDMODE_N8) + RLA ; ROTATE INP:6 INTO CF + RLA ; " #ENDIF + #IF (SDMODE == SDMODE_DSD) + RRA ; ROTATE INP:0 INTO CF + #ENDIF + RL C ; ROTATE CF INTO C:0 + LD A,(SD_OPSVAL) ; BACK TO INITIAL VALUES (TOGGLE CLOCK) + OUT (SD_OPSREG),A ; DO IT + DJNZ SD_GET1 ; REPEAT FOR ALL 8 BITS + LD A,C ; GET BYTE RECEIVED INTO A #ENDIF - + RET +; +;================================================================================================== +; SD DISK DRIVER PROTOCOL IMPLEMENTATION +;================================================================================================== ; ; SELECT CARD AND WAIT FOR IT TO BE READY ($FF) ; SD_WAITRDY: -#IF (PPISD) - LD A,21H ;/CS ACTIVE (PC4), DOUT=1 (PC0) - OUT (PPIC),A -#ELSE - #IF (S2ISD) - IN A,(SIO_MCR) - AND ~SD_CS ; ASSERT CS (1) - OUT (SIO_MCR),A - #ELSE - IN A,(RTC) - #IF (!SDCSIO) - OR SD_CS | SD_DOUT ; SET SD_CS (CHIP SELECT) - #ELSE - CALL SD_WAITTX ; MAKE SURE WE ARE DONE SENDING - OR SD_CS ; SET SD_CS (CHIP SELECT) - #ENDIF - OUT (RTC),A - #ENDIF -#ENDIF + CALL SD_SELECT ; SELECT CARD LD DE,0 ; LOOP MAX (TIMEOUT) SD_WAITRDY1: -; CALL PC_SPACE ; *DEBUG* +; CALL PC_SPACE ; *DEBUG CALL SD_GET ; CALL PRTHEXBYTE ; *DEBUG* ; XOR A ; *DEBUG* TO SIMULATE READY TIMEOUT INC A ; $FF -> $00 RET Z ; IF READY, RETURN - DEC DE + DEC DE LD A,D OR E JR NZ,SD_WAITRDY1 ; KEEP TRYING UNTIL TIMEOUT - LD A,$FF ; SIGNAL TIMEOUT ERROR - OR A ; SET FLAGS + XOR A ; ZERO ACCUM + DEC A ; ACCUM := $FF TO SIGNAL ERROR RET ; TIMEOUT ; +; COMPLETE A TRANSACTION - PRESERVE AF +; +SD_DONE: + PUSH AF + CALL SD_DESELECT + LD A,$FF + CALL SD_PUT + POP AF + RET +; ; SD_GETDATA ; SD_GETDATA: @@ -481,7 +582,7 @@ SD_PUTDATA2: CALL SD_GET CP $FF ; WANT BYTE != $FF JR NZ,SD_PUTDATA3 ; NOT $FF, MOVE ON - DEC DE + DEC DE BIT 7,D JR Z,SD_PUTDATA2 ; KEEP TRYING UNTIL TIMEOUT SD_PUTDATA3: @@ -526,19 +627,21 @@ SD_SETCMDP: ; W/ PARMS IN BC & DE ; EXECUTE A SD CARD COMMAND ; SD_EXEC: + CALL SD_WAITRDY + JP NZ,SD_ERRRDYTO ; RETURN VIA READY TIMEOUT HANDLER XOR A LD (SD_RC),A LD (SD_TOK),A LD HL,SD_CMDBUF LD E,6 ; COMMANDS ARE 6 BYTES SD_EXEC1: -#IF (SDCSIO) +#IF (SDMODE == SDMODE_CSIO) CALL SD_WAITTX ; MAKE SURE WE ARE DONE SENDING - IN A,(RTC) + IN A,(SD_OPSREG) OR SD_CS ; SET CS - OUT (RTC),A + OUT (SD_OPSREG),A #ENDIF -#IF (S2ISD) +#IF (SDMODE == SDMODE_UART) IN A,(SIO_MCR) AND ~SD_CS ; ASSERT = LO = 0 OUT (SIO_MCR),A @@ -556,6 +659,7 @@ SD_EXEC2: DEC DE BIT 7,D JR Z,SD_EXEC2 + JP SD_ERRCMDTO SD_EXEC3: LD (SD_RC),A #IF (SDTRACE >= 2) @@ -564,6 +668,7 @@ SD_EXEC3: #IF (DSKYENABLE) CALL SD_DSKY #ENDIF + OR A RET ; SD_EXECCMD0: ; EXEC COMMAND, NO PARMS @@ -577,6 +682,8 @@ SD_EXECCMDP: ; EXEC CMD W/ PARMS IN BC/DE ; PUT CARD IN IDLE STATE ; SD_GOIDLE: + ;CALL SD_DONE ; SEEMS TO HELP SOME CARDS... + ; SMALL DELAY HERE HELPS SOME CARDS LD DE,200 ; 5 MILISECONDS CALL VDELAY @@ -587,65 +694,37 @@ SD_GOIDLE: LD A,$95 LD (SD_CMDBUF+5),A ; SET CRC=$95 CALL SD_EXEC ; EXEC CMD - CP $01 ; IN IDLE STATE? - CALL SD_DONE - RET + CALL SD_DONE ; SIGNAL COMMAND COMPLETE + JP P,SD_GOIDLE1 ; VALID RESULT, CHECK IT + CALL SD_EXEC ; 2ND TRY + CALL SD_DONE ; SIGNAL COMMAND COMPLETE + RET M ; COMMAND FAILED +; +SD_GOIDLE1: ; COMMAND OK, CHECK FOR EXPECTED RESULT + DEC A ; MAP EXPECTED $01 -> $00 + RET Z ; IF $00, ALL GOOD, RETURN + JP SD_ERRCMD ; OTHERWISE, HANDLE COMMAND ERROR ; ; INIT CARD ; SD_INITCARD: -#IF (PPISD) - LD A,82H ; PPI PORT A=OUT, B=IN, C=OUT - OUT (PPIX),A - LD A,30H ; PC4,5 /CS HIGH - OUT (PPIC),A -#ENDIF - LD A,20H ; PUT RTC LATCH TO IDLE - OUT (RTC),A - -#IF (SDCSIO) - ; CSIO SETUP -; LD A,02 ; 18MHz/20 <= 400kHz - LD A,06 ; ??? - OUT0 (CPU_CNTR),A -#ENDIF - CALL SD_DONE ; SEEMS TO HELP SOME CARDS... - -#IF (!SDCSIO) - #IF (PPISD) - LD A,21H ; /CS=0, DOUT=1, CLK=0 - OUT (PPIC),A - LD B,07FH ; 127 CLOCKS (255 TRANSITIONS STARTING WITH LO) - #ELSE - #IF (S2ISD) - IN A,(SIO_MCR) - OR SD_CS ; DEASSERT CS = HI = 1 - AND ~SD_DIN ; ASSERT DIN = HI = 0 - AND ~SD_CLK ; DEASSERT CLK = HI = 0 - LD B,0FFH ; 127 CLOCKS (255 TRANSITIONS STARTING WITH LO) - #ELSE - LD A,SD_CS | SD_DOUT ; CS=HI, DOUT=HI - LD B,0FFH ; 127 CLOCKS (255 TRANSITIONS STARTING WITH LO) - #ENDIF - #ENDIF -#ELSE - CALL SD_WAITTX ; MAKE SURE WE ARE DONE SENDING - IN A,(RTC) - OR SD_CS ; SET CS - OUT (RTC),A - LD B,16 -#ENDIF - CALL SD_SENDCLKS ; INIT DELAY + GO SPI MODE + CALL SD_SETUP ; DO HARDWARE SETUP/INIT +; + ; WAKE UP THE CARD, KEEP DIN HI (ASSERTED) AND /CS HI (DEASSERTED) + LD B,$10 ; MIN 74 CLOCKS REQUIRED, WE USE 128 ($10 * 8) +SD_INITCARD000: + LD A,$FF + PUSH BC + CALL SD_PUT + POP BC + DJNZ SD_INITCARD000 - ; WAIT FOR CARD TO BE READY FOR A COMMAND - CALL SD_WAITRDY - JP NZ,SD_ERRRDYTO + ;CALL SD_SELECT ; PUT CARD IN IDLE STATE CALL SD_GOIDLE - CALL NZ,SD_GOIDLE ; SOME CARDS REQUIRE A SECOND ATTEMPT - JP NZ,SD_ERRCMD ; GIVE UP - + RET NZ ; FAILED + SD_INITCARD00: LD A,SD_TYPESDSC ; ASSUME SDSC CARD TYPE LD (SD_TYPE),A ; SAVE IT @@ -653,7 +732,6 @@ SD_INITCARD00: ; CMD8 IS REQUIRED FOR V2 CARDS. FAILURE HERE IS OK AND ; JUST MEANS THAT IT IS A V1.X CARD LD A,SD_CMD8 - LD BC,0 LD D,1 ; VHS=1, 2.7-3.6V LD E,$AA ; CHECK PATTERN @@ -661,11 +739,12 @@ SD_INITCARD00: LD A,$87 LD (SD_CMDBUF+5),A ; SET CRC=$87 CALL SD_EXEC ; EXEC CMD - AND ~$01 - JR NZ,SD_INITCARD0 + CALL M,SD_DONE ; CLOSE COMMAND IF ERROR + RET M ; ABORT DUE TO PROCESSING ERROR + AND ~$01 ; IGNORE BIT 0 (IDLE) + JR NZ,SD_INITCARD0 ; CMD RESULT ERR, SKIP AHEAD - ; CMD8 WORKED, SO THIS IS V2 CARD - ; NEED TO CONSUME EXTRA CMD8 RESPONSE BYTES (4) + ; CMD8 WORKED, NEED TO CONSUME CMD8 RESPONSE BYTES (4) CALL SD_GET CALL SD_GET CALL SD_GET @@ -674,34 +753,31 @@ SD_INITCARD00: SD_INITCARD0: CALL SD_DONE - LD B,0 ; LOOP LIMIT (TIMEOUT) + LD A,$40 + LD (SD_LCNT),A SD_INITCARD1: ; CALL SD_APP_OP_COND UNTIL CARD IS READY (NOT IDLE) LD DE,200 ; 5 MILLISECONDS CALL VDELAY LD A,SD_CMD55 ; APP CMD IS NEXT - PUSH BC CALL SD_EXECCMD0 - POP BC - AND ~$01 ; ONLY 0 (OK) OR 1 (IDLE) ARE OK CALL SD_DONE + RET M ; ABORT ON PROCESSING ERROR + AND ~$01 ; ONLY 0 (OK) OR 1 (IDLE) ARE OK JP NZ,SD_ERRCMD LD A,SD_ACMD41 ; SD_APP_OP_COND - PUSH BC LD BC,$4000 ; INDICATE WE SUPPORT HC LD DE,$0000 CALL SD_EXECCMDP - POP BC - PUSH AF - AND ~$01 CALL SD_DONE - POP AF -; LD A,$01 ; *DEBUG* TO SIMULATE INIT TIMEOUT ERROR + RET M ; ABORT ON PROCESSING ERROR CP $00 ; INIT DONE? JR Z,SD_INITCARD2 ; YUP, MOVE ON CP $01 ; IDLE? JP NZ,SD_ERRCMD ; NOPE, MUST BE CMD ERROR, ABORT - DJNZ SD_INITCARD1 ; KEEP CHECKING + LD HL,SD_LCNT ; POINT TO LOOP COUNTER + DEC (HL) ; DECREMENT LOOP COUNTER + JR NZ,SD_INITCARD1 ; LOOP UNTIL COUNTER EXHAUSTED LD A,$FF ; SIGNAL TIMEOUT OR A JP SD_ERRINITTO @@ -712,6 +788,7 @@ SD_INITCARD2: LD A,SD_CMD58 CALL SD_EXECCMD0 CALL NZ,SD_DONE + RET M ; ABORT ON PROCESSING ERROR JP NZ,SD_ERRCMD ; CMD58 WORKED, GET OCR DATA AND SET CARD TYPE @@ -732,6 +809,7 @@ SD_INITCARD21: LD DE,512 CALL SD_EXECCMDP CALL SD_DONE + RET M ; ABORT ON PROCESSING ERROR JP NZ,SD_ERRCMD #IF (SDTRACE >= 2) @@ -742,9 +820,7 @@ SD_INITCARD21: CALL PRTHEXBYTE #ENDIF -; RET NZ ; IF ERROR, ABORT NOW WITH A SET CORRECTLY - -#IF (SDCSIO) +#IF (SDMODE == SDMODE_CSIO) CALL SD_WAITTX ; MAKE SURE WE ARE DONE SENDING XOR A ; NOW SET CSIO PORT TO FULL SPEED OUT (CPU_CNTR),A @@ -803,9 +879,6 @@ SD_RDSEC: CALL SD_CHKCARD ; CHECK / REINIT CARD AS NEEDED RET NZ - CALL SD_WAITRDY ; WAIT FOR CARD TO BE READY FOR A COMMAND - JP NZ,SD_ERRRDYTO ; HANDLE NOT READY TIMEOUT ERROR - CALL SD_SETADDR ; SETUP BLOCK ADDRESS LD A,SD_CMD17 ; READ_SINGLE_BLOCK @@ -825,9 +898,6 @@ SD_WRSEC: CALL SD_CHKCARD ; CHECK / REINIT CARD AS NEEDED RET NZ - CALL SD_WAITRDY ; WAIT FOR CARD TO BE READY FOR A COMMAND - JP NZ,SD_ERRRDYTO ; HANDLE NOT READY TIMEOUT ERROR - CALL SD_SETADDR ; SETUP BLOCK ADDRESS LD A,SD_CMD24 ; WRITE_BLOCK @@ -876,59 +946,45 @@ SD_SETADDRSDHC: ; HANDLE READY TIMEOUT ERROR ; SD_ERRRDYTO: -#IF (SDTRACE >= 1) - CALL SD_PRTPREFIX - LD DE,SDSTR_ERRRDYTO -#ENDIF + LD A,SD_STRDYTO JR SD_CARDERR ; -; HANDLE INIT TIMEOUT ERROR -; SD_ERRINITTO: -#IF (SDTRACE >= 1) - CALL SD_PRTPREFIX - LD DE,SDSTR_ERRINITTO -#ENDIF + LD A,SD_STINITTO JR SD_CARDERR ; -; HANDLE COMMAND ERROR +SD_ERRCMDTO: + LD A,SD_STCMDTO + JR SD_CARDERR ; SD_ERRCMD: -#IF (SDTRACE == 1) - CALL SD_PRTTRN -#ENDIF -#IF (SDTRACE >= 1) - LD DE,SDSTR_ERRCMD -#ENDIF + LD A,SD_STCMDERR JR SD_CARDERR ; -; HANDLE COMMAND ERROR -; SD_ERRDATA: -#IF (SDTRACE == 1) - CALL SD_PRTTRN -#ENDIF -#IF (SDTRACE >= 1) - LD DE,SDSTR_ERRDATA -#ENDIF + LD A,SD_STDATAERR + JR SD_CARDERR +; +SD_ERRDATATO: + LD A,SD_STDATATO + JR SD_CARDERR +; +SD_ERRCRC: + LD A,SD_STCRCERR JR SD_CARDERR ; ; GENERIC ERROR HANDLER, DE POINTS TO ERROR STRING ; SD_CARDERR: - PUSH AF - XOR A - DEC A - LD A,FALSE LD (SD_STAT),A -#IF (SDTRACE >= 1) - CALL PC_SPACE - CALL PC_LBKT - CALL WRITESTR - CALL PC_RBKT -#ENDIF +#IF (SDTRACE >= 2) + PUSH AF + PRTC('<') + CALL SD_PRTSTAT + PRTC('>') POP AF - LD (SD_STAT),A +#ENDIF + OR A RET ; ; PRINT DIAGNONSTIC PREFIX @@ -939,6 +995,67 @@ SD_PRTPREFIX: CALL WRITESTR RET ; +; PRINT STATUS STRING +; +SD_PRTSTAT: + LD A,(SD_STAT) + LD DE,SDSTR_STOK + JR Z,SD_PRTSTAT1 + INC A + LD DE,SDSTR_STNOTRDY + JR Z,SD_PRTSTAT1 + INC A + LD DE,SDSTR_STRDYTO + JR Z,SD_PRTSTAT1 + INC A + LD DE,SDSTR_STINITTO + JR Z,SD_PRTSTAT1 + INC A + LD DE,SDSTR_STCMDTO + JR Z,SD_PRTSTAT1 + INC A + LD DE,SDSTR_STCMDERR + JR Z,SD_PRTSTAT1 + INC A + LD DE,SDSTR_STDATAERR + JR Z,SD_PRTSTAT1 + INC A + LD DE,SDSTR_STDATATO + JR Z,SD_PRTSTAT1 + INC A + LD DE,SDSTR_STCRCERR + JR Z,SD_PRTSTAT1 + LD DE,SDSTR_STUNK +; +SD_PRTSTAT1: + CALL WRITESTR + LD A,(SD_STAT) + CP SD_STCMDERR + JR Z,SD_PRTCMDERR + CP SD_STDATAERR + JR Z,SD_PRTDATAERR + RET +; +SD_PRTCMDERR: + LD A,(SD_RC) + JR SD_PRTCODE +; +SD_PRTDATAERR: + LD A,(SD_TOK) + JR SD_PRTCODE +; +SD_PRTCODE: + CALL PC_LPAREN + PUSH AF + LD A,(SD_CMD) + CALL PRTHEXBYTE + LD DE,SDSTR_ARROW + CALL WRITESTR + POP AF + CALL PRTHEXBYTE + CALL PC_RPAREN + RET +; ; PRT COMMAND TRACE ; SD_PRTTRN: @@ -992,39 +1109,23 @@ SD_DSKY: ; ; ; -#IF (SDCSIOFAST) -MIRTAB: .DB 00H, 80H, 40H, 0C0H, 20H, 0A0H, 60H, 0E0H, 10H, 90H, 50H, 0D0H, 30H, 0B0H, 70H, 0F0H - .DB 08H, 88H, 48H, 0C8H, 28H, 0A8H, 68H, 0E8H, 18H, 98H, 58H, 0D8H, 38H, 0B8H, 78H, 0F8H - .DB 04H, 84H, 44H, 0C4H, 24H, 0A4H, 64H, 0E4H, 14H, 94H, 54H, 0D4H, 34H, 0B4H, 74H, 0F4H - .DB 0CH, 8CH, 4CH, 0CCH, 2CH, 0ACH, 6CH, 0ECH, 1CH, 9CH, 5CH, 0DCH, 3CH, 0BCH, 7CH, 0FCH - .DB 02H, 82H, 42H, 0C2H, 22H, 0A2H, 62H, 0E2H, 12H, 92H, 52H, 0D2H, 32H, 0B2H, 72H, 0F2H - .DB 0AH, 8AH, 4AH, 0CAH, 2AH, 0AAH, 6AH, 0EAH, 1AH, 9AH, 5AH, 0DAH, 3AH, 0BAH, 7AH, 0FAH - .DB 06H, 86H, 46H, 0C6H, 26H, 0A6H, 66H, 0E6H, 16H, 96H, 56H, 0D6H, 36H, 0B6H, 76H, 0F6H - .DB 0EH, 8EH, 4EH, 0CEH, 2EH, 0AEH, 6EH, 0EEH, 1EH, 9EH, 5EH, 0DEH, 3EH, 0BEH, 7EH, 0FEH - .DB 01H, 81H, 41H, 0C1H, 21H, 0A1H, 61H, 0E1H, 11H, 91H, 51H, 0D1H, 31H, 0B1H, 71H, 0F1H - .DB 09H, 89H, 49H, 0C9H, 29H, 0A9H, 69H, 0E9H, 19H, 99H, 59H, 0D9H, 39H, 0B9H, 79H, 0F9H - .DB 05H, 85H, 45H, 0C5H, 25H, 0A5H, 65H, 0E5H, 15H, 95H, 55H, 0D5H, 35H, 0B5H, 75H, 0F5H - .DB 0DH, 8DH, 4DH, 0CDH, 2DH, 0ADH, 6DH, 0EDH, 1DH, 9DH, 5DH, 0DDH, 3DH, 0BDH, 7DH, 0FDH - .DB 03H, 83H, 43H, 0C3H, 23H, 0A3H, 63H, 0E3H, 13H, 93H, 53H, 0D3H, 33H, 0B3H, 73H, 0F3H - .DB 0BH, 8BH, 4BH, 0CBH, 2BH, 0ABH, 6BH, 0EBH, 1BH, 9BH, 5BH, 0DBH, 3BH, 0BBH, 7BH, 0FBH - .DB 07H, 87H, 47H, 0C7H, 27H, 0A7H, 67H, 0E7H, 17H, 97H, 57H, 0D7H, 37H, 0B7H, 77H, 0F7H - .DB 0FH, 8FH, 4FH, 0CFH, 2FH, 0AFH, 6FH, 0EFH, 1FH, 9FH, 5FH, 0DFH, 3FH, 0BFH, 7FH, 0FFH -#ENDIF -; -; -; SDSTR_PREFIX .TEXT "SD:$" SDSTR_ARROW .TEXT "-->$" SDSTR_RC .TEXT "RC=$" SDSTR_TOK .TEXT "TOK=$" -SDSTR_OK .TEXT "OK$" -SDSTR_ERR .TEXT "ERR$" -SDSTR_ERRRDYTO .TEXT "READY TIMEOUT$" -SDSTR_ERRINITTO .TEXT "INIT TIMEOUT$" -SDSTR_ERRCMD .TEXT "CMD ERR$" -SDSTR_ERRDATA .TEXT "DATA ERR$" +SDSTR_STOK .TEXT "OK$" SDSTR_SDTYPE .TEXT "SD CARD TYPE: $" ; +SDSTR_STNOTRDY .TEXT "NOT READY$" +SDSTR_STRDYTO .TEXT "READY TIMEOUT$" +SDSTR_STINITTO .TEXT "INITIALIZATION TIMEOUT$" +SDSTR_STCMDTO .TEXT "COMMAND TIMEOUT$" +SDSTR_STCMDERR .TEXT "COMMAND ERROR$" +SDSTR_STDATAERR .TEXT "DATA ERROR$" +SDSTR_STDATATO .TEXT "DATA TIMEOUT$" +SDSTR_STCRCERR .TEXT "CRC ERROR$" +SDSTR_STUNK .TEXT "UNKNOWN$" +; ;================================================================================================== ; SD DISK DRIVER - DATA ;================================================================================================== @@ -1033,6 +1134,8 @@ SD_STAT .DB 0 SD_TYPE .DB 0 SD_RC .DB 0 SD_TOK .DB 0 +SD_OPSVAL .DB 0 +SD_LCNT .DB 0 ; LOOP COUNTER SD_CMDBUF .EQU $ SD_CMD .DB 0 SD_CMDP0 .DB 0 diff --git a/Source/sd_data.asm b/Source/sd_dph.asm similarity index 87% rename from Source/sd_data.asm rename to Source/sd_dph.asm index 0a6e665e..71bc710e 100644 --- a/Source/sd_data.asm +++ b/Source/sd_dph.asm @@ -7,10 +7,10 @@ SD_SLICETRKS .EQU 65 ; TRACKS PER SLICE SD_TRKSIZE .EQU 128 ; SIZE OF TRACK (IN KB) SD_SLICESIZE .EQU ((SD_SLICETRKS * SD_TRKSIZE) + 1023) / 1024 ; SIZE OF EACH SLICE (IN MB) SD_NUMSLICES .EQU SDCAPACITY / SD_SLICESIZE ; TOTAL SLICES IN DEVICE -SD0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR UNIT 0 -SD1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR UNIT 1 -SD2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR UNIT 0 -SD3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR UNIT 1 +SD0_SLICEDEF .EQU 0 ; DEFAULT SLICE FOR LOGICAL UNIT 0 +SD1_SLICEDEF .EQU 1 ; DEFAULT SLICE FOR LOGICAL UNIT 1 +SD2_SLICEDEF .EQU 2 ; DEFAULT SLICE FOR LOGICAL UNIT 2 +SD3_SLICEDEF .EQU 3 ; DEFAULT SLICE FOR LOGICAL UNIT 3 ; .DB DIODEV_SD + 0 SDDPH0 .DW 0000,0000 diff --git a/Source/std.asm b/Source/std.asm index cd14fe07..37e02168 100644 --- a/Source/std.asm +++ b/Source/std.asm @@ -99,6 +99,16 @@ PPIDEMODE_NONE .EQU 0 PPIDEMODE_STD .EQU 1 ; STANDARD N8VEM PARALLEL PORT PPIDEMODE_DIO3 .EQU 2 ; DISKIO V3 PARALLEL PORT ; +; SD MODE SELECTIONS +; +SDMODE_NONE .EQU 0 +SDMODE_JUHA .EQU 1 ; JUHA MINI BOARD +SDMODE_N8 .EQU 2 ; N8-2511, UNMODIFIED +SDMODE_CSIO .EQU 3 ; N8-2312 OR N8-2511 MODIFIED +SDMODE_PPI .EQU 4 ; PPISD MINI BOARD +SDMODE_UART .EQU 5 ; S2ISD +SDMODE_DSD .EQU 6 ; DUAL SD +; ; CONSOLE TERMINAL TYPE CHOICES ; TERM_TTY .EQU 0