home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 18 / CD_ASCQ_18_111294_W.iso / dos / prg / pas / gfxfx / raster.pas < prev    next >
Pascal/Delphi Source File  |  1994-04-21  |  4KB  |  132 lines

  1. {$g+}
  2.  
  3. program raster;
  4. { First 'raster', Try Copper5 instead, by Bas van Gaalen, Holland, PD }
  5. const
  6.   rgb : array[0..299] of longint = (
  7.     $00000000,$00000000,$00000000,$00010000,$00020000,
  8.     $00030000,$00040000,$00050000,$00060000,$00070000,
  9.     $00080000,$00090000,$000a0000,$000b0000,$000c0000,
  10.     $000d0000,$000e0000,$000f0000,$00100000,$00110000,
  11.     $00120000,$00130000,$00140000,$00150000,$00160000,
  12.     $00170000,$00180000,$00190000,$001a0000,$001b0000,
  13.     $001c0000,$001d0000,$001e0000,$001f0000,$00200000,
  14.     $00210000,$00220000,$00230000,$00240000,$00250000,
  15.     $00260000,$00270000,$00280000,$00290000,$002a0000,
  16.     $002b0000,$002c0000,$002d0000,$002e0000,$002f0000,
  17.     $00300000,$00310000,$00320000,$00330000,$00340000,
  18.     $00350000,$00360000,$00370000,$00380000,$00390000,
  19.     $003a0000,$003b0000,$003c0000,$003d0000,$003e0000,
  20.     $003f0000,$003f0100,$003e0200,$003d0300,$003c0400,
  21.     $003b0500,$003a0600,$00390700,$00380800,$00370900,
  22.     $00360a00,$00350b00,$00340c00,$00330d00,$00320e00,
  23.     $00310f00,$00301000,$002f1100,$002e1200,$002d1300,
  24.     $002c1400,$002b1500,$002a1600,$00291700,$00281800,
  25.     $00271900,$00261a00,$00251b00,$00241c00,$00231d00,
  26.     $00221e00,$00211f00,$00202000,$001f2100,$001e2200,
  27.     $001d2300,$001c2400,$001b2500,$001a2600,$00192700,
  28.     $00182800,$00172900,$00162a00,$00152b00,$00142c00,
  29.     $00132d00,$00122e00,$00112f00,$00103000,$000f3100,
  30.     $000e3200,$000d3300,$000c3400,$000b3500,$000a3600,
  31.     $00093700,$00083800,$00073900,$00063a00,$00053b00,
  32.     $00043c00,$00033d00,$00023e00,$00013f00,$00003f01,
  33.     $00003e02,$00003d03,$00003c04,$00003b05,$00003a06,
  34.     $00003907,$00003808,$00003709,$0000360a,$0000350b,
  35.     $0000340c,$0000330d,$0000320e,$0000310f,$00003010,
  36.     $00002f11,$00002e12,$00002d13,$00002c14,$00002b15,
  37.     $00002a16,$00002917,$00002818,$00002719,$0000261a,
  38.     $0000251b,$0000241c,$0000231d,$0000221e,$0000211f,
  39.     $00002020,$00001f21,$00001e22,$00001d23,$00001c24,
  40.     $00001b25,$00001a26,$00001927,$00001828,$00001729,
  41.     $0000162a,$0000152b,$0000142c,$0000132d,$0000122e,
  42.     $0000112f,$00001030,$00000f31,$00000e32,$00000d33,
  43.     $00000c34,$00000b35,$00000a36,$00000937,$00000838,
  44.     $00000739,$0000063a,$0000053b,$0000043c,$0000033d,
  45.     $0000023e,$0000013f,$0000003f,$0000003e,$0000003d,
  46.     $0000003c,$0000003b,$0000003a,$00000039,$00000038,
  47.     $00000037,$00000036,$00000035,$00000034,$00000033,
  48.     $00000032,$00000031,$00000030,$0000002f,$0000002e,
  49.     $0000002d,$0000002c,$0000002b,$0000002a,$00000029,
  50.     $00000028,$00000027,$00000026,$00000025,$00000024,
  51.     $00000023,$00000022,$00000021,$00000020,$0000001f,
  52.     $0000001e,$0000001d,$0000001c,$0000001b,$0000001a,
  53.     $00000019,$00000018,$00000017,$00000016,$00000015,
  54.     $00000014,$00000013,$00000012,$00000011,$00000010,
  55.     $0000000f,$0000000e,$0000000d,$0000000c,$0000000b,
  56.     $0000000a,$00000009,$00000008,$00000007,$00000006,
  57.     $00000005,$00000004,$00000003,$00000002,$00000001,
  58.     $00000000,$00000000,$00000000,$00000000,$00000000,
  59.     $00000000,$00000000,$00000000,$00000000,$00000000,
  60.     $00000000,$00000000,$00000000,$00000000,$00000000,
  61.     $00000000,$00000000,$00000000,$00000000,$00000000,
  62.     $00000000,$00000000,$00000000,$00000000,$00000000,
  63.     $00000000,$00000000,$00000000,$00000000,$00000000,
  64.     $00000000,$00000000,$00000000,$00000000,$00000000,
  65.     $00000000,$00000000,$00000000,$00000000,$00000000,
  66.     $00000000,$00000000,$00000000,$00000000,$00000000);
  67.  
  68. var
  69.   i : word;
  70.  
  71. begin
  72.   asm
  73.     cli
  74.    @l0:
  75.     mov dx,03dah
  76.    @l1:
  77.     in al,dx
  78.     test al,8
  79.     jnz @l1
  80.    @l2:
  81.     in al,dx
  82.     test al,8
  83.     jz @l2
  84.  
  85.     mov cx,300
  86.    @l3:
  87.  
  88.     mov dx,03c8h
  89.     xor al,al
  90.     out dx,al
  91.     inc dx
  92.     mov si,cx
  93.     shl si,2
  94.     mov al,byte ptr rgb[si]
  95.     out dx,al
  96.     inc si
  97.     mov al,byte ptr rgb[si]
  98.     out dx,al
  99.     push dx
  100.  
  101.     mov dx,03dah
  102.    @l4:
  103.     in al,dx
  104.     test al,1
  105.     jnz @l4
  106.    @l5:
  107.     in al,dx
  108.     test al,1
  109.     jz @l5
  110.  
  111.     pop dx
  112.     inc si
  113.     mov al,byte ptr rgb[si]
  114.     out dx,al
  115.     loop @l3
  116.  
  117.     mov dx,03c8h
  118.     xor al,al
  119.     out dx,al
  120.     inc dx
  121.     out dx,al
  122.     out dx,al
  123.     out dx,al
  124.  
  125.     mov dx,60h
  126.     in al,dx
  127.     cmp al,1
  128.     jne @l0
  129.     sti
  130.   end;
  131. end.
  132.