home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / COOLVIEW.ZIP / VIEW50_2.PAS < prev    next >
Pascal/Delphi Source File  |  1995-03-05  |  1KB  |  65 lines

  1. { View 50-lines screen in Text Mode                                         }
  2. { Coded '95 by Paradise, 1995.III.3                                         }
  3. { Lublin, Poland                                                            }
  4. { paradise@bachus.umcs.lublin.pl                                            }
  5. {                                                                           }
  6. { Example : Include picture exe file                                        }
  7. {                                                                           }
  8. { Need : piccy.obj (converted by "BINOBJ picture.bin piccy.obj PicData" )   }
  9. {                                                                           }
  10.  
  11. {$L piccy.obj}
  12. procedure PicData; external;
  13.  
  14. procedure OpenMode50L; assembler;
  15. asm
  16.   mov ax, 1202h
  17.   mov bl, 30h
  18.   int 10h
  19.   mov ax, 3h
  20.   int 10h
  21.   mov ax, 1112h
  22.   mov bl, 0
  23.   int 10h
  24. end;
  25.  
  26. procedure CloseMode; assembler;
  27. asm
  28.   mov ax,0003h
  29.   int 10h
  30. end;
  31.  
  32. procedure ShowPiccy;
  33. begin
  34.   move(mem[seg(PicData):ofs(PicData)],mem[$B800:0],8000);
  35. end;
  36.  
  37. procedure ShowPiccyAsm; assembler;
  38. asm
  39.   push ds
  40.   mov ax,seg PicData
  41.   mov ds,ax
  42.   mov si,offset PicData
  43.   mov ax,0b800h
  44.   mov es,ax
  45.   xor di,di
  46.   mov cx,8000/2
  47.   cld
  48.   rep movsw
  49.   pop ds
  50. end;
  51.  
  52. procedure WaitEsc; assembler;
  53. asm
  54.   @escnopressed:
  55.   in al,60h
  56.   cmp al,1
  57.   jne @escnopressed
  58. end;
  59.  
  60. begin
  61.   OpenMode50L;
  62.   ShowPiccyAsm;
  63.   WaitEsc;
  64.   CloseMode;
  65. end.