mujtahidin(1155201011) PROGRAM PARAMETER HARDISK DENGAN PASCAL


PROGRAM PARAMETER_HARDISK;

uses wincrt;
label
     awal;
procedure latency;
var
 rpm :real;
 r   :real;
begin
 clrscr;
 gotoxy( 3, 2);write('[1] PROGRAM MENGHITUNG ROTATIONAL LATENCY');
 gotoxy( 3, 3);write('=========================================');
 gotoxy( 3, 4);write('Rumus (r) = (0.5*60*1000)/rpm');
 gotoxy( 3, 5);write('Untuk   r = Rotational Latency');
 gotoxy( 9, 6);write('rpm = Kecepatan putar disk');
 gotoxy( 3, 7);write('Diket...??');
 gotoxy( 5, 8);write('Masukkan nilai kecepatan putar hardisk(rpm) : ..........milisecond(ms)');
 gotoxy(51, 8);readln(rpm);
 gotoxy( 3, 9);write('Di tanya...??');
 gotoxy( 5,10);write('Nilai Rotational Latency...??');
 gotoxy( 3,11);write('Jawab...??');
 gotoxy( 5,12);write('Untuk rpm : ',rpm:4:2,' milisecond(ms)');
 r:=30000/rpm;
 gotoxy( 5,13);write('Adalah    : ',r:6:4,' milisecond(ms)');
 gotoxy( 3,15);write('Jadi nilai Rotational Latency (r) hardisk adalah  : ',r:6:4,' milisecond(ms)');
 gotoxy(35,22);write('Pemrogram by : mujtahidin');
 gotoxy(10,18);write('KLIK ENTER UNTUK KEMBALI KE MENU UTAMA...!');
 readkey;
 end;

procedure blockingfaktor;

var
 B   :real;
 R   :real;
 Bfr :real;
begin
 clrscr;
 gotoxy( 3, 2);write('[2] PROGRAM MENGHITUNG BLOCKING FACTOR');
 gotoxy( 3, 3);write('======================================');
 gotoxy( 3, 4);write('Rumus Bfr = B/R');
 gotoxy( 3, 5);write('Untuk Bfr = Blocking Factor');
 gotoxy( 3, 6);write('B = Ukuran Block');
 gotoxy( 3, 7);write('R = Ukuran record');
 gotoxy( 3, 8);write('Diket...??');
 gotoxy( 5, 9);write('Masukkan nilai ukuran block (B)  : ..........byte');
 gotoxy(40, 9);readln(B);
 gotoxy( 5,10);write('Masukkan nilai ukuran record (R) : ..........bute');
 gotoxy(40,10);readln(R);
 gotoxy( 3,11);write('Di tanya...??');
 gotoxy( 5,12);write('Nilai Blocking Faktor (Bfr)');
 gotoxy( 3,13);write('Jawab...??');
 gotoxy( 5,14);write('Untuk B : ',B:4:2,' byte');
 gotoxy( 5,15);write('Untuk R : ',R:4:2,' byte');
 gotoxy( 5,16);write('Maka Bfr=B/R');
 Bfr:=B/R;
 gotoxy( 5,17);write('Adalah : ',Bfr:6:4);
 gotoxy( 3,18);write('Jadi nilai Blocking Factor (Bfr) adalah : ',Bfr:6:4);
 gotoxy(35,22);write('Pemrogram by : mujtahidin');
 gotoxy(10,20);write('KLIK ENTER UNTUK KEMBALI KE MENU UTAMA...!');
 readkey;
end;

procedure bulk;

var
 t    :real;
 R    :real;
 W    :real;
 bulk :real;
