Article View: pl.comp.lang.asm
Article #2472naruszenie ochrony pamieci - dlaczego
From: panki
Date: Sat, 11 Jun 2011 12:07
Date: Sat, 11 Jun 2011 12:07
49 lines
1868 bytes
1868 bytes
witam - probuje troche oswoic sobie assemblera i nie zabardzo wiem gdzie popelnilem błąd w przykladowym kodzie. Bo po uruchomieniu tego programu wypisuje ten napis i potem pisze naruszenie ochryny pamieci. ten kod jest podobny jaki zostal uzyty w bibl.zip ps. moze to trywialne pytanie ale dlaczego kladzie sie ebp na stos(a także eax i esi, pushfd) [code] section .text global _start _start: call pisz db "qwerty",0; wypisz zmienna mov eax,1 int 80h pisz: push ebp;ebp na stos mov ebp,esp pushfd push esi push eax mov esi,[ebp+4] mov [tmp],esi mov eax, 4 mov ebx,1 mov ecx, [tmp] mov edx,6 int 80h pop eax pop esi popfd pop ebp ret section .data tmp times 20 db 0
Technical Details
Message-ID:
<9b70ec81-f1ce-4857-b679-c0d1498ae9ee@v8g2000yqb.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!v8g2000yqb.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!v8g2000yqb.googlegroups.com!not-for-mail From: panki <bartekn80@gmail.com> Newsgroups: pl.comp.lang.asm Subject: naruszenie ochrony pamieci - dlaczego Date: Sat, 11 Jun 2011 05:07:31 -0700 (PDT) Organization: http://groups.google.com Lines: 49 Message-ID: <9b70ec81-f1ce-4857-b679-c0d1498ae9ee@v8g2000yqb.googlegroups.com> NNTP-Posting-Host: 195.13.38.135 Mime-Version: 1.0 X-Trace: posting.google.com 1307794052 3107 127.0.0.1 (11 Jun 2011 12:07:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 11 Jun 2011 12:07:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v8g2000yqb.googlegroups.com; posting-host=195.13.38.135; posting-account=JRAzRQkAAAD5XoJzKjluGTDzABl8OkXy User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit