Sistema operativo en pascal
Publicado por Francisco (3 intervenciones) el 21/09/2000 00:00:00
Necesito un pragrama que simule un Sistema operativo hecho en pascal.......gracias
Valora esta pregunta


0
Program odisea01;
uses
crt,windos;
type
Tstr25=string[25];
type
Tsysblock=record
coltext:integer;
colfond:integer;
username:string[12];
password:string[8];
end;
var
hallado:boolean;
V_sysblock:Tsysblock;
F_sysblock:File of Tsysblock;
comandos:array[0..10] of Tstr25;
comando:string[25];
procedure _salir;
var
c:integer;
begin
writeln('Saliendo ');
for c:=0 to 80 do BEGIN
write('>'); delay(20);
end;
clrscr;
delay(3000);
writeln;writeln;writeln;writeln;writeln;writeln;writeln;writeln;writeln;writeln;writeln;writeln;
writeln(' APAGUE SU EQUIPO AHORA');READLN;
READLN;
EXIT;
end;
function error:string;
var
c:integer;
enc:integer;
begin
enc:=0;
for c:=0 to 10 do
if comandos[c]=comando then
begin
enc:=enc+1; break;
end;
if enc=0 then
error:='Comando invalido' else error:='';
end;
procedure sysini;
begin
V_sysblock.coltext:=7;
V_sysblock.colfond:=15;
V_sysblock.username:='diego';
V_sysblock.password:='pass';
assign(F_sysblock,'c:\odisea\system');
rewrite(F_sysblock);
write(F_sysblock,V_sysblock);
close(F_sysblock);
end;
Procedure Console;
var
c:integer;
begin
comando:='';
textcolor(15);
clrscr;
writeln('Iniciando');
for c:=0 to 80 do begin write('>'); delay(10); end;
Writeln('Listo');
writeln;
repeat
comando:='';
textcolor(10);
Write('@>>');
textcolor(15);
readln(comando);
if comando='version' then
writeln('Version ....');
if comando='texto' then
writeln('Diego');
writeln(error);
until (comando='salir');_salir;
end;
begin
hallado:=false;
comandos[0]:='version';
comandos[1]:='texto';
comandos[2]:='calcular';
comandos[3]:='salir';
comandos[4]:='';
comandos[5]:='';
comandos[6]:='';
comandos[7]:='';
comandos[8]:='';
comandos[9]:='';
comandos[10]:='';
{assign(F_sysblock,'c:\odisea\system');
reset(F_sysblock);
if filesize(F_sysblock)<9 then
sysini; }
console;
end.