TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: THOMAS GOHEL
date: 1998-04-05 00:00:00
subject: Re: Interrupt Programmier

From: author@pbsound.snafu.KILL.SPAM.de (Thomas Gohel)
Subject: Re: Interrupt Programmierung mit Powerbasic
 
In article "Interrupt Programmierung mit Powerbasic" (on 31.03.98), 
P-Arbeiter@online-club.de says:
 
Hello Peter !!
 
> Ich brauche eine Routine die den Timer Baustein 8254 beliebig umstellt
> von 0.005 ms bis 55ms.
Was willst Du damit machen? Ich habe mich damit schon *fters herumplagen
m*ssen, allerdings ist das auch schon lange her. ;-)
 
> desweiteren muss ein Interrupt auf eine Powerbasic Rotine umgebogen werden
> wer kann mir Helfen ?
Davon gibt es tonnenweise in meiner BBS, aber vielleicht hast Du diese
einfach in dem nahezu un*berschaubaren Berg von BASIC/PowerBASIC-Files
*bersehen? Immerhin sind es ja in der Zwischenzeit knapp 900 Files mit
insgesamt 52MB, Tendenz stark steigend ... 
 
Ansonsten sehe Dir einfach folgende Souce an, sie macht nicht mehr als
einfach eine kleine Uhr oben rechts einzublenden:
 
'*************************************************************************
'
'  einfache Demonstration einer kleinen TSR-Uhr in PowerBASIC 3.0/3.2
'
'  entwickelt von / developed by    :  Thomas Gohel
'
'                           Fido    :  Thomas Gohel@2:2410/330.1
'                           InterNet:  author@pbsound.snafu.de
'                           Homepage:  http://www.snafu.de/~pbsound/
'
'*************************************************************************
 
$COMPILE EXE "PBCLOCK.EXE"
$OPTION CNTLBREAK OFF
 
CLS
TSRUhr "ON"                              ' Uhrzeit einschalten
SHELL
TSRUhr "OFF"                             ' Uhrzeit ausschalten
END
 
SUB TSRUhr(Aktion$) public
 
        SELECT CASE Aktion$
            CASE "ON", "EIN", "+"
                NewIntVektorSeg?? = CODESEG(Uhrzeit)
                NewIntVektorOff?? = CODEPTR(Uhrzeit)
                ! call GetOldInterruptVektor
                ! call SetNewInterruptVektor
            CASE "OFF", "AUS", "-"
                ! call SetOldInterruptVektor
            CASE ELSE
                PRINT "nicht unterst*tzter Aufruf!"
        END SELECT
        EXIT SUB
 
        UhrZeit:
        ! push  ax
        ! push  bx
        ! push  cx
        ! push  dx
        ! push  si
        ! push  di
        ! push  bp
        ! push  ds
        ! push  es
        ! mov   ax, &hb800               ;Setzen des Video-RAM's
        ! mov   es, ax
        ! mov   bx, 142                  ;Setzen der Position der Uhr
        ! mov   al, &h04
        ! out &h70, al
        ! in    al, &h71
        ! call WriteUhrZeit
        ! call WriteTrenner
        ! mov   al, &h02
        ! out &h70, al
        ! in    al, &h71
        ! call WriteUhrZeit
        ! call WriteTrenner
        ! mov   al, &h00
        ! out &h70, al
        ! in    al, &h71
        ! call WriteUhrZeit
        ! pop   es
        ! pop   ds
        ! pop   bp
        ! pop   di
        ! pop   si
        ! pop   dx
        ! pop   cx
        ! pop   bx
 
Continued with next message...
 
*** QwkNews (tm) v2.1
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.