Article View: pl.comp.lang.asm
Article #2428Re: naruszenie ochrony pamieci - dlaczego
From: yesma
Date: Sun, 12 Jun 2011 14:34
Date: Sun, 12 Jun 2011 14:34
47 lines
693 bytes
693 bytes
panki pisze: [...] > ps. moze to trywialne pytanie ale dlaczego kladzie sie ebp na stos(a > tak�e eax i esi, pushfd) > ;~~~~~~~~~~~~~~~~~~~~ ;te procedury odkladaja na stos ;wszystkie rejestry ktorych uzywaja wewnatrz PROC1: push eax mov eax,1 call PROC2 add eax,1 ;eax==2 pop eax ret ;~~~~~~~~~~ PROC2: push eax mov eax,4 pop eax ret ;~~~~~~~~~~~~~~~~~~~~ ;a te procedury odkladaja na stos ;te rejestry ktore beda im potrzebne nie zmienione ;po instrukcji call PROC1: mov eax,1 push eax call PROC2 pop eax add eax,1 ;eax==2 ret ;~~~~~~~~~~ PROC2: mov eax,4 ret ;~~~~~~~~~~~~~~~~~~~~ ;poczytaj "Konwencje wywo�ania" -- Pozdrawiam - Grzechu Linux x86_64
Message-ID:
<it2c1c$9t7$1@inews.gazeta.pl>
Path:
polish.pugleaf.net!archive.newsdeef.eu!mbox2nntp-pl.comp.lang.asm.mbox.zip!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!newsfeed.pionier.net.pl!news.gazeta.pl!not-for-mail
References:
<9b70ec81-f1ce-4857-b679-c0d1498ae9ee@v8g2000yqb.googlegroups.com>