🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Wynik w konsoli

#337
From: Wiktor S.
Date: Wed, 14 Jun 2006 22:06
25 lines
1347 bytes
> W jaki sposób mogę wyświetlić w konsoli wynik
> operacji, który mieści się np. w ax?

Zamienić na ciąg znaków, w systemie dziesiętnym albo szesnastkowym.

Wyświetlanie liczby z al (czyli 8-bitowej) w postaci szesnastkowej:

; składnia NASM-a

 xor ebx,ebx
 mov bl,al
 and bl,11110000b
 shr bl,4
 mov ah,[.heksy+ebx]
 call writechar
 mov bl,al
 and bl,00001111b
 mov ah,[.heksy+ebx]
 call writechar

.heksy db '0123456789ABCDEF'


-- 
Azarien
Technical Details
Message-ID: <e6q18g$43r$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: <e6p4as$bsk$1@atlantis.news.tpi.pl>

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: Wynik w konsoli
Date: Thu, 15 Jun 2006 00:06:08 +0200
Organization: Onet.pl
Lines: 27
Message-ID: <e6q18g$43r$1@news.onet.pl>
References: <e6p4as$bsk$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: 155.168.wmc.com.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1150322768 4219 87.250.168.155 (14 Jun 2006 22:06:08 GMT)
X-Complaints-To: usenet@news.onet.pl
NNTP-Posting-Date: Wed, 14 Jun 2006 22:06:08 +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