DEFINT A-Z
'$INCLUDE: '\Prog\Forward\LIB\MTimer\MTimerA.bi'
'   Filename: MTimerA.bas
'      Title: MTimer ASM Routines
'Description: Routines for MTimer rewritten in ASM.
'     Author: Antoni Gual [AG] and Peter Fedorow [PF]
'    Contact: AG - agual AT eic.ictnet.es
'    Contact: PF - fedorowp AT yahoo.com / fedorowp AT earthlink.net
'  Copyright: 2003 Antoni Gual, 2003 Peter Fedorow
'    Started: 2002 Mar 15
'Last Change: 2003 May 26 Mon
'    History: 2002 Mar 26 Mon  [PF] Moved PITReadTicks here.


  CONST False = 0
  CONST True = NOT False


SUB PITReadTicks (TicksHi, TicksLo)

  'PIT 8253 Mode Control register.
  'Select Counter 0
  'Latch present counter value
  'Mode 0: Countdown, interrupt, then wait for new mode/count
  OUT &H43, &H0

  'PIT ticks.
  TicksHi = INP(&H40) 'High byte.
  TicksLo = INP(&H40) 'Low byte.

END SUB

