Buchempfehlung
MySQL kurz & gut
MySQL kurz & gut
Das preiswerte Taschen- buch stellt MySQL-rele- vante Inhalte systematisch und knapp dar, sodass es sich optimal zum Nach- schlagen beim Pro- grammieren eignet. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

core_pit.bi

Uploader:MitgliedThePuppetMaster
Datum/Zeit:26.08.2008 22:13:38

'###############################################################################################################
'###############################################################################################################
'###   F B - C O R E
'###############################################################################################################
'###############################################################################################################
'### Version:  1.00.0
'### Revision: 0
'###############################################################################################################
'### (c) 2008 By.: /_\ DeltaLab's Germany [experimental computing]
'### Author:       Martin Wiemann
'### Date of Idea: 2008.08.16 - 17:55:38
'###############################################################################################################
'### Copy('s) of this code or a part of this IS allowed!!!
'###############################################################################################################





'###############################################################################################################
Dim Shared G_System_Ticks as ULongInt





'###############################################################################################################
Private Sub PIT_Handler()
G_System_Ticks += 1
End Sub





'###############################################################################################################
Private Sub PIT_WaitmsX10(V_ms as UInteger)
Dim TDest as ULongInt
TDest = G_System_Ticks + V_ms
Do
    If TDest < G_System_Ticks Then Exit Do
Loop
End Sub





'###############################################################################################################
Private Function PIT_Set_IRQ0InterruptFrq(V_Hz as UInteger) as Integer
If V_Hz <= 0 Then Return GURU_PIT_FrqOutOfRange
Dim XDiv as Integer
XDiv = 1193180 \ V_Hz
outb(&H43, &H36)
outb(&h40, (XDiv and &HFF))
outb(&h40, ((XDiv shr 8) and &HFF))
IRQ_UnSetCallback(0)
Return IRQ_SetCallback(0, @PIT_Handler)
End Function