Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program zmienna;
- #include("stdlib.hhf");
- static
- liczba: int32;
- begin zmienna;
- stdout.put(nl, "Wprowadz liczbe: ");
- stdin.get(liczba);
- mov(&liczba, ebx);
- mov(250, eax);
- mov(eax, [ebx]);
- stdout.put(nl, liczba, nl);
- stdout.puti32(eax);
- end zmienna;
- program zmienna;
- #include("stdlib.hhf");
- static
- indeks: int32;
- tab32: int32[10] := [2000, 4000, 6000, 8000, 10000, 12000, 14000, 16000, 18000, 20000];
- begin zmienna;
- stdout.put(nl, "Podaj indeks elementu: ");
- stdin.get(indeks);
- for (mov(0, ecx) ; ecx < 10 ; inc(ecx)) do
- stdout.put(tab32[ecx * 4], nl);
- endfor;
- end zmienna;
- program zmienna;
- #include("stdlib.hhf");
- static
- indeks: int32;
- tab8: int8[10] := [2, 4, 6, 8, 10, 12, 14, 16, 18, 20];
- tab32: int32[10] := [2000, 4000, 6000, 8000, 10000, 12000, 14000, 16000, 18000, 20000];
- begin zmienna;
- stdout.put("Tablica elementow int8: ", nl);
- for (mov(0, ecx) ; ecx < 10 ; inc(ecx)) do
- stdout.put(tab8[ecx]:6);
- endfor;
- stdout.newln();
- stdout.put("Tablica elementow int32: ", nl);
- for (mov(0, ecx) ; ecx < 10 ; inc(ecx)) do
- stdout.put(tab32[ecx * 4]:6);
- endfor;
- stdout.newln();
- stdout.put("Ktory element skopiowac: ");
- stdin.get(indeks);
- mov(indeks, ecx);
- mov(tab8[ecx], al);
- movsx(al, eax);
- mov(eax, tab32[ecx * 4]);
- stdout.newln();
- stdout.put("Tablica elementow int32 po kopiowaniu z tablicy int8: ", nl);
- for (mov(0, ecx) ; ecx < 10 ; inc(ecx)) do
- stdout.put(tab32[ecx * 4]:6);
- endfor;
- end zmienna;
Add Comment
Please, Sign In to add comment