|
DataMuseum.dkPresents historical artifacts from the history of: RegneCentralen RC700 "Piccolo" |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RegneCentralen RC700 "Piccolo" Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 1920 (0x780) Types: TextFile Names: »INTPAD.PAS«
└─⟦037dced94⟧ Bits:30003312 Elevopgave i styring af skildpadde til Piccolo └─ ⟦this⟧ »INTPAD.PAS«
program Intpad;(* Jens Vaaben 25-8-1986 *) var ch:char; x,test,tempo,nr,vent,pause:integer; tilf,tilstand,valg : byte; (*-----------------------------------------*) procedure tempovalg; begin gotoxy(17,12);write('Indtast tempo (1 er langsomt, 5 er hurtigt): '); repeat read(kbd,ch); until ch in (.'1','2','3','4','5'.); val(ch,tempo,test); gotoxy(62,12);write(tempo); pause := (8-tempo)*40; end; (*-----------------------------------------*) procedure indledning; begin gotoxy(1,1);write(clrhom); gotoxy(29,5);write('T Æ N K E - P A D D E'); gotoxy(29,6);write('**********************'); tempovalg; gotoxy(42,20);write('Tryk MELLEMRUM for at køre...'); repeat read(kbd,ch); until ch=' '; ch:='K'; gotoxy(42,19);write('Nu kører TÆNKE-PADDEN,'); gotoxy(42,20);write('Tryk MELLEMRUM for at standse...'); end; (*-----------------------------------------*) procedure flyt(var tilstand : byte); begin for vent:=1 to pause do port(.17.):=tilstand; for vent:=1 to pause do port(.17.):=0; end; (*-----------------------------------------*) Procedure kigge; begin x := random(2); case x of 0 : tilf := 15; 1 : tilf := 5; end; for nr := 1 to random(20) do begin for vent := 1 to 100 do port(.17.) := tilf; for vent := 1 to 100 do port(.17.) := 0; end; tilstand := 0; end; (*---her begynder det egentlige program----*) begin indledning; repeat port(.19.):=255; port(.19.):=192; valg:=port(.17.); if valg=0 then tilstand := 13; if valg=64 then tilstand := 12; if valg=128 then tilstand := 1; if valg=192 then kigge; flyt(tilstand); if keypress then read(kbd,ch); until ch=' '; gotoxy(1,1);write(clrhom); end. «eof»