The following file is a complete set of instructions for installing Turbo Pascal V3 (or V2) on a DEC VT180 Robin, CP/M 2.2 system. The BIOS patch is already set for Robin BIOS 1.1, but can be edited for 1.0. This is a consolidation of information in notes 31.x and 36, plus the autoboot section at the end of the file has been added. If you have already used the older layout in notes 31,36 the BIOS patch is identical, and STILL needed. The keypad layout has been slightly changed to closer match EDT. The changed keys are now: Word Left ^K Insert Line keypad 4 key Left on line keypad 0 key. <-- this was the biggest change needed Mod. 20-APR-85 changed keypad slightly from original layout - as close to EDT as is possible on a Robin. The patch described below is also necessary for TURBO Version 3.0 on a VT180. Sigh.... Here is the full TURBO installation and keypad layout for a VT180, updated with the BIOS patch to correct the VT180 problems, and with an easy way to patch CP/M to autoload the patch each time you warm boot. If you print the keypad diagram in 16.5 cpi pitch, it fits nicely on the Robin terminal front. ************************************************************************ These are the required settings to successfully install TURBO PASCAL on a DEC VT180 terminal (VT100). The terminal definition listed here is almost the same as the standard ANSI terminal choice offered on the TINST menu. However, there are some minor differences. You may select either "ANSI" as your terminal type, and then enter the new values only where differences appear, or just use the "None of the above" choice, and define it all from scratch. It is recommended that you use decimal numbers as the input values, rather than typing in the keys themselves, for example, enter 27 61 instead of ESC = . Using this method precludes having any problems getting TINST to recognize what you're trying to enter. Installation: Load your TURBO working copy disk in drive A. Type TINST Press "S" for Screen installation Select "None of the above" from the menu of terminals. (All responses will be either Y/N or decimal input values as shown.) Do you want to modify this terminal definition before installation: Y Terminal type: DEC VT180 Robin Send an initialization string to the terminal: Y Command: 27 61 (esc =) Send a reset string to the terminal: Y Command: 27 62 (esc >) CURSOR POSITIONING COMMAND to send between row and column: 59 (;) CURSOR POSITIONING COMMAND to send after line and column: 72 (H) Column first: N Offset to add to LINE: 1 Offset to add to COLUMN: 1 Binary address: N 2 or 3 ASCII digits: 2 CLEAR SCREEN command: 27 91 50 74 (esc [ 2 J) Does CLEAR SCREEN also HOME cursor: N HOME CURSOR command: 27 91 102 (esc [ f) DELETE LINE command: - (hyphen here means "none") ERASE TO END OF LINE command: 27 91 75 (esc [ K) Start Highlighted Video command: 27 91 49 109 (esc [ 1 m) END highlighted video command: 27 91 48 109 (esc [ 0 m) Number of ROWS on your screen: 24 Number of COLUMNS: 80 Delay after cursor address: 0 Delay after CLEAR, DELETE, INSERT: 0 Delay after ERASE TO END OF LINE and HIGHLIGHT: 0 Is this definition correct: Y Operating frequency of your microprocessor in MHz: 4 (The terminal definition data is now written out to disk) The above definition is required for the VT180 screen handling. It is set up to work with the following EDT-like mini-keypad editor layout, which is much easier to use than the WORDSTAR-style definitions. Now select "C" from the TINST menu (command definitions) NOTE: THIS CHANGES THE KEYPAD TO APPLICATION MODE (LIKE EDT) AND THE NUMBERS HAVE DIFFERENT MEANINGS) Now enter to change the commands. 1. character left press left arrow 2. alternate hyphen 3. character right press right arrow 4. word left 11 Ctrl-K 5. word right 27 79 113 ESC O q 6. line up press up arrow 7. line down press down arrow 8. scroll up 23 21 Ctrl-W Ctrl-U 9. scroll down 23 4 Ctrl-W Ctrl-D 10. page up 16 21 Ctrl-P Ctrl-U 11. page down 16 4 Ctrl-P Ctrl-D 12. left on line 27 79 112 ESC O p 13. right on line 12 Ctrl-L 14. top of page 16 20 Ctrl-P Ctrl-T 15. bottom of page 16 2 Ctrl-P Ctrl-B 16. top of file 20 Ctrl-T 17. bottom of file 3 Ctrl-C 18. beginning of block 2 2 Ctrl-B Ctrl-B 19. end of block 2 5 Ctrl-B Ctrl-E 20. last cursor position 21 Ctrl-U 21. insert mode on/off 22 Ctrl-V 22. insert line 27 79 116 ESC O t 23. delete line 27 79 83 ESC O S 24. delete to end of line 27 79 114 ESC O r 25. delete right word 27 79 109 ESC O m 26. delete character under cursor 27 79 108 ESC O l 27. delete left character 28. alternate hyphen 29. mark block begin 27 79 110 ESC O n 30. mark block end 27 79 77 ESC O M 31. mark single word 25 Ctrl-Y 32. hide/display block 27 79 115 ESC O s 33. copy block 27 79 119 ESC O w 34. move block 27 79 120 ESC O x 35. delete block 27 79 121 ESC O y 36. read block from disk 27 79 117 ESC O u 37. write block from disk 27 79 118 ESC O v 38. end edit 26 Ctrl-Z (like edt) 39. tab 9 Ctrl-I 40. auto tab on/off 1 Ctrl-A 41. restore line 18 Ctrl-R 42. find 27 79 80 ESC O P 43. find and replace 27 79 81 ESC O Q 44. repeat last find 27 79 82 ESC O R 45. control characer prefix 30 Ctrl-^ TURBO VT180 Keypad v1.1 PF1 PF2 PF3 PF +-------+-------+-------+-------+ Scroll up ^W^U | Find | Find | Repeat| Del | Scroll down ^W^D | | & | | | Page Up ^P^U | | Repl | Find | Line | Page Down ^P^D +-------+-------+-------+-------+ Top of Page ^P^T +-------+-------+-------+-------+ Bot of Page ^P^B | 7| 8| 9| -| Top of File ^T | Copy | Move | Del | Del | Bot of File ^C | Block | Block | Block | Word | Beg of Block ^B^B +-------+-------+-------+-------+ End of Block ^B^E | 4| 5| 6| ,| Word Left ^K | Insert| Read | Write | Del | Right on Line ^L | Line | Disk | Disk | Char | Tab ^I +-------+-------+-------+-------+ AutoTab On/Off ^A | 1| 2| 3| | Restore Line ^R | Word | Del | Hide | Mark | Mark Single Block ^Y | Right | EOL | Block | | Restore Cursor ^U +-------+-------+-------+ End | Toggle Insert ^V | 0| Mark .| | | Left on Line | Begin | Block | End Edit ^Z | | Block | | +---------------+-------+-------+ *************************************************************** The attached program will fix the Turbo bug for VT180's, but it *must* be configured for the correct version of your BIOS, either V1.0 or V1.1. DO NOT use it for ZCPR2 BIOS. Use your favorite editor to extract the source code listed here for TURBO180.ASM, and follow the instructions in the code to create the executable file. ---------------------- CUT HERE ------------------------------------ ; TURBO180.ASM -- 11/23/84 ; Patch program for DEC VT-180's to enable them to correctly ; run Turbo Pascal. The fix consists of patching in code to ; save and restore the index register IX when Turbo calls ; the CONIN and CONOUT from inside the text editor. Other ; BIOS calls do not seem to have this problem. ; ; *************** I M P O R T A N T ************************************* ; ; THIS PATCH IS HEAVILY DEPENDENT ON THE VERSION OF CP/M BIOS THAT YOU ; ARE USING. You must check the BIOS version that you are using, and ; configure the program appropriately, as described below. IT WILL ONLY ; WORK WITH ONE OF EITHER V1.0 OR V1.1 OF THE DEC VERSIONS OF CP/M ON THE ; VT-180. ; ; You can tell by looking at the greeting message that you get when you ; boot up your system. If it says something like "CP/M 2.2 (1.0)", then ; you have a V1.0 BIOS. (Some of the distributions of ZCPR1 were based ; on V1.0.) You can then assemble and load this file as distributed, then ; run it before you run TURBO. For example, assuming all files on A: ; ----------------------- ; A>ASM TURBO180.AAZ <-compile, getting HEX but no PRN output ; A>LOAD TURBO180 <-load it, getting TURBO180.COM ; ; A>TURBO180 <-run it before going to TURBO ; A>TURBO ; If you have a V1.1 BIOS, the greeting would have been something like ; "CP/M 2.2 (1.1)". In this case, you must edit the following assembly ; option switch from V10 EQU TRUE to V11 EQU TRUE, which will use the ; alternate definition lines. You can then proceed as ; in the above example. ; If you are using a ZCPR2 or ZCPR3 system, then you have a totally ; different BIOS, and a different patch is needed. This patch is based on ; that earlier patch for ZCPR2, which I called TPATCH.MAC. ; ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; TURBO180.ASM ; Copyright (C) 1984, by Walter Lamia ; 93 Central St. ; Acton, MA 01720 ; ; released to the public domain on 11/23/84, by the author. ;----------------------------------------------------------------------------- FALSE EQU 0 TRUE EQU NOT FALSE V10 EQU TRUE ;set only ONE of these to TRUE, depending V11 EQU FALSE ; on your version of the CP/M BIOS IF V10 ; define some fixed locations in CP/M, for DEC V1.0 of CP/M 2.2 PCRTIN EQU 0F705H ;"IN" entry point of the physical CRT driver PCRTOUT EQU 0F70CH ;"OUT" " " " T$CRTCB EQU 0F50FH ;CRT device control block P232IN EQU 0F482H ;device port driver P232OUT EQU 0F4A7H ; " " " PCRTOUT1 EQU 0F71CH ; " " " alt. entry PVT100XC EQU 0F468H ;recycled old VT125 subroutine area ENDIF ; V10 IF V11 ; use these definitions instead for DEC V1.1 of CP/M 2.2 pcrtin equ 0f70eh pcrtout equ 0f715h t$crtcb equ 0f518h p232in equ 0f48bh p232out equ 0f4b0h pcrtout1 equ 0f725h pvt100xc equ 0f471h ENDIF ; V11 ORG 100H START: LXI B,PATCH1 ;ADDR OF PATCH AREA -> B LXI H,PCRTIN ;ADDR OF THE DESTINATION OF THE PATCHES -> H CALL BLT ;USE A SUBR. TO BLOCK TRANSFER LXI B,PATCH2 LXI H,PCRTOUT1 CALL BLT LXI B,PATCH3 LXI H,PVT100XC CALL BLT RET BLT: LDAX B ;GET A BYTE FROM PATCH AREA ORA A ;CHECK TO SEE IF THIS PATCH BYTE IS 0 RZ ; IF SO, RETURN NOW MOV M,A INX B ;INCREMENT THE SOURCE AND DEST. POINTERS INX H JMP BLT ; ; ------------------------------------------------------------------ ;the start of the patch overlay area PATCH1: ;PCRTIN: ;goes at F705, over old PCRTIN ; STIX SAVEIX ;simulate a `store IX' instr. DB 0DDH,22H DW SAVEIX JMP CALP232IN ;need more space to continue, below... ;PCRTOUT: ;goes at F70C, just after PCRTIN ; STIX SAVEIX ;`save' the IX DB 0DDH,22H DW SAVEIX ; LXIX T$CRTCB ;load IX with the ctrl.blk. address DB 0DDH,21H DW T$CRTCB CALL P232OUT ;do a `call' to the port driver, not JMP ; LDIX SAVEIX ; and on return, restore IX DB 0DDH,02AH DW SAVEIX RET ;do the `real' return from here DW 0 PATCH2: ;goes at F71C, over PCRTOUT1 JMP PCRTOUT DW 0 PATCH3: ;goes at F468, recycle PVT100XC area CALP232IN EQU PVT100XC PC EQU $ ;do this to find where SAVEIX will fall ;the rest of the PCRTIN code is here... ; LXIX T$CRTCB ; (basically the same as above) DB 0DDH,21H DW T$CRTCB CALL P232IN ; LDIX SAVEIX DB 0DDH,02AH DW SAVEIX RET SAVEIX EQU CALP232IN + $ - PC DW 0 ;place to save IX. also marks the end ;of the patch area. END START (******** End of patch program. *****************************************) Subject: CP/M patch for ROBIN TURBO PASCAL (auto-execute on TURBO boot-up) NOTE: This procedure will describe how to specifically patch your VT180 CP/M system on your TURBO PASCAL disk to autoboot the aforementioned BIOS patch to correct the Highlighting & other problems known to exist in the VT180-version of TURBO. (For safety's sake, make a copy of your present CP/M working copy diskette before proceeding - put your working copy away, and use your new copy for the following operations. ) Copy just the 2 TURBO files needed to run TURBO onto the working copy disk: TURBO.COM TURBO.MSG Also, copy over TURBO180.COM, which you have just generated as described above. You won't be patching either of these files at all; they are just there to check out how well the patch worked when you're done. Put your normal, everyday-copy CP/M system disk in B, patch disk with TURBO in A B>^C <--- type a CTRLC to reboot B>A: <--- set default to A A>^C <--- type a CTRLC to reboot A>B:SYSGEN <--- type "SYSGEN" SYSGEN VER 2.2 SOURCE DRIVE NAME (OR RETURN TO SKIP)A <--- type "A" SOURCE ON A, THEN TYPE RETURN <--- type FUNCTION COMPLETE DESTINATION DRIVE NAME (OR RETURN TO REBOOT) <--- type A>SAVE 35 CPM.COM <--- saving memory image in file CPM.COM A>B:DDT CPM.COM DDT VERS 2.2 NEXT PC 2400 0100 -D980 99F <--- display memory locations 0980(hex) to 098F(hex) 0980 C3 5C DF C3 58 DF 7F 00 20 20 20 20 20 20 20 20 .\..X... 0990 20 20 20 20 20 20 20 20 43 4F 50 59 52 49 47 48 COPYRIGH -S987 <--- inserting hex code into memory 0987 00 08 <--- # of ASCII characters in command 0988 20 54 <--- ASCII code for "T" 0989 20 55 <--- ASCII code for "U" 098A 20 52 <--- ASCII code for "R" 098B 20 42 <--- ASCII code for "B" 098C 20 4F <--- ASCII code for "O" 098D 20 31 <--- ASCII code for "1" 098E 20 38 <--- ASCII code for "8" 098F 20 30 <--- ASCII code for "0" 0990 20 00 <--- must end with "00" 0991 20 . <--- this ends insert mode -D980 99F <--- check memory locations 0980(hex) to 098F(hex) 0980 C3 5C DF C3 58 DF 7F 08 54 55 52 42 4F 31 38 30 .\..X...TURBO180 0990 00 20 20 20 20 20 20 20 43 4F 50 59 52 49 47 48 . COPYRIGH -^C <--- terminate DDT session A>SAVE 35 CPM.COM <--- saving memory image again A>B:SYSGEN <--- entering "SYSGEN" again SYSGEN VER 2.2 SOURCE DRIVE NAME (OR RETURN TO SKIP) <--- type DESTINATION DRIVE NAME (OR RETURN TO REBOOT)A <--- type "A" DESTINATION ON A, THEN TYPE RETURN <--- type FUNCTION COMPLETE DESTINATION DRIVE NAME (OR RETURN TO REBOOT) <--- type (command "TURBO180" should execute here - you won't see anything happen, but the patch will have been loaded into memory, as it will anytime you ^C your TURBO disk.) A>ERA CPM.COM <--- CPM.COM no longer needed A> <--- ready for input The changes made affect only the system tracks of the diskette - to copy this "new" CP/M to another diskette, do a DDCOPY and copy just the S(YSTEM) tracks. You can check out the TURBO now. Boot up the work disk, assign some junk name as the work file (JUNK.PAS, etc) and then try the READ DISK function in the editor, using TURBO.MSG as the input file. It should now work as you would expect it to, instead of displaying only the first letter typed as it did before the patch. The FIND & REPLACE type functions will also work correctly now. Try finding the word "expected". Once you have DDCOPY'd the new patched version of CP/M onto the system tracks of your real TURBO disk and have also copied over TURBO180.COM to the disk, anytime you boot the TURBO disk, the patch will be autoloaded for you -- painlessly!!!! You'll never forget to load it!