home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / tbsource.lha / TBSource / NBBS / ReqSimpleReq.i < prev   
Text File  |  1993-12-21  |  1KB  |  57 lines

  1.  
  2. SureText    DC.B    "  Ok  ",0
  3. CancelText    DC.B    "Cancel",0
  4. ResumeText    DC.B    "Resume",0
  5.  
  6. ;    even
  7.     CNOP 0,2
  8.  
  9. ;----------------------------------------------------
  10.     xdef    TwoGadRequest
  11. TwoGadRequest:
  12. ;Bool=TwoGadRequest(String,Controls)
  13. ;                     A0      A1
  14.  
  15.     MOVEM.L    A2-A4/D2,-(SP)
  16.  
  17.     LEA.L    SureText,A2
  18.     LEA.L    CancelText,A3
  19.     BRA.S    TheRequest
  20.  
  21. SimpleRequest:
  22.  
  23. ;SimpleRequest(Text,Controls)
  24. ;               A0    A1
  25. ; This is just a method of telling a user something. It just calls MultiRequest
  26. ; with no gadgets.
  27.  
  28.     MOVEM.L    A2-A4/D2,-(SP)
  29.     SUBA.L    A2,A2
  30.     LEA.L    ResumeText,A3
  31.  
  32. TheRequest
  33.  
  34.     MOVE.L    _ReqBase,A6    ;Load A6 from the data segment _before_ tromping on A4.
  35.  
  36.     SUB.W    #TR_SIZEOF,SP        ;get some temporary storage.
  37.  
  38.     MOVE.L    SP,A4
  39.     MOVEQ    #TR_SIZEOF/2-1,D2    ;because the stack is almost never clear.
  40. 1$    CLR.W    (A4)+
  41.     DBF    D2,1$
  42.  
  43.     MOVE.L    A0,TR_Text(SP)
  44.     MOVE.L    A1,TR_Controls(SP)
  45.     MOVE.L    A2,TR_PositiveText(SP)
  46.     MOVE.L    A3,TR_NegativeText(SP)
  47.  
  48.     MOVE.W    #$FFFF,TR_KeyMask(SP)
  49.  
  50.     MOVE.L    SP,A0
  51.     JSR    _LVOTextRequest(A6)
  52.  
  53.     ADD.W    #TR_SIZEOF,SP
  54.  
  55.     MOVEM.L    (sp)+,A2-A4/D2
  56.     RTS
  57.