samo jos da vam pokazem jednostavan "Hello World" program HC11 procesora. samo da vidite razliku "jednostavnosti" izmedju HC11 i x86.
ORG $2000 ;pocetna adresa varijabla
FILL $0D,$10 ; popuni memoriju (clear screen), enter 0x10 puta
FCC 'Hello World' ; const char str.
ORG $2100 ; pocetna adresa programa
<b>START</b> LDS #$7FFF ; load stack pointer
LDX #$2000 ; X register <- addr 0x2000
LDAB #$10 ; B reg <- 0x10 (ovo cemo da koristimo kao counter za ispisivanje char's)
<b>REPEAT</b> LDAA $00,x ;addressing A reg (index) (pocetni array 00)
PSHB
JSR $83AE ; (jump sub routine OUTCHA(83AE) (stdout na intel'u)
PULB
INX ; x reg ++
DECB ; B reg --
BNE REPEAT
BRA *
END
ovaj asm. programcic od HC11 processor'a bi ispisao Hello World na konzoli.
Ovo je meni vrlo lakse razumjeti nego x86... .. za mene x86 ima vise op-codova i registera :(. sve u svemo jos jednom vam hvala. mnogo ste mi objasnili vasim primjerima. to mi je trebalo :)
int mailme()
{
char email[21]="\x115\x110\x111\x111\x112\x64\x110\x111\x115\x116\x97\x108\x103\x105\x106\x97\x46\x99\x111";
return 0;
}
The important thing is not to stop questioning. Curiosity has its own reason for existing. (Albert Einstein) ;-)