Geshi-Highlight
(Rozdíly mezi verzemi)
Řádka 1: | Řádka 1: | ||
− | syntaxhighlight lang="php" | + | <nowiki> syntaxhighlight lang="php" |
syntaxhighlight lang="c" | syntaxhighlight lang="c" | ||
Řádka 5: | Řádka 5: | ||
syntaxhighlight lang="asm" | syntaxhighlight lang="asm" | ||
− | syntaxhighlight lang="basic4l" | + | syntaxhighlight lang="basic4l" </nowiki> |
<source lang="php"> | <source lang="php"> |
Verze z 27. 4. 2011, 19:08
syntaxhighlight lang="php" syntaxhighlight lang="c" syntaxhighlight lang="asm" syntaxhighlight lang="basic4l"
<?php for ($i=0;$i<=10;$i++) // Příklad cyklu for v php. BY ROMAN SVOBODA { echo $i; } ?> <?php $i = 0; while ($i<=10) { // Příklad cyklu while v php. BY ROMAN SVOBODA echo $i; ++$i; } ?>
#include <reg51.h> #include<stdio.h> void MSdelay (unsigned int); sbit P10 = 0x90; /* now the functions may be written to use this location */ void main (void) { /* forever loop, toggling pin 0 of port 1 */ while (1==1) { P10 = !P10; P3=0xAA; MSdelay (500); /* wait 500 microseconds */ P3=0x55; MSdelay (500); /* wait 500 microseconds */ } } void MSdelay (unsigned int itime) { unsigned int i,j; for (i=0;i<itime;i++); for (j=0;j<1275;j++); }
$mod51 org 00h ;ukládání programu start: mov A,#01010111b ; zápis do akumulátoru mov P1,A ; přesun na bránu P1 mov A,#10101000b mov P1,A sjmp start ; krátký skok na návěští end