🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Stos i byte

#416
From: Andrzej Grażyński
Date: Thu, 14 Sep 2006 22:21
38 lines
1659 bytes
Michał Walenciak napisał(a):
> Johnny wrote:
> 
>> Czy można na stosie położyć elementy listy "bajtowej". Jest lista
>> wartości typu 1,2,3,4,..., której offset znajduje się w di. Wywołując
>> push [di] na stosie pojawiają się słowa a nie bajty, z kolei wywołanie
>> push byte ptr [di] jest błędne.
>>
>> Pozdrawiam
> 
> na stos mozna kłaść tylko słowa lub podwójne słowa (w procesorach 32
> bitowych), nie da sie położyć bajtu
> 
> możesz zrobić cos takiego :
> mov ah,[di]
> mov al,[di + 1]
> push ax
> 


mov  ah, bajt
push ax
inc  sp


a w powyższym przypadku:

push [di-1]
inc  sp



a z powrotem (bajt ze stosu do al)


dec sp
pop ax
xchg al,ah
Technical Details
Message-ID: <eeckln$ra0$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <e9q0v1$k7h$1@nemesis.news.tpi.pl> <e9q2tc$t1g$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Andrzej Grażyński <grazynsk@petex.com.pl>
Newsgroups: pl.comp.lang.asm
Subject: Re: Stos i byte
Date: Fri, 15 Sep 2006 00:21:14 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 48
Message-ID: <eeckln$ra0$1@atlantis.news.tpi.pl>
References: <e9q0v1$k7h$1@nemesis.news.tpi.pl> <e9q2tc$t1g$1@inews.gazeta.pl>
NNTP-Posting-Host: duc168.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1158272503 27968 83.22.10.168 (14 Sep 2006 22:21:43 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Thu, 14 Sep 2006 22:21:43 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.5 (Windows/20060719)
In-Reply-To: <e9q2tc$t1g$1@inews.gazeta.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit