; 0001 0 ! ; 0002 0 %TITLE 'Create the color table file for use by the DISPLAY program' ; 0003 0 MODULE color_table (MAIN = color_table, ; 0004 0 IDENT = 'V001-1' ! File: color_table.bli ; 0005 0 ) = ; 0006 1 BEGIN ; 0007 1 ; 0008 1 !++ ; 0009 1 ! ; 0010 1 ! FACILITY: DECUS pre-symposium seminar 'BLISS for Macro users' examples ; 0011 1 ! ; 0012 1 ! This routine will show the use of: ; 0013 1 ! ; 0014 1 ! Run-time library routines ; 0015 1 ! RMS ; 0016 1 ! Simple macro ; 0017 1 ! Require file ; 0018 1 ! Library file ; 0019 1 ! Builtins ; 0020 1 ! Floating point computation ; 0021 1 ! INCR loops ; 0022 1 ! BLOCK ; 0023 1 ! VECTOR ; 0024 1 ! BLOCKVECTOR ; 0025 1 ! ASCID ; 0026 1 ! PLIT ; 0027 1 ! ; 0028 1 ! ABSTRACT: This program will generate the color table to be used with ; 0029 1 ! images created by the COMPUTE program. The DISPLAY program ; 0030 1 ! will ask for an image file, and a color table. This program ; 0031 1 ! will create a generic color table using 8 bits per primary ; 0032 1 ! color (red, green, blue), with 256 entries (compatible with ; 0033 1 ! a maximum pixel value of 255 in COMPUTE). ; 0034 1 ! ; 0035 1 ! This is a very attractive color table, and I've had quite a ; 0036 1 ! bit of success with it. This program can be easily changed ; 0037 1 ! to accomodate graphics hardware with different color table ; 0038 1 ! requirements. ; 0039 1 ! ; 0040 1 ! ENVIRONMENT: VAX/VMS, user mode ; 0041 1 ! ; 0042 1 ! AUTHOR: Brian K Catlin ; 0043 1 ! ; 0044 1 ! CREATED: 11-MAY-1988 ; 0045 1 ! ; 0046 1 ! MODIFICATION ; 0047 1 ! HISTORY: ; 0048 1 ! ; 0049 1 ! V001-1 BKC001 Brian K Catlin 11-MAY-1988 ; 0050 1 ! Original version ; 0051 1 ! ; 0052 1 ! ; 0053 1 !-- ; 0054 1 ; 0056 1 %SBTTL 'Declarations' ; 0057 1 !+ ; 0058 1 ! SWITCHES: ; 0059 1 !- ; 0060 1 ; 0061 1 SWITCHES ADDRESSING_MODE (EXTERNAL = GENERAL, NONEXTERNAL = WORD_RELATIVE); ; 0062 1 ; 0063 1 !+ ; 0064 1 ! LINKAGES: ; 0065 1 !- ; 0066 1 ; 0067 1 ! None. ; 0068 1 ; 0069 1 !+ ; 0070 1 ! TABLE OF CONTENTS: ; 0071 1 ! ; 0072 1 ! color_table Calculate the color table, and write it to a file ; 0073 1 !- ; 0074 1 ; 0075 1 FORWARD ROUTINE ; 0076 1 color_table; ; 0077 1 ; 0078 1 !+ ; 0079 1 ! INCLUDE FILES: ; 0080 1 ! ; 0081 1 !- ; 0082 1 ; 0083 1 LIBRARY 'SYS$LIBRARY:LIB'; ! VMS executive macros/symbols. ; 0084 1 ; 0085 1 LIBRARY 'USR$LIBRARY:USRLIB'; ! User Definitions. ; 0086 1 ; 0087 1 REQUIRE 'structs'; ! Header definitions ; 0127 1 ; 0128 1 !+ ; 0129 1 ! MACROS: ; 0130 1 !- ; 0131 1 ; 0132 1 MACRO ; 0133 1 ; 0134 1 !+ ; 0135 1 ! Find first whitespace character (space, tab, cr, lf, vt, nul) ; 0136 1 !- ; 0137 1 ; M 0138 1 _find_whitespace (string) = ; M 0139 1 BEGIN ; M 0140 1 ; M 0141 1 LOCAL ; M 0142 1 i : LONG INITIAL (0); ; M 0143 1 ; M 0144 1 BIND ; M 0145 1 line = .string [dsc$a_pointer] : VECTOR [, BYTE]; ; M 0146 1 ; M 0147 1 WHILE ( NOT (_cvt_is_white (.line [.i]) OR _cvt_is_mechan (.line [.i])) AND (.i LSSU .string [ ; M 0148 1 dsc$w_length])) DO ; M 0149 1 i = .i + 1; ; M 0150 1 ; M 0151 1 .i ; M 0152 1 END ; 0153 1 %; ; 0154 1 ; 0155 1 ; 0156 1 !+ ; 0157 1 ! FIELDS: ; 0158 1 !- ; 0159 1 ; 0160 1 ! None. ; 0161 1 ; 0162 1 !+ ; 0163 1 ! STRUCTURES: ; 0164 1 !- ; 0165 1 ; 0166 1 ! None. ; 0167 1 ; 0168 1 !+ ; 0169 1 ! PSECTS: ; 0170 1 !- ; 0171 1 ; 0172 1 ! None. ; 0173 1 ; 0174 1 !+ ; 0175 1 ! EQUATED SYMBOLS: ; 0176 1 !- ; 0177 1 ; 0178 1 ! None. ; 0179 1 ; 0180 1 !+ ; 0181 1 ! OWN STORAGE: ; 0182 1 !- ; 0183 1 ; 0184 1 ! None. ; 0185 1 ; 0186 1 !+ ; 0187 1 ! BUILTIN DECLARATIONS: ; 0188 1 !- ; 0189 1 ; 0190 1 BUILTIN ; 0191 1 CVTDL, ; 0192 1 CVTLD, ; 0193 1 ADDD, ; 0194 1 DIVD, ; 0195 1 MULD, ; 0196 1 SUBD; ; 0197 1 ; 0198 1 !+ ; 0199 1 ! EXTERNAL REFERENCES: ; 0200 1 ! ; 0201 1 ! LIB$GET_INPUT Get input from the user ; 0202 1 !- ; 0203 1 ; 0204 1 EXTERNAL ROUTINE ; 0205 1 lib$get_input; ; 0206 1 ; 0208 1 %SBTTL 'COLOR_TABLE - Main entry point for this program' ; 0209 1 ROUTINE color_table = ; 0210 1 ; 0211 1 !++ ; 0212 1 ! ; 0213 1 ! FUNCTIONAL DESCRIPTION: ; 0214 1 ! ; 0215 1 ! Compute the color table, and write it to a file. See the file ; 0216 1 ! STRUCTS for the definition on how to access the color table from ; 0217 1 ! any other language. ; 0218 1 ! ; 0219 1 ! CALLING SEQUENCE: ; 0220 1 ! ; 0221 1 ! display () Called by VMS as the entry point of this program ; 0222 1 ! ; 0223 1 ! FORMAL PARAMETERS: ; 0224 1 ! ; 0225 1 ! None. ; 0226 1 ! ; 0227 1 ! IMPLICIT INPUTS: ; 0228 1 ! ; 0229 1 ! None. ; 0230 1 ! ; 0231 1 ! IMPLICIT OUTPUTS: ; 0232 1 ! ; 0233 1 ! None. ; 0234 1 ! ; 0235 1 ! COMPLETION CODES: ; 0236 1 ! ; 0237 1 ! SS$_NORMAL Normal successful completion. ; 0238 1 ! ; 0239 1 ! SIDE AFFECTS: ; 0240 1 ! ; 0241 1 ! The color table file is created, and written ; 0242 1 ! ; 0243 1 !-- ; 0244 1 ; 0245 2 BEGIN ; 0246 2 ; 0247 2 ; 0248 2 LOCAL ; 0249 2 status : LONG, ; 0250 2 color_table : BLOCKVECTOR [256, ctbl_s_ctbldef, 1] FIELD (ctbl_ctbldef_fieldset) INITIAL (REP 256 OF (0)), ; 0251 2 red : VECTOR [256, LONG], ; 0252 2 grn : VECTOR [256, LONG], ; 0253 2 blu : VECTOR [256, LONG], ; 0254 2 iter : VECTOR [2, LONG], ; 0255 2 temp1 : VECTOR [2, LONG], ; 0256 2 temp2 : VECTOR [2, LONG], ; 0257 2 bits : VECTOR [2, LONG], ; 0258 2 bitp : LONG, ; 0259 2 j : LONG, ; 0260 2 color_desc : _string_desc (class = d), ; 0261 2 color_fab : $fab_decl, ; 0262 2 color_rab : $rab_decl; ; 0263 2 ; 0264 2 !+ ; 0265 2 ! Get the name of the color table file ; 0266 2 !- ; 0267 2 ; 0268 3 IF NOT (status = lib$get_input (color_desc, %ASCID'Color table name > ')) ! ; 0269 2 THEN ; 0270 2 SIGNAL (.status); ; 0271 2 ; 0272 2 color_desc [dsc$w_length] = _find_whitespace (color_desc); ! Trim off white space ; 0273 2 ; 0274 2 !+ ; 0275 2 ! Declare the color table file ; 0276 2 !- ; 0277 2 ; P 0278 2 $fab_init (fab = color_fab, ! Address of File Access Block ; P 0279 2 fna = .color_desc [dsc$a_pointer], ! Address of file name ; P 0280 2 fns = .color_desc [dsc$w_length], ! Length of file name ; P 0281 2 dnm = '.ctbl', ! Default file name ; P 0282 2 alq = 2, ! Allocation size ; P 0283 2 fac = put, ! File access - PUT ; P 0284 2 fop = sqo, ! File operations - Sequential ; P 0285 2 org = seq, ! File organization - Sequential ; P 0286 2 rfm = fix, ! Record format - Fixed ; 0287 2 mrs = 512); ! Maximum record size ; 0288 2 ! ; P 0289 2 $rab_init (rab = color_rab, ! Address of Record Access Block ; P 0290 2 fab = color_fab, ! Address of File Access Block ; P 0291 2 rac = seq, ! Record access - Sequential ; P 0292 2 rop = wbh, ! Record operations - Write behind ; P 0293 2 rsz = 512, ! Record size ; 0294 2 rbf = color_table [0, 0, 0, 0, 0]); ! Record buffer ; 0295 2 ; 0296 2 !+ ; 0297 2 ! Create and open the output file ; 0298 2 !- ; 0299 2 ; 0300 3 IF NOT (status = $create (fab = color_fab)) ! Create the file ; 0301 2 THEN ; 0302 2 SIGNAL (.color_fab [fab$l_sts], .color_fab [fab$l_stv]); ; 0303 2 ; 0304 3 IF NOT (status = $connect (rab = color_rab)) ! Connect record stream ; 0305 2 THEN ; 0306 2 SIGNAL (.color_rab [rab$l_sts], .color_rab [rab$l_stv]); ; 0307 2 ; 0308 2 ; 0309 2 bitp = 255; ; 0310 2 CVTLD (bitp, bits); ; 0311 2 ; 0312 2 !+ ; 0313 2 ! Define white ; 0314 2 !- ; 0315 2 ; 0316 2 red [0] = 255; ; 0317 2 grn [0] = 255; ; 0318 2 blu [0] = 255; ; 0319 2 ; 0320 2 !+ ; 0321 2 ! Calculate red range ; 0322 2 !- ; 0323 2 ; 0324 2 INCR i FROM 1 TO 31 DO ; 0325 3 BEGIN ; 0326 3 CVTLD (i, iter); ! iter = FLOAT ( i ) ; 0327 3 DIVD (PLIT (%D'64.0'), iter, temp1); ! temp1 = iter / 64.0 ; 0328 3 ADDD (PLIT (%D'0.5'), temp1, temp2); ! temp2 = temp1 + 0.5 ; 0329 3 MULD (bits, temp2, temp2); ! temp2 = temp2 * 255 ; 0330 3 CVTDL (temp2, red [.i]); ! red [.i] = INT ( temp2 ) ; 0331 3 CVTDL (temp1, grn [.i]); ! grn [.i] = INT ( temp1 ) ; 0332 3 blu [.i] = 0; ; 0333 2 END; ; 0334 2 ; 0335 2 !+ ; 0336 2 ! Calculate orange range ; 0337 2 !- ; 0338 2 ; 0339 2 INCR i FROM 32 TO 63 DO ; 0340 3 BEGIN ; 0341 3 j = .i - 32; ; 0342 3 CVTLD (j, iter); ; 0343 3 DIVD (PLIT (%D'128.0'), iter, temp1); ; 0344 3 ADDD (PLIT (%D'0.5'), temp1, temp2); ; 0345 3 MULD (bits, temp2, temp2); ; 0346 3 red [.i] = 255; ; 0347 3 CVTDL (temp2, grn [.i]); ; 0348 3 blu [.i] = 0; ; 0349 2 END; ; 0350 2 ; 0351 2 !+ ; 0352 2 ! Calculate gold range ; 0353 2 !- ; 0354 2 ; 0355 2 INCR i FROM 64 TO 95 DO ; 0356 3 BEGIN ; 0357 3 j = .i - 64; ; 0358 3 CVTLD (j, iter); ; 0359 3 DIVD (PLIT (%D'128.0'), iter, temp1); ; 0360 3 ADDD (PLIT (%D'0.75'), temp1, temp2); ; 0361 3 MULD (bits, temp2, temp2); ; 0362 3 red [.i] = 255; ; 0363 3 CVTDL (temp2, red [.i]); ; 0364 3 blu [.i] = 0; ; 0365 2 END; ; 0366 2 ; 0367 2 !+ ; 0368 2 ! Calculate yellow range ; 0369 2 !- ; 0370 2 ; 0371 2 INCR i FROM 96 TO 127 DO ; 0372 3 BEGIN ; 0373 3 j = 128 - .i; ; 0374 3 CVTLD (j, iter); ; 0375 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0376 3 ADDD (PLIT (%D'0.5'), temp1, temp2); ; 0377 3 MULD (bits, temp2, temp2); ; 0378 3 CVTDL (temp2, red [.i]); ; 0379 3 grn [.i] = 255; ; 0380 3 j = .i - 96; ; 0381 3 CVTLD (j, iter); ; 0382 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0383 3 MULD (bits, temp1, temp1); ; 0384 3 CVTDL (temp1, blu [.i]); ; 0385 2 END; ; 0386 2 ; 0387 2 !+ ; 0388 2 ! Calculate green range ; 0389 2 !- ; 0390 2 ; 0391 2 INCR i FROM 128 TO 159 DO ; 0392 3 BEGIN ; 0393 3 j = 160 - .i; ; 0394 3 CVTLD (j, iter); ; 0395 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0396 3 MULD (bits, temp1, temp1); ; 0397 3 CVTDL (temp1, red [.i]); ; 0398 3 grn [.i] = 255; ; 0399 3 j = .i - 96; ; 0400 3 CVTLD (j, iter); ; 0401 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0402 3 MULD (bits, temp1, temp1); ; 0403 3 CVTDL (temp1, blu [.i]); ; 0404 2 END; ; 0405 2 ; 0406 2 !+ ; 0407 2 ! Calculate cyan range ; 0408 2 !- ; 0409 2 ; 0410 2 INCR i FROM 160 TO 191 DO ; 0411 3 BEGIN ; 0412 3 j = 192 - .i; ; 0413 3 CVTLD (j, iter); ; 0414 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0415 3 ADDD (PLIT (%D'0.5'), temp1, temp2); ; 0416 3 MULD (bits, temp2, temp2); ; 0417 3 red [.i] = 0; ; 0418 3 CVTDL (temp2, grn [.i]); ; 0419 3 blu [.i] = 255; ; 0420 2 END; ; 0421 2 ; 0422 2 !+ ; 0423 2 ! Calculate blue range ; 0424 2 !- ; 0425 2 ; 0426 2 INCR i FROM 192 TO 224 DO ; 0427 3 BEGIN ; 0428 3 j = .i - 192; ; 0429 3 CVTLD (j, iter); ; 0430 3 DIVD (PLIT (%D'32.0'), iter, temp1); ; 0431 3 MULD (bits, temp1, temp1); ; 0432 3 CVTDL (temp1, red [.i]); ; 0433 3 j = 224 - .i; ; 0434 3 CVTLD (j, iter); ; 0435 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0436 3 MULD (bits, temp1, temp1); ; 0437 3 CVTDL (temp1, grn [.i]); ; 0438 3 blu [.i] = 255; ; 0439 2 END; ; 0440 2 ; 0441 2 !+ ; 0442 2 ! Calculate magenta range ; 0443 2 !- ; 0444 2 ; 0445 2 INCR i FROM 225 TO 254 DO ; 0446 3 BEGIN ; 0447 3 j = 256 - .i; ; 0448 3 CVTLD (j, iter); ; 0449 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0450 3 ADDD (PLIT (%D'0.5'), temp1, temp2); ; 0451 3 MULD (bits, temp2, temp2); ; 0452 3 CVTDL (temp2, red [.i]); ; 0453 3 j = .i - 224; ; 0454 3 CVTLD (j, iter); ; 0455 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0456 3 MULD (bits, temp1, temp1); ; 0457 3 CVTDL (temp1, grn [.i]); ; 0458 3 j = 256 - .i; ; 0459 3 CVTLD (j, iter); ; 0460 3 DIVD (PLIT (%D'64.0'), iter, temp1); ; 0461 3 ADDD (PLIT (%D'0.5'), temp1, temp2); ; 0462 3 MULD (bits, temp2, temp2); ; 0463 3 CVTDL (temp2, blu [.i]); ; 0464 2 END; ; 0465 2 ; 0466 2 !+ ; 0467 2 ! Define black - For pixels that are part of the Mandelbrot set ; 0468 2 !- ; 0469 2 ; 0470 2 red [255] = 0; ; 0471 2 grn [255] = 0; ; 0472 2 blu [255] = 0; ; 0473 2 ; 0474 2 !+ ; 0475 2 ! Condense the three components of the lookup table into one table ; 0476 2 !- ; 0477 2 ; 0478 2 INCR i FROM 0 TO 255 DO ; 0479 3 BEGIN ; 0480 3 color_table [.i, ctbl_b_red] = .red [.i]; ; 0481 3 color_table [.i, ctbl_b_grn] = .grn [.i]; ; 0482 3 color_table [.i, ctbl_b_blu] = .blu [.i]; ; 0483 2 END; ; 0484 2 ; 0485 2 !+ ; 0486 2 ! Write out the color table ; 0487 2 !- ; 0488 2 ; 0489 3 IF NOT (status = $put (rab = color_rab)) ! Write a block ; 0490 2 THEN ; 0491 2 SIGNAL (.color_rab [rab$l_sts], .color_rab [rab$l_stv]); ; 0492 2 ; 0493 2 color_rab [rab$l_rbf] = .color_rab [rab$l_rbf] + 512; ! Point to next block ; 0494 2 ; 0495 3 IF NOT (status = $put (rab = color_rab)) ! Write a block ; 0496 2 THEN ; 0497 2 SIGNAL (.color_rab [rab$l_sts], .color_rab [rab$l_stv]); ; 0498 2 ; 0499 2 ! ; 0500 2 ss$_normal ! Routine value ; 0501 1 END; ! End of routine COLOR_TABLE .TITLE COLOR_TABLE Create the color table file for use by the DISP .IDENT \V001-1\ .PSECT $PLIT$,NOWRT,NOEXE,2 P.AAA: .LONG 0[256] ; 00000000# 00000 P.AAC: .ASCII \Color table name > \<0> ; 61 74 20 72 6F 6C 6F 43 00400 ; 65 6D 61 6E 20 65 6C 62 00408 ; 00 20 3E 20 00410 P.AAB: .LONG 17694739 ; 010E0013 00414 .ADDRESS P.AAC ; 00000000' 00418 P.AAD: .ASCII \.ctbl\ ; 6C 62 74 63 2E 0041C .BLKB 3 ; 00421 .LONG 2 ; 00000002 00424 P.AAE: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 00428 .LONG 2 ; 00000002 00430 P.AAF: .LONG ^X00004000, ^X00000000 ; 00000000 00004000 00434 .LONG 2 ; 00000002 0043C P.AAG: .LONG ^X00004400, ^X00000000 ; 00000000 00004400 00440 .LONG 2 ; 00000002 00448 P.AAH: .LONG ^X00004000, ^X00000000 ; 00000000 00004000 0044C .LONG 2 ; 00000002 00454 P.AAI: .LONG ^X00004400, ^X00000000 ; 00000000 00004400 00458 .LONG 2 ; 00000002 00460 P.AAJ: .LONG ^X00004040, ^X00000000 ; 00000000 00004040 00464 .LONG 2 ; 00000002 0046C P.AAK: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 00470 .LONG 2 ; 00000002 00478 P.AAL: .LONG ^X00004000, ^X00000000 ; 00000000 00004000 0047C .LONG 2 ; 00000002 00484 P.AAM: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 00488 .LONG 2 ; 00000002 00490 P.AAN: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 00494 .LONG 2 ; 00000002 0049C P.AAO: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 004A0 .LONG 2 ; 00000002 004A8 P.AAP: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 004AC .LONG 2 ; 00000002 004B4 P.AAQ: .LONG ^X00004000, ^X00000000 ; 00000000 00004000 004B8 .LONG 2 ; 00000002 004C0 P.AAR: .LONG ^X00004300, ^X00000000 ; 00000000 00004300 004C4 .LONG 2 ; 00000002 004CC P.AAS: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 004D0 .LONG 2 ; 00000002 004D8 P.AAT: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 004DC .LONG 2 ; 00000002 004E4 P.AAU: .LONG ^X00004000, ^X00000000 ; 00000000 00004000 004E8 .LONG 2 ; 00000002 004F0 P.AAV: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 004F4 .LONG 2 ; 00000002 004FC P.AAW: .LONG ^X00004380, ^X00000000 ; 00000000 00004380 00500 .LONG 2 ; 00000002 00508 P.AAX: .LONG ^X00004000, ^X00000000 ; 00000000 00004000 0050C .EXTRN LIB$GET_INPUT, SYS$CREATE, SYS$CONNECT, SYS$PUT .PSECT $CODE$,NOWRT,2 ;COLOR_TABLE U.1: .WORD ^M ;Save R2,R3,R4,R5,R6 0209 007C 00000 MOVAB -4284(SP), SP ;-4284(SP), SP 5E EF44 CE 9E 00002 MOVC3 #1024, W^P.AAA, -1024(FP) ;#1024, P.AAA, COLOR_TABLE 0250 0000' CF 0400 8F 28 00007 ; FC00 CD 0000E MOVL #34471936, 148(SP) ;#34471936, COLOR_DESC 0260 0094 CE 020E0000 8F D0 00011 CLRL 152(SP) ;COLOR_DESC+4 0098 CE D4 0001A PUSHAB W^P.AAB ;P.AAB 0268 0000' CF 9F 0001E PUSHAB 152(SP) ;COLOR_DESC 0098 CE 9F 00022 CALLS #2, G^LIB$GET_INPUT ;#2, LIB$GET_INPUT 00000000G 00 02 FB 00026 MOVL R0, R6 ;R0, STATUS 56 50 D0 0002D BLBS R6, 1$ ;STATUS, 1$ 09 56 E8 00030 PUSHL R6 ;STATUS 0270 56 DD 00033 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL 00000000G 00 01 FB 00035 1$: CLRL R0 ;I 0272 50 D4 0003C BRB 3$ ;3$ 02 11 0003E 2$: INCL R0 ;I 50 D6 00040 3$: MOVZBL @152(SP)[R0], R1 ;@COLOR_DESC+4[I], R1 51 0098 DE40 9A 00042 CLRL R2 ;R2 52 D4 00048 CMPB R1, #9 ;R1, #9 09 51 91 0004A BNEQ 4$ ;4$ 04 12 0004D INCL R2 ;R2 52 D6 0004F BRB 5$ ;5$ 29 11 00051 4$: CMPB R1, #32 ;R1, #32 20 51 91 00053 BEQL 5$ ;5$ 24 13 00056 TSTL R1 ;R1 51 D5 00058 BEQL 5$ ;5$ 20 13 0005A CMPB R1, #7 ;R1, #7 07 51 91 0005C BEQL 5$ ;5$ 1B 13 0005F BLBS R2, 5$ ;R2, 5$ 18 52 E8 00061 CMPB R1, #10 ;R1, #10 0A 51 91 00064 BEQL 5$ ;5$ 13 13 00067 CMPB R1, #12 ;R1, #12 0C 51 91 00069 BEQL 5$ ;5$ 0E 13 0006C CMPB R1, #13 ;R1, #13 0D 51 91 0006E BEQL 5$ ;5$ 09 13 00071 CMPZV #0, #16, 148(SP), R0 ;#0, #16, COLOR_DESC, I 10 00 ED 00073 ; 50 0094 CE 00076 BGTRU 2$ ;2$ C4 1A 0007A 5$: MOVW R0, 148(SP) ;I, COLOR_DESC 0094 CE 50 B0 0007C MOVC5 #0, (SP), #0, #80, 68(SP) ;#0, (SP), #0, #80, $RMS_PTR 0287 6E 00 2C 00081 ; 0050 8F 00 00084 ; 44 AE 00088 MOVW #20483, 68(SP) ;#20483, $RMS_PTR 44 AE 5003 8F B0 0008A MOVZBL #64, 72(SP) ;#64, $RMS_PTR+4 48 AE 40 8F 9A 00090 MOVL #2, 84(SP) ;#2, $RMS_PTR+16 54 AE 02 D0 00095 MOVB #1, 90(SP) ;#1, $RMS_PTR+22 5A AE 01 90 00099 CLRB 97(SP) ;$RMS_PTR+29 61 AE 94 0009D MOVB #1, 99(SP) ;#1, $RMS_PTR+31 63 AE 01 90 000A0 MOVL 152(SP), 112(SP) ;COLOR_DESC+4, $RMS_PTR+44 70 AE 0098 CE D0 000A4 MOVAB W^P.AAD, 116(SP) ;P.AAD, $RMS_PTR+48 74 AE 0000' CF 9E 000AA MOVB 148(SP), 120(SP) ;COLOR_DESC, $RMS_PTR+52 78 AE 0094 CE 90 000B0 MOVB #5, 121(SP) ;#5, $RMS_PTR+53 79 AE 05 90 000B6 MOVW #512, 122(SP) ;#512, $RMS_PTR+54 7A AE 0200 8F B0 000BA MOVC5 #0, (SP), #0, #68, (SP) ;#0, (SP), #0, #68, $RMS_PTR 0294 6E 00 2C 000C0 ; 0044 8F 00 000C3 ; 6E 000C7 MOVW #17409, (SP) ;#17409, $RMS_PTR 6E 4401 8F B0 000C8 MOVZWL #1024, 4(SP) ;#1024, $RMS_PTR+4 04 AE 0400 8F 3C 000CD CLRB 30(SP) ;$RMS_PTR+30 1E AE 94 000D3 MOVW #512, 34(SP) ;#512, $RMS_PTR+34 22 AE 0200 8F B0 000D6 MOVAB -1024(FP), 40(SP) ;COLOR_TABLE, $RMS_PTR+40 28 AE FC00 CD 9E 000DC MOVAB 68(SP), 60(SP) ;COLOR_FAB, $RMS_PTR+60 3C AE 44 AE 9E 000E2 PUSHAB 68(SP) ;COLOR_FAB 0300 44 AE 9F 000E7 CALLS #1, G^SYS$CREATE ;#1, SYS$CREATE 00000000G 00 01 FB 000EA MOVL R0, R6 ;R0, STATUS 56 50 D0 000F1 BLBS R6, 6$ ;STATUS, 6$ 0D 56 E8 000F4 PUSHL 80(SP) ;COLOR_FAB+12 0302 50 AE DD 000F7 PUSHL 80(SP) ;COLOR_FAB+8 50 AE DD 000FA CALLS #2, G^LIB$SIGNAL ;#2, LIB$SIGNAL 00000000G 00 02 FB 000FD 6$: PUSHL SP ;SP 0304 5E DD 00104 CALLS #1, G^SYS$CONNECT ;#1, SYS$CONNECT 00000000G 00 01 FB 00106 MOVL R0, R6 ;R0, STATUS 56 50 D0 0010D BLBS R6, 7$ ;STATUS, 7$ 0D 56 E8 00110 PUSHL 12(SP) ;COLOR_RAB+12 0306 0C AE DD 00113 PUSHL 12(SP) ;COLOR_RAB+8 0C AE DD 00116 CALLS #2, G^LIB$SIGNAL ;#2, LIB$SIGNAL 00000000G 00 02 FB 00119 7$: MOVZBL #255, R0 ;#255, BITP 0309 50 FF 8F 9A 00120 CVTLD R0, 156(SP) ;BITP, BITS 0310 009C CE 50 6E 00124 MOVZBL #255, -2048(FP) ;#255, RED 0316 F800 CD FF 8F 9A 00129 MOVZBL #255, 1212(SP) ;#255, GRN 0317 04BC CE FF 8F 9A 0012F MOVZBL #255, 188(SP) ;#255, BLU 0318 00BC CE FF 8F 9A 00135 MOVL #1, R0 ;#1, I 0324 50 01 D0 0013B 8$: CVTLD R0, 180(SP) ;I, ITER 0326 00B4 CE 50 6E 0013E DIVD3 W^P.AAE, 180(SP), 172(SP) ;P.AAE, ITER, TEMP1 0327 00B4 CE 0000' CF 67 00143 ; 00AC CE 0014A ADDD3 W^P.AAF, 172(SP), 164(SP) ;P.AAF, TEMP1, TEMP2 0328 00AC CE 0000' CF 61 0014D ; 00A4 CE 00154 MULD2 156(SP), 164(SP) ;BITS, TEMP2 0329 00A4 CE 009C CE 64 00157 CVTDL 164(SP), -2048(FP)[R0] ;TEMP2, RED[I] 0330 F800 CD40 00A4 CE 6A 0015E CVTDL 172(SP), 1212(SP)[R0] ;TEMP1, GRN[I] 0331 04BC CE40 00AC CE 6A 00166 CLRL 188(SP)[R0] ;BLU[I] 0332 00BC CE40 D4 0016E AOBLEQ #31, R0, 8$ ;#31, I, 8$ 50 1F F3 00173 ; C7 00176 MOVL #32, R0 ;#32, I 0339 50 20 D0 00177 9$: MOVAB -32(R0), R1 ;-32(R0), J 0341 51 E0 A0 9E 0017A CVTLD R1, 180(SP) ;J, ITER 0342 00B4 CE 51 6E 0017E DIVD3 W^P.AAG, 180(SP), 172(SP) ;P.AAG, ITER, TEMP1 0343 00B4 CE 0000' CF 67 00183 ; 00AC CE 0018A ADDD3 W^P.AAH, 172(SP), 164(SP) ;P.AAH, TEMP1, TEMP2 0344 00AC CE 0000' CF 61 0018D ; 00A4 CE 00194 MULD2 156(SP), 164(SP) ;BITS, TEMP2 0345 00A4 CE 009C CE 64 00197 MOVZBL #255, -2048(FP)[R0] ;#255, RED[I] 0346 F800 CD40 FF 8F 9A 0019E CVTDL 164(SP), 1212(SP)[R0] ;TEMP2, GRN[I] 0347 04BC CE40 00A4 CE 6A 001A5 CLRL 188(SP)[R0] ;BLU[I] 0348 00BC CE40 D4 001AD AOBLEQ #63, R0, 9$ ;#63, I, 9$ 50 3F F3 001B2 ; C4 001B5 MOVZBL #64, R0 ;#64, I 0355 50 40 8F 9A 001B6 10$: MOVAB -64(R0), R1 ;-64(R0), J 0357 51 C0 A0 9E 001BA CVTLD R1, 180(SP) ;J, ITER 0358 00B4 CE 51 6E 001BE DIVD3 W^P.AAI, 180(SP), 172(SP) ;P.AAI, ITER, TEMP1 0359 00B4 CE 0000' CF 67 001C3 ; 00AC CE 001CA ADDD3 W^P.AAJ, 172(SP), 164(SP) ;P.AAJ, TEMP1, TEMP2 0360 00AC CE 0000' CF 61 001CD ; 00A4 CE 001D4 MULD2 156(SP), 164(SP) ;BITS, TEMP2 0361 00A4 CE 009C CE 64 001D7 MOVZBL #255, -2048(FP)[R0] ;#255, RED[I] 0362 F800 CD40 FF 8F 9A 001DE CVTDL 164(SP), -2048(FP)[R0] ;TEMP2, RED[I] 0363 F800 CD40 00A4 CE 6A 001E5 CLRL 188(SP)[R0] ;BLU[I] 0364 00BC CE40 D4 001ED AOBLEQ #95, R0, 10$ ;#95, I, 10$ 50 0000005F 8F F3 001F2 ; C0 001F9 MOVZBL #96, R0 ;#96, I 0371 50 60 8F 9A 001FA 11$: SUBL3 R0, #128, R1 ;I, #128, J 0373 00000080 8F 50 C3 001FE ; 51 00205 CVTLD R1, 180(SP) ;J, ITER 0374 00B4 CE 51 6E 00206 DIVD3 W^P.AAK, 180(SP), 172(SP) ;P.AAK, ITER, TEMP1 0375 00B4 CE 0000' CF 67 0020B ; 00AC CE 00212 ADDD3 W^P.AAL, 172(SP), 164(SP) ;P.AAL, TEMP1, TEMP2 0376 00AC CE 0000' CF 61 00215 ; 00A4 CE 0021C MULD2 156(SP), 164(SP) ;BITS, TEMP2 0377 00A4 CE 009C CE 64 0021F CVTDL 164(SP), -2048(FP)[R0] ;TEMP2, RED[I] 0378 F800 CD40 00A4 CE 6A 00226 MOVZBL #255, 1212(SP)[R0] ;#255, GRN[I] 0379 04BC CE40 FF 8F 9A 0022E MOVAB -96(R0), R1 ;-96(R0), J 0380 51 A0 A0 9E 00235 CVTLD R1, 180(SP) ;J, ITER 0381 00B4 CE 51 6E 00239 DIVD3 W^P.AAM, 180(SP), 172(SP) ;P.AAM, ITER, TEMP1 0382 00B4 CE 0000' CF 67 0023E ; 00AC CE 00245 MULD2 156(SP), 172(SP) ;BITS, TEMP1 0383 00AC CE 009C CE 64 00248 CVTDL 172(SP), 188(SP)[R0] ;TEMP1, BLU[I] 0384 00BC CE40 00AC CE 6A 0024F AOBLEQ #127, R0, 11$ ;#127, I, 11$ 50 0000007F 8F F3 00257 ; 9F 0025E MOVZBL #128, R0 ;#128, I 0391 50 80 8F 9A 0025F 12$: SUBL3 R0, #160, R1 ;I, #160, J 0393 000000A0 8F 50 C3 00263 ; 51 0026A CVTLD R1, 180(SP) ;J, ITER 0394 00B4 CE 51 6E 0026B DIVD3 W^P.AAN, 180(SP), 172(SP) ;P.AAN, ITER, TEMP1 0395 00B4 CE 0000' CF 67 00270 ; 00AC CE 00277 MULD2 156(SP), 172(SP) ;BITS, TEMP1 0396 00AC CE 009C CE 64 0027A CVTDL 172(SP), -2048(FP)[R0] ;TEMP1, RED[I] 0397 F800 CD40 00AC CE 6A 00281 MOVZBL #255, 1212(SP)[R0] ;#255, GRN[I] 0398 04BC CE40 FF 8F 9A 00289 MOVAB -96(R0), R1 ;-96(R0), J 0399 51 A0 A0 9E 00290 CVTLD R1, 180(SP) ;J, ITER 0400 00B4 CE 51 6E 00294 DIVD3 W^P.AAO, 180(SP), 172(SP) ;P.AAO, ITER, TEMP1 0401 00B4 CE 0000' CF 67 00299 ; 00AC CE 002A0 MULD2 156(SP), 172(SP) ;BITS, TEMP1 0402 00AC CE 009C CE 64 002A3 CVTDL 172(SP), 188(SP)[R0] ;TEMP1, BLU[I] 0403 00BC CE40 00AC CE 6A 002AA AOBLEQ #159, R0, 12$ ;#159, I, 12$ 50 0000009F 8F F3 002B2 ; A9 002B9 MOVZBL #160, R0 ;#160, I 0410 50 A0 8F 9A 002BA 13$: SUBL3 R0, #192, R1 ;I, #192, J 0412 000000C0 8F 50 C3 002BE ; 51 002C5 CVTLD R1, 180(SP) ;J, ITER 0413 00B4 CE 51 6E 002C6 DIVD3 W^P.AAP, 180(SP), 172(SP) ;P.AAP, ITER, TEMP1 0414 00B4 CE 0000' CF 67 002CB ; 00AC CE 002D2 ADDD3 W^P.AAQ, 172(SP), 164(SP) ;P.AAQ, TEMP1, TEMP2 0415 00AC CE 0000' CF 61 002D5 ; 00A4 CE 002DC MULD2 156(SP), 164(SP) ;BITS, TEMP2 0416 00A4 CE 009C CE 64 002DF CLRL -2048(FP)[R0] ;RED[I] 0417 F800 CD40 D4 002E6 CVTDL 164(SP), 1212(SP)[R0] ;TEMP2, GRN[I] 0418 04BC CE40 00A4 CE 6A 002EB MOVZBL #255, 188(SP)[R0] ;#255, BLU[I] 0419 00BC CE40 FF 8F 9A 002F3 AOBLEQ #191, R0, 13$ ;#191, I, 13$ 50 000000BF 8F F3 002FA ; BC 00301 MOVZBL #192, R0 ;#192, I 0426 50 C0 8F 9A 00302 14$: MOVAB -192(R0), R1 ;-192(R0), J 0428 51 FF40 C0 9E 00306 CVTLD R1, 180(SP) ;J, ITER 0429 00B4 CE 51 6E 0030B DIVD3 W^P.AAR, 180(SP), 172(SP) ;P.AAR, ITER, TEMP1 0430 00B4 CE 0000' CF 67 00310 ; 00AC CE 00317 MULD2 156(SP), 172(SP) ;BITS, TEMP1 0431 00AC CE 009C CE 64 0031A CVTDL 172(SP), -2048(FP)[R0] ;TEMP1, RED[I] 0432 F800 CD40 00AC CE 6A 00321 SUBL3 R0, #224, R1 ;I, #224, J 0433 000000E0 8F 50 C3 00329 ; 51 00330 CVTLD R1, 180(SP) ;J, ITER 0434 00B4 CE 51 6E 00331 DIVD3 W^P.AAS, 180(SP), 172(SP) ;P.AAS, ITER, TEMP1 0435 00B4 CE 0000' CF 67 00336 ; 00AC CE 0033D MULD2 156(SP), 172(SP) ;BITS, TEMP1 0436 00AC CE 009C CE 64 00340 CVTDL 172(SP), 1212(SP)[R0] ;TEMP1, GRN[I] 0437 04BC CE40 00AC CE 6A 00347 MOVZBL #255, 188(SP)[R0] ;#255, BLU[I] 0438 00BC CE40 FF 8F 9A 0034F AOBLEQ #224, R0, 14$ ;#224, I, 14$ 50 000000E0 8F F3 00356 ; A8 0035D MOVZBL #225, R0 ;#225, I 0445 50 E1 8F 9A 0035E 15$: SUBL3 R0, #256, R2 ;I, #256, R2 0447 00000100 8F 50 C3 00362 ; 52 00369 MOVL R2, R1 ;R2, J 51 52 D0 0036A CVTLD R1, 180(SP) ;J, ITER 0448 00B4 CE 51 6E 0036D DIVD3 W^P.AAT, 180(SP), 172(SP) ;P.AAT, ITER, TEMP1 0449 00B4 CE 0000' CF 67 00372 ; 00AC CE 00379 ADDD3 W^P.AAU, 172(SP), 164(SP) ;P.AAU, TEMP1, TEMP2 0450 00AC CE 0000' CF 61 0037C ; 00A4 CE 00383 MULD2 156(SP), 164(SP) ;BITS, TEMP2 0451 00A4 CE 009C CE 64 00386 CVTDL 164(SP), -2048(FP)[R0] ;TEMP2, RED[I] 0452 F800 CD40 00A4 CE 6A 0038D MOVAB -224(R0), R1 ;-224(R0), J 0453 51 FF20 C0 9E 00395 CVTLD R1, 180(SP) ;J, ITER 0454 00B4 CE 51 6E 0039A DIVD3 W^P.AAV, 180(SP), 172(SP) ;P.AAV, ITER, TEMP1 0455 00B4 CE 0000' CF 67 0039F ; 00AC CE 003A6 MULD2 156(SP), 172(SP) ;BITS, TEMP1 0456 00AC CE 009C CE 64 003A9 CVTDL 172(SP), 1212(SP)[R0] ;TEMP1, GRN[I] 0457 04BC CE40 00AC CE 6A 003B0 MOVL R2, R1 ;R2, J 0458 51 52 D0 003B8 CVTLD R1, 180(SP) ;J, ITER 0459 00B4 CE 51 6E 003BB DIVD3 W^P.AAW, 180(SP), 172(SP) ;P.AAW, ITER, TEMP1 0460 00B4 CE 0000' CF 67 003C0 ; 00AC CE 003C7 ADDD3 W^P.AAX, 172(SP), 164(SP) ;P.AAX, TEMP1, TEMP2 0461 00AC CE 0000' CF 61 003CA ; 00A4 CE 003D1 MULD2 156(SP), 164(SP) ;BITS, TEMP2 0462 00A4 CE 009C CE 64 003D4 CVTDL 164(SP), 188(SP)[R0] ;TEMP2, BLU[I] 0463 00BC CE40 00A4 CE 6A 003DB ACBL #254, #1, R0, 15$ ;#254, #1, I, 15$ 01 000000FE 8F F1 003E3 ; FF75 50 003EA CLRL -1028(FP) ;RED+1020 0470 FBFC CD D4 003ED CLRL -2052(FP) ;GRN+1020 0471 F7FC CD D4 003F1 CLRL 1208(SP) ;BLU+1020 0472 04B8 CE D4 003F5 CLRL R0 ;I 0478 50 D4 003F9 16$: PUSHAL -1024(FP)[R0] ;COLOR_TABLE[I] 0480 FC00 CD40 DF 003FB PUSHAL -2048(FP)[R0] ;RED[I] F800 CD40 DF 00400 MOVB @(SP)+, @(SP)+ ;@(SP)+, @(SP)+ 9E 9E 90 00405 PUSHAL -1023(FP)[R0] ;COLOR_TABLE+1[I] 0481 FC01 CD40 DF 00408 PUSHAL 1216(SP)[R0] ;GRN[I] 04C0 CE40 DF 0040D MOVB @(SP)+, @(SP)+ ;@(SP)+, @(SP)+ 9E 9E 90 00412 PUSHAL -1022(FP)[R0] ;COLOR_TABLE+2[I] 0482 FC02 CD40 DF 00415 PUSHAL 192(SP)[R0] ;BLU[I] 00C0 CE40 DF 0041A MOVB @(SP)+, @(SP)+ ;@(SP)+, @(SP)+ 9E 9E 90 0041F AOBLEQ #255, R0, 16$ ;#255, I, 16$ 50 000000FF 8F F3 00422 ; D1 00429 PUSHL SP ;SP 0489 5E DD 0042A CALLS #1, G^SYS$PUT ;#1, SYS$PUT 00000000G 00 01 FB 0042C MOVL R0, R6 ;R0, STATUS 56 50 D0 00433 BLBS R6, 17$ ;STATUS, 17$ 0D 56 E8 00436 PUSHL 12(SP) ;COLOR_RAB+12 0491 0C AE DD 00439 PUSHL 12(SP) ;COLOR_RAB+8 0C AE DD 0043C CALLS #2, G^LIB$SIGNAL ;#2, LIB$SIGNAL 00000000G 00 02 FB 0043F 17$: ADDL2 #512, 40(SP) ;#512, COLOR_RAB+40 0493 28 AE 00000200 8F C0 00446 PUSHL SP ;SP 0495 5E DD 0044E CALLS #1, G^SYS$PUT ;#1, SYS$PUT 00000000G 00 01 FB 00450 MOVL R0, R6 ;R0, STATUS 56 50 D0 00457 BLBS R6, 18$ ;STATUS, 18$ 0D 56 E8 0045A PUSHL 12(SP) ;COLOR_RAB+12 0497 0C AE DD 0045D PUSHL 12(SP) ;COLOR_RAB+8 0C AE DD 00460 CALLS #2, G^LIB$SIGNAL ;#2, LIB$SIGNAL 00000000G 00 02 FB 00463 18$: MOVL #1, R0 ;#1, R0 0501 50 01 D0 0046A RET ; 04 0046D ; Routine Size: 1134 bytes, Routine Base: $CODE$ + 0000 ; 0502 1 END ! End of module COLOR_TABLE ; 0503 1 ; 0504 0 ELUDOM .EXTRN LIB$SIGNAL ; PSECT SUMMARY ; ; Name Bytes Attributes ; ; $PLIT$ 1300 NOVEC,NOWRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $CODE$ 1134 NOVEC,NOWRT, RD , EXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; Library Statistics ; ; -------- Symbols -------- Pages Processing ; File Total Loaded Percent Mapped Time ; ; SYS$SYSROOT:[SYSLIB]LIB.L32;6 21522 83 0 1156 00:02.1 ; DUA0:[NEW_USRLIB]USRLIB.L32;1 234 11 4 29 00:00.8 ; COMMAND QUALIFIERS ; BLIS/LIS=COLOR_TABLE.MAR/SOU=NOHEAD/MACH=(ASS,UNI)/OPT=(SPEED,LEV=3) COLOR_TABLE ; 0505 0 ; Compilation Complete .END U.1