Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.
- program tescior;
- #include("stdlib.hhf");
- static
- procedure gigancior;
- begin gigancior;
- push(ECX);
- for(mov(0,ECX); ECX<40; inc(ECX)) do
- stdout.put(" ");
- endfor;
- stdout.put("*");
- pop(ECX);
- end gigancior;
- begin tescior;
- mov(20, ECX);
- repeat
- gigancior();
- dec(ECX);
- stdout.newln();
- until(ECX==0);
- end tescior;
- 2.
- program tescior;
- #include("stdlib.hhf");
- static
- a: int32:= 100;
- b: int32:= 200;
- procedure gigancior;
- static
- i: int32;
- var
- a: int32;
- b: int32;
- begin gigancior;
- mov(10,a);
- mov(0,b);
- mov(5,i);
- repeat
- inc(a);
- dec(b);
- dec(i);
- until(i=0);
- stdout.put(" Zmienna a: ", a, nl);
- stdout.put(" Zmienna b: ", b, nl);
- end gigancior;
- begin tescior;
- gigancior();
- stdout.put(" Zmienna glob a: ", a, nl);
- stdout.put(" Zmienna glob b: ", b, nl);
- end tescior;
- 3.
- program tescior;
- #include("stdlib.hhf");
- static
- znak: char;
- licznik: int32;
- procedure gigancior(znak: char; licznik: int32);
- static
- begin gigancior;
- repeat
- stdout.put(znak, nl);
- dec(licznik);
- until(licznik = 0);
- end gigancior;
- begin tescior;
- stdout.put(" Jaki znak: ", nl);
- stdin.get(znak);
- stdout.put(" Ile razy ", nl);
- stdin.get(licznik);
- gigancior(znak, licznik);
- end tescior;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement