home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech.edu!news.byu.edu!eff!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!news.funet.fi!fuug!kiae!demos!newsserv
- From: evsikov@lcta5.jinr.dubna.su (Igor Evsikov)
- Newsgroups: comp.lang.pascal
- Subject: Re: How to make own characterset for DOS
- Message-ID: <AAXSyAhK4B@lcta5.jinr.dubna.su>
- Date: 13 Dec 92 23:28:33 GMT
- Sender: news-service@newcom.kiae.su
- Reply-To: evsikov@lcta5.jinr.dubna.su
- Organization: Lcta
- Lines: 70
-
-
- { Procedures set and get current image for characters EGA VGA}
- { Sourse and Dest Array [1..16] of byte }
- const
- images : array [1..16] of byte =
-
- {NormalArrow} ($00,$40,$60,$70,$78,$7C,$7E,$78,$6c,$46,$07,$06,$00,$00,$00,$00);
- (*
- {DragArrow } ($18,$3C,$7E,$FF,$18,$18,$18,$18,$18,$18,$FF,$7E,$3C,$18,$00,$00);
- {ClockArrow } ($FE,$82,$82,$82,$82,$7C,$38,$10,$38,$54,$92,$BA,$FE,$FE,$00,$00);
- {HandArrow } ($00,$C0,$C0,$C0,$D5,$D5,$D5,$FF,$FF,$FF,$FF,$7F,$1F,$1F,$00,$00);
- {Clock2Arrow} ($00,$1C,$3E,$08,$1C,$22,$49,$49,$4D,$41,$22,$1C,$1C,$22,$00,$00);
- {Hand2Arrow } ($40,$40,$40,$55,$55,$55,$7F,$7F,$7F,$3F,$3E,$3E,$3E,$3E,$00,$00);
- {BigArrow } ($40,$60,$70,$78,$7C,$7E,$7F,$7F,$0C,$0C,$0E,$06,$07,$07,$07,$00);
- {SU29Arrow } ($10,$10,$38,$38,$38,$7C,$7C,$FE,$FE,$FE,$10,$38,$7C,$00,$00,$00);
- {Hand3Arrow } ($C0,$A0,$50,$2B,$15,$2E,$5F,$BF,$7F,$3F,$1F,$1F,$1F,$1F,$00,$00);
- {FootArrow } ($60,$9E,$95,$81,$81,$81,$82,$42,$42,$42,$42,$42,$42,$3C,$00,$00);
- {PlusArrow } ($00,$00,$00,$18,$18,$18,$FF,$FF,$18,$18,$18,$00,$00,$00,$00,$00);
- *)
- Procedure SetImageChar(Ch:char;var sourse);
- { Write Character matrix to map 2}
-
- var ofset : word;
- begin
- ofset :=ord(Ch)*32;
- inline($fa); { CLI }
- portw[$3c4]:=$0402; { See PROGRAMMER'S GUIDE TO PC AND PS/2 }
- portw[$3c4]:=$0704; { VIDEO SYSTEMS }
- portw[$3ce]:=$0204; { RICHARD WILTON }
- portw[$3ce]:=$0005; { And THIS TEXT }
- portw[$3ce]:=$0006;
- move(sourse,ptr($a000,ofset)^,16);
- portw[$3c4]:=$0302;
- portw[$3c4]:=$0304;
- portw[$3ce]:=$0004;
- portw[$3ce]:=$1005;
- portw[$3ce]:=$0E06;
- inline($fb); { STI }
- end;
-
- Procedure GetImageChar( ChIn: char; var dest);
- { Read Character matrix from map 2}
-
- var ofset : word;
- begin
- ofset :=ord(ChIn)*32;
- inline($fa); { CLI }
- portw[$3c4]:=$0402; { See PROGRAMMER'S GUIDE TO PC AND PS/2 }
- portw[$3c4]:=$0704; { VIDEO SYSTEMS }
- portw[$3ce]:=$0204; { RICHARD WILTON }
- portw[$3ce]:=$0005; { And THIS TEXT }
- portw[$3ce]:=$0006;
- move(ptr($a000,ofset)^,dest,16);
- portw[$3c4]:=$0302;
- portw[$3c4]:=$0304;
- portw[$3ce]:=$0004;
- portw[$3ce]:=$1005;
- portw[$3ce]:=$0E06;
- inline($fb); { STI }
- end;
-
- var
- tmpImage : array[1..16] of byte;
- begin
- GetImageChar('a',tmpImage);
- SetImageChar('a',Images);
- writeln('a a a a a a a a a a a a a a a a');
- readln;
- SetImageChar('a',tmpImage);
- end.
-