-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathXDC_COMM.PAS
56 lines (49 loc) · 915 Bytes
/
XDC_COMM.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
unit xdc_common;
{procedures and functions common to both the encoder and player}
interface
procedure xdc_setvid(b:byte); {set video mode}
procedure fatalerr(s:string);
implementation
uses
xdc_globals,xdc_log,m6845ctl;
procedure xdc_setvid(b:byte);
{1=160x200x16, 2=640x200x2, 3=160x200x16 Tandy/PCjr, 4=240x128x2 HP 95LX}
begin
case b of
1:asm
mov ax,0006
int 10h
{turn on colorburst}
mov dx,m6845_mode_ctl
mov al,c_videosignal_enable+c_graphics_enable+c_640x200_enable
out dx,al
end;
2:asm
mov ax,0006
int 10h
end;
3:asm
mov ax,0008
int 10h
end;
{$IFDEF HP95LX}
4:asm
mov ax,0020h
int 10h
end;
{$ENDIF}
end;
end;
procedure fatalerr(s:string);
begin
s:='FATAL ERROR: '+s;
if logging then stderr(s);
{doneCompiler;}
asm
mov ax,0003
int 10h
end;
writeln(s);
halt(1);
end;
end.