🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.asm
Article #499

Re: Z ciekawosci...

#499
From: Wiktor S.
Date: Tue, 08 Aug 2006 01:11
52 lines
2061 bytes
> Wlasciwie nie wiem czemu, ale po prostu nagle zaczelo dreczyc
> mnie to.
> Mianowicie oto kod:
>
> ; -------------------------
> _DATA segment
> ;dane...
> _DATA ends
>
> _TEXT segment
> start:
> ;kod...
> _TEXT ends
> end start
> ; -----------------------------
>
> Gdy mamy tak "ulozony program", wszystko jest ok, tzn. kompiluje sie
> (TASM).
> Zastanawiaja mnie dwa ostatnie wiersze:
>
> _TEXT ends
> end start
>
> o co mi chodzi?

poczatek segmentu:

| NAZWA segment

koniec segmentu:

| NAZWA ends

a wiec twój segment kodu zawiera sie miedzy "_TEXT segment" a "_TEXT ends".

"start:" jest etykieta.

END oznacza koniec programu w asemblerze. dlatego jest na samym koncu.
parametr po END okresla etykiete, od której wykonanie programu ma sie 
rozpoczynac (u ciebie jest to "start")

> skompilowac w TASM jest OK ale pojawia sie warning. (w MASM nie ma
> róznicy)
> Czy to tylko taka skladnia - szablon - a jesli tak, to czym byl
> podyktowany brak "kolejnosci"?


kolejnosc jak najbardziej jest, po prostu zle zrozumiales, ze "end start" 
jest niby koncem tego, co sie zaczyna od "start:". tak nie jest.

-- 
Azarien
Technical Details
Message-ID: <eb8obe$svm$1@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
References: <1154992159.298894.75050@75g2000cwc.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
From: "Wiktor S." <wswiktorSP@Mpoczta.fm>
Newsgroups: pl.comp.lang.asm
Subject: Re: Z ciekawosci...
Date: Tue, 8 Aug 2006 03:11:11 +0200
Organization: Onet.pl
Lines: 53
Message-ID: <eb8obe$svm$1@news.onet.pl>
References: <1154992159.298894.75050@75g2000cwc.googlegroups.com>
NNTP-Posting-Host: 155.168.wmc.com.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1154999470 29686 87.250.168.155 (8 Aug 2006 01:11:10 GMT)
X-Complaints-To: usenet@news.onet.pl
NNTP-Posting-Date: Tue, 8 Aug 2006 01:11:10 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-Sender: 63e3folRCjcGWUjNfLSN0w==
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-Priority: 3
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit