home *** CD-ROM | disk | FTP | other *** search
/ Computer Club Elmshorn Atari PD / CCE_PD.iso / pc / 0600 / CCE_0657.ZIP / CCE_0657.PD / FAST_DVI.GAS < prev    next >
Text File  |  1993-10-08  |  3KB  |  168 lines

  1. |********************************************************************
  2. |**** *schnelle* ausgabe von zeichen im hintergrund          *****
  3. |********************************************************************
  4.  
  5.     .globl _prn_byte
  6.     .globl _exstall
  7.     .globl _old_vec
  8.     .globl _shm_name
  9.     .globl _CookieJar
  10.  
  11.  
  12.     .text
  13. | **********************************************
  14. | ****    Sucht nach CookieJar (für Dialoge)  ****
  15. Cook:    DC.L    0
  16. _CookieJar:
  17.     movel    d0,Cook
  18.     pea    SearchCookie
  19.     movew #38,a7@-
  20.     trap    #14
  21.     addql    #6,a7
  22.     movel    Cook,d0
  23.     rts
  24.  
  25. SearchCookie:
  26.     movel    $5A0,d0
  27.     ble    NoCookie
  28.     moveal    D0,a0
  29.     movel    Cook,d0
  30. cl:    cmpl    a0@,d0
  31.     beq    YesCookie
  32.     tstl    a0@+
  33.     beq    NoCookie
  34.     addql    #4,a0
  35.     bra    cl
  36. YesCookie:
  37.     movel    a0@(4),Cook
  38.     rts
  39. NoCookie:
  40.     clrl    Cook
  41.     rts
  42. | ****    30.1.92    ****
  43.  
  44.  
  45. | **** programm durch signal gekillt!
  46. _exstall:
  47.     tstl _ptr
  48.     ble no_ex_
  49.     pea ex_print
  50.     movew #38,a7@-
  51.     trap #14
  52.     addql #6,a7
  53. no_ex_:
  54.     pea _shm_name     | temporäre datei wird z.zt. nicht gelöscht!
  55.     movew #0x41,a7@-
  56.     trap #1
  57.     addql #6,a7
  58.     pea killed
  59.     movew #0x9,a7@-
  60.     trap #1
  61.     addql #6,a7
  62.     clrw a7@-
  63.     trap #1
  64.     rts
  65.  
  66. ex_print:
  67.     clrl _anzahl
  68.     bclr #0,0xfa09:w         | ausschalten
  69.     bclr #0,0xfa15:w | maskieren
  70.     movel _old_vec,0x100:w
  71.     clrl _old_vec
  72.     rts
  73.  
  74.  
  75. | Idee aus ST-Computer 5/92, stark modifizert
  76. _prn_byte:
  77.     movel sp@(8),_anzahl | Anzahl Bytes
  78.     ble no_print
  79.     movel sp@(4),_ptr
  80.  
  81.     pea i_byte
  82.     movew #38,a7@-
  83.     trap #14
  84.     addql #6,a7
  85. no_print:
  86.     rts
  87.  
  88. | Interruptroutine in MFP-Busy-Interrupt
  89. | Wenn man positionsunabhaengig schriebe,
  90. | koennte sogar "shared text" unterstuetzt 
  91. | werden
  92. i_byte:    movel #xbra,a0    | Xbra-Routine bauen
  93.     movel #0x58425241,a0@+    | 'XBRA'
  94.     movel #0x44564952,a0@+    | 'DVIR'
  95.     movel 0x0100:w,a0@+    | alter Vektor
  96.     movel #0x07C0700,a0@+    | ORI #$0700,SR
  97.     movew #0x4EB9,a0@+    | JSR out
  98.     movel #out,a0@+
  99.     movew #0x4E73,a0@+    | RTE
  100.     movel #_int,0x0100:w
  101.  
  102.     bclr #0,0xfa03:w
  103.     bset #0,0xfa09:w | anschalten
  104.     bset #0,0xfa15:w | demaskieren
  105.     moveb #0xfe,0xfa11:w
  106.  
  107.     moveb #14,0xffff8800:w | strobe aus
  108.     moveb 0xffff8800:w,d0
  109.     bset #5,d0
  110.     moveb d0,0xffff8802:w
  111.  
  112. | Hier wird ein Byte ausgegeben
  113. out:
  114.     subql #1,_anzahl
  115.     bmi ende
  116.     moveml do/a0,a7@-
  117. |    bclr #0,0xfa15:w
  118.  
  119.     moveb #15,0xffff8800:w
  120.     moveb a0@+,0xffff8802:w
  121.     movel a0,_ptr
  122.  
  123.     movew wait1,d0 | damit das Timing der Norm entspricht, bzw
  124. time1:    nop
  125.     dbra d0,time1
  126.  
  127.     moveb #14,0xffff8800:w
  128.     moveb 0xffff8800:w,d0
  129.     bclr #5,d0
  130.     moveb d0,0xffff8802:w
  131.     bset #5,d0
  132.     movew d0,a0
  133.  
  134.     movew wait2,d0 | verändert werden kann
  135. time2:    nop
  136.     dbra d0,time2
  137.  
  138.     movew a0,d0
  139.     moveb d0,0xffff8802:w
  140.  
  141.     moveml a7@+,d0/a0
  142. |    bset #0,0xfa15:w
  143.     moveb #0xfe,0xfa11:w
  144.     rts
  145.  
  146.  
  147.  
  148. ende:    movel _old_vec,0x100:w
  149.     bclr #0,0xfa09:w | ausschalten
  150.     bclr #0,0xfa15:w | maskieren
  151.     clrl _old_vec
  152.     rts
  153.  
  154.  
  155.  
  156.     .data
  157.     .ascii "PATCH:"
  158. wait1:    .word 0x0006
  159. wait2:    .word 0x0024
  160. killed: .byte 0x1b,0x48,0x20,7,0
  161.  
  162.     .data
  163.     .comm _anzahl,4
  164.     .comm _ptr,4
  165.     .comm _xbra,8
  166.     .comm _old_vec,4
  167.     .comm _int,12
  168.