begin
 clrscr;
 gotoxy( 3, 2);write('[3] PROGRAM MENGHITUNG BULK TRANSFER RATE');
 gotoxy( 3, 3);write('=========================================');
 gotoxy( 3, 4);write('Rumus t"=(t/2)*(R/(R+W))');
 gotoxy( 3, 5);write('Untuk t"= Bulk Transfer Rate');
 gotoxy( 9, 6);write('t = Transfer Rate');
 gotoxy( 9, 7);write('R = Ukuran Record');
 gotoxy( 9, 8);write('W = Pemborosan Record');
 gotoxy( 3, 9);write('Diket...??');
 gotoxy( 5,10);write('Masukkan nilai transfer rate (t)     : .............byte/second');
 gotoxy(44,10);readln(t);
 gotoxy( 5,11);write('Masukkan nilai ukuran record (R)     : .............byte');
 gotoxy(44,11);readln(R);
 gotoxy( 5,12);write('Masukkan nilai Pemborosan Record (W) : .............');
 gotoxy(44,12);readln(W);
 gotoxy( 3,13);write('Di tanya...??');
 gotoxy( 5,14);write('Nilai Bulk Transfer Rate (t")');
 gotoxy( 3,15);write('Jawab...??');
 gotoxy( 5,16);write('Untuk (t) : ',t:4:2,' byte/second');
 gotoxy( 5,17);write('Untuk (R) : ',R:4:2,' byte');
 gotoxy( 5,18);write('Untuk (W) : ',W:4:2);
 gotoxy( 5,19);write('Maka  t"  : (t/2)*(R/(R+W))'); 
 bulk:=(t/2)*(R/(R+W));
 gotoxy( 5,20);write('Adalah    : ',bulk:6:4);
 gotoxy( 3,21);write('Jadi nilai bulk transfer rate (Bfr) adalah : ',bulk:6:4);
 gotoxy(46,24);write('Pemrogram by : mujtahidin');
 gotoxy( 3,23);write('KLIK ENTER UNTUK KEMBALI KE MENU UTAMA...!');
 readkey;
end;

procedure transferblock;

var
 B   :real;
 t   :real;
 btt :real;
begin
 clrscr;
 gotoxy( 3, 2);write('[4] PROGRAM MENGHITUNG WAKTU TRANSFER BLOCK');
 gotoxy( 3, 3);write('===========================================');
 gotoxy( 3, 4);write('Rumus (btt) = B/t');
 gotoxy( 3, 5);write('Untuk bbt = waktu antar block');
 gotoxy(11, 6);write('B = ukuran block');
 gotoxy(11, 7);write('t = transfer rate');
 gotoxy( 3, 8);write('Diket  : ....??');
 gotoxy( 5, 9);write('Masukkan nilai (B) : .........byte');
 gotoxy(26, 9);readln(B);
 gotoxy( 5,10);write('Masukkan nilai (t) : .........byte/second ');
 gotoxy(26,10);readln(t);
 gotoxy( 3,11);write('Ditanya ...?');
 gotoxy( 5,12);write('waktu Transfer Block (btt)..??');
 gotoxy( 3,13);write('jawab ....?');
 gotoxy( 5,14);write('untuk (B) : ',B:4:2,' byte');
 gotoxy( 5,15);write('untuk (t) : ',t:4:2,' byte/second');
 gotoxy( 5,16);write('maka btt=B/t');
 btt:=B/t;
 gotoxy( 5,17);write('Adalah    : ',btt:6:4 ,' second');
 gotoxy( 3,19);write('Jadi nilai waktu transfer rate (btt) adalah : ',btt:6:4,' second');
 gotoxy(35,23);write('Pemrogram by : mujtahidin');
 gotoxy(10,21);write('KLIK ENTER UNTUK KEMBALI KE MENU UTAMA...!');
 readkey;
end;

procedure pemborosan;

var
 G    :real;
 Bfr  :real;
 w    :real;
