home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
beehive
/
bbs
/
picsuncr.arc
/
PICSMAIN.UNC
< prev
next >
Wrap
Text File
|
1991-08-11
|
2KB
|
74 lines
{ PICSMAIN.UNC - Pascal Integrated Communications System mainline code}
{ 5/25/87 Ver 1.6 Copyright 1987 by Les Archambault }
{ 02mar88 wb - Modifed to go directly into file mode with heap restored
when chaining back from PICSUNCR.CHN uncrunch program. Renamed from
PICSmain.inc to PICSmain.unc }
begin { PICS }
{ Go directly into file mode if PICS is executed by Turbo
Pascal instead of CP/M. }
turbo_executed := (cmdline_bfr > 127);
if not turbo_executed then
begin
{ Raise heap address to make room for uncrunch program }
HeapPtr:=$9300;
HeapFre:=$9300;
for i:=0 to 3 do
mem[HeapPtr+i]:=0;
{ Save heap address so heap can be restored after chain }
heap_low:=HeapPtr;
heap_hi:=RecurPtr;
system_init;
cold_start;
setup;
wait_for_user;
check_300_restrict;
end;
cmdline_bfr := 128;
while not fini do
begin
if turbo_executed then
begin
UsrOutPtr:=addr(putchar); { Reassign USR: to ROS output driver }
HeapPtr:=heap_ptr; { Restore heap pointers }
HeapFre:=heap_fre;
end
else
begin
login;
if online and in_use then Set_Initial_areas;
end;
while online and in_use do
begin
if op_chat
then op_chat := chat;
check_time;
make_prompt;
writeln(USR);
write_status_line;
st:=prompt(st,50,'ES?M');
if length(st)=1 then ch := st[1]
else ch:=' ';
if (not op_chat) then
begin
case mode of
message_mode: process_messages;
files_mode: process_files;
utility_mode: process_utility;
sysop_mode: process_sysop;
end;
end;
end;
exit_system;
wait_for_user;
check_300_restrict;
end;
system_de_init
end.
{End of PICSmain.unc }