🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Pobieranie danych ze zmiennej

#2404
From: Remek
Date: Sat, 23 Oct 2010 21:07
35 lines
1367 bytes
Witam

Windows 32 bit. Masm32.

Czegoś nie rozumiem. Proszę o wyjaśnienie:

Mam dekraracje:

zmienna dd?
Bufor   db 128h dup(0)

instrukcja:

mov eax, zmienna

kopiuje do eax dworda z adresu wskazywanego przez zmienną. To samo wykonuje:

mov eax, [zmienna]

również instrukcje:

mov eax, dword ptr Bufor
mov eax, dword ptr [Bufor]

robią to samo.

Czyżby Masma nie obowiązywały reguły asemblera? Adres zmiennej mogę pobrać
tylko przez:

 lea zmienna
 lea Bufor

Coś zapomniałem, przeoczyłem?

Pozdrawiam  Remek
Technical Details
Message-ID: <i9vip5$8pr$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "Remek" <dupa@gmail.com>
Newsgroups: pl.comp.lang.asm
Subject: Pobieranie danych ze zmiennej
Date: Sat, 23 Oct 2010 23:07:22 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 36
Message-ID: <i9vip5$8pr$1@inews.gazeta.pl>
NNTP-Posting-Host: acqc108.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1287868005 9019 83.10.234.108 (23 Oct 2010 21:06:45 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Sat, 23 Oct 2010 21:06:45 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-User: remeka
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit