🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.pascal
Article #80417

Re: BP na TP 5.5 albo FPC

#80417
From: Wiktor S.
Date: Thu, 23 Oct 2003 09:59
40 lines
1539 bytes
> mój odpowiednik we FPC (kompiluje się, ale wywala Runtime Error..):
>
> asm {get port base address}
>    mov bx,40h
>    mov es,bx
>    mov bx,comport
>    dec bx
>    shl bx,1
>    mov eax,es:[bx]   {dużo nie poprawiłem, as na eax  :-)}
>    mov bas,ax
>   end;

To nie ma prawa działać w zamierzony sposób w trybie chronionym.

> uses Dos;
> var r:registers;
> ...
> with r do begin
>   bx:=$40;
>   es:=bx;
>   bx:=comport;
>   dec(bx);
>   bx:=(bx shl 1);
>   ax:=mem[es:bx];  {albo ta}
>   bas:=ax;

a tu już zupełnie nie potrzebnie operujesz na tregisters.


bas:=memw[$40:(comport-1)*2];


i po co kombinować? ;-)



--
Azarien

my e-mail address ends in .fm not .fmv
Technical Details
Message-ID: <bn88pl$8v0$1@flis.man.torun.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!not-for-mail
References: <oprxfsy7ms0gcmwk@news.internetia.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!not-for-mail
From: "Wiktor S." <wswiktor@poczta.fmv>
Newsgroups: pl.comp.lang.pascal
Subject: Re: BP na TP 5.5 albo FPC
Date: Thu, 23 Oct 2003 11:59:08 +0200
Organization: TORMAN
Lines: 41
Message-ID: <bn88pl$8v0$1@flis.man.torun.pl>
References: <oprxfsy7ms0gcmwk@news.internetia.pl>
NNTP-Posting-Host: azi.wmc.com.pl
Mime-Version: 1.0
X-Trace: flis.man.torun.pl 1066903157 9184 82.160.11.135 (23 Oct 2003 09:59:17 GMT)
X-Complaints-To: usenet@man.torun.pl
NNTP-Posting-Date: 23 Oct 2003 09:59:17 GMT
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit