Article View: pl.comp.lang.asm
Article #854Re: newbie
From: Bernard
Date: Thu, 30 Nov 2006 22:12
Date: Thu, 30 Nov 2006 22:12
57 lines
2205 bytes
2205 bytes
robert wrote: > Witam. Napisałem poniższy kod, który się kompiluje, ale już nie likuje. > 1) komunikat błędu: _show_txt unresolved external. Wydaje mi się, że nie > może odszukać procedury show_txt znajdującej się w kod_2 sgement; > 2) po usunięciu lini .model small argument napis procedury show_txt musi > być zadeklarowany jako dword, inaczej progr. się nie skompiluje. Oznacza to, > że addr > zwraca 32bitowy adres [seg+offset], dlaczego ? > > Bardzo prosze o pomoc i pozdrawiam. > > .model small > .386 > > show_txt proto far C count:byte, napis:word, data_sem:word A dlaczego "far", skoro był "model small"? Skoro używasz "nowych" dyrektyw, to dlaczego jednocześnie otwierasz segmenty "po staremu"? > Moj_stos segment stack > db 256 dup (?) > Moj_stos ends > > Dane segment > napis db "Komuunikat", 0dh,0ah,"$" > licznik db ? > Dane ends > > kod_1 segment 'code' > assume cs:kod_1,ds:Dane > start: > mov ax,seg Dane > mov ds,ax > > invoke show_txt, licznik, addr napis, seg napis > > kod_1 ends > end start > > kod_2 segment 'code' > assume cs:kod_2,ds:nothing Dwa segmenty kodu w modelu SMALL?! Też bym zgłupiał na miejscu konsolidatora... > show_txt proc far C uses ax ds, count:byte, nap:word, data_sem:word > > show_mac > > ret > > show_txt endp > > kod_2 ends
Technical Details
Message-ID:
<456f47db$0$17969$f69f905@mamut2.aster.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.astercity.net!news.aster.pl!not-for-mailReferences:
<ekmuk3$170$1@node5.news.atman.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.astercity.net!news.aster.pl!not-for-mail Date: Thu, 30 Nov 2006 23:12:55 +0100 From: Bernard <bernard@earth.net> User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 Newsgroups: pl.comp.lang.asm Subject: Re: newbie References: <ekmuk3$170$1@node5.news.atman.pl> In-Reply-To: <ekmuk3$170$1@node5.news.atman.pl> X-Antivirus: avast! (VPS 0652-2, 2006-11-30), Outbound message X-Antivirus-Status: Clean Lines: 57 Message-ID: <456f47db$0$17969$f69f905@mamut2.aster.pl> NNTP-Posting-Date: 30 Nov 2006 21:06:36 GMT NNTP-Posting-Host: 82.210.165.187 X-Trace: 1164920796 mamut2.aster.pl 17969 82.210.165.187:1091 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit