🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problem z przesunięciem ekranu

#653
From: Johnny
Date: Wed, 20 Sep 2006 08:31
94 lines
3071 bytes
No więc poddaję się. Próbuję przewalczyć "błąd przedostatniej i
ostatniej kolumny" ale bez pozytywnych rezultatów. Poniżej zamieszczam
uproszczoną wersję bez przesuwania ekranu. Nie korzystam już z funkcji
10h przerwania 16h lecz 8h - 21h ale to niewiele zmieniło.

Czy ktoś potrafi wskazać gdzie leży błąd lub przerobić to na działającą
wersję z wykorzystaniem tych samych funkcji?

Kolega Matuzalem bardzo się starał i za to mu dziękuję. Jednak teorii
podanej w jego odpowiedziach nie udało mi się przełożyć na praktykę.

title ekran
.model small
.stack 100h
.386
.code
;---------------------------------------------
; main
;---------------------------------------------
main proc
mov ax,@data		; inicjalizacja ds
mov ds,ax

xor ah,ah		; minimalny tryb wideo
mov al,1h
int 10h

mov ah,0fh		; odczyt liczby kolumn
int 10h
dec ah			; l kolumn - 1 bo indeks zaczyna się od zera
mov lcol,ah

mov cx,040ah		; licznik

odczyt:
mov ah,8h
int 21h

cmp al,1bh		; czy ESC
je exit

mov ah,0ah		; zapis znaku
xor bh,bh
push cx
mov cx,1h
int 10h
pop cx

call przesun

loop odczyt

exit:
mov ax,4C00h		; zakończenie procedury
int 21h
main endp


;---------------------------------------------
; przesun
;---------------------------------------------
przesun proc
pusha		; wszystko na stos

mov ah,3h	; odczytaj położenie wskaźnika
xor bh,bh
int 10h

mov ah,2h	; przesuń wskaźnik
xor bh,bh
cmp dl,lcol
je nwiersz
inc dl
jmp exec

nwiersz:
mov dl,0h
inc dh

exec:
int 10h

popa
ret

przesun endp

.data
lcol db ?
end main


-- 
Johnny
Technical Details
Message-ID: <eequ8i$goo$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <ee8g03$ia2$1@nemesis.news.tpi.pl> <eeb7nb$1r0$1@nemesis.news.tpi.pl> <1158244982.390461.281100@m73g2000cwd.googlegroups.com> <1158247875.473696.47560@e3g2000cwe.googlegroups.com> <eedgj5$hl8$1@atlantis.news.tpi.pl> <1158314745.102416.285490@p79g2000cwp.googlegroups.com> <1158315621.847716.34500@p79g2000cwp.googlegroups.com> <eee9ll$38u$1@atlantis.news.tpi.pl> <1158328549.838592.247550@m73g2000cwd.googlegroups.com> <eelk74$rmc$1@atlantis.news.tpi.pl> <1158601023.863820.102920@k70g2000cwa.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Johnny <johnny_bez_spamu_@klub.chip.pl>
Newsgroups: pl.comp.lang.asm
Subject: Re: Problem z przesunięciem ekranu
Date: Wed, 20 Sep 2006 10:31:47 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 94
Message-ID: <eequ8i$goo$1@atlantis.news.tpi.pl>
References: <ee8g03$ia2$1@nemesis.news.tpi.pl>   <eeb7nb$1r0$1@nemesis.news.tpi.pl>   <1158244982.390461.281100@m73g2000cwd.googlegroups.com>   <1158247875.473696.47560@e3g2000cwe.googlegroups.com>   <eedgj5$hl8$1@atlantis.news.tpi.pl>   <1158314745.102416.285490@p79g2000cwp.googlegroups.com>   <1158315621.847716.34500@p79g2000cwp.googlegroups.com>   <eee9ll$38u$1@atlantis.news.tpi.pl>   <1158328549.838592.247550@m73g2000cwd.googlegroups.com>   <eelk74$rmc$1@atlantis.news.tpi.pl> <1158601023.863820.102920@k70g2000cwa.googlegroups.com>
NNTP-Posting-Host: nat-132.wasko.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1158741074 17176 193.178.240.132 (20 Sep 2006 08:31:14 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Wed, 20 Sep 2006 08:31:14 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
In-Reply-To: <1158601023.863820.102920@k70g2000cwa.googlegroups.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit