7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 1 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (1) ; 0001 0 ! ; 0002 0 %TITLE 'LASER_SYMBIONT' ; 0003 0 MODULE laser_symbiont (IDENT = 'V001-01', ! File: LASER_SYMBIONT.BLI ; 0004 0 MAIN = ls_main ; 0005 0 ) = ; 0006 1 BEGIN ; 0007 1 ; 0008 1 !++ ; 0009 1 ! ; 0010 1 ! FACILITY: User modified print symbiont ; 0011 1 ! ; 0012 1 ! ABSTRACT: This user modified print symbiont will prevent the laser printer ; 0013 1 ! from ejecting a blank page at the beginning of each job, when the ; 0014 1 ! symbiont first starts up, and when the first character of a file ; 0015 1 ! is a form feed (listing files). ; 0016 1 ! ; 0017 1 ! ENVIRONMENT: VAX/VMS, user mode ; 0018 1 ! ; 0019 1 ! AUTHOR: Brian K Catlin ; 0020 1 ! ; 0021 1 ! CREATED: 9-JAN-1990 ; 0022 1 ! ; 0023 1 ! MODIFICATION ; 0024 1 ! HISTORY: ; 0025 1 ! ; 0026 1 ! V001-1 Brian K Catlin, James A Gray 9-JAN-1990 ; 0027 1 ! Original version. ; 0028 1 ! ; 0029 1 !-- ; 0030 1 LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 2 V001-01 Declarations 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (2) ; 0032 1 %SBTTL 'Declarations' ; 0033 1 ; 0034 1 !+ ; 0035 1 ! SWITCHES: ; 0036 1 !- ; 0037 1 ; 0038 1 SWITCHES ADDRESSING_MODE (EXTERNAL = GENERAL, NONEXTERNAL = WORD_RELATIVE); ; 0039 1 ; 0040 1 !+ ; 0041 1 ! LINKAGE/GLOBAL REGISTERS: ; 0042 1 !- ; 0043 1 ; 0044 1 ! None. ; 0045 1 ; 0046 1 !+ ; 0047 1 ! LINKAGES: ; 0048 1 !- ; 0049 1 ; 0050 1 ! None. ; 0051 1 ; 0052 1 !+ ; 0053 1 ! INCLUDE FILES: ; 0054 1 !- ; 0055 1 ; 0056 1 LIBRARY 'SYS$LIBRARY:LIB'; ! VMS executive macros/symbols ; 0057 1 ; 0058 1 LIBRARY 'USR_LIBRARY:USRLIB'; ! Our macros/symbols ; 0059 1 ; 0060 1 REQUIRE 'LASER_DEFS'; ! Local definitions ; 0086 1 ; 0087 1 !+ ; 0088 1 ! TABLE OF CONTENTS: ; 0089 1 !- ; 0090 1 ; 0091 1 FORWARD ROUTINE ; 0092 1 ls_main, ! Main entrypoint into the symbiont ; 0093 1 ls_output_filter, ! Filters output stream ; 0094 1 ls_page_setup; ! Handles page setup ; 0095 1 ; 0096 1 !+ ; 0097 1 ! MACROS: ; 0098 1 !- ; 0099 1 ; 0100 1 ! None. ; 0101 1 ; 0102 1 !+ ; 0103 1 ! FIELDS: ; 0104 1 !- ; 0105 1 ; 0106 1 ! None. ; 0107 1 ; 0108 1 !+ ; 0109 1 ! STRUCTURES: ; 0110 1 !- ; 0111 1 ; 0112 1 ! None. ; 0113 1 ; 0114 1 !+ ; 0115 1 ! PROGRAM SECTION DECLARATIONS: ; 0116 1 !- ; 0117 1 ; 0118 1 ! None. ; 0119 1 LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 3 V001-01 Declarations 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (2) ; 0120 1 !+ ; 0121 1 ! EQUATED SYMBOLS: ; 0122 1 !- ; 0123 1 ; 0124 1 LITERAL ; 0125 1 k_false = 0, ; 0126 1 k_true = 1; ; 0127 1 ; 0128 1 !+ ; 0129 1 ! OWN (R/O) STORAGE: ; 0130 1 !- ; 0131 1 ; 0132 1 !+ ; 0133 1 ! Build a string descriptor that points to a string containing a carriage return ; 0134 1 ! and a form feed. This is the string we will strip from the beginning of the job. ; 0135 1 !- ; 0136 1 ; 0137 1 BIND ; 0138 1 ls_r_crff = $descriptor (%CHAR (smg$k_trm_cr), %CHAR (smg$k_trm_ff)) : BLOCK [, BYTE]; ; 0139 1 ; 0140 1 !+ ; 0141 1 ! OWN (R/W) STORAGE: ; 0142 1 !- ; 0143 1 ; 0144 1 ! None. ; 0145 1 ; 0146 1 !+ ; 0147 1 ! BUILTIN DECLARATIONS: ; 0148 1 !- ; 0149 1 ; 0150 1 BUILTIN ; 0151 1 TESTBITCS; ! Effectively a BBCS instruction ; 0152 1 ; 0153 1 !+ ; 0154 1 ! EXTERNAL ROUTINES: ; 0155 1 !- ; 0156 1 ; 0157 1 EXTERNAL ROUTINE ; 0158 1 psm$page_setup, ! VMS symbiont page setup ; 0159 1 psm$print, ! Tell the VMS print symbiont to processing ; 0160 1 psm$read_item_dx, ! Read item from VMS symbiont ; 0161 1 psm$replace, ! Replace a standard VMS print symbiont routine ; 0162 1 str$analyze_sdesc, ! Analyze string descriptor ; 0163 1 str$copy_r; ! Copy a string by reference ; 0164 1 ; 0165 1 !+ ; 0166 1 ! EXTERNAL REFERENCES: ; 0167 1 !- ; 0168 1 ; 0169 1 EXTERNAL ; 0170 1 psm$_eof, ! End of input ; 0171 1 psm$_funnotsup; ! Function not supported ; 0172 1 LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 4 V001-01 LS_MAIN - Laser Symbiont main entry point 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (3) ; 0174 1 %SBTTL 'LS_MAIN - Laser Symbiont main entry point' ; 0175 1 ROUTINE ls_main = ; 0176 1 ; 0177 1 !++ ; 0178 1 ! ; 0179 1 ! FUNCTIONAL DESCRIPTION: ; 0180 1 ! ; 0181 1 ! This routine gains control from VMS and initializes the print symbiont. ; 0182 1 ! ; 0183 1 ! ENVIRONMENT: ; 0184 1 ! ; 0185 1 ! All access modes, AST reentrant ; 0186 1 ! ; 0187 1 ! CALLING SEQUENCE: ; 0188 1 ! ; 0189 1 ! Called by the image activator (we're a detached process) ; 0190 1 ! ; 0191 1 ! LINKAGE: ; 0192 1 ! ; 0193 1 ! CALL ; 0194 1 ! ; 0195 1 ! FORMAL PARAMETERS: ; 0196 1 ! ; 0197 1 ! None. ; 0198 1 ! ; 0199 1 ! IMPLICIT INPUTS: ; 0200 1 ! ; 0201 1 ! None. ; 0202 1 ! ; 0203 1 ! IMPLICIT OUTPUTS: ; 0204 1 ! ; 0205 1 ! None. ; 0206 1 ! ; 0207 1 ! COMPLETION CODES: ; 0208 1 ! ; 0209 1 ! SS$_NORMAL Normal successful completion ; 0210 1 ! Anything returned by PSM$PRINT, or PSM$PRINT ; 0211 1 ! ; 0212 1 ! SIDE EFFECTS: ; 0213 1 ! ; 0214 1 ! None. ; 0215 1 ! ; 0216 1 !-- ; 0217 1 ; 0218 2 BEGIN ; 0219 2 ; 0220 2 LOCAL ; 0221 2 l_status : LONG; ; 0222 2 ; 0223 2 !+ ; 0224 2 ! Replace some routines in the standard symbiont. ; 0225 2 !- ; 0226 2 ; 0227 3 IF (l_status = psm$replace (%REF (psm$k_output_filter), ls_output_filter)) ; 0228 2 THEN ; 0229 3 BEGIN ; 0230 3 ; 0231 4 IF (l_status = psm$replace (%REF (psm$k_page_setup), ls_page_setup)) ; 0232 3 THEN ; 0233 4 BEGIN ; 0234 4 ; 0235 4 !+ ; 0236 4 ! Start the symbiont. Only returns if symbiont is stopped or a fatal error LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 5 V001-01 LS_MAIN - Laser Symbiont main entry point 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (3) ; 0237 4 ! has occurred. ; 0238 4 !- ; 0239 4 ; 0240 4 l_status = psm$print (%REF (16), 0, %REF (sctx_s_sctxdef)); ; 0241 3 END; ; 0242 3 ; 0243 2 END; ; 0244 2 ; 0245 2 !+ ; 0246 2 ! If bad status, then signal it. ; 0247 2 !- ; 0248 2 ; 0249 3 IF NOT (.l_status) ; 0250 2 THEN ; 0251 3 BEGIN ; 0252 3 SIGNAL (.l_status); ; 0253 2 END; ; 0254 2 ; 0255 2 RETURN (.l_status); ; 0256 1 END; ! End of routine LS_MAIN .TITLE LASER_SYMBIONT LASER_SYMBIONT .IDENT \V001-01\ .PSECT $PLIT$,NOWRT,NOEXE,2 0D 00000 P.AAB: .ASCII <13> ; 0C 00001 .ASCII <12> ; 00002 .BLKB 2 00000002 00004 P.AAA: .LONG 2 ; 00000000' 00008 .ADDRESS P.AAB ; LS_R_CRFF= P.AAA .EXTRN PSM$PAGE_SETUP, PSM$PRINT .EXTRN PSM$READ_ITEM_DX .EXTRN PSM$REPLACE, STR$ANALYZE_SDESC .EXTRN STR$COPY_R, PSM$_EOF .EXTRN PSM$_FUNNOTSUP .PSECT $CODE$,NOWRT,2 000C 00000 LS_MAIN:.WORD Save R2,R3 ; 0175 53 00000000G 00 9E 00002 MOVAB PSM$REPLACE, R3 ; 5E 08 C2 00009 SUBL2 #8, SP ; 0000V CF 9F 0000C PUSHAB LS_OUTPUT_FILTER ; 0227 08 AE 06 D0 00010 MOVL #6, 8(SP) ; 08 AE 9F 00014 PUSHAB 8(SP) ; 63 02 FB 00017 CALLS #2, PSM$REPLACE ; 52 50 D0 0001A MOVL R0, L_STATUS ; 31 52 E9 0001D BLBC L_STATUS, 1$ ; 0000V CF 9F 00020 PUSHAB LS_PAGE_SETUP ; 0231 08 AE 01 D0 00024 MOVL #1, 8(SP) ; 08 AE 9F 00028 PUSHAB 8(SP) ; 63 02 FB 0002B CALLS #2, PSM$REPLACE ; 52 50 D0 0002E MOVL R0, L_STATUS ; 1D 52 E9 00031 BLBC L_STATUS, 1$ ; 04 AE 04 D0 00034 MOVL #4, 4(SP) ; 0240 04 AE 9F 00038 PUSHAB 4(SP) ; 7E D4 0003B CLRL -(SP) ; 08 AE 10 D0 0003D MOVL #16, 8(SP) ; 08 AE 9F 00041 PUSHAB 8(SP) ; 00000000G 00 03 FB 00044 CALLS #3, PSM$PRINT ; LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 6 V001-01 LS_MAIN - Laser Symbiont main entry point 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (3) 52 50 D0 0004B MOVL R0, L_STATUS ; 09 52 E8 0004E BLBS L_STATUS, 2$ ; 0249 52 DD 00051 1$: PUSHL L_STATUS ; 0252 00000000G 00 01 FB 00053 CALLS #1, LIB$SIGNAL ; 50 52 D0 0005A 2$: MOVL L_STATUS, R0 ; 0255 04 0005D RET ; ; Routine Size: 94 bytes, Routine Base: $CODE$ + 0000 LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 7 V001-01 LS_OUTPUT_FILTER - Filter the output stream 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (4) ; 0258 1 %SBTTL 'LS_OUTPUT_FILTER - Filter the output stream' ; 0259 1 ROUTINE ls_output_filter ( ! ; 0260 1 l_request_id : REF VECTOR [, LONG], ! ; 0261 1 r_sctx : REF sctxdef, ! ; 0262 1 l_function : REF VECTOR [, LONG], ! ; 0263 1 r_input_desc : REF BLOCK [, BYTE], ! ; 0264 1 l_input_arg : REF VECTOR [, LONG], ! ; 0265 1 r_output_desc : REF BLOCK [, BYTE], ! ; 0266 1 l_output_arg : REF VECTOR [, LONG] ! ; 0267 1 ) = ; 0268 1 ; 0269 1 !++ ; 0270 1 ! ; 0271 1 ! FUNCTIONAL DESCRIPTION: ; 0272 1 ! ; 0273 1 ! This routine replaces the PSM$OUTPUT_FILTER routine. In the normal print ; 0274 1 ! symbiont, there is no output filter, (or input filter for that matter), ; 0275 1 ! but we need one here to remove the CR/FF sequences. The output filter is ; 0276 1 ! called between the format routine and the output routine to modify the ; 0277 1 ! output buffer prior to being passed to the output routine. ; 0278 1 ! ; 0279 1 ! ENVIRONMENT: ; 0280 1 ! ; 0281 1 ! All access modes, AST reentrant ; 0282 1 ! ; 0283 1 ! CALLING SEQUENCE: ; 0284 1 ! ; 0285 1 ! Called by the VMS print symbiont ; 0286 1 ! ; 0287 1 ! LINKAGE: ; 0288 1 ! ; 0289 1 ! CALL ; 0290 1 ! ; 0291 1 ! FORMAL PARAMETERS: ; 0292 1 ! ; 0293 1 ! l_request_id ; 0294 1 ! Request identifier supplied by the symbiont ; 0295 1 ! ; 0296 1 ! r_sctx ; 0297 1 ! User context area ; 0298 1 ! ; 0299 1 ! l_function ; 0300 1 ! Function code indicating function to be performed by this routine ; 0301 1 ! ; 0302 1 ! r_input_desc ; 0303 1 ! Input buffer ; 0304 1 ! ; 0305 1 ! l_input_arg ; 0306 1 ! Input argument ; 0307 1 ! ; 0308 1 ! r_output_desc ; 0309 1 ! Output buffer ; 0310 1 ! ; 0311 1 ! l_output_arg ; 0312 1 ! Output argument ; 0313 1 ! ; 0314 1 ! IMPLICIT INPUTS: ; 0315 1 ! ; 0316 1 ! None. ; 0317 1 ! ; 0318 1 ! IMPLICIT OUTPUTS: ; 0319 1 ! ; 0320 1 ! None. LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 8 V001-01 LS_OUTPUT_FILTER - Filter the output stream 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (4) ; 0321 1 ! ; 0322 1 ! COMPLETION CODES: ; 0323 1 ! ; 0324 1 ! SS$_NORMAL Normal successful completion ; 0325 1 ! PSM$_FUNNOTSUP Function not supported ; 0326 1 ! ; 0327 1 ! SIDE EFFECTS: ; 0328 1 ! ; 0329 1 ! None. ; 0330 1 ! ; 0331 1 !-- ; 0332 1 ; 0333 2 BEGIN ; 0334 2 ; 0335 2 LOCAL ; 0336 2 a_pointer : LONG, ; 0337 2 l_status : LONG, ; 0338 2 w_length : WORD; ; 0339 2 ; 0340 2 !+ ; 0341 2 ! Decide what to do based on the function code passed to us by the VMS print symbiont. ; 0342 2 !- ; 0343 2 ; 0344 2 SELECTONE (.l_function [0]) OF ; 0345 2 SET ; 0346 2 ; 0347 2 !+ ; 0348 2 ! Process a chunk to be sent to the printer. ; 0349 2 !- ; 0350 2 ; 0351 2 [psm$k_format] : ; 0352 3 BEGIN ; 0353 3 ; 0354 3 !+ ; 0355 3 ! Get the address and length of the chunk to be written. ; 0356 3 !- ; 0357 3 ; 0358 3 str$analyze_sdesc (r_input_desc [0, 0, 0, 0], w_length, a_pointer); ; 0359 3 ; 0360 3 !+ ; 0361 3 ! If this is the first write since the symbiont was started, then check if the first ; 0362 3 ! characters in the chunk match the CR/FF sequence and if so then remove them from the ; 0363 3 ! record being written. This prevents an unnecessary blank page from being output each ; 0364 3 ! time the symbiont is started. ; 0365 3 !- ; 0366 3 ; 0367 4 IF (.w_length GEQU .ls_r_crff [dsc$w_length]) ; 0368 3 THEN ; 0369 4 BEGIN ; 0370 4 ; 0371 5 IF (TESTBITCS (r_sctx [sctx_v_stream_crff_ignored])) ; 0372 4 THEN ; 0373 5 BEGIN ; 0374 5 ; 0375 6 IF (CH$EQL (.ls_r_crff [dsc$w_length], .a_pointer, .ls_r_crff [dsc$w_length], ; 0376 6 .ls_r_crff [dsc$a_pointer])) ; 0377 5 THEN ; 0378 6 BEGIN ; 0379 6 ; 0380 6 !+ ; 0381 6 ! Skip past the CR/FF characters. ; 0382 6 !- ; 0383 6 LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 9 V001-01 LS_OUTPUT_FILTER - Filter the output stream 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (4) ; 0384 6 a_pointer = .a_pointer + .ls_r_crff [dsc$w_length]; ; 0385 6 w_length = .w_length - .ls_r_crff [dsc$w_length]; ; 0386 5 END; ; 0387 5 ; 0388 4 END; ; 0389 4 ; 0390 3 END; ; 0391 3 ; 0392 3 !+ ; 0393 3 ! If this is the first write for this job, then check if the last characters in the chunk ; 0394 3 ! match the CR/FF sequence and if so then remove them from the record being written. This ; 0395 3 ! prevents an unnecessary blank page from being output. ; 0396 3 !- ; 0397 3 ; 0398 4 IF (.w_length GEQU .ls_r_crff [dsc$w_length]) ; 0399 3 THEN ; 0400 4 BEGIN ; 0401 4 ; 0402 5 IF (TESTBITCS (r_sctx [sctx_v_job_crff_ignored])) ; 0403 4 THEN ; 0404 5 BEGIN ; 0405 5 ; 0406 6 IF (CH$EQL (.ls_r_crff [dsc$w_length], ; 0407 6 .a_pointer + .w_length - .ls_r_crff [dsc$w_length], .ls_r_crff [dsc$w_length], ; 0408 6 .ls_r_crff [dsc$a_pointer])) ; 0409 5 THEN ; 0410 6 BEGIN ; 0411 6 ; 0412 6 !+ ; 0413 6 ! Remove the trailing CR/FF characters. ; 0414 6 !- ; 0415 6 ; 0416 6 w_length = .w_length - .ls_r_crff [dsc$w_length]; ; 0417 5 END; ; 0418 5 ; 0419 5 END ; 0420 4 ELSE ; 0421 5 BEGIN ; 0422 5 ; 0423 5 !+ ; 0424 5 ! If we're printing a listing file (.LIS - possibly generated by a compiler), then there ; 0425 5 ! will be a CR/FF as the first characters on the first line so remove them as well so we ; 0426 5 ! don't get a blank page at the beginning of every listing file. The FF is part of the ; 0427 5 ! listing file, and a CR is prefixed by the main format routine. ; 0428 5 !- ; 0429 5 ; 0430 6 IF (TESTBITCS (r_sctx [sctx_v_first_crff_ignored])) ; 0431 5 THEN ; 0432 6 BEGIN ; 0433 6 ; 0434 7 IF (CH$EQL (.ls_r_crff [dsc$w_length], .a_pointer, .ls_r_crff [dsc$w_length], ; 0435 7 .ls_r_crff [dsc$a_pointer])) ; 0436 6 THEN ; 0437 7 BEGIN ; 0438 7 ; 0439 7 !+ ; 0440 7 ! Skip past the CR/FF characters. ; 0441 7 !- ; 0442 7 ; 0443 7 a_pointer = .a_pointer + .ls_r_crff [dsc$w_length]; ; 0444 7 w_length = .w_length - .ls_r_crff [dsc$w_length]; ; 0445 6 END; ; 0446 6 LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 10 V001-01 LS_OUTPUT_FILTER - Filter the output stream 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (4) ; 0447 5 END; ; 0448 5 ; 0449 4 END; ; 0450 4 ; 0451 3 END; ; 0452 3 ; 0453 3 !+ ; 0454 3 ! Copy resultant record to the output buffer. ; 0455 3 !- ; 0456 3 ; 0457 4 IF (l_status = str$copy_r (r_output_desc [0, 0, 0, 0], w_length, .a_pointer)) ; 0458 3 THEN ; 0459 4 BEGIN ; 0460 4 l_status = ss$_normal; ; 0461 3 END; ; 0462 3 ; 0463 2 END; ; 0464 2 ; 0465 2 !+ ; 0466 2 ! No other functions are supported. ; 0467 2 !- ; 0468 2 ; 0469 2 [OTHERWISE] : ; 0470 3 BEGIN ; 0471 3 l_status = psm$_funnotsup; ; 0472 2 END; ; 0473 2 TES; ; 0474 2 ; 0475 2 RETURN (.l_status); ; 0476 1 END; ! End of routine LS_OUTPUT_FILTER 001C 00000 LS_OUTPUT_FILTER: .WORD Save R2,R3,R4 ; 0259 5E 08 C2 00002 SUBL2 #8, SP ; 50 0C BC D0 00005 MOVL @L_FUNCTION, R0 ; 0344 03 50 D1 00009 CMPL R0, #3 ; 0351 79 12 0000C BNEQ 5$ ; 5E DD 0000E PUSHL SP ; 0358 08 AE 9F 00010 PUSHAB W_LENGTH ; 10 AC DD 00013 PUSHL R_INPUT_DESC ; 00000000G 00 03 FB 00016 CALLS #3, STR$ANALYZE_SDESC ; 54 0000' CF 3C 0001D MOVZWL LS_R_CRFF, R4 ; 0367 54 04 AE B1 00022 CMPW W_LENGTH, R4 ; 15 1F 00026 BLSSU 1$ ; 10 08 BC 00 E2 00028 BBSS #0, @R_SCTX, 1$ ; 0371 0000' DF 00 BE 54 29 0002D CMPC3 R4, @A_POINTER, @LS_R_CRFF+4 ; 0375 07 12 00034 BNEQ 1$ ; 6E 54 C0 00036 ADDL2 R4, A_POINTER ; 0384 04 AE 54 A2 00039 SUBW2 R4, W_LENGTH ; 0385 54 04 AE B1 0003D 1$: CMPW W_LENGTH, R4 ; 0398 2E 1F 00041 BLSSU 4$ ; 14 08 BC 01 E2 00043 BBSS #1, @R_SCTX, 2$ ; 0402 50 04 AE 3C 00048 MOVZWL W_LENGTH, R0 ; 0407 50 6E C0 0004C ADDL2 A_POINTER, R0 ; 50 54 C2 0004F SUBL2 R4, R0 ; 0000' DF 60 54 29 00052 CMPC3 R4, (R0), @LS_R_CRFF+4 ; 0406 17 12 00058 BNEQ 4$ ; 11 11 0005A BRB 3$ ; 0416 10 08 BC 02 E2 0005C 2$: BBSS #2, @R_SCTX, 4$ ; 0430 LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 11 V001-01 LS_OUTPUT_FILTER - Filter the output stream 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (4) 0000' DF 00 BE 54 29 00061 CMPC3 R4, @A_POINTER, @LS_R_CRFF+4 ; 0434 07 12 00068 BNEQ 4$ ; 6E 54 C0 0006A ADDL2 R4, A_POINTER ; 0443 04 AE 54 A2 0006D 3$: SUBW2 R4, W_LENGTH ; 0444 6E DD 00071 4$: PUSHL A_POINTER ; 0457 08 AE 9F 00073 PUSHAB W_LENGTH ; 18 AC DD 00076 PUSHL R_OUTPUT_DESC ; 00000000G 00 03 FB 00079 CALLS #3, STR$COPY_R ; 0B 50 E9 00080 BLBC L_STATUS, 6$ ; 50 01 D0 00083 MOVL #1, L_STATUS ; 0460 04 00086 RET ; 0344 50 00000000G 00 9E 00087 5$: MOVAB PSM$_FUNNOTSUP, L_STATUS ; 0471 04 0008E 6$: RET ; 0475 ; Routine Size: 143 bytes, Routine Base: $CODE$ + 005E LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 12 V001-01 LS_PAGE_SETUP - Handles page setup 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (5) ; 0478 1 %SBTTL 'LS_PAGE_SETUP - Handles page setup' ; 0479 1 ROUTINE ls_page_setup ( ! ; 0480 1 l_request_id : REF VECTOR [, LONG], ! ; 0481 1 r_sctx : REF sctxdef, ! ; 0482 1 l_function : REF VECTOR [, LONG], ! ; 0483 1 r_func_desc : REF BLOCK [, BYTE], ! ; 0484 1 l_func_arg : REF VECTOR [, LONG] ! ; 0485 1 ) = ; 0486 1 ; 0487 1 !++ ; 0488 1 ! ; 0489 1 ! FUNCTIONAL DESCRIPTION: ; 0490 1 ! ; 0491 1 ! This routine replaces the PSM$PAGE_SETUP routine. This routine will be ; 0492 1 ! called at the beginning of each page, job, task, and stream. This ; 0493 1 ! routine is used to reset the state variables that are used by the output ; 0494 1 ! filter routine (LS_OUTPUT_FILTER). After the state variables have been ; 0495 1 ! set, the standard VMS page setup routine will be called. ; 0496 1 ! ; 0497 1 ! ENVIRONMENT: ; 0498 1 ! ; 0499 1 ! All access modes, AST reentrant ; 0500 1 ! ; 0501 1 ! CALLING SEQUENCE: ; 0502 1 ! ; 0503 1 ! Called by the print symbiont ; 0504 1 ! ; 0505 1 ! LINKAGE: ; 0506 1 ! ; 0507 1 ! CALL ; 0508 1 ! ; 0509 1 ! FORMAL PARAMETERS: ; 0510 1 ! ; 0511 1 ! l_request_id ; 0512 1 ! Request identifier supplied by the symbiont ; 0513 1 ! ; 0514 1 ! r_sctx ; 0515 1 ! User context area ; 0516 1 ! ; 0517 1 ! l_function ; 0518 1 ! Function code indicating function to be performed by this routine ; 0519 1 ! ; 0520 1 ! r_func_desc ; 0521 1 ! Function buffer ; 0522 1 ! ; 0523 1 ! l_func_arg ; 0524 1 ! Function argument ; 0525 1 ! ; 0526 1 ! IMPLICIT INPUTS: ; 0527 1 ! ; 0528 1 ! None. ; 0529 1 ! ; 0530 1 ! IMPLICIT OUTPUTS: ; 0531 1 ! ; 0532 1 ! None. ; 0533 1 ! ; 0534 1 ! COMPLETION CODES: ; 0535 1 ! ; 0536 1 ! SS$_NORMAL Normal successful completion ; 0537 1 ! Anything returned by PSM$PAGE_SETUP ; 0538 1 ! ; 0539 1 ! SIDE EFFECTS: ; 0540 1 ! LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 13 V001-01 LS_PAGE_SETUP - Handles page setup 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (5) ; 0541 1 ! None. ; 0542 1 ! ; 0543 1 !-- ; 0544 1 ; 0545 2 BEGIN ; 0546 2 ; 0547 2 LOCAL ; 0548 2 l_status : LONG; ; 0549 2 ; 0550 2 !+ ; 0551 2 ! Decide what to do based on the function code passed to us by VMS symbiont. ; 0552 2 !- ; 0553 2 ; 0554 2 SELECTONE (.l_function [0]) OF ; 0555 2 SET ; 0556 2 ; 0557 2 !+ ; 0558 2 ! Processing to be done when starting a new stream. ; 0559 2 !- ; 0560 2 ; 0561 2 [psm$k_start_stream] : ; 0562 3 BEGIN ; 0563 3 ; 0564 3 !+ ; 0565 3 ! Initialize values in the stream context block that are needed ; 0566 3 ! before a task is even started. ; 0567 3 !- ; 0568 3 ; 0569 3 r_sctx [sctx_v_stream_crff_ignored] = k_false; ; 0570 3 l_status = ss$_normal; ; 0571 2 END; ; 0572 2 ; 0573 2 !+ ; 0574 2 ! Processing to do when starting a new task. ; 0575 2 !- ; 0576 2 ; 0577 2 [psm$k_start_task] : ; 0578 3 BEGIN ; 0579 3 ; 0580 3 !+ ; 0581 3 ! Initialize values in the stream context block that are needed ; 0582 3 ! at the beginning of each task. ; 0583 3 !- ; 0584 3 ; 0585 3 r_sctx [sctx_v_job_crff_ignored] = k_false; ; 0586 3 r_sctx [sctx_v_first_crff_ignored] = k_false; ; 0587 3 l_status = ss$_normal; ; 0588 2 END; ; 0589 2 ; 0590 2 !+ ; 0591 2 ! No other functions supported. ; 0592 2 !- ; 0593 2 ; 0594 2 [OTHERWISE] : ; 0595 3 BEGIN ; 0596 3 l_status = ss$_normal; ; 0597 2 END; ; 0598 2 TES; ; 0599 2 ; 0600 2 !+ ; 0601 2 ! If everything up to this point was processed OK, then call the VMS symbiont supplied ; 0602 2 ! page setup routine so it can do its normal processing. The only reason that this ; 0603 2 ! routine is replaced at all is so that we can get control at the beginning of each task. LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 14 V001-01 LS_PAGE_SETUP - Handles page setup 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (5) ; 0604 2 !- ; 0605 2 ; 0606 3 IF (.l_status) ; 0607 2 THEN ; 0608 3 BEGIN ; 0609 3 l_status = psm$page_setup (l_request_id [0], r_sctx [0, 0, 0, 0], l_function [0], ; 0610 3 r_func_desc [0, 0, ; 0611 3 0, 0], l_func_arg [0]); ; 0612 2 END; ; 0613 2 ; 0614 2 RETURN (.l_status); ; 0615 1 END; ! End of routine LS_PAGE_SETUP 0000 00000 LS_PAGE_SETUP: .WORD Save nothing ; 0479 51 0C AC D0 00002 MOVL L_FUNCTION, R1 ; 0554 50 61 D0 00006 MOVL (R1), R0 ; 0F 50 D1 00009 CMPL R0, #15 ; 0561 06 12 0000C BNEQ 1$ ; 08 BC 01 8A 0000E BICB2 #1, @R_SCTX ; 0569 0D 11 00012 BRB 2$ ; 0570 10 50 D1 00014 1$: CMPL R0, #16 ; 0577 08 12 00017 BNEQ 2$ ; 08 BC 02 8A 00019 BICB2 #2, @R_SCTX ; 0585 08 BC 04 8A 0001D BICB2 #4, @R_SCTX ; 0586 50 01 D0 00021 2$: MOVL #1, L_STATUS ; 0596 11 50 E9 00024 BLBC L_STATUS, 3$ ; 0606 7E 10 AC 7D 00027 MOVQ R_FUNC_DESC, -(SP) ; 0610 51 DD 0002B PUSHL R1 ; 7E 04 AC 7D 0002D MOVQ L_REQUEST_ID, -(SP) ; 0609 00000000G 00 05 FB 00031 CALLS #5, PSM$PAGE_SETUP ; 04 00038 3$: RET ; 0614 ; Routine Size: 57 bytes, Routine Base: $CODE$ + 00ED ; 0616 1 END ! End of module LASER_SYMBIONT ; 0617 1 ; 0618 0 ELUDOM .EXTRN LIB$SIGNAL ; PSECT SUMMARY ; ; Name Bytes Attributes ; ; $PLIT$ 12 NOVEC,NOWRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $CODE$ 294 NOVEC,NOWRT, RD , EXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 15 V001-01 LS_PAGE_SETUP - Handles page setup 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (5) Symbol Type Defined Referenced ... -------------------------- -------- ----- ---------------- $DESCRIPTOR Macro Lib01 138 A_POINTER Local 336 358a 375@. 384= 384. 407. 434@. 443= 443. 457. DSC$A_POINTER Macro Lib01 376 408 435 DSC$W_LENGTH Macro Lib01 367 375 384 385 398 406 407 416 434 443 444 K_FALSE Literal 125 569 585 586 K_TRUE Literal 126 LIB$SIGNAL Predecl 252c LS_MAIN Routine 175 92f LS_OUTPUT_FILTER Routine 259 93f 227a LS_PAGE_SETUP Routine 479 94f 231a LS_R_CRFF Bind 138 367. 375. 376@. 384. 385. 398. 406. 407. 408@. 416. 434. 435@. 443. 444. L_FUNCTION RoutForm 262 344@. RoutForm 482 554@. 609. L_FUNC_ARG RoutForm 484 611. L_INPUT_ARG RoutForm 264 L_OUTPUT_ARG RoutForm 266 L_REQUEST_ID RoutForm 260 RoutForm 480 609. L_STATUS Local 221 227= 231= 240= 249. 252. 255. Local 337 457= 460= 471= 475. Local 548 570= 587= 596= 606. 609= 614. PSM$K_FORMAT Literal Lib01 351 PSM$K_OUTPUT_FILTER Literal Lib01 227 PSM$K_PAGE_SETUP Literal Lib01 231 PSM$K_START_STREAM Literal Lib01 561 PSM$K_START_TASK Literal Lib01 577 PSM$PAGE_SETUP ExtRout 158 609c PSM$PRINT ExtRout 159 240c PSM$READ_ITEM_DX ExtRout 160 PSM$REPLACE ExtRout 161 227c 231c PSM$_EOF External 170 PSM$_FUNNOTSUP External 171 471a R_FUNC_DESC RoutForm 483 610. R_INPUT_DESC RoutForm 263 358. R_OUTPUT_DESC RoutForm 265 457. R_SCTX RoutForm 261 371@. 371@= 402@. 402@= 430@. 430@= RoutForm 481 569@= 585@= 586@= 609. SCTXDEF Macro 85 261 481 SCTX_L_FLAGS Field 77 SCTX_M_FIRST_CRFF_IGNORED Literal 74 SCTX_M_JOB_CRFF_IGNORED Literal 73 SCTX_M_STREAM_CRFF_IGNORED Literal 72 SCTX_R_FILL_0 Field 82 SCTX_R_FILL_1 Field 81 SCTX_SCTXDEF_FIELDSET Unbound 85 Fieldset 76 261 481 SCTX_S_SCTXDEF Unbound 85 Literal 84 240 261 481 SCTX_V_FIRST_CRFF_IGNORED Field 80 430= 430. 586= SCTX_V_JOB_CRFF_IGNORED Field 79 402= 402. 585= SCTX_V_STREAM_CRFF_IGNORED Field 78 371= 371. 569= SMG$K_TRM_CR Literal Lib01 138 SMG$K_TRM_FF Literal Lib01 138 SS$_NORMAL Literal Lib01 460 570 587 596 STR$ANALYZE_SDESC ExtRout 162 358c STR$COPY_R ExtRout 163 457c TESTBITCS Builtin 151 371 402 430 W_LENGTH Local 338 358a 367. 385= 385. 398. 407. 416= 416. 444= 444. 457a LASER_SYMBIONT LASER_SYMBIONT 7-Dec-1990 21:23:09 VAX Bliss-32 V4.5-862 Page 16 V001-01 LS_PAGE_SETUP - Handles page setup 7-Dec-1990 21:19:49 LASER_SYMBIONT.BLI;113 (5) CROSS REFERENCE MAP Line # Event File ... ----- --------------- --------- 1 Source (start) $2$DUA1:[BRIAN-JIM.LASER_SYMBIONT]LASER_SYMBIONT.BLI;113 3 Module LASER_SYMBIONT 56 Library #1 SYS$COMMON:[SYSLIB]LIB.L32;1 58 Library #2 DIR_GRAY_:[USRLIB]USRLIB.L32;4 61 Require (start) $2$DUA1:[BRIAN-JIM.LASER_SYMBIONT]LASER_DEFS.R32;5 85 Require (end) 618 Eludom LASER_SYMBIONT KEY TO REFERENCE TYPE FLAGS . Fetch = Store c Routine call a Address use @ Indirect use e External, external routine, or external literal declaration f Forward or forward routine declaration h Condition handler enabling m Map declaration u Undeclare declaration ; Library Statistics ; ; -------- Symbols -------- Pages Processing ; File Total Loaded Percent Mapped Time ; ; SYS$COMMON:[SYSLIB]LIB.L32;1 32180 11 0 1736 00:01.1 ; DIR_GRAY_:[USRLIB]USRLIB.L32;4 234 0 0 29 00:00.1 ; COMMAND QUALIFIERS ; BLISS/LIST/CHECK=(FIELD,INITIAL,OPTIMIZE,REDECLARE)/CROSS_REFERENCE LASER_SYMBIONT ; Size: 294 code + 12 data bytes ; Run Time: 00:04.8 ; Elapsed Time: 00:07.8 ; Lines/CPU Min: 7757 ; Lexemes/CPU-Min: 27376 ; Memory Used: 135 pages ; Compilation Complete