begin
 clrscr;
 gotoxy( 3, 2);write('[5] PROGRAM MENGHITUNG PEMBOROSAN RUANG PADA HARDISK');
 gotoxy( 3, 3);write('====================================================');
 gotoxy( 3, 4);write('Rumus  W = G/Bfr');
 gotoxy( 3, 5);write('Untuk  W = Pemborosan ruang');
 gotoxy(10, 6);write('G = Ukuran interblock gap');
 gotoxy(10, 7);write('Bfr = Blocking Factor');
 gotoxy( 3, 8);write('Diket...??');
 gotoxy( 5, 9);write('Masukkan nilai ukuran interblock (G) : .........byte');
 gotoxy(44, 9);readln(G);
 gotoxy( 5,10);write('Masukkan nilai blocking faktor (Bfr) : ......... ');
 gotoxy(44,10);readln(Bfr);
 gotoxy( 3,11);write('Ditanya..??');
 gotoxy( 5,12);write('Pemborosan ruang pada hardsik..??');
 gotoxy( 3,13);write('Jawab...??');
 gotoxy( 5,14);write('Untuk (G)   : ',G:6:2,' byte');
 gotoxy( 5,15);write('Untuk (Bfr) : ',Bfr:6:2);
 gotoxy( 5,16);write('maka W = G/Bfr');
 W:=G/Bfr;
 gotoxy( 5,17);write('Adalah : ',W:6:4);
 gotoxy( 3,19);write('Jadi nilai pemborosan  ruang (W) adalah : ',W:6:4);
 gotoxy(35,23);write('Pemrogram by : mujtahidin');
 gotoxy(10,21);write('KLIK ENTER UNTUK KEMBALI KE MENU UTAMA...!');
 readkey;
end;

procedure totpem;

var
 P     :real;
 G     :real;
 block :real;
 tot   :real;
begin
 clrscr;
 gotoxy( 3, 2);write('[6] PROGRAM MENGHITUNG TOTAL PEMBOROSAN');
 gotoxy( 3, 3);write('=======================================');
 gotoxy( 3, 4);write('Rumus Wt=P+((P+G)/Bfr)');
 gotoxy( 3, 5);write('Untuk Wt=Total Pemborosan');
 gotoxy(10, 6);write('P=Ukuran Pointer');
 gotoxy(10, 7);write('G=Ukuran Interblok gap');
 gotoxy( 8, 8);write('Bfr=Blocking Faktor');
 gotoxy( 3, 9);write('Diket...??');
 gotoxy( 5,10);write('Masukkan nilai ukuran pointer (P)    : .....');
 gotoxy(44,10);readln(p);
 gotoxy( 5,11);write('Masukkan nilai ukuran interblok (G)  : .....');
 gotoxy(44,11);readln(G);
 gotoxy( 5,12);write('Masukkan nilai blocking faktor (Bfr) : .....');
 gotoxy(44,12);readln(block);
 gotoxy( 3,13);write('Di tanya...??');
 gotoxy( 5,14);write('Nilai total pemborosan...?');
 gotoxy( 3,15);write('Jawab...??');
 gotoxy( 5,16);write('Untuk (P)   : ',P:4:2);
 gotoxy( 5,17);write('Untuk (G)   : ',G:4:2);
 gotoxy( 5,18);write('Untuk (Bfr) : ',block:4:2);
 gotoxy( 5,19);write('Maka wt=P+((P+G)/Bfr)');
 tot:=P+((P+G)/block);
 gotoxy( 5,20);write('Adalah      : ',tot:4:2);
 gotoxy( 3,21);write('Jadi nilai pemborosan total adalah : ',tot:6:4);
 gotoxy(40,24);write('Pemrogram by : mujtahidin');
 gotoxy( 3,23);write('KLIK ENTER UNTUK KEMBALI KE MENU UTAMA...!');
 readkey;
end;

procedure waktutransfer;

var
 R   :real;
 t   :real;
 Tr  :real;
