Turbo Assembler	 Version 4.1	    07/16/99 01:00:56	    Page 1
gyrpcx2.ASM



      1					 ;  WARNING...this is what happens when	you drink TOO much coffee.
      2					 ; 121,	118, 115, 99, 98, 97, 96, 94, 92, 91, 90, 89, 88
      3					 ; see nice for	the explanation	of what	the fuck i'm doing here.
      4
      5					 ;Eldre8 - found 2/3 bytes to save!
      6
      7	    0000			 code  segment para public 'CODE'
      8					       assume cs:code, ds:code
      9							 .386
     10							 org 100h
     11	    0100			 start:
     12	    0100  8A 1E	80 00		   db 8ah, 1eh,	80h, 00h       ; hehehe	that was fun. (mov bl, [80h])
     13	    0104  88 87	0081		   mov [bx+81h], al
     14
     15	    0108  B4 3D			   mov ah, 3dh
     16	    010A  B2 82			   mov dl, 82h
     17	    010C  CD 21			   int 21h
     18	    010E  72 44			   jc FuckHead
     19	    0110  8B D8			   mov bx, ax
     20
     21	    0112  B0 13			   mov al, 13h	 ; this	is a fluke one...
     22	    0114  CD 10			   int 10h
     23
     24	    0116  68 A000		   push	0a000h	 ; pissed off that nothing can be done about this.
     25	    0119  07			   pop es	 ; well, at least nothing i can	think of.
     26
     27					 ;鞍鞍DECODE PCX北北北北北北北北北北北北北北北北北北北北北北北北北北北北
     28
     29	    011A  B4 3F			   mov ah, 3fh
     30	    011C  B5 FD			   mov ch, (64768+128)/256     ; evil zoon tricks. ;)
     31	    011E  BA 0155r		   lea dx, Manufacturer
     32	    0121  CD 21			   int 21h
     33
     34	    0123  33 FF			   xor di, di		 ; damn	inconsistant initial values...
     35
     36	    0125  BE 01D5r		   lea si, ScrPal
     37	    0128			 DecodePCX:
     38	    0128  B1 01			   mov cl, 1
     39	    012A  AC			   lodsb
     40	    012B  3C C0			   cmp al, 192
     41	    012D  72 05			   jb Single
     42	    012F  24 3F			   and al, 63
     43	    0131  8A C8			   mov cl, al
     44	    0133  AC			   lodsb
     45	    0134			 Single:
     46	    0134  F3> AA		   rep stosb
     47	    0136  81 FF	FA01		   cmp di, 64001
     48	    013A  72 EC			   jb DecodePCX
     49
     50	    013C  BA 03C8		   mov dx, 3c8h
     51	    013F  32 C0			   xor al, al
     52	    0141  EE			   out dx, al
     53	    0142  42			   inc dx
     54
     55	    0143  B5 03			   mov ch, 3   ;cx=768..zoon's trick is	VERY nice.  as you can tell. :)
     56	    0145			 SetPal:
     57	    0145  AC			   lodsb
Turbo Assembler	 Version 4.1	    07/16/99 01:00:56	    Page 2
gyrpcx2.ASM



     58	    0146  C0 E8	02		   shr al, 2
     59	    0149  EE			   out dx, al
     60	    014A  E2 F9			   loop	SetPal
     61
     62					 ;北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北
     63	    014C  32 E4			   xor ah, ah	  ;
     64	    014E  CD 16			   int 16h	  ;  Very tempted to use Pascal's tactic for these... :)
     65							  ;  the 20 byte starfield is amazing...but he could've
     66	    0150  B0 03			   mov al, 3	  ;  just been nice and	at least returned to dos :)
     67	    0152  CD 10			   int 10h	  ;  but i suppose it's	justified, as these three things
     68							  ;  are around	11 bytes total anyway.	damn that thing
     69	    0154			 FuckHead:	  ;  was small.
     70	    0154  C3			   ret		  ;
     71
     72					 ;鞍癙CX decoder data北北北北北北北北北北北北北北北北北北北北北北北北北北
     73	    0155  ??			 Manufacturer	 db	 ?
     74	    0156  ??			 PCXVersion		 db	 ?
     75	    0157  ??			 Encoding		 db	 ?
     76	    0158  ??			 BitsPerPixel	 db	 ?
     77	    0159  ????			 XMin				 dw	 ?
     78	    015B  ????			 YMin				 dw	 ?
     79	    015D  ????			 XMax				 dw	 ?
     80	    015F  ????			 YMax				 dw	 ?
     81	    0161  ????			 Hres				 dw	 ?
     82	    0163  ????			 Vres				 dw	 ?
     83	    0165  30*(??)		 CrapPalette	 db	 48 dup	(?)
     84	    0195  ??			 Reserved1		 db	 ?
     85	    0196  ??			 ColorPlanes	 db	 ?			   ; so	i like the american spelling	    +
     86					 better...
     87	    0197  ????			 BytesPerLine	 dw	 ?
     88	    0199  ????			 PaletteType	 dw	 ?
     89	    019B  3A*(??)		 Reserved2		 db	 58 dup	(?)
     90
     91	    01D5  FD00*(??)		 ScrPal	  db   64768 dup (?)	 ; screen + palette.
     92					 ;北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北北
     93
     94	    FED5			 ends code
     95					 end start
Turbo Assembler	 Version 4.1	    07/16/99 01:00:56	    Page 3
Symbol Table




Symbol Name		Type   Value			   Cref	(defined at #)

??DATE			Text   "07/16/99"
??FILENAME		Text   "gyrpcx2	"
??TIME			Text   "01:00:56"
??VERSION		Number 040A
@CPU			Text   0F0FH			   #9
@CURSEG			Text   CODE			   #7
@FILENAME		Text   GYRPCX2
@WORDSIZE		Text   4			   #7  #9
BITSPERPIXEL		Byte   CODE:0158		   #76
BYTESPERLINE		Word   CODE:0197		   #87
COLORPLANES		Byte   CODE:0196		   #85
CRAPPALETTE		Byte   CODE:0165		   #83
DECODEPCX		Near   CODE:0128		   #37	48
ENCODING		Byte   CODE:0157		   #75
FUCKHEAD		Near   CODE:0154		   18  #69
HRES			Word   CODE:0161		   #81
MANUFACTURER		Byte   CODE:0155		   31  #73
PALETTETYPE		Word   CODE:0199		   #88
PCXVERSION		Byte   CODE:0156		   #74
RESERVED1		Byte   CODE:0195		   #84
RESERVED2		Byte   CODE:019B		   #89
SCRPAL			Byte   CODE:01D5		   36  #91
SETPAL			Near   CODE:0145		   #56	60
SINGLE			Near   CODE:0134		   41  #45
START			Near   CODE:0100		   #11	95
VRES			Word   CODE:0163		   #82
XMAX			Word   CODE:015D		   #79
XMIN			Word   CODE:0159		   #77
YMAX			Word   CODE:015F		   #80
YMIN			Word   CODE:015B		   #78

Groups & Segments	Bit Size Align	Combine	Class	   Cref	(defined at #)

CODE			16  FED5 Para	Public	CODE	   #7  8  8
