0001 *********************************************************** 0002 * SOL System III/IV * 0003 * * 0004 * VIDEO TO HARDCOPY MEDIA CONVERSION * 0005 * * 0006 * By * 0007 * * 0008 * E S V Computer Service (78/10/15) * 0009 * * 0010 * COPYRIGHT (C) 1978 ALL RIGHTS RESERVED * 0011 *********************************************************** 0012 * 0013 * 0014 * 0015 *********************************************************** 0016 * MEDIA CONVERSION should be assembled as part of the * 0017 * source program that will use this facility by using the * 0018 * 'COPY' assembly command. Execution of this routine may * 0019 * be controlled by testing the keyboard input for unique * 0020 * characters such as 'TAB' or a control character. * 0021 *********************************************************** 0022 * 0023 * 0024 * 0025 *********************************************************** 0026 * SYSTEM EQUATES: Remove if already defined elsewhere in * 0027 * your source program or a 'D' error may occur. * 0028 *********************************************************** 0029 CRLF EQU 0C2F9H 0030 BOT EQU 0C80AH 0031 OPORT EQU 0C807H 0032 SOUT EQU 0C019H 0033 * 0034 * 0035 * 0036 *********************************************************** 0037 * NOTE: This utility is intended for stand alone machine * 0038 * coded programs using SOLOS or BOOTLOAD personal- * 0039 * ity modules AND IS NOT SUPPORTED by PTDOS CONOUT * 0040 * which uses an internal VDM driver. * 0041 *********************************************************** 0042 * 0043 * 0044 * 0045 *********************************************************** 0046 * OPORT is set to output data to the serial, parallel, or * 0047 * custom output port by selecting '1','2', or '3' for the * 0048 * accumulator value and restoring the video (0) at return * 0049 *********************************************************** 0050 * 0051 * 0052 * 0053 ENTRY PUSH PSW ;Save all registers on entry 0054 PUSH H 0055 PUSH D 0056 PUSH B 0057 STA TEMP1 0058 MVI A,1 ;Now set for serial port - Change as needed 0059 STA OPORT ;Load with 1, 2, or 3 for your port 0060 WHERE LXI H,0CC00H ;Calculate where the first line starts 0061 LDA BOT ;Get the text displacement value 0062 LXI B,64 ;Start of next line is equal to Address + 64 0063 WHER2 DAD B ;Add # of char. per line to current addr 0064 DCR A ;See if first line has been located yet 0065 JZ FOUND ;Yes we have... 0066 JMP WHER2 ;Nope, not yet... 0067 * 0068 * 0069 * 0070 FOUND SHLD START ;Store our starting address 0071 CALL CRLF ;Give us a little room 0072 MVI A,64 ;Maximum characters per line 0073 STA TEMP2 ;Store char. count 0074 LHLD START ;Restore starting address 0075 PRINT MOV B,M ;Get the character 0076 CALL SOUT ;Print it 0077 INX H ;Set up for next character 0078 CALL EOL ;Are we at end of line? 0079 CALL LOOP ;Are we at end of VDM RAM? 0080 JMP DONE ;Have we transferred all lines? 0081 * 0082 * 0083 * 0084 EOL LDA TEMP2 ;Get the last count seen 0085 DCR A ;Decrease it by one 0086 CPI 0 ;Reached zero yet? 0087 JNZ EOL2 ;Not at End Of Line yet 0088 MVI A,64 ;Reached EOL, restore character count 0089 STA TEMP2 ;Store maximum character count 0090 JMP CRLF ;Need a new line now 0091 EOL2 STA TEMP2 ;Store current char. count down 0092 RET 0093 * 0094 * 0095 * 0096 LOOP MOV A,H 0097 CPI 0D0H ;Did we leave the VDM RAM area? 0098 RNZ 0099 LXI H,0CC00H ;Restore start of VDM RAM 0100 RET 0101 * 0102 * 0103 * 0104 DONE XCHG ;Save current address in D & E 0105 LHLD START ;Where did we start first line? 0106 MOV A,L ;Get LO address to accumulator 0107 CMP E 0108 JZ DONE2 ;Gotta match. What about HI? 0109 JMP DONE3 ;We are not yet done 0110 DONE2 MOV A,H ;Get HI Address to accumulator 0111 CMP D 0112 JZ DONE4 ;All screen data printed. Go home now. 0113 DONE3 XCHG ;Restore the next VDM address 0114 JMP PRINT 0115 DONE4 CALL CRLF 0116 XRA A 0117 STA OPORT ;OPORT now reset to video port 0118 LDA TEMP1 ;Restore ALL Registers 0119 POP B 0120 POP D 0121 POP H 0122 POP PSW 0123 RET 0124 *********************************************************** 0125 * DEFINE STORAGE locations required for temporary values * 0126 *********************************************************** 0127 ADDR1 DW 0 ;Where we've come from 0128 CURNT DW 0 ;Current video line being scanned 0129 START DW 0 ;VDM RAM starting point 0130 TEMP1 DB 0 ;Save accumulator for later restoration 0131 TEMP2 DB 0 ;Char. count down value 0132 * 0133 * 0134 * 0135 *********************************************************** 0136 * SOL System III/IV * 0137 * * 0138 * VIDEO TO HARDCOPY MEDIA CONVERSION * 0139 * * 0140 * By * 0141 * * 0142 * E S V Computer Service (78/10/15) * 0143 * * 0144 * COPYRIGHT (C) 1978 ALL RIGHTS RESERVED * 0145 ***********************************************************