home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG094.ARC
/
HIRES5B.I
< prev
next >
Wrap
Text File
|
1979-12-31
|
6KB
|
169 lines
begin
if VduStatus[1]<>1 then
begin
Case Ch of
' '..'}' :begin
If hi(CursPos)>=$F8 then CursPos:=$F7FF;
If (VduStatus[4]=1) or (VduStatus[5]=1)
then
begin
StorePCG(Ch);
If VduStatus[4]=1
then Scratch[13]:=255; {underline}
if VDUstatus[5]=1 then invert;
PCGBank:= (CursPos-$F000) shr 7;
PCGNo := (CursPos-$F000) and $7F;
Port[28]:=144;
Mem[CursPos]:=PCGBank;
Port[28]:=128+PCGBank;
PCGPos:=(PCGNo shl 4)+$F800;
Move(Scratch,Mem[PCGPos],16);
Port[28]:=128;
Mem[CursPos]:=PCGNo+128
end
else
begin
Port[28]:=144;
Mem[CursPos]:=0;
Port[28]:=128;
Mem[CursPos]:=Ord(Ch)
end;
Port[28]:=128;
CursPos:=CursPos+1;
end;
#13 :CursPos:=CursPos and $FFC0; {Reset bits 0 to 5}
#10 :CursPos:=CursPos+64;
#8,#127 :begin
Port[28]:=144;
Mem[CursPos]:=0;
Port[28]:=128;
Mem[CursPos]:=32;
If CursPos>$F000 then CursPos:=CursPos-1
end;
^Z :begin
CursPos:=$F000;
ClearHiRes
end;
#27 :VDUstatus[1]:=1 {esc}
end;
end
else
Case VDUstatus[2] of
1:begin
VDUstatus[3]:=(Ord(Ch)-32) and 15;
VDUstatus[2]:=2;
end;
2:begin
CursPos:=$F000+(VDUstatus[3] SHL 6)+(Ord(Ch)-32) and 63;
For Count:= 1 to 3 do VDUstatus[count]:=0
end
else
begin
Case Ch of
'=' :VDUstatus[2]:=1;
'[' :VduStatus[4]:=1;{UNDERLINE ON}
']' :VduStatus[4]:=0;
')' :VduStatus[5]:=1;{Highlight on}
'(' :VduStatus[5]:=0;
end;
If VduStatus[2]=0 then VDUstatus[1]:=0
end
end;
If hi(CursPos)>=$F4
then begin
CursPos:=Curspos-64;
ScrollUp
end
end;
procedure HiRes;
{procedure set_6416;}
Var count:byte;
begin
CursPos:=$F000;
ConOutAdr:=ConOutPtr;
ConOutPtr:=Addr(VduOut); {Set to 64*16 Vdu Driver}
For count:=1 to 5 do VDUstatus[count]:=0;
inline ($21/*+52/$C5/$E5/6/$10/$78/$3D/$D3/$0C/$7E/$D3/
$0D/$2B/$10/$F6/6/$4B/$CD/*+5/$E1/$C1/$C9/
$E5/$21/$7A/0/$2B/$7C/$B5/$20/$FB/$10/$F6/$E1/$C9/
107/64/81/55/18/9/$10/17/$48/$0F/$2F/$0F/
0/0/0/0)
end; {procedure set_6416}
procedure NORMAL;
{ Procedure to restore Inverse characters
to the PCG.
This procedure is derived from the disk
ROM routine at E02AH, which fills the
PCG with inverse characters of the
current font type.
}
begin { procedure normal }
{ SCNTOP EQU 0F000H }
{ PCGRAM EQU 0F800H }
{ ROMPORT EQU 0BH }
{ NORMAL: }
inline($3E/ $01/ { LD A,1 }
$D3/ $0B/ { OUT (ROMPORT),A }
$21/ $F000/ { LD HL,SCNTOP }
$11/ $F800/ { LD DE,PCGRAM }
{ NORM_1: }
$7E/ { LD A,(HL) }
$2F/ { CPL }
$12/ { LD (DE),A }
$23/ { INC HL }
$13/ { INC DE }
$CB/ $5C/ { BIT 3,H }
$28/ $F7/ { JR Z,NORM_1 }
$AF/ { XOR A }
$D3/ $0B { OUT (ROMPORT),A }
)
end; {procedure normal}
Procedure vdu_init;
begin
inline ($21/*+52/$C5/$E5/6/$10/$78/$3D/$D3/$0C/$7E/$D3/
$0D/$2B/$10/$F6/6/$4B/$CD/*+5/$E1/$C1/$C9/
$E5/$21/$7A/0/$2B/$7C/$B5/$20/$FB/$10/$F6/$E1/$C9/
{Crtc Initialisation data for 80x24 screen}
{Data=>}$6b/$50/$58/$37/$1b/$05/$18/$1a/$48/$0a/$2a/$0a/$20/$00/$00/$00)
end;
procedure Reset_8024;
{ Procedure to restore Inverse characters
to the PCG and reset attribute RAM to
bank 0.}
Var Count:Integer;
begin { Reset }
ConOutPtr:=ConOutAdr; {Reset normal VDU driver}
Vdu_init; {80*24 screen}
Port[28]:=144; {Select attribute RAM }
For count:=$F000 to $F7FF do mem[count]:=0;
port[28]:=128;
normal
end; { Reset }