home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.7z / ftp.whtech.com / emulators / v9t9 / linux / sources / V9t9 / tools / Forth / int.inc < prev    next >
Encoding:
Text File  |  2006-10-19  |  1.2 KB  |  67 lines

  1. ;    V9t9: the TI Emulator! v6.0 Source 
  2. ;    Copyright (c) 1996 by Edward Swartz
  3.  
  4.  
  5.  
  6.  
  7. ;==========================================================================
  8. ;    The VDP interrupt routine.
  9. ;
  10. ;    This handles clock, keyboard, etc.
  11. ;
  12. ;==========================================================================
  13.  
  14. int    limi    0            ; disable interrupts 
  15.  
  16.     clr        r12            ; point to 9901
  17.     tb        2            ; VDP interrupt?
  18.     jne        intvdp        ; yup.
  19.            
  20.     lwpi    >83e0        ; they require this...
  21.     lwpi    intws
  22.     jmp        intout        ; don't handle device interrupts yet
  23.  
  24. intvdp:
  25.     sbo    2                ; acknowledge VDP interrupt
  26.  
  27.     inc        @uptime 2+    ; time in 1/60 seconds
  28.     jnc        intv00        ; overflow?
  29.        inc        @uptime         ; more time accuracy
  30.  
  31. intv00:    
  32.     ab        @h01,@kbdtimer    ; inc repeat delay
  33.     bl        @scankbd        ; get keyboard, save char
  34.  
  35. @intpatch:    nop            ; PATCH HERE for VDP int
  36.  
  37. ;-----------------------------------
  38.  
  39. int2:
  40.     inct    @timeout    ; blank screen?
  41.     jne        int200
  42.  
  43.     blwp    @vscreenoff
  44.  
  45. int200:
  46.     li        0,vcrstimer
  47.     ab        @h01,*0            ; cursor timer
  48.     cb        *0,@vcrsblink    ; to blink or not to blink?
  49.     jl        int201
  50.  
  51.     sb        *0,*0            ; clear
  52.     mov        @vcursor,0        ; get ptr
  53.     blwp    *0                ; blink it
  54.  
  55. int201:
  56.     mov        @userint,0        
  57.     jeq        intout
  58.  
  59.     bl        *0                ; execute user interrupt routine
  60.     lwpi    intws
  61.  
  62. vdpintout:
  63.     movb    @>8802, 0        ; clear interrupt
  64. intout:
  65.  
  66.     RTWP
  67.