home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 2: Collection B / 17Bit_Collection_B.iso / files / 1794.dms / in.adf / Extensions_Sources / Extension_Sources.Lzh / _request.s < prev    next >
Encoding:
Text File  |  1992-02-01  |  12.1 KB  |  614 lines

  1. ;---------------------------------------------------------------------
  2. ;    **   **   **  ***   ***   ****     **    ***  **  ****
  3. ;   ****  *** *** ** ** **     ** **   ****  **    ** **  **
  4. ;  **  ** ** * ** ** **  ***   *****  **  **  ***  ** **
  5. ;  ****** **   ** ** **    **  **  ** ******    ** ** **
  6. ;  **  ** **   ** ** ** *  **  **  ** **  ** *  ** ** **  **
  7. ;  **  ** **   **  ***   ***   *****  **  **  ***  **  ****
  8. ;---------------------------------------------------------------------
  9. ; AMOS Requester handler V1.3
  10. ; By François Lionet
  11. ; AMOS and AMOS Compiler (c) Europress Software 1991
  12. ; To be used with AMOS1.3 and over
  13. ;--------------------------------------------------------------------- 
  14. ; This file is public domain
  15. ;---------------------------------------------------------------------
  16. ; Please refer to the _Music.s file for more informations
  17. ;---------------------------------------------------------------------
  18. Req_WY        equ    100
  19.  
  20. T_Tit        equ    0
  21. T_Text        equ    T_Tit+80
  22. T_Gad        equ    T_Text+320
  23. T_Size        equ    T_Gad+128
  24.  
  25. *
  26. ExtNb        equ    3-1
  27. *
  28.          Include    "_Equ.s"
  29.         RsSet    DataLong
  30.         Include "_Pointe.s"
  31.         Include "_CEqu.s"
  32.         Include    "_WEqu.s"
  33.         Include    "_LEqu.s"
  34. *
  35. Start        dc.l    C_Tk-C_Off
  36.         dc.l    C_Lib-C_Tk
  37.         dc.l    C_Title-C_Lib
  38.         dc.l    C_End-C_Title
  39.         dc.w    -1    
  40. *
  41. ******************************************************************
  42. *         OFFSETS TO FUNCTIONS
  43. C_Off           dc.w (L1-L0)/2,(L2-L1)/2,(L3-L2)/2,(L4-L3)/2
  44.             dc.w (L5-L4)/2,(L6-L5)/2,(L7-L6)/2,(L8-L7)/2
  45.             dc.w (L9-L8)/2,(L10-L9)/2,(L11-L10)/2
  46.  
  47. ******************************************************************
  48. *     TOKEN TABLE + Addresses
  49. C_Tk        dc.w     1,0
  50.         dc.b     $80,-1
  51.         dc.w    L_ReqOn,-1
  52.         dc.b    "request o","n"+$80,"I",-1
  53.         dc.w    L_ReqOf,-1
  54.         dc.b    "request of","f"+$80,"I",-1
  55.         dc.w    L_ReqWb,-1
  56.         dc.b    "request w","b"+$80,"I",-1
  57.         dc.w     0
  58.  
  59. ******************************************************************
  60. C_Lib
  61. ******************************************************************
  62. *        COLD START
  63. L0    movem.l    a3-a6,-(sp)
  64.     lea    ReqData(pc),a4
  65.     move.l    a4,ExtAdr+ExtNb*16(a5)
  66.     lea    Quit(pc),a0
  67.     move.l    a0,ExtAdr+ExtNb*16+8(a5)
  68. * Copy default palette    
  69.     lea    DefEPa+8(a5),a0    
  70.     lea    Req_Pal+8(pc),a1
  71.     moveq    #28-1,d0
  72. CPal    move.w    (a0)+,(a1)+
  73.     dbra    d0,CPal
  74. * Branch the requester
  75.     move.l    a5,Datas-ReqData(a4)
  76.     lea    Request(pc),a0
  77.     Rbsr    L_SetJump
  78.     move.l    d0,ReqPrev-ReqData(a4)
  79.     move.w    #-1,ReqFlag-ReqData(a4)            * Default is AMOS request
  80. * Return to caller
  81.     movem.l    (sp)+,a3-a6
  82.     moveq    #ExtNb,d0            * NO ERRORS
  83.     rts
  84.  
  85. ******* SCREEN RESET
  86. Warm    rts
  87.  
  88. ******* QUIT
  89. Quit    move.l    ReqPrev(pc),a0
  90.     Rbsr    L_SetJump
  91.     rts
  92.  
  93. ***********************************************************
  94. *    AMOS REQUESTER
  95. Request    movem.l    a0-a6/d0-d7,-(sp)
  96.     lea    ReqData(pc),a6
  97.     move.l    Datas-ReqData(a6),a5
  98.     tst    ReqFlag-ReqData(a6)
  99.     beq.s    ReqANo
  100.     bmi.s    ReqAMOS
  101.  
  102. ******* System requester
  103. SyReq    tst.w    WbClose(a5)
  104.     bne.s    ReqAMOS
  105.     move.w    T_AMOSHere(a5),d0    * Is AMOS here?
  106. SyReq0    move.w    d0,ReqOld-ReqData(a6)
  107.     beq.s    SyReq1
  108.     EcCalD    AMOS_WB,0        * AMOS To BACK
  109. SyReq1    movem.l    (sp),a0-a6/d0-d7
  110.     move.l    ReqPrev(pc),a5
  111.     jsr    (a5)
  112.     lea    ReqData(pc),a6
  113.     move.l    Datas-ReqData(a6),a5
  114.     move.l    d0,Req_Pos-ReqData(a6)
  115.     move.w    ReqOld(pc),d1
  116.     beq.s    SyReq2
  117.     EcCalD    AMOS_WB,1        * AMOS To FRONT
  118. SyReq2    bra    ReqXX
  119.     
  120. ******* Always NO!
  121. ReqANo    movem.l    (sp)+,a0-a6/d0-d7
  122.     moveq    #0,d0
  123.     rts
  124.  
  125. ******* AMOS Normal requester
  126. ReqAMOS
  127.     move.w    T_AMOSHere(a5),d0    * Is AMOS Here?
  128.     beq.s    SyReq0
  129. * 2.0 or 1.3?
  130.     tst.w    WB2.0(a5)        * WB2.0-> Normal requester!
  131.     bne.s    .20
  132.     bsr    Req_1.3
  133.     bra.s    .Open
  134. .20    bsr    Req_2.0
  135. * Open screen
  136. .Open    SyCall    AMALFrz
  137.     bsr    UnMix1
  138.     move.w    Req_Sx-ReqData(a6),d2
  139.     lsl.w    #3,d2
  140.     ext.l    d2
  141.     move.w    Req_Sy-ReqData(a6),d3
  142.     lsl.w    #3,d3
  143.     ext.l    d3
  144.     move.w    d3,Req_Sy-ReqData(a6)
  145.     moveq    #2,d4
  146.     move.l    #$8000,d5
  147.     moveq    #4,d6
  148.     moveq    #0,d7
  149.     lea    Req_Pal-ReqData(a6),a1
  150.     EcCalD    Cree,EcReq
  151.     bne    NoReq
  152.     move.l    a0,ScAdr-ReqData(a6)
  153.     SyCalD    ResZone,2
  154. * Initialise background text
  155.     WiCalA    Print,Req_Back-ReqData(a6)
  156.     WiCalA    Centre,T_Tit(a4)
  157.     WiCalA    Print,Req_Tit1(pc)
  158. * Print main text
  159.     moveq    #0,d1
  160.     moveq    #4,d2
  161.     WiCall    Locate
  162.     lea    T_Text(a4),a1
  163. .lop    move.l    a1,-(sp)
  164.     WiCall    Centre
  165.     move.l    (sp)+,a1
  166. .lop1    tst.b    (a1)+
  167.     bne.s    .lop1
  168.     tst.b    (a1)
  169.     bne.s    .lop
  170. * Positive text (left)
  171.     moveq    #1,d0
  172.     moveq    #"0",d1
  173.     bsr    PrtZone
  174. * Negative text (right)
  175. .NoPos    move.l    Req_Neg-ReqData(a6),d0
  176.     beq.s    .NoNeg
  177.     move.l    d0,a0
  178. .lop2    tst.b    (a0)+
  179.     bne.s    .lop2
  180.     sub.l    d0,a0
  181.     move.w    Req_Sx-ReqData(a6),d0
  182.     sub.w    a0,d0
  183.     add.b    #48,d0
  184.     move.b    d0,XTNeg-ReqData(a6)
  185.     moveq    #2,d0
  186.     moveq    #"0",d1
  187.     bsr    PrtZone
  188. * Screen appearance
  189. .NoNeg    move.l    ScAdr-ReqData(a6),a2
  190.     move.w    #288,d0
  191.     move.w    Req_Sx-ReqData(a6),d1
  192.     lsl.w    #1,d1
  193.     sub.w    d1,d0
  194.     move.w    d0,EcAWX(a2)
  195.     bset    #1,EcAW(a2)
  196.     moveq    #8,d7
  197.     moveq    #1,d6
  198.     move.w    Req_Sy-ReqData(a6),d5
  199.     lsr.w    #1,d5
  200.     add.w    #Req_Wy,d5
  201.     bsr    AppCentre
  202.     bsr    UnMix2
  203. * State of disc drive
  204.     SyCall    GetDisc
  205.     move.w    d0,DOld-ReqData(a6)
  206.  
  207. ******* Test loop (fun!)
  208. ReqLoop    SyCall    WaitVbl
  209. * Automatic disc change
  210.     move.l    Req_IDCMP-ReqData(a6),d0
  211.     btst    #15,d0
  212.     beq.s    NoAuto
  213.     SyCall    GetDisc
  214.     cmp.w    DOld-ReqData(a6),d0
  215.     beq.s    NoAuto
  216.     move.w    d0,DOld-ReqData(a6)
  217.     bne    ReqYes
  218. * Keyboard
  219. NoAuto    SyCall    Inkey
  220.     cmp.w    #13,d1        * ASCII-> Return 
  221.     beq.s    ReqYes    
  222.     cmp.w    #27,d1        * ASCII-> ESC
  223.     beq.s    ReqNo    
  224. * Don't you think it is better than this wierd Amiga V and B?
  225. * Sometime I ask myself what they were thinking when they chose such
  226. * key combinations!
  227.     swap    d1
  228.     move.w    d1,d0        * Isolate AMIGA keys
  229.     and.w    #%1100000000000000,d0
  230.     beq.s    RqL0
  231.     cmp.b    #$34,d1        * V
  232.     beq.s    ReqYes
  233.     cmp.b    #$35,d1        * B
  234.     beq.s    ReqNo
  235. * Mouse pointer
  236. RqL0    SyCall    GetZone
  237.     cmp.w    #EcReq,d1
  238.     beq.s    RqL1
  239.     moveq    #0,d1
  240. RqL1:    swap     d1
  241.     cmp.w    d7,d1
  242.     beq.s    RqL2
  243.     move.w    d7,d0
  244.     move.w    d1,d7
  245.     moveq    #"0",d1
  246.     bsr    UnMix1
  247.     bsr    PrtZone
  248.     bsr    UnMix2
  249. RqL2:    move.w    d7,d0
  250.     moveq    #"1",d1
  251.     bsr    UnMix1
  252.     bsr    PrtZone
  253.     bsr    UnMix2
  254.     tst.w    d7
  255.     beq    ReqLoop
  256.     SyCall    MouseKey
  257.     tst.w    d1
  258.     beq    ReqLoop
  259.     cmp.w    #2,d7
  260.     beq.s    ReqNo
  261. ReqYes    moveq    #-1,d0
  262.     bra.s    ReqGo
  263. ReqNo    moveq    #0,d0
  264.  
  265. ******* End of screen (well done!!!)
  266. ReqGo    move.l    d0,-(sp)
  267.     bsr    UnMix1
  268.     move.l    ScAdr-ReqData(a6),a2
  269.     moveq    #-8,d7
  270.     move.w    EcTY(a2),d6
  271.     lsr.w    #1,d6
  272.     move.w    Req_Sy-ReqData(a6),d5
  273.     lsr.w    #1,d5
  274.     add.w    #Req_Wy,d5
  275.     bsr    AppCentre
  276.     EcCalD    Del,EcReq
  277.     bsr    UnMix2
  278.  
  279. ******* Back to system!
  280. ReqX    bsr    ClrData
  281.     SyCall    AMALUFrz    
  282.     move.l    (sp)+,Req_Pos-ReqData(a6)    * Returns answer
  283. * Normal exit
  284. ReqXX    movem.l    (sp)+,a0-a6/d0-d7
  285.     move.l    Req_Pos(pc),d0
  286.     rts
  287. ******* Can't open screen!!!
  288. NoReq    clr.l    -(sp)
  289.     bra.s    ReqX
  290.  
  291. ******* Print a zone D0-> zone, D1-> inverse or not
  292. PrtZone    subq.w    #1,d0
  293.     bmi.s    PrtX
  294.     bne.s    PrtNeg
  295. * Print pos text
  296. PrtPos    tst.l    Req_Pos-ReqData(a6)
  297.     beq.s    .skip
  298.     lea    TPos1-ReqData(a6),a1
  299.     move.b    d1,5(a1)
  300.     WiCall    Print
  301.     move.l    Req_Pos-ReqData(a6),a1
  302.     WiCall    Print
  303.     WiCalA    Print,TPos2-ReqData(a6)
  304. .skip    bra.s    PrtX
  305. * Print neg text
  306. PrtNeg    tst.l    Req_Neg-ReqData(a6)
  307.     beq.s    .skip
  308.     lea    TNeg1-ReqData(a6),a1
  309.     move.b    d1,5(a1)
  310.     WiCall    Print
  311.     move.l    Req_Neg-ReqData(a6),a1
  312.     WiCall    Print
  313.     WiCalA    Print,TNeg2-ReqData(a6)
  314. .skip
  315. PrtX    rts
  316.  
  317. ******* Screen appearance
  318. AppCentre:
  319.     move.w    d6,d4
  320.     move.w    d6,EcAWTy(a2)
  321.     add.w    d6,EcAWTy(a2)
  322.     bset    #2,EcAWT(a2)
  323.     move.w    EcTy(a2),d0
  324.     lsr.w    #1,d0
  325.     sub.w    d6,d0
  326.     move.w    d0,EcAVY(a2)
  327.     bset    #2,EcAV(a2)
  328.     move.w    d5,EcAWy(a2)
  329.     sub.w    d6,EcAWy(a2)
  330.     bset    #2,EcAW(a2)
  331.     movem.l    a2/d4-d7,-(sp)
  332.     SyCall    WaitVBL
  333.     EcCall    CopForce
  334.     movem.l    (sp)+,a2/d4-d7
  335.     add.w    d7,d6
  336.     bpl.s    FsApp2
  337.     clr.w    d6
  338. FsApp2:    move.w    EcTy(a2),d0
  339.     lsr.w    #1,d0
  340.     cmp.w    d0,d6
  341.     bcs.s    FsApp3
  342.     move.w    d0,d6
  343. FsApp3:    cmp.w    d4,d6
  344.     bne.s    AppCentre
  345.     rts
  346.  
  347. ******* Prevent mixes between AMOS and the requester!
  348. UnMix1    movem.l    d0-d7/a0-a6,-(sp)
  349.     move.l    $4,a6
  350.     jsr    Forbid(a6)
  351.     EcCall    Current
  352.     move.w    EcNumber(a0),d1
  353.     lea    ReqOld(pc),a0
  354.     move.w    d1,(a0)
  355.     EcCalD    Active,EcReq
  356.     EcCalD    First,EcReq
  357.     movem.l    (sp)+,d0-d7/a0-a6
  358.     rts
  359. UnMix2    movem.l    d0-d7/a0-a6,-(sp)
  360.     move.w    ReqOld(pc),d1
  361.     EcCall    Active
  362.     move.l    $4,a6
  363.     jsr    Permit(a6)
  364.     movem.l    (sp)+,d0-d7/a0-a6
  365.     rts
  366.  
  367. ******* Open TEXT data zone
  368. ResData    move.l    #T_Size,d0
  369.     SyCall    SyFast
  370.     move.l    d0,a4
  371.     rts
  372. ******* Clear TEXT data zone
  373. ClrData    move.l    #T_Size,d0
  374.     move.l    a4,a1
  375.     SyCall    SyFree
  376.     rts
  377.  
  378. ******* Entree requester WB1.3
  379. Req_1.3    bsr    ResData
  380.  
  381.     move.l    #$00008000,Req_IDCMP-ReqData(a6)
  382.  
  383.     lsr.w    #3,d2
  384.     addq.w    #3,d2
  385.     and.w    #$FFFC,d2
  386.     move.w    d2,Req_Sx-ReqData(a6)
  387.     lsr.w    #3,d3
  388.     addq.w    #2,d3
  389.     move.w    d3,Req_Sy-ReqData(a6)
  390.  
  391.     move.l    a1,a0
  392.     lea    T_Text(a4),a1
  393.     moveq    #10,d0
  394.     bsr    IT_Print
  395.  
  396.     clr.l    Req_Pos-ReqData(a6)
  397.     lea    T_Gad(a4),a1
  398.     move.l    a2,d0
  399.     move.l    d0,a0
  400.     beq.s    .skip1
  401.     move.l    a1,Req_Pos-ReqData(a6)
  402.     moveq    #0,d0
  403.     bsr    IT_Print
  404. .skip1
  405.     clr.l    Req_Neg-ReqData(a6)
  406.     lea    T_Gad+64(a4),a1
  407.     move.l    a3,d0
  408.     move.l    d0,a0
  409.     beq.s    .skip2
  410.     move.l    a1,Req_Neg-ReqData(a6)
  411.     moveq    #0,d0
  412.     bsr    IT_Print
  413. .skip2
  414.     lea    Req_Tit(pc),a0
  415.     lea    T_Tit(a4),a1
  416. .loop    move.b    (a0)+,(a1)+
  417.     bne.s    .loop
  418.     rts    
  419.  
  420. ******* Entree requester WB2.0: fabrique les chaines de caracteres
  421. Req_2.0    bsr    ResData
  422.     move.l    (a2),Req_IDCMP-ReqData(a6)
  423.  
  424.     lea    8(a1),a2
  425.     clr.w    TxtMaxCx-ReqData(a6)
  426.  
  427.     lea    T_Tit(a4),a1
  428.     move.l    (a2)+,d0
  429.     move.l    d0,a0
  430.     bne.s    .nof
  431.     lea    Req_Tit(pc),a0
  432. .nof    bsr    Format
  433.  
  434.     move.l    (a2)+,a0
  435.     lea    T_Text(a4),a1
  436.     bsr    Format
  437.     move.w    TxtCy-ReqData(a6),Req_Sy-ReqData(a6)
  438.  
  439.     move.l    (a2)+,a0
  440.     lea    T_Gad(a4),a1
  441.     bsr    Format
  442.  
  443.     lea    T_Gad(a4),a0
  444.     move.l    a0,Req_Pos-ReqData(a6)
  445.     clr.l    Req_Neg-ReqData(a6)
  446. .loop    move.b    (a0)+,d0
  447.     beq.s    .skp
  448.     cmp.b    #"|",d0
  449.     bne.s    .loop
  450.     clr.b    -1(a0)
  451.     move.l    a0,Req_Neg-ReqData(a6)
  452. .skp
  453.     move.w    TxtMaxCx-ReqData(a6),d0
  454.     cmp.w    #32,d0
  455.     bcc.s    .skp2
  456.     moveq    #32,d0
  457. .skp2    add.w    #9,d0
  458.     and.w    #$FFFC,d0
  459.     move.w    d0,Req_Sx-ReqData(a6)
  460.  
  461.     add.w    #8,Req_Sy-ReqData(a6)
  462.     rts
  463.  
  464. ** Routine, appel de RawDoFmt
  465. Format    clr.w    TxtCx-ReqData(a6)
  466.     move.w    #1,TxtCy-ReqData(a6)
  467.     movem.l    a2/a3/a6,-(sp)
  468.     exg    a3,a1
  469.     lea    .OutC(pc),a2
  470.     move.l    $4.w,a6
  471.     jsr    -522(a6)
  472.     exg    a3,a1
  473.     movem.l    (sp)+,a2/a3/a6
  474. .XMax    move.w    TxtCx-ReqData(a6),d0
  475.     cmp.w    TxtMaxCx-ReqData(a6),d0
  476.     bls.s    .sk
  477.     move.w    d0,TxtMaxCx-ReqData(a6)
  478. .sk    rts
  479. .OutC    movem.l    a6/d0,-(sp)
  480.     lea    ReqData(pc),a6
  481.     addq.w    #1,TxtCx-ReqData(a6)
  482.     move.b    d0,(a3)+
  483.     cmp.b    #10,d0
  484.     bne.s    .Skip
  485.     clr.b    (a3)+
  486.     addq.w    #1,TxtCy-ReqData(a6)
  487.     bsr.s    .XMax
  488.     clr.w    TxtCx-ReqData(a6)
  489. .Skip    movem.l    (sp)+,a6/d0
  490.     clr.b    (a3)
  491.     rts
  492.  
  493. ******* Routine: copie un intuitext dans le buffer
  494. *    A0-> ITEXT
  495. *    A1-> Buffer
  496. *    D0-> Mettre un 10 a la fin...
  497. IT_Print
  498.     movem.l    a0-a2/d0-d1,-(sp)
  499. .loop    move.l    12(a0),d1
  500.     move.l    d1,a2
  501.     beq.s    .skip
  502. .loop1    move.b    (a2)+,(a1)+
  503.     bne.s    .loop1
  504.     tst.w    d0
  505.     beq.s    .skip
  506.     move.b    d0,-1(a1)
  507.     clr.b    (a1)+
  508. .skip    move.l    16(a0),d1
  509.     move.l    d1,a0
  510.     bne.s    .loop
  511.     movem.l    (sp)+,a0-a2/d0-d1
  512.     rts
  513.  
  514. ;--------------------------------------------------------------------
  515. *        DATA ZONE
  516. ReqData        
  517. *
  518. ScAdr        dc.l     0
  519. Datas        dc.l     0
  520. ReqMain        dc.l     0
  521. ReqPrev        dc.l    0
  522. Req_Sx        dc.w     0
  523. Req_Sy        dc.w    0
  524. Req_Pos        dc.l    0
  525. Req_Neg        dc.l    0
  526. Req_IDCMP    dc.l    0
  527. ReqFlag        dc.w     0
  528. ReqOld        dc.w     0
  529. DOld        dc.w    0
  530. WB20        dc.w    0
  531. TxtCx        dc.w    0
  532. TxtMaxCx    dc.w    0
  533. TxtCy        dc.w    0
  534.  
  535. Req_Pal        dc.w    $000,$46C,$FFF,$C41
  536.         ds.w    28
  537.  
  538. *         Background drawing
  539. Req_Back    dc.b 27,"C0",27,"V0"
  540.         dc.b 24,28,31,27,"E0",24,29,30,27,"E2"
  541.         dc.b 27,"B3",24,31,7
  542.         dc.b 24,28,31,27,"E0",29,29,31,27,"E2"
  543.         dc.b 24,31
  544.         dc.b 0
  545. *         Title
  546. Req_Tit        dc.b "System request",0
  547. Req_Tit1    dc.b 27,"B1",0
  548. *         Positive text
  549. TPos1        dc.b 27,"B3",27,"I0",24,30,30,28,27,"E0",27,"Z0",0
  550. TPos2        dc.b 27,"E2",27,"Z1",0
  551. *         Negative text
  552. TNeg1        dc.b 27,"B3",27,"I0",24,30,30,27,"X"
  553. XTNeg        dc.b "0",27,"E0",27,"Z0",0
  554. TNeg2        dc.b 27,"E2",27,"Z2",0
  555.         even
  556. ;--------------------------------------------------------------------
  557.  
  558. L1
  559. L2
  560. L3
  561.  
  562. ***********************************************************
  563. *        REQUEST WB
  564. L_ReqWb        equ    4
  565. L4    moveq    #1,d0
  566.     Rbra    L_ROnOf
  567. *********************************************************** 
  568. *        REQUEST ON
  569. L_ReqOn        equ    5
  570. L5    moveq    #-1,d0
  571.     Rbra    L_ROnOf
  572. *********************************************************** 
  573. *        REQUEST OFF
  574. L_ReqOf        equ    6
  575. L6    moveq    #0,d0
  576.     Rbra    L_ROnOf
  577. *
  578. L_ROnOf        equ    7
  579. L7    move.l    ExtAdr+ExtNb*16(a5),a0
  580.     move.w    d0,ReqFlag-ReqData(a0)
  581.     rts
  582.  
  583. ********************************************************** 
  584. *    Change the library jump
  585. L_SetJump    equ    8
  586. L8    movem.l    a1/a6,-(sp)
  587.     move.l    a0,d0
  588.     move.l    T_IntBase(a5),a1
  589.     lea    -$15c,a0
  590.     move.w    WB2.0(a5),d1
  591.     beq.s    SetJ1
  592.     lea    -$1d4-(20*6),a0
  593. SetJ1    move.l    $4,a6
  594.     jsr    SetFunction(a6)
  595.     movem.l    (sp)+,a1/a6
  596.     rts
  597.  
  598. **********************************************************
  599. *    Even if you do not have error messages, you MUST
  600. *    leave TWO routines empty at the end...
  601. L9
  602. L10
  603. * Two routines means three borders!
  604. L11
  605.  
  606. *******************************************************************************
  607.  
  608. *         Welcome message
  609. C_Title        dc.b     31,"Requester V 1.4",0
  610. *        End of extension
  611. C_End        dc.w    0
  612.  
  613.     even
  614.