begin
 clrscr;
 gotoxy( 3, 2);write('[7] PROGRAM MENGHITUNG WAKTU TRANSFER RECORD');
 gotoxy( 3, 3);write('============================================');
 gotoxy( 3, 4);write('Rumus Tr=R/t');
 gotoxy( 3, 5);write('Untuk Tr=Waktu transfer record');
 gotoxy(10, 6);write('R=Ukuran record');
 gotoxy(10, 7);write('t=Transfer rate');
 gotoxy( 3, 8);write('Diket...??');
 gotoxy( 5, 9);write('Masukkan nilai (R) : .........byte');
 gotoxy(26, 9);readln(R);
 gotoxy( 5,10);write('Masukkan nilai (t) : .........byte/second ');
 gotoxy(26,10);readln(t);
 gotoxy( 3,11);write('Ditanya ...?');
 gotoxy( 5,12);write('Nilai waktu transfer record..??');
 gotoxy( 3,13);write('jawab ....?');
 gotoxy( 5,14);write('untuk (R) : ',R:4:2,' byte');
 gotoxy( 5,15);write('untuk (t) : ',t:4:2,' byte/second');
 gotoxy( 5,16);write('maka Tr=R/t');
 Tr:=R/t;
 gotoxy( 5,17);write('Adalah    : ',Tr:6:4 ,' second');
 gotoxy( 3,19);write('Jadi nilai waktu transfer record (Tr) adalah : ',Tr:6:4,' second');
 gotoxy(35,23);write('Pemrogram by : mujtahidin');
 gotoxy(10,21);write('KLIK ENTER UNTUK KEMBALI KE MENU UTAMA...!');
 readkey;
end;

procedure selesai;
begin
 clrscr;
 gotoxy(35,8);write('PROGRAM SELESAI');
 gotoxy(36,10);write('TERIMA KASIH');
 gotoxy(30,19);write('Pemrogram by : mujtahidin');
 gotoxy(28,20);write('UNIVERSITAS  BAKTI  INDONESIA');
end;

var
 pilih   :byte;                      
begin
 awal:
 clrscr;
 gotoxy(10, 5);write('MENU PROGRAM PENGHITUNGAN PARAMETER HARDISK NiduDjavu');
 gotoxy(10, 6);write('*****************************************************');
 gotoxy(10, 7);write('[1]. PROGRAM MENGHITUNG ROTATIONAL LATENCY (r)......?');
 gotoxy(10, 8);write('[2]. PROGRAM MENGHITUNG BLOCKING FAKTOR (Bfr).......?');
 gotoxy(10, 9);write('[3]. PROGRAM MENGHITUNG BULK TRANFER RATE (t")......?');
 gotoxy(10,10);write('[4]. PROGRAM MENGHITUNG WAKTU TRANFER BLOCK (btt)...?');
 gotoxy(10,11);write('[5]. PROGRAM MENGHITUNG PEMBOROSAN (W) .............?');
 gotoxy(10,12);write('[6]. PROGRAM MENGHITUNG TOTAL PEMBOROSAN (Wtotal)...?');
 gotoxy(10,13);write('[7]. PROGRAM MENGHITUNG WAKTU TRANSFER RECORD (Tr)..?');
 gotoxy(35,20);write('Pemrogram by : mujtahidin');
 gotoxy(10,14);write('[8]. SELESAI');

 pilih:=9;

 begin
  gotoxy(10,17);write('MASUKKAN PILIHAN ANDA [1-8] : [...]');
  gotoxy(42,17);readln(pilih);
 end;

case pilih of
1:begin
  latency;
   goto awal;
  end;
2:begin
  blockingfaktor;
   goto awal;
  end;
3:begin
  bulk;
   goto awal;
  end;
4:begin
  transferblock;
   goto awal;
  end;
5:begin
  pemborosan;
   goto awal;
  end;
6:begin
  totpem;
   goto awal;
  end;
7:begin
  waktutransfer;
   goto awal;
  end;
8:begin
  selesai;
   end;
    else
     begin
   clrscr;
   gotoxy(35,20);write('Pemrogram by : mujtahidin');
   gotoxy(10,10);write('PILIHAN ANDA SALAH, KLIK ENTER UNTUK KEMBALI KE MENU UTAMA : |_._|');
   gotoxy(73,10);readln;
   goto awal;
  end;
 end;
end.

0 comments:

Post a Comment

Comments

Followers