home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / dev / asm / tbsource / questions / versions / 0.99e / qv99e.lha / Questions.bak < prev    next >
Encoding:
Text File  |  1991-10-19  |  85.2 KB  |  4,231 lines

  1. *************************************************
  2. *                        *
  3. *         (C)opyright 1991        *
  4. *                        *
  5. *        by  Tomi Blinnikka        *
  6. *                        *
  7. *    Don´t try to understand the code    *
  8. *                        *
  9. * Version 0.01a    25/07/1991            *
  10. *    - 0.98ö 20/09/1991            *
  11. *                        *
  12. * BUGS: A few. (Not finished)            *
  13. *                        *
  14. *************************************************
  15.  
  16.     INCLUDE    "JMPLibs.i"
  17.     INCLUDE    "exec/types.i"
  18.     INCLUDE    "libraries/dos.i"
  19.     INCLUDE    "libraries/reqbase.i"
  20.     INCLUDE    "graphics/gfx.i"
  21.     INCLUDE    "graphics/gels.i"
  22.     INCLUDE    "intuition/intuition.i"
  23.     INCLUDE    "FH1:Language/Include2.0/Intuition/gadgetclass.i"
  24.     INCLUDE    "FH1:Language/Include2.0/libraries/gadtools.i"
  25.  
  26. ;    INCLUDE "iff.i"
  27.  
  28.     INCLUDE    "XREF:2.0.xref"
  29.  
  30.     INCLUDE    "XREF:GadTools.xref"
  31.     INCLUDE    "XREF:gfx.xref"
  32.     INCLUDE    "XREF:intuition.xref"
  33.     INCLUDE    "XREF:exec.xref"
  34.     INCLUDE "XREF:iff.xref"
  35.     INCLUDE    "XREF:dos.xref"
  36.  
  37. ;Gee, don't you just hate XREFs and XDEFs?
  38.  
  39.     XREF    Help
  40.     XREF    Load
  41.     XREF    Save
  42.     XREF    SaveAs
  43.     XREF    Prefs20
  44.     XREF    SToW5
  45.     XREF    SToW7
  46.     XREF    PrefsWin1
  47.     XREF    NoPrefsWin1
  48.     XREF    glist2
  49.     XREF    mlist2
  50.     XREF    GadMagic2
  51.     XREF    MenuMagic2
  52.     XREF    glist3
  53.     XREF    mlist3
  54.     XREF    GadMagic3
  55.     XREF    MenuMagic3
  56.     XREF    DefPrefs
  57.     XREF    Talk
  58.     XREF    TalkSys
  59.     XREF    TalkDes
  60.     XREF    TalkQue
  61.     XREF    TalkAns
  62.     XREF    TalkScore
  63.     XREF    FileRequest2
  64.     XREF    SpeakName
  65.     XREF    PrefsFile
  66.     XREF    SpeakFile
  67.     XREF    FRPathName2
  68.     XREF    Colors
  69.     XREF    ColorsBuf
  70.     XREF    P1CheckFile
  71.     XREF    PrefsBuf
  72.     XREF    CurrentPrefs
  73.     XREF    PrefsSize
  74.  
  75.     XDEF    About
  76.     XDEF    Find
  77.     XDEF    CheckFile
  78.     XDEF    DesMem1
  79.     XDEF    FRPathName
  80.     XDEF    SaveQuestion
  81.     XDEF    GetLength
  82.     XDEF    KillQueMem1
  83.     XDEF    QueCount
  84.     XDEF    QueCount2
  85.     XDEF    QueFile
  86.     XDEF    NoMem1
  87.     XDEF    FileRequester
  88.     XDEF    PrintTeach
  89.     XDEF    DoTeach
  90.     XDEF    RememberKey
  91.     XDEF    SetActivation
  92.     XDEF    OthActivation
  93.     XDEF    OthActivation1
  94.     XDEF    NoHelpWin1
  95.     XDEF    LoadName
  96.     XDEF    SaveName
  97.     XDEF    LoadCommKey
  98.     XDEF    SaveCommKey
  99.     XDEF    SaveAsCommKey
  100.     XDEF    QuitCommKey
  101.     XDEF    QuitMenu1I2Text
  102.     XDEF    PrefsM2Text
  103.     XDEF    PrefsM3Text
  104.     XDEF    PrefsM4Text
  105.     XDEF    Speaker
  106.     XDEF    Window1IDCMP
  107.     XDEF    vi
  108.     XDEF    Screen1
  109.     XDEF    ViewPort1
  110.     XDEF    SS_Load
  111.     XDEF    SS_Load2
  112.     XDEF    SS_Load3
  113.     XDEF    SS_Save
  114.     XDEF    SS_Save2
  115.     XDEF    SS_SaveAs
  116.     XDEF    SS_SaveAs2
  117.     XDEF    SS_Help
  118.     XDEF    SS_HelpHelp
  119.     XDEF    SS_Next2
  120.     XDEF    SS_Prev2
  121.     XDEF    SS_Prefs
  122.     XDEF    SS_Colors
  123.     XDEF    SS_On
  124.     XDEF    SS_Done
  125.     XDEF    SS_Default
  126.     XDEF    SS_Next2
  127.     XDEF    SS_Prev2
  128.     XDEF    SS_Quit
  129.     XDEF    SS_Page1
  130.     XDEF    SS_Page2
  131.     XDEF    SS_Page3
  132.     XDEF    SS_Page4
  133.     XDEF    SS_Page5
  134.     XDEF    SS_Page6
  135.     XDEF    SS_Page7
  136.     XDEF    SS_Page8
  137.     XDEF    SS_Page9
  138.     XDEF    SS_Page10
  139.     XDEF    SS_Page11
  140.     XDEF    SS_Page12
  141.     XDEF    SS_Page13
  142.     XDEF    SS_Page14
  143.     XDEF    SS_Page15
  144.     XDEF    SS_Page16
  145.     XDEF    SS_Page17
  146.     XDEF    SS_Page18
  147.     XDEF    SS_Page19
  148.     XDEF    SS_Page20
  149.     XDEF    SS_ERR_Win1
  150.     XDEF    SS_ERR_File1
  151.     XDEF    SS_ERR_File2
  152.     XDEF    SS_ERR_File3
  153.     XDEF    Mode
  154.     XDEF    Que
  155.     XDEF    NumQ
  156.     XDEF    Game
  157.     XDEF    AskReplace
  158.     XDEF    ClockPointer1
  159.     XDEF    SimpleRequest
  160.     XDEF    TwoGadRequest
  161.     XDEF    MenusOff
  162.     XDEF    FileError
  163.     XDEF    MenusOn
  164.     XDEF    SleepPointer
  165.     XDEF    NormalPointer
  166.     XDEF    MenuNull
  167.     XDEF    CheckIDCMP
  168.     XDEF    ClearMSGs
  169.     XDEF    OKTxt
  170.     XDEF    _GadToolsBase
  171.     XDEF    _IntuitionBase
  172.     XDEF    _DosBase
  173.     XDEF    _GfxBase
  174.     XDEF    _ReqBase
  175.     XDEF    ShutDown
  176.     XDEF    QName
  177.     XDEF    Topaz
  178.     XDEF    PrefTop
  179.     XDEF    Window1
  180.     XDEF    MainMGad1
  181.     XDEF    MainMenu
  182.  
  183. DesTop:        EQU    14    ;Desciption Y-Top
  184. QueTop:        EQU    67    ;Question Y-Top
  185. MulTop:        EQU    89    ;Multiselect Y-Top
  186. AnsTop:        EQU    190    ;Answer Y-Top
  187. NameTop:    EQU    95    ;Name Y-Top
  188. TimTop:        EQU    36    ;Timer Y-Top
  189. NumQTop:    EQU    46    ;Number(of)Questions Y-Top
  190. ScoTop:        EQU    55    ;Score Y-Top
  191. OptionTop:    EQU    49    ;Option(Teacher BOOL gad) Y-Top
  192. OptionTop2:    EQU    46    ;Option(Teacher BOOL gad) Y-Top
  193. OptionTop3:    EQU    37    ;Option(Teacher BOOL gad) Y-Top
  194. PrefTop:    EQU    25    ;Preference(BOOL gad) Y-Top
  195. MainMTop:    EQU    40    ;Preference(BOOL gad) Y-Top
  196.  
  197. StudentMenuN:    EQU    $F804
  198. TeachMenuN:    EQU    $F824
  199.  
  200. TRUE:        EQU    1
  201.  
  202. DGadTools:    set    1
  203. DReq:        set    1
  204.  
  205.         section    Q,CODE
  206.  
  207.         openlib    Dos,ShutDown
  208.         lib    Dos,Output
  209.         move.l    d0,_stdout
  210.         beq    ShutDown
  211.     
  212. ;To see if we have ks2.0 we'll try to open the gadtools.library
  213.  
  214.         move.l    #37,d0
  215.         lea.l    _GadToolsLib,a1
  216.         lib    Exec,OpenLibrary
  217.         move.l    d0,_GadToolsBase
  218.         beq    NoKS20
  219.  
  220.         openlib    Intuition,ShutDown
  221.         openlib    Gfx,ShutDown
  222.         move.l    #2,d0
  223.         lea.l    _ReqLib,a1
  224.         lib    Exec,OpenLibrary
  225.         move.l    d0,_ReqBase
  226.         beq    NoReq
  227.  
  228. ;Get system pref-colors.
  229.  
  230.         lea.l    SysPrefsBuf,a0
  231.         move.l    #118,d0
  232.         lib    Intuition,GetPrefs
  233.  
  234. ;Load user preferences
  235.  
  236.         lea.l    FRPathName2,a1
  237.         move.l    a1,d1
  238.         cmp.b    #$00,(a1)
  239.         beq    PrefsLoad_OUT2
  240.         move.l    #MODE_OLDFILE,d2
  241.         lib    Dos,Open
  242.         move.l    d0,PrefsFile
  243.         bne    PrefsLoad1
  244.         jsr    FileError
  245.         jmp    PrefsLoad_OUT2
  246.  
  247. PrefsLoad1:    jsr    P1CheckFile
  248.         tst.l    d0
  249.         beq    PrefsLoad_OUT.1
  250.  
  251. PrefsLoad2:    move.l    PrefsFile,d1
  252.         lea.l    ColorsBuf,a0
  253.         move.l    a0,d2
  254.         move.l    #PrefsSize-4,d3
  255.         lib    Dos,Read
  256.         tst.l    d0
  257.         bne    PrefsLoad_OUT1
  258.         jsr    FileError
  259.         lea.l    SS_ERR_File1,a0
  260.         jsr    Speaker
  261.         jmp    PrefsLoad_OUT.1
  262.  
  263. PrefsLoad_OUT1:    lea.l    PrefsBuf,a0
  264.         lea.l    CurrentPrefs,a1
  265.         move.l    #PrefsSize,d0
  266.         lib    Exec,CopyMem
  267.  
  268. PrefsLoad_OUT.1    move.l    PrefsFile,d1
  269.         lib    Dos,Close
  270.         move.l    #$00,PrefsFile
  271.  
  272. PrefsLoad_OUT2:    tst.w    Talk
  273.         beq    OpenLibs
  274.         lea.l    SpeakName,a0
  275.         move.l    a0,d1
  276.         move.l    #MODE_NEWFILE,d2
  277.         lib    Dos,Open
  278.         move.l    d0,SpeakFile
  279.         beq    NoSpeaking
  280.  
  281. OpenLibs:    ;openlib Iff,ShutDown
  282.  
  283.  
  284.         lea.l    SysPrefsBuf,a0
  285.         move.l    $6e(a0),Colors
  286.         move.l    $6e+4(a0),Colors+4
  287.  
  288. ;Find our task
  289.  
  290.         move.l    #$00,a1
  291.         lib    Exec,FindTask
  292.         move.l    d0,OurTask
  293.         move.l    d0,a0
  294.         move.l    $b8(a0),OldTaskWinPtr
  295.  
  296.         jsr    Do2.0Magic
  297.  
  298. ;Open Window1
  299.  
  300. StartWin1:    move.l    Screen1,d0
  301.         lea.l    NewWindow1,a0
  302.         move.l    d0,nw_Screen(a0)
  303.         move.l    d0,a1
  304.         move.l    sc_Width(a1),nw_Width(a0)
  305.         move.l    d0,SToW2
  306.         move.l    d0,SToW3
  307.         move.l    d0,SToW4
  308.         move.l    d0,SToW5
  309.         move.l    d0,SToW6
  310.         move.l    d0,SToW7
  311.         add.l    #$2c,d0
  312.         move.l    d0,ViewPort1
  313.  
  314.         move.l    ViewPort1,a0
  315.         lea.l    Colors,a1
  316.         move.l    #$04,d0
  317.         lib    Gfx,LoadRGB4
  318.  
  319.         lea.l    NewWindow1,a0
  320.         lib    Intuition,OpenWindow
  321.         move.l    d0,Window1
  322.         beq    NoWindow1
  323.         move.l    d0,a0
  324.         move.l    $32(a0),RP1
  325.  
  326. ;move requesters to Window1
  327.  
  328.         move.l    OurTask,a0
  329.         move.l    Window1,$b8(a0)
  330.  
  331. ;Reserve memory for description
  332. ;
  333. ;We're going to add 12 bytes to the amount of memory to be reserved,
  334. ;just in case.
  335.  
  336.         move.l    #DesLeng+12,d0
  337.         move.l    #MEMF_CLEAR!MEMF_PUBLIC,d1    ;Type of memory wanted
  338.         lib    Exec,AllocMem            ;Allocate memory
  339.         move.l    d0,DesMem1
  340.         bne    AddMens1
  341.         jsr    NoMem1                ;Tell user about memory
  342.         jmp    ShutDown
  343.  
  344. ;Add Menus to Window1
  345.  
  346. AddMens1:    lea.l    SS_Welcome,a0
  347.         jsr    Speaker
  348.         move.l    Window1,a0
  349.         move.l    mlist,a1
  350.         lib    Intuition,SetMenuStrip
  351.  
  352.         jsr    MainMenu
  353.  
  354. Window1IDCMP:    move.l    Window1,a0
  355.         jsr    CheckIDCMP
  356.         cmp.l    #REFRESHWINDOW,d2
  357.         beq    Refresher
  358.         cmp.l    #VANILLAKEY,d2
  359.         beq    VanillaKeys
  360.         cmp.l    #GADGETUP,d2
  361.         beq    GotAnswer
  362.         cmp.l    #MENUPICK,d2
  363.         beq    Win1Menus
  364.         cmp.l    #RAWKEY,d2
  365.         beq    RawKeys
  366.         cmp.l    #ACTIVEWINDOW,d2
  367.         beq    GoActivateGads
  368.         jmp    Window1IDCMP
  369.  
  370. GoActivateGads:    cmp.w    #$01,Mode
  371.         bne    Window1IDCMP
  372.         lea.l    AStrGad1,a0
  373.         move.l    Window1,a1
  374.         move.l    #$00,a2
  375.         lib    Intuition,ActivateGadget
  376.         jmp    Window1IDCMP
  377.  
  378. Refresher:    move.l    Window1,a0
  379.         lib    GadTools,GT_BeginRefresh
  380.         move.l    Window1,a0
  381.         move.l    #TRUE,d0
  382.         lib    GadTools,GT_EndRefresh
  383.         jmp    Window1IDCMP
  384.  
  385. GetName:    jsr    MenusOff
  386.  
  387.         move.l    Window1,a0
  388.         lea.l    MainMGad1,a1
  389.         move.l    #-1,d0
  390.         lib    Intuition,RemoveGList
  391.  
  392.         move.l    RP1,a1
  393.         clr.l    d0
  394.         clr.l    d1
  395.         lib    Gfx,Move
  396.  
  397.         move.l    RP1,a1
  398.         lib    Gfx,ClearScreen
  399.  
  400.         move.l    Window1,a0
  401.         lea.l    NameGad1,a1
  402.         move.l    #-1,d0
  403.         lib    Intuition,AddGadget
  404.  
  405.         lea.l    NameGad1,a0
  406.         move.l    Window1,a1
  407.         move.l    #$00,a2
  408.         move.l    #$01,d0
  409.         lib    Intuition,RefreshGList
  410.  
  411. GetName1:    lea.l    SS_EName,a0
  412.         jsr    Speaker
  413.  
  414.         lea.l    NameGad1,a0
  415.         move.l    Window1,a1
  416.         move.l    #$00,a2
  417.         lib    Intuition,ActivateGadget
  418.  
  419. GetName2:    move.l    Window1,a0
  420.         jsr    CheckIDCMP
  421.         cmp.l    #GADGETUP,d2
  422.         beq    GetName3
  423.         jmp    GetName2
  424.  
  425. GetName3:    tst.b    (NameGad1Buf)
  426.         beq    GetName1
  427.  
  428. GetName_OUT:    move.l    Window1,a0
  429.         lea.l    NameGad1,a1
  430.         lib    Intuition,RemoveGadget
  431.  
  432.         move.l    RP1,a1
  433.         clr.l    d0
  434.         clr.l    d1
  435.         lib    Gfx,Move
  436.  
  437.         move.l    RP1,a1
  438.         lib    Gfx,ClearScreen
  439.  
  440.  
  441.         lea.l    NameGad1Buf,a2
  442.         move.l    a2,d2
  443.         jsr    GetLength
  444.         move.b    #$dc,0(a2,d3.l)
  445.  
  446.         lea.l    SS_Welcome2,a0
  447.         jsr    Speaker
  448.         lea.l    NameGad1Buf,a0
  449.         jsr    Speaker
  450.  
  451.         move.l    Window1,a0
  452.         move.l    #$00,a1
  453.         lea.l    MenuBarName,a2
  454.         lib    Intuition,SetWindowTitles
  455.         jsr    MenusOn
  456.         rts
  457.  
  458. VanillaKeys:    cmp.w    #$1b,d3
  459.         beq    Quit
  460.         cmp.w    #$02,Mode
  461.         bne    VanillaKeys2
  462.         cmp.w    #"a",d3
  463.         beq    GoAddQues
  464.         cmp.w    #"A",d3
  465.         beq    GoAddQues
  466.         cmp.w    #"c",d3
  467.         beq    GoClear
  468.         cmp.w    #"C",d3
  469.         beq    GoClear
  470.         cmp.w    #00,NumQ
  471.         beq    Window1IDCMP
  472.         cmp.w    #'/',d3
  473.         beq    GoFindFirst
  474.         cmp.w    #'*',d3
  475.         beq    GoFindLast
  476.         cmp.w    #"f",d3
  477.         beq    GoFindFirst
  478.         cmp.w    #"F",d3
  479.         beq    GoFindFirst
  480.         cmp.w    #'l',d3
  481.         beq    GoFindLast
  482.         cmp.w    #'L',d3
  483.         beq    GoFindLast
  484.         cmp.w    #'-',d3
  485.         beq    GoFindPrev
  486.         cmp.w    #"p",d3
  487.         beq    GoFindPrev
  488.         cmp.w    #"P",d3
  489.         beq    GoFindPrev
  490.         cmp.w    #'+',d3
  491.         beq    GoFindNext
  492.         cmp.w    #"n",d3
  493.         beq    GoFindNext
  494.         cmp.w    #"N",d3
  495.         beq    GoFindNext
  496.         cmp.w    #"u",d3
  497.         beq    GoUndo
  498.         cmp.w    #"U",d3
  499.         beq    GoUndo
  500.         jmp    Window1IDCMP
  501. VanillaKeys2:    cmp.w    #$00,Mode
  502.         bne    Window1IDCMP
  503.         cmp.w    #"1",d3
  504.         beq    Game
  505.         cmp.w    #"2",d3
  506.         beq    GoToGetName
  507.         cmp.w    #"3",d3
  508.         beq    Load
  509.         cmp.w    #"4",d3
  510.         beq    GoTeacher
  511.         cmp.w    #"5",d3
  512.         beq    Prefs20
  513.         cmp.w    #"6",d3
  514.         beq    Help
  515.         cmp.w    #"7",d3
  516.         beq    About
  517.         cmp.w    #"8",d3
  518.         beq    Quit
  519.         jmp    Window1IDCMP
  520. RawKeys:    cmp.w    #$5f,d3
  521.         beq    Help
  522.         cmp.w    #$02,Mode
  523.         bne    Window1IDCMP
  524.         cmp.w    #00,NumQ
  525.         beq    Window1IDCMP
  526.         cmp.w    #$54,d3
  527.         beq    GoAddQues
  528.         cmp.w    #$55,d3
  529.         beq    GoClear
  530.         cmp.w    #$50,d3
  531.         beq    GoFindFirst
  532.         cmp.w    #$51,d3
  533.         beq    GoFindLast
  534.         cmp.w    #$52,d3
  535.         beq    GoFindPrev
  536.         cmp.w    #$53,d3
  537.         beq    GoFindNext
  538.         cmp.w    #$55,d3
  539.         beq    GoUndo
  540.         cmp.w    #$4f,d3        ;arrow back
  541.         beq    GoFindPrev
  542.         cmp.w    #$4e,d3        ;arrow forward
  543.         beq    GoFindNext
  544.         cmp.w    #$4d,d3        ;arrow down
  545.         beq    GoFindPrev
  546.         cmp.w    #$4c,d3        ;arrow up
  547.         beq    GoFindNext
  548.         jmp    Window1IDCMP
  549.  
  550. Win1Menus:    jsr    MenuNull
  551.         cmp.l    #$00,d6
  552.         beq    Win1Menus1
  553.         cmp.l    #$01,d6
  554.         beq    Win1Menus2
  555.         cmp.l    #$02,d6
  556.         beq    Win1Menus3
  557.         cmp.l    #$03,d6
  558.         beq    Win1Menus4
  559.         cmp.l    #$04,d6
  560.         beq    Win1Menus5
  561.         cmp.l    #$05,d6
  562.         beq    Win1Menus6
  563.         jmp    Window1IDCMP
  564. Win1Menus1:    cmp.l    #$00,d5
  565.         beq    Game
  566.         cmp.l    #$01,d5
  567.         beq    GoToGetName
  568.         cmp.l    #$02,d5
  569.         beq    Load
  570.         cmp.l    #$03,d5
  571.         beq    Save
  572.         cmp.l    #$04,d5
  573.         beq    SaveAs
  574.         cmp.l    #$05,d5
  575.         beq    Help
  576.         cmp.l    #$06,d5
  577.         beq    About
  578.         cmp.l    #$08,d5
  579.         beq    Quit
  580.         jmp    Window1IDCMP
  581. Win1Menus2:    cmp.l    #$00,d5
  582.         beq    GoAddQues
  583.         cmp.w    #$00,NumQ
  584.         beq    Window1IDCMP
  585.         cmp.l    #$02,d5
  586.         beq    GoUndo
  587.         jmp    Window1IDCMP
  588. Win1Menus3:    cmp.l    #$00,d5
  589.         beq    GoClear
  590.         jmp    Window1IDCMP
  591. Win1Menus4:    cmp.w    #$00,NumQ
  592.         beq    Window1IDCMP
  593.         cmp.l    #$00,d5
  594.         beq    GoFindFirst
  595.         cmp.l    #$01,d5
  596.         beq    GoFindLast
  597.         cmp.l    #$02,d5
  598.         beq    GoFindPrev
  599.         cmp.l    #$03,d5
  600.         beq    GoFindNext
  601.         jmp    Window1IDCMP
  602. Win1Menus5:    cmp.l    #$00,d5
  603.         beq    Student
  604.         cmp.l    #$01,d5
  605.         beq    Teacher
  606.         jmp    Window1IDCMP
  607. Win1Menus6:    cmp.l    #$00,d5
  608.         beq    Prefs20
  609. ;        cmp.l    #$01,d5
  610. ;        beq    LoadPrefs
  611. ;        cmp.l    #$02,d5
  612. ;        beq    SavePrefs
  613. ;        cmp.l    #$03,d5
  614. ;        beq    DefPrefs
  615.         jmp    Window1IDCMP
  616.  
  617. ;GoSetPrefs:    jmp    Prefs20
  618.  
  619. GoToGetName:    jsr    GetName
  620.         jsr    MainMenu
  621.         jmp    Window1IDCMP
  622.  
  623. Student:    lea.l    SS_Mode1,a0
  624.         jsr    Speaker
  625.         cmp.w    #$02,Mode
  626.         bne    Window1IDCMP
  627.  
  628.         jsr    SaveQuestion
  629.         move.w    #$00,Mode
  630.         move.l    #$f800,d0        ;First, Game!
  631.         move.l    Window1,a0
  632.         lib    Intuition,OnMenu
  633.         move.l    #$f820,d0        ;Second, Enter name
  634.         move.l    Window1,a0
  635.         lib    Intuition,OnMenu
  636.         move.l    #$f860,d0        ;Fourth, Save
  637.         move.l    Window1,a0
  638.         lib    Intuition,OffMenu
  639.         move.l    #$f880,d0        ;Fifth, Save As
  640.         move.l    Window1,a0
  641.         lib    Intuition,OffMenu
  642.  
  643.         move.l    #$ff01,d0        ;Second menu list, Edit single
  644.         move.l    Window1,a0
  645.         lib    Intuition,OffMenu
  646.  
  647.         move.l    #$ff02,d0        ;Third menu list, Edit all
  648.         move.l    Window1,a0
  649.         lib    Intuition,OffMenu
  650.  
  651.         move.l    #$ff03,d0        ;Fourth menu list, Move
  652.         move.l    Window1,a0
  653.         lib    Intuition,OffMenu
  654.  
  655.         move.l    Window1,a0
  656.         move.l    glist,a1
  657.         move.l    #-1,d0
  658.         move.l    #$00,a2
  659.         lib    Intuition,RemoveGList
  660.  
  661.         jsr    EmptyPage
  662.         jsr    MainMenu
  663.         jmp    Window1IDCMP
  664.  
  665. GoTeacher:    move.l    mlist,a0
  666.         move.l    #StudentMenuN,d0
  667.         lib    Intuition,ItemAddress
  668.         move.l    d0,a0
  669.         and.w    #~CHECKED,$c(a0)
  670.  
  671.         move.l    mlist,a0
  672.         move.l    #TeachMenuN,d0
  673.         lib    Intuition,ItemAddress
  674.         move.l    d0,a0
  675.         or.w    #CHECKED,$c(a0)
  676.  
  677. ;Nothing here please!
  678.  
  679. Teacher:    lea.l    SS_Mode2,a0
  680.         jsr    Speaker
  681.         cmp.w    #$00,Mode
  682.         bne    Window1IDCMP
  683.  
  684.         move.l    Window1,a0
  685.         lea.l    MainMGad1,a1
  686.         move.l    #-1,d0
  687.         lib    Intuition,RemoveGList
  688.  
  689.         move.w    #$02,Mode
  690.         move.w    #$00,QueCount
  691.         move.l    #$f800,d0        ;First, Game!
  692.         move.l    Window1,a0
  693.         lib    Intuition,OffMenu
  694.         move.l    #$f820,d0        ;Second, Enter name
  695.         move.l    Window1,a0
  696.         lib    Intuition,OffMenu
  697.         move.l    #$f860,d0        ;Fourth, Save
  698.         move.l    Window1,a0
  699.         lib    Intuition,OnMenu
  700.         move.l    #$f880,d0        ;Fifth, Save As
  701.         move.l    Window1,a0
  702.         lib    Intuition,OnMenu
  703.  
  704.         move.l    #$ff01,d0            ;Second menu list, Edit single
  705.         move.l    Window1,a0
  706.         lib    Intuition,OnMenu
  707.  
  708.         move.l    #$ff02,d0            ;Third menu list, Edit all
  709.         move.l    Window1,a0
  710.         lib    Intuition,OnMenu
  711.  
  712.         move.l    #$ff03,d0            ;Fourth menu list, Move
  713.         move.l    Window1,a0
  714.         lib    Intuition,OnMenu
  715.  
  716.         jsr    DoPage
  717.  
  718.         jsr    DoTeachPage
  719.  
  720.         move.l    Window1,a0        ;add buttons
  721.         move.l    glist,a1
  722.         move.l    #-1,d0
  723.         move.l    #-1,d1
  724.         move.l    #$00,a2
  725.         lib    Intuition,AddGList
  726.  
  727.         jsr    SetActivation
  728.         jsr    OthActivation1
  729.  
  730. ;Refresh gadgetlists so they're drawn on the screen (done in subroutine)
  731.  
  732.         move.l    Window1,a0
  733.         move.l    #$00,a1
  734.         lib    GadTools,GT_RefreshWindow
  735.  
  736. Teacher1:    jmp    DoTeach
  737.  
  738. TeacherAction:    cmp.w    #40,$26(a5)
  739.         beq    GoAddQues
  740.         cmp.w    #60,$26(a5)
  741.         beq    GoClear
  742.         cmp.w    #00,NumQ
  743.         beq    Window1IDCMP
  744.         cmp.w    #10,$26(a5)
  745.         beq    GoFindFirst
  746.         cmp.w    #15,$26(a5)
  747.         beq    GoFindLast
  748.         cmp.w    #20,$26(a5)
  749.         beq    GoFindPrev
  750.         cmp.w    #30,$26(a5)
  751.         beq    GoFindNext
  752.         cmp.w    #50,$26(a5)
  753.         beq    GoUndo
  754.         jmp    Window1IDCMP
  755.  
  756. GoFindFirst:    lea.l    SS_First,a0
  757.         jsr    Speaker
  758.         jsr    SaveQuestion
  759.         jsr    FindFirst
  760.         jsr    PrintTeach
  761.         jsr    SetActivation
  762.         lea.l    SS_Done,a0
  763.         jsr    Speaker
  764.         lea.l    DesStrGad2,a5
  765.         jmp    ActivateGads
  766. GoFindPrev:    lea.l    SS_Prev,a0
  767.         jsr    Speaker
  768.         jsr    SaveQuestion
  769.         tst.w    QueCount
  770.         beq    Window1IDCMP
  771.         jsr    FindPrev
  772.         jsr    SetActivation
  773. GoFindPrev1:    jsr    PrintTeach
  774.         lea.l    SS_Done,a0
  775.         jsr    Speaker
  776.         lea.l    DesStrGad2,a5
  777.         jmp    ActivateGads
  778. GoFindNext:    lea.l    SS_Next,a0
  779.         jsr    Speaker
  780.         jsr    SaveQuestion
  781.         move.w    NumQ,d0
  782.         sub.w    #1,d0
  783.         cmp.w    QueCount,d0
  784.         beq    Window1IDCMP
  785.         jsr    FindNext
  786.         jsr    SetActivation
  787. GoFindNext1:    jsr    PrintTeach
  788.         lea.l    SS_Done,a0
  789.         jsr    Speaker
  790.         lea.l    DesStrGad2,a5
  791.         jmp    ActivateGads
  792.  
  793. GoFindLast:    lea.l    SS_Last,a0
  794.         jsr    Speaker
  795.         jsr    SaveQuestion
  796.         jsr    FindLast
  797.         jsr    PrintTeach
  798.         jsr    SetActivation
  799.         lea.l    SS_Done,a0
  800.         jsr    Speaker
  801.         lea.l    DesStrGad2,a5
  802.         jmp    ActivateGads
  803. GoAddQues:    lea.l    SS_Add,a0
  804.         jsr    Speaker
  805.         jsr    SaveQuestion
  806.         jsr    AddQues
  807.         jsr    PrintNumQ
  808.         jsr    PrintTeach
  809.         jsr    SetActivation
  810.         lea.l    SS_Done,a0
  811.         jsr    Speaker
  812.         lea.l    DesStrGad2,a5
  813.         jmp    ActivateGads
  814. GoUndo:        lea.l    SS_SUndo,a0
  815.         jsr    Speaker
  816.         jsr    Find
  817.         jsr    PrintTeach
  818.         lea.l    SS_Done,a0
  819.         jsr    Speaker
  820.         lea.l    DesStrGad2,a5
  821.         jmp    ActivateGads
  822. GoClear:    lea.l    SS_AClear2,a0
  823.         jsr    Speaker
  824.         jsr    AskDoIt
  825.         cmp.l    #TRUE,d0
  826.         bne    GoClear_OUT
  827.         lea.l    SS_AClear,a0
  828.         jsr    Speaker
  829.         jsr    Clear
  830.         jsr    AddQues
  831.         jsr    PrintNumQ
  832.         jsr    PrintTeach
  833.         jsr    SetActivation
  834. GoClear_OUT:    lea.l    AStrGad1,a5
  835.         jmp    ActivateGads
  836.  
  837. ;
  838. ;SetActivation subroutine. To be called to turn off gadgets if they can't
  839. ;be used, i.e. can't use first gadget if at first question etc.
  840. ; Use also with load and save, with fake NumQ (set to zero) to turn off
  841. ;gads for loading time.
  842. ;
  843. ;inputs (from NumQ, QCount etc.)
  844. ;
  845. ;result (said above)
  846. ;
  847.  
  848. SetActivation:    move.l    Window1,a0
  849.         move.l    FirstGad1P,a1
  850.         move.l    #7,d0
  851.         lib    Intuition,RemoveGList
  852.         tst.w    QueCount            ;add menus too
  853.         bne    SetActivation2
  854.         move.l    FirstGad1P,a0
  855.         bset.l    #8,$c(a0)
  856.         move.l    #$f803,d0
  857.         move.l    Window1,a0
  858.         lib    Intuition,OffMenu
  859.         move.l    PrevGad1P,a0
  860.         bset.l    #8,$c(a0)
  861.         move.l    #$f843,d0
  862.         move.l    Window1,a0
  863.         lib    Intuition,OffMenu
  864.         jmp    SetActivation3
  865.  
  866. SetActivation2:    move.l    PrevGad1P,a0
  867.         bclr.l    #8,$c(a0)
  868.         move.l    #$f843,d0
  869.         move.l    Window1,a0
  870.         lib    Intuition,OnMenu
  871.         move.l    FirstGad1P,a0
  872.         bclr.l    #8,$c(a0)
  873.         move.l    #$f803,d0
  874.         move.l    Window1,a0
  875.         lib    Intuition,OnMenu
  876.  
  877. SetActivation3:    move.w    NumQ,d0
  878.         sub.w    #1,d0
  879.         cmp.w    QueCount,d0
  880.         beq    SetActivation4
  881.  
  882.         move.l    LastGad1P,a0
  883.         bclr.l    #8,$c(a0)
  884.         move.l    #$f823,d0
  885.         move.l    Window1,a0
  886.         lib    Intuition,OnMenu
  887.         move.l    NextGad1P,a0
  888.         bclr.l    #8,$c(a0)
  889.         move.l    #$f863,d0
  890.         move.l    Window1,a0
  891.         lib    Intuition,OnMenu
  892.         jmp    SetActivation5
  893.  
  894. SetActivation4:    move.l    LastGad1P,a0        ;Was last one.
  895.         bset.l    #8,$c(a0)
  896.         move.l    #$f823,d0
  897.         move.l    Window1,a0
  898.         lib    Intuition,OffMenu
  899.         move.l    NextGad1P,a0
  900.         bset.l    #8,$c(a0)
  901.         move.l    #$f863,d0
  902.         move.l    Window1,a0
  903.         lib    Intuition,OffMenu
  904.  
  905. SetActivation5:    tst.w    NumQ
  906.         beq    SetActivation6
  907.         move.l    UndoGad1P,a0
  908.         bclr.l    #8,$c(a0)
  909.         move.l    #$f841,d0
  910.         move.l    Window1,a0
  911.         lib    Intuition,OnMenu
  912.         jmp    SetActivation7
  913.  
  914. SetActivation6:    move.l    UndoGad1P,a0        ;Here we turn off all
  915.         bset.l    #8,$c(a0)        ;gadgets that can't
  916.         move.l    #$f841,d0        ;be used if NumQ = 0
  917.         move.l    Window1,a0
  918.         lib    Intuition,OffMenu
  919.         move.l    FirstGad1P,a0
  920.         bset.l    #8,$c(a0)
  921.         move.l    #$f803,d0
  922.         move.l    Window1,a0
  923.         lib    Intuition,OffMenu
  924.         move.l    LastGad1P,a0
  925.         bset.l    #8,$c(a0)
  926.         move.l    #$f823,d0
  927.         move.l    Window1,a0
  928.         lib    Intuition,OffMenu
  929.         move.l    PrevGad1P,a0
  930.         bset.l    #8,$c(a0)
  931.         move.l    #$f843,d0
  932.         move.l    Window1,a0
  933.         lib    Intuition,OffMenu
  934.         move.l    NextGad1P,a0
  935.         bset.l    #8,$c(a0)
  936.         move.l    #$f863,d0
  937.         move.l    Window1,a0
  938.         lib    Intuition,OffMenu
  939.  
  940. SetActivation7:    move.l    Window1,a0
  941.         move.l    FirstGad1P,a1
  942.         move.l    #$00,a2
  943.         move.l    #-1,d0
  944.         move.l    #7,d1
  945.         lib    Intuition,AddGList
  946.         move.l    FirstGad1P,a0
  947.         move.l    Window1,a1
  948.         move.l    #$00,a2
  949.         move.l    #7,d0
  950.         lib    Intuition,RefreshGList
  951.         rts
  952.  
  953. ;Turns off Add gadget (and menu) + Clear gadget (and menu)
  954.  
  955. OthActivation:    move.l    Window1,a0
  956.         move.l    AddGad1P,a1
  957.         move.l    #4,d0
  958.         lib    Intuition,RemoveGList
  959.         move.l    AddGad1P,a0
  960.         bset.l    #8,$c(a0)
  961.         move.l    #$f801,d0
  962.         move.l    Window1,a0
  963.         lib    Intuition,OffMenu
  964.         move.l    ClearGad1P,a0
  965.         bset.l    #8,$c(a0)
  966.         move.l    #$f802,d0
  967.         move.l    Window1,a0
  968.         lib    Intuition,OffMenu
  969.         move.l    Window1,a0
  970.         move.l    AddGad1P,a1
  971.         move.l    #$00,a2
  972.         move.l    #-1,d0
  973.         move.l    #4,d1
  974.         lib    Intuition,AddGList
  975.         move.l    AddGad1P,a0
  976.         move.l    Window1,a1
  977.         move.l    #$00,a2
  978.         move.l    #4,d0
  979.         lib    Intuition,RefreshGList
  980.         rts
  981.  
  982. ;Turns on Add gadget (and menu) + Clear gadget (and menu)
  983.  
  984. OthActivation1:    move.l    Window1,a0
  985.         move.l    AddGad1P,a1
  986.         move.l    #4,d0
  987.         lib    Intuition,RemoveGList
  988.         move.l    AddGad1P,a0
  989.         bclr.l    #8,$c(a0)
  990.         move.l    #$f801,d0
  991.         move.l    Window1,a0
  992.         lib    Intuition,OnMenu
  993.         move.l    ClearGad1P,a0
  994.         bclr.l    #8,$c(a0)
  995.         move.l    #$f802,d0
  996.         move.l    Window1,a0
  997.         lib    Intuition,OnMenu
  998.         move.l    Window1,a0
  999.         move.l    AddGad1P,a1
  1000.         move.l    #$00,a2
  1001.         move.l    #-1,d0
  1002.         move.l    #4,d1
  1003.         lib    Intuition,AddGList
  1004.         move.l    AddGad1P,a0
  1005.         move.l    Window1,a1
  1006.         move.l    #$00,a2
  1007.         move.l    #4,d0
  1008.         lib    Intuition,RefreshGList
  1009.         rts
  1010.  
  1011. ;Get length of text in given address (d2), including 0
  1012. ;
  1013. ;Input d2 = Address of null terminated text string
  1014. ;
  1015. ;Result d3 = Length
  1016.  
  1017. GetLength:    move.l    #$00,d3
  1018.         move.l    d2,a0
  1019. GetLength2:    add.l    #1,d3
  1020.         tst.b    (a0)+
  1021.         bne    GetLength2
  1022.         rts
  1023.  
  1024. PrintTeach:    cmp.w    #$00,NumQ
  1025.         beq    PrintTeach_OUT
  1026.         move.l    Window1,a0        ;remove gadgets
  1027.         lea.l    DesStrGad1,a1
  1028.         move.l    #-1,d0
  1029.         move.l    #$00,a2
  1030.         lib    Intuition,RemoveGList
  1031.  
  1032. ;Copy description into correct buffers
  1033.  
  1034.         move.l    DesMem1,a0
  1035.         lea.l    DesStr1Buf,a1
  1036.         move.l    #DesLeng,d0
  1037.         lib    Exec,CopyMem
  1038.  
  1039. ;Copy current questions and answers into gadget buffers
  1040.  
  1041.         move.l    CurrentQue,a0
  1042.         lea.l    QueStr1Buf,a1
  1043.         move.l    #NextQues,d0
  1044.         lib    Exec,CopyMem
  1045.  
  1046.         move.l    Window1,a0        ;Add gadgets
  1047.         lea.l    DesStrGad1,a1
  1048.         move.l    #-1,d0
  1049.         move.l    #-1,d1
  1050.         move.l    #$00,a2
  1051.         lib    Intuition,AddGList
  1052.  
  1053. ;Refresh gadget so they're drawn on the screen
  1054.  
  1055.         lea.l    DesStrGad1,a0
  1056.         move.l    Window1,a1
  1057.         move.l    #$00,a2
  1058.         move.l    #-1,d0
  1059.         lib    Intuition,RefreshGList
  1060.         jsr    PrintScore
  1061. PrintTeach_OUT:    rts
  1062.  
  1063. ;Copy description into memory
  1064.  
  1065. SaveQuestion:    cmp.w    #$00,NumQ
  1066.         beq    SaveQ_OUT
  1067.         lea.l    DesStr1Buf,a0
  1068.         move.l    DesMem1,a1
  1069.         move.l    #DesLeng,d0
  1070.         lib    Exec,CopyMem
  1071.  
  1072. ;Copy current question and answers into memory
  1073.  
  1074.         lea.l    QueStr1Buf,a0
  1075.         move.l    CurrentQue,a1
  1076.         move.l    #NextQues,d0
  1077.         lib    Exec,CopyMem
  1078. SaveQ_OUT:    rts
  1079.  
  1080. DoTeach:    jsr    FindFirst
  1081.         jsr    PrintTeach
  1082.         jsr    PrintNumQ
  1083.         jmp    Window1IDCMP
  1084.  
  1085. ActivateGads:    cmp.w    #1,$26(a5)
  1086.         bne    TeacherAction
  1087.         move.l    (a5),a0
  1088.         cmp.l    #$00,a0
  1089.         bne    ActivateGads1
  1090.         jmp    Window1IDCMP
  1091. ActivateGads1:    move.l    Window1,a1
  1092.         move.l    #$00,a2
  1093.         lib    Intuition,ActivateGadget
  1094.         jmp    Window1IDCMP    
  1095.  
  1096. Clear:        lea.l    RememberKey,a0
  1097.         move.l    #TRUE,d0
  1098.         lib    Intuition,FreeRemember
  1099.         move.w    #$00,NumQ
  1100.         move.w    #$00,QueCount
  1101.         move.b    #$00,DesStr1Buf
  1102.         move.b    #$00,DesStr2Buf
  1103.  
  1104. ;Clear description
  1105.  
  1106.         tst.l    DesMem1
  1107.         beq    ClearDes1
  1108.         move.l    DesMem1,a1
  1109.         move.l    #DesLeng+12,d0
  1110.         lib    Exec,FreeMem
  1111.         move.l    #$00,DesMem1
  1112.  
  1113. ClearDes1:    move.l    #DesLeng+12,d0
  1114.         move.l    #MEMF_CLEAR!MEMF_PUBLIC,d1    ;Type of memory wanted
  1115.         lib    Exec,AllocMem            ;Allocate memory
  1116.         move.l    d0,DesMem1
  1117.         bne    ClearDes_OUT
  1118.         jsr    NoMem1                ;Tell user about memory
  1119.         jmp    ShutDown
  1120. ClearDes_OUT:    rts
  1121.  
  1122. AddQues:    lea.l    RememberKey,a0
  1123.         move.l    #NextQues,d0
  1124.         move.l    #MEMF_CLEAR!MEMF_PUBLIC,d1
  1125.         lib    Intuition,AllocRemember
  1126.         tst.l    d0
  1127.         bne    AddQues1
  1128.         jsr    NoMem1
  1129.         jsr    FindFirst
  1130.         rts
  1131. AddQues1:    jsr    FindFirst
  1132.         add.w    #1,NumQ
  1133.         rts
  1134.  
  1135. FindFirst:    move.w    #0,QueCount
  1136.         jsr    Find
  1137.         move.l    a4,QueBegin
  1138.         rts
  1139. FindLast:    move.w    NumQ,QueCount
  1140.         sub.w    #1,QueCount
  1141.         jsr    Find
  1142.         rts
  1143. FindPrev:    sub.w    #1,QueCount
  1144.         jsr    Find
  1145.         rts
  1146. FindNext:    add.w    #1,QueCount
  1147.         jsr    Find
  1148.         rts
  1149.  
  1150. Find:        move.l    #$00,d4
  1151.         lea.l    RememberKey,a4
  1152.         move.l    (a4),a4
  1153. Find2:        cmp.w    QueCount,d4
  1154.         beq    Find3
  1155.         add.w    #1,d4
  1156.         move.l    (a4),a4
  1157.         jmp    Find2
  1158. Find3:        move.l    $8(a4),a4
  1159.         move.l    a4,CurrentQue
  1160.         rts
  1161.         
  1162. MainMenuSelect:    cmp.w    #70,$26(a5)
  1163.         beq    Game
  1164.         cmp.w    #71,$26(a5)
  1165.         beq    GoToGetName
  1166.         cmp.w    #72,$26(a5)
  1167.         beq    Load
  1168.         cmp.w    #73,$26(a5)
  1169.         beq    GoTeacher
  1170.         cmp.w    #74,$26(a5)
  1171.         beq    Prefs20
  1172.         cmp.w    #75,$26(a5)
  1173.         beq    Help
  1174.         cmp.w    #76,$26(a5)
  1175.         beq    About
  1176.         cmp.w    #77,$26(a5)
  1177.         beq    Quit
  1178.         jmp    Window1IDCMP
  1179. GotAnswer:    cmp.w    #$00,Mode
  1180.         beq    MainMenuSelect
  1181.         cmp.w    #$02,Mode
  1182.         beq    ActivateGads
  1183.         lea.l    AStrGad1Buf,a3
  1184.         move.l    CAnsBegin,a5
  1185.         move.l    QueBegin,a4
  1186.  
  1187. ;
  1188. ;a3 = Gadget buffer start
  1189. ;a4 = Question begin
  1190. ;a5 = Correct answer start
  1191. ;
  1192.  
  1193.         move.w    #$00,AnsCount
  1194.         move.l    a3,a1
  1195.         move.l    a5,a2
  1196. TestAnswer:    tst.b    (a2)        ;If correct answer = 0
  1197.         beq    TestAnswer2
  1198.         cmp.b    (a1)+,(a2)+    ;Compare correct & user answer
  1199.         beq    TestAnswer
  1200.  
  1201. TestAnswer1:    cmp.w    #09,AnsCount    ;See if done last correct answer
  1202.         beq    WrongAnswer    ;If have, user hasn't given correct answer
  1203.         add.l    #AnsLeng,a5    ;If not, get next correct answer
  1204.         move.l    a5,a2        ;Move it for checker
  1205.         tst.b    (a2)        ;Next answer is empty
  1206.         beq    WrongAnswer    ;So users answer was wrong
  1207.         move.l    a3,a1        ;Get start of user answer
  1208.         add.w    #$01,AnsCount    ;Get ready for next correct answer
  1209.         jmp    TestAnswer
  1210.  
  1211. TestAnswer2:    tst.b    (a1)        ;If correct & user answer
  1212.         bne    TestAnswer1    ;don't equal 0 answer is wrong
  1213.         jmp    RightAnswer    ;so get next correct answer
  1214.  
  1215. ;Wrong answer
  1216.  
  1217. WrongAnswer:    jsr    PrintScore
  1218.  
  1219.         move.w    #$00,LastAns
  1220.         jsr    GiveAnswer
  1221.         move.l    ViewPort1,a0
  1222.         move.l    #$03,d0
  1223.         move.l    #$0f,d1
  1224.         clr.l    d2
  1225.         clr.l    d3
  1226.         lib    Gfx,SetRGB4
  1227.  
  1228.         lea.l    NewWrongWin1,a0
  1229.         lea.l    NWrongTL,a1
  1230.         lib    Intuition,OpenWindowTagList
  1231.         move.l    d0,WrongWin1
  1232.         beq    NoWrongWin1
  1233.         move.l    d0,a0
  1234.         move.l    $32(a0),a4
  1235.  
  1236.         move.l    a4,a0
  1237.         lea.l    WrongTxt2,a1
  1238.         clr.l    d0
  1239.         clr.l    d1
  1240.         lib    Intuition,PrintIText
  1241.  
  1242.         lea.l    SS_Wrong,a0
  1243.         jsr    Speaker
  1244.  
  1245.         move.l    WrongWin1,a0
  1246.         push    a3-a5
  1247.         jsr    CheckIDCMP
  1248.         pull    a3-a5
  1249.         move.l    WrongWin1,a0
  1250.         jsr    ClearMSGs
  1251.         move.l    #$00,WrongWin1
  1252.  
  1253.         move.l    ViewPort1,a0
  1254.         lea.l    Colors,a1
  1255.         move.l    #$04,d0
  1256.         lib    Gfx,LoadRGB4
  1257.         jmp    TestAns_OUT
  1258.  
  1259. RightAnswer:    add.w    #1,Score
  1260.  
  1261.         jsr    PrintScore
  1262.  
  1263.         move.w    #$01,LastAns
  1264.         jsr    GiveAnswer
  1265.         move.l    ViewPort1,a0
  1266.         move.l    #$03,d0
  1267.         clr.l    d1
  1268.         move.l    #$0a,d2
  1269.         clr.l    d3
  1270.         lib    Gfx,SetRGB4
  1271.  
  1272.         lea.l    NewRightWin1,a0
  1273.         lea.l    NWrongTL,a1
  1274.         lib    Intuition,OpenWindowTagList
  1275.         move.l    d0,RightWin1
  1276.         beq    NoRightWin1
  1277.         move.l    d0,a0
  1278.         move.l    $32(a0),a4
  1279.  
  1280.         move.l    a4,a0
  1281.         lea.l    RightTxt1,a1
  1282.         clr.l    d0
  1283.         clr.l    d1
  1284.         lib    Intuition,PrintIText
  1285.  
  1286.         lea.l    SS_Right,a0
  1287.         jsr    Speaker
  1288.  
  1289.         move.l    RightWin1,a0
  1290.         push    a3-a5
  1291.         jsr    CheckIDCMP
  1292.         pull    a3-a5
  1293.         move.l    RightWin1,a0
  1294.         jsr    ClearMSGs
  1295.         move.l    #$00,RightWin1
  1296.  
  1297.         move.l    ViewPort1,a0
  1298.         lea.l    Colors,a1
  1299.         move.l    #$04,d0
  1300.         lib    Gfx,LoadRGB4
  1301.         jmp    TestAns_OUT
  1302.  
  1303. TestAns_OUT:    add.w    #$01,QueCount
  1304.  
  1305. ;remove gadget, clear inputs and put it back
  1306.  
  1307.         move.l    Window1,a0
  1308.         lea.l    AStrGad1,a1
  1309.         lib    Intuition,RemoveGadget
  1310.         move.b    #$00,AStrGad1Buf
  1311.         move.l    Window1,a0
  1312.         lea.l    AStrGad1,a1
  1313.         move.l    #-1,d0
  1314.         lib    Intuition,AddGadget
  1315.  
  1316.         lea.l    AStrGad1,a0
  1317.         move.l    Window1,a1
  1318.         move.l    #$00,a2
  1319.         move.l    #1,d0
  1320.         lib    Intuition,RefreshGList
  1321.  
  1322.         jmp    Ask
  1323.  
  1324. PutChProc:    tst.b    d0
  1325.         beq    PutChProc_OUT
  1326.         move.b    d0,(a3)+
  1327. PutChProc_OUT:    rts
  1328.  
  1329. PrintTimer:    move.l    RP1,a1
  1330.         move.l    #$00,d0
  1331.         lib    Gfx,SetAPen
  1332.  
  1333.         move.l    RP1,a1        ;Clear old timer text
  1334.         move.l    #440,d0
  1335.         move.l    #TimTop,d1
  1336.         move.l    #638,d2
  1337.         move.l    #ScoTop+9,d3
  1338.         lib    Gfx,RectFill
  1339.  
  1340.         move.l    RP1,a0        ;Print Timer: No
  1341.         lea.l    TimerTxt2,a1
  1342.         move.l    #440,d0
  1343.         move.l    #TimTop,d1
  1344.         lib    Intuition,PrintIText
  1345.         rts
  1346.  
  1347. ;Print score
  1348.  
  1349. PrintScore:    lea.l    fstrl,a0
  1350.         lea.l    Score,a1
  1351.         lea.l    PutChProc,a2
  1352.         lea.l    ScoreText2,a3
  1353.         lib    Exec,RawDoFmt
  1354.  
  1355.         lea.l    fstrl,a0
  1356.         move.w    QueCount,QueCount2
  1357.         add.w    #1,QueCount2
  1358.         lea.l    QueCount2,a1
  1359.         lea.l    PutChProc,a2
  1360.         lea.l    ScoreText4,a3
  1361.         lib    Exec,RawDoFmt
  1362.  
  1363. ;Clear old score
  1364.  
  1365.         move.l    RP1,a1
  1366.         move.l    #$00,d0
  1367.         lib    Gfx,SetAPen
  1368.  
  1369.         move.l    RP1,a1        ;Question
  1370.         move.l    #440,d0
  1371.         move.l    #ScoTop,d1
  1372.         move.l    #638,d2
  1373.         move.l    #ScoTop+9,d3
  1374.         lib    Gfx,RectFill
  1375.  
  1376. ;Print score
  1377.  
  1378.         move.l    RP1,a0
  1379.         lea.l    ScoreTxt1,a1
  1380.         move.l    #440,d0
  1381.         move.l    #ScoTop,d1
  1382.         lib    Intuition,PrintIText
  1383.         move.l    #$DEAFBEEF,d2
  1384.         lea.l    ScoreText1,a0
  1385.         jsr    Speaker
  1386.         rts
  1387.  
  1388. PrintNumQ:    lea.l    fstrl,a0
  1389.         lea.l    NumQ,a1
  1390.         lea.l    PutChProc,a2
  1391.         lea.l    NumQText2,a3
  1392.         lib    Exec,RawDoFmt
  1393.  
  1394. ;Clear old NumQ
  1395.  
  1396.         move.l    RP1,a1
  1397.         move.l    #$00,d0
  1398.         lib    Gfx,SetAPen
  1399.  
  1400.         move.l    RP1,a1        ;Question
  1401.         move.l    #440,d0
  1402.         move.l    #NumQTop,d1
  1403.         move.l    #638,d2
  1404.         move.l    #NumQTop+8,d3
  1405.         lib    Gfx,RectFill
  1406.  
  1407. ;Print NumQ
  1408.  
  1409.         move.l    RP1,a0
  1410.         lea.l    NumQTxt1,a1
  1411.         move.l    #440,d0
  1412.         move.l    #NumQTop,d1
  1413.         lib    Intuition,PrintIText
  1414.         rts
  1415.  
  1416. ;Print answer
  1417.  
  1418. GiveAnswer:    move.l    #$DEADBEEF,d2
  1419.         lea.l    SS_Answers,a0
  1420.         jsr    Speaker
  1421.         move.w    #$00,d5
  1422.         move.l    CAnsBegin,a5
  1423. GiveAnswer1:    move.l    d5,d4
  1424.         mulu.w    #10,d4            ;Calculate place to print answer
  1425.         move.l    a5,AnsTextAdd        ;Place address of answer text...
  1426.         move.l    RP1,a0            ;into IText structure
  1427.         lea.l    AnsTxt1,a1
  1428.         move.l    #1,d0
  1429.         move.l    #MulTop,d1
  1430.         add.l    d4,d1
  1431.         lib    Intuition,PrintIText
  1432.  
  1433.         move.l    #$DEADBEEF,d2
  1434.         move.l    a5,a0
  1435.         jsr    Speaker
  1436.  
  1437.         add.w    #1,d5
  1438.         add.l    #AnsLeng,a5
  1439.         tst.b    (a5)
  1440.         bne    GiveAnswer1
  1441.  
  1442.         cmp.w    #$01,LastAns
  1443.         bne    GiveAnswer_OUT
  1444.         jsr    HiLite
  1445.  
  1446. GiveAnswer_OUT:    rts
  1447.  
  1448. Game:        move.l    Window1,a0        ;Remove Main menu's gadgets
  1449.         lea.l    MainMGad1,a1
  1450.         move.l    #-1,d0
  1451.         lib    Intuition,RemoveGList
  1452.  
  1453.         tst.b    (NameGad1Buf)        ;See if we have the player's name or not
  1454.         bne    Game1            ;continue if we do
  1455.         jsr    GetName            ;ask for if we don't
  1456.  
  1457. Game1:        cmp.w    #$00,NumQ
  1458.         beq    Load
  1459.  
  1460.         move.l    #$f800,d0        ;Disable menus (first, Game)
  1461.         move.l    Window1,a0
  1462.         lib    Intuition,OffMenu
  1463.         move.l    #$f820,d0        ;Second, Enter name
  1464.         move.l    Window1,a0
  1465.         lib    Intuition,OffMenu
  1466.         move.l    #$f840,d0        ;Third, Load
  1467.         move.l    Window1,a0
  1468.         lib    Intuition,OffMenu
  1469.         move.l    #$ff04,d0        ;Fifth menu list (Student, Teacher)
  1470.         move.l    Window1,a0
  1471.         lib    Intuition,OffMenu
  1472.  
  1473.         move.w    #01,Mode
  1474.  
  1475.         jsr    DoPage            ;Draw the boxes and add gadget
  1476.         jsr    AddaGad
  1477.         jsr    PrintNumQ
  1478.         jsr    PrintDesc        ;Print description of questions
  1479.                         ;(What to do)
  1480. ;
  1481. ;start asking...
  1482.  
  1483. StartAsk:    move.w    #$00,QueCount        ;Reset question counter
  1484.         move.w    #$00,Score        ;Reset score
  1485.         jsr    PressAnyKey
  1486.         jsr    PrintScore
  1487.  
  1488. ;Calculate memory address of question (a4) and answer (a5)
  1489.  
  1490. Ask:        move.w    QueCount,d4
  1491.         cmp.w    NumQ,d4
  1492.         bcc    Game_Out        ;Check if done all questions
  1493.  
  1494.         add.w    #$01,d4
  1495.         move.w    #$00,d3
  1496.         lea.l    RememberKey,a4
  1497.         move.l    (a4),a4
  1498.         move.l    a4,QueBegin
  1499. Ask1:        add.w    #1,d3
  1500.         cmp.w    d3,d4
  1501.         beq    Ask2
  1502.         move.l    (a4),a4
  1503.         jmp    Ask1
  1504.  
  1505. Ask2:        move.l    $8(a4),a4        ;Address of question
  1506.         move.l    a4,CurrentQue
  1507.         move.l    a4,a5
  1508.         add.l    #QueLeng,a5        ;Address of answers
  1509.         move.l    a5,CAnsBegin
  1510.         move.w    QueCount,d4
  1511. ;
  1512. ;d4 = QueCount
  1513. ;
  1514. ;a4 = Question address
  1515. ;a5 = Answer address
  1516.  
  1517.  
  1518.         jsr    ResetPage
  1519.  
  1520. ;Print question
  1521.  
  1522.         move.l    a4,QueTextAdd
  1523.         move.l    RP1,a0
  1524.         lea.l    QueTxt1,a1
  1525.         move.l    #1,d0
  1526.         move.l    #QueTop,d1
  1527.         lib    Intuition,PrintIText
  1528.  
  1529.         move.l    #$C0FFEE,d2
  1530.         move.l    a4,a0
  1531.         jsr    Speaker
  1532.  
  1533.         add.l    #LineLeng,a4
  1534.         move.l    a4,QueTextAdd
  1535.         move.l    RP1,a0
  1536.         lea.l    QueTxt1,a1
  1537.         move.l    #1,d0
  1538.         move.l    #QueTop+10,d1
  1539.         lib    Intuition,PrintIText
  1540.  
  1541.         move.l    #$C0FFEE,d2
  1542.         move.l    a4,a0
  1543.         jsr    Speaker
  1544.  
  1545.         jmp    Window1IDCMP
  1546.  
  1547. ;Print description
  1548.  
  1549. PrintDesc:    move.l    DesMem1,DesTextAdd
  1550.         move.l    RP1,a0
  1551.         lea.l    DesTxt1,a1
  1552.         move.l    #1,d0
  1553.         move.l    #DesTop,d1
  1554.         lib    Intuition,PrintIText
  1555.  
  1556.         move.l    DesMem1,d0
  1557.         add.l    #80,d0
  1558.         move.l    d0,DesTextAdd
  1559.         move.l    RP1,a0
  1560.         lea.l    DesTxt1,a1
  1561.         move.l    #1,d0
  1562.         move.l    #DesTop+10,d1
  1563.         lib    Intuition,PrintIText
  1564.  
  1565.         move.l    DesMem1,a0
  1566.         jsr    Speaker
  1567.         move.l    #$CADBEEF,d2
  1568.         move.l    DesMem1,a0
  1569.         add.l    #80,a0
  1570.         jsr    Speaker
  1571.         rts
  1572.  
  1573. Game_Out:    lea.l    SS_GameOver,a0
  1574.         jsr    Speaker
  1575.  
  1576.         move.l    #$DEAFBEEF,d2
  1577.         lea.l    SS_Score,a0
  1578.         jsr    Speaker
  1579.         move.l    #$DEAFBEEF,d2
  1580.         lea.l    ScoreText1,a0
  1581.         jsr    Speaker
  1582.  
  1583.         move.w    QueCount,d0
  1584. ;        add.w    #1,d0
  1585.         cmp.w    Score,d0
  1586.         bne    Game_OUT1
  1587.         move.l    #$DEAFBEEF,d2
  1588.         lea.l    SS_Score2,a0
  1589.         jsr    Speaker
  1590.  
  1591. Game_OUT1:    jsr    PressAnyKey
  1592.  
  1593.         jsr    ClearPage
  1594.  
  1595.         move.w    #$00,Mode
  1596.         move.l    #$f800,d0        ;Enable menus
  1597.         move.l    Window1,a0
  1598.         lib    Intuition,OnMenu
  1599.         move.l    #$f820,d0
  1600.         move.l    Window1,a0
  1601.         lib    Intuition,OnMenu
  1602.         move.l    #$f840,d0
  1603.         move.l    Window1,a0
  1604.         lib    Intuition,OnMenu
  1605.         move.l    #$ff04,d0
  1606.         move.l    Window1,a0
  1607.         lib    Intuition,OnMenu
  1608.  
  1609.         jsr    MainMenu
  1610.         jmp    Window1IDCMP
  1611.  
  1612. PressAnyKey:    lea.l    NewAnyKeyWin1,a0
  1613.         lea.l    NAnyKeyTL,a1
  1614.         lib    Intuition,OpenWindowTagList
  1615.         move.l    d0,AnyKeyWin1
  1616.         beq    NoAnyKeyWin1
  1617.         move.l    d0,a0
  1618.         move.l    $32(a0),a3
  1619.  
  1620.         move.l    a3,a0
  1621.         lea.l    AnyKeyTxt1,a1
  1622.         clr.l    d0
  1623.         clr.l    d1
  1624.         lib    Intuition,PrintIText
  1625.  
  1626.         lea.l    SS_AnyKey,a0
  1627.         jsr    Speaker
  1628.  
  1629.         move.l    AnyKeyWin1,a0
  1630.         jsr    CheckIDCMP
  1631.         move.l    AnyKeyWin1,a0
  1632.         jsr    ClearMSGs
  1633.         move.l    #$00,AnyKeyWin1
  1634.         rts
  1635.  
  1636. ;Clear question area. Now a subroutine.
  1637.  
  1638. ResetPage:    move.l    RP1,a1
  1639.         move.l    #$00,d0
  1640.         lib    Gfx,SetAPen
  1641.  
  1642.         move.l    RP1,a1        ;Question
  1643.         move.l    #1,d0
  1644.         move.l    #QueTop,d1
  1645.         move.l    #638,d2
  1646.         move.l    #QueTop+19,d3
  1647.         lib    Gfx,RectFill
  1648.  
  1649.         move.l    RP1,a1        ;Multibox
  1650.         move.l    #01,d0
  1651.         move.l    #MulTop-1,d1
  1652.         move.l    #638,d2
  1653.         move.l    #MulTop+98,d3
  1654.         lib    Gfx,RectFill
  1655.  
  1656. ;Print numbers again
  1657.  
  1658.         move.l    RP1,a0
  1659.         lea.l    Num1Txt1,a1
  1660.         move.l    #00,d0
  1661.         move.l    #MulTop,d1
  1662.         lib    Intuition,PrintIText
  1663.         rts
  1664.  
  1665. ;Clean the screen of all text and Answer-Gadget
  1666.  
  1667. ClearPage:    move.l    Window1,a0
  1668.         lea.l    AStrGad1,a1
  1669.         lib    Intuition,RemoveGadget
  1670.  
  1671.         move.l    RP1,a1
  1672.         clr.l    d0
  1673.         clr.l    d1
  1674.         lib    Gfx,Move
  1675.  
  1676.         move.l    RP1,a1
  1677.         lib    Gfx,ClearScreen
  1678.         rts
  1679.  
  1680. ;Draw main menu
  1681.  
  1682. MainMenu:    tst.w    Mode
  1683.         bne    Window1IDCMP
  1684.         move.l    RP1,a1
  1685.         move.l    #$03,d0
  1686.         lib    Gfx,SetAPen
  1687.  
  1688.         move.l    RP1,a1
  1689.         move.l    #50,d0            ;*1
  1690.         move.l    #MainMTop,d1        ;*2
  1691.         move.l    #590,d2
  1692.         move.l    #MainMTop+100,d3
  1693.         lib    Gfx,RectFill
  1694.  
  1695.         move.l    RP1,a0
  1696.         lea.l    MainMBorder1,a1
  1697.         move.l    #50,d0            ;*1
  1698.         move.l    #MainMTop,d1        ;*2
  1699.         lib    Intuition,DrawBorder
  1700.  
  1701. ;Print 'Please select option:' etc.
  1702.  
  1703.         move.l    RP1,a0
  1704.         lea.l    SelectTxt1,a1
  1705.         move.l    #50+7,d0        ;*1
  1706.         move.l    #MainMTop+4,d1        ;*2
  1707.         lib    Intuition,PrintIText
  1708.  
  1709. ;Add gadgets
  1710.  
  1711.         move.l    Window1,a0
  1712.         lea.l    MainMGad1,a1
  1713.         move.l    #00,a2
  1714.         move.l    #-1,d0
  1715.         move.l    #-1,d1
  1716.         lib    Intuition,AddGList
  1717.  
  1718. ;Refresh gadget so its drawn on the screen
  1719.  
  1720.         lea.l    MainMGad1,a0
  1721.         move.l    Window1,a1
  1722.         move.l    #$00,a2
  1723.         move.l    #-1,d0
  1724.         lib    Intuition,RefreshGList
  1725.  
  1726.  
  1727.         rts        
  1728.  
  1729. ;Clear everything.
  1730.  
  1731. EmptyPage:    move.l    RP1,a1
  1732.         clr.l    d0
  1733.         clr.l    d1
  1734.         lib    Gfx,Move
  1735.  
  1736.         move.l    RP1,a1
  1737.         lib    Gfx,ClearScreen
  1738.         rts
  1739.  
  1740. ;Clear screen and add boxes to Window 1. Now a subroutine.
  1741.  
  1742. DoPage:        move.l    RP1,a1
  1743.         clr.l    d0
  1744.         clr.l    d1
  1745.         lib    Gfx,Move
  1746.  
  1747.         move.l    RP1,a1
  1748.         lib    Gfx,ClearScreen
  1749.  
  1750.         move.l    RP1,a0
  1751.         lea.l    TwoLineBox1,a1    ;What-to-do box
  1752.         move.l    #0,d0
  1753.         move.l    #DesTop,d1
  1754.         lib    Intuition,DrawBorder
  1755.  
  1756.         move.l    RP1,a0
  1757.         lea.l    TwoLineBox1,a1    ;Question box
  1758.         move.l    #0,d0
  1759.         move.l    #QueTop,d1
  1760.         lib    Intuition,DrawBorder
  1761.  
  1762.         move.l    RP1,a0
  1763.         lea.l    TenLineBox1,a1        ;Multi-question box
  1764.         move.l    #0,d0            ;and answer
  1765.         move.l    #MulTop,d1
  1766.         lib    Intuition,DrawBorder
  1767.  
  1768.         jsr    PrintTimer
  1769.  
  1770.         rts
  1771.  
  1772. DoTeachPage:    move.l    RP1,a0
  1773.         lea.l    MoveBorder1,a1        ;Draw borders around option
  1774.         move.l    #0,d0            ;gadgets
  1775.         move.l    #OptionTop-13,d1
  1776.         lib    Intuition,DrawBorder
  1777.  
  1778. ;Add all the texts to Window1
  1779.  
  1780.         move.l    RP1,a0
  1781.         lea.l    MoveTxt1,a1
  1782.         move.l    #00,d0
  1783.         move.l    #OptionTop-12,d1
  1784.         lib    Intuition,PrintIText
  1785.         rts
  1786.  
  1787. ;Add Gadget to Window 1
  1788.  
  1789. AddaGad:    move.l    Window1,a0
  1790.         lea.l    AStrGad1,a1
  1791.         move.l    #-1,d0
  1792.         lib    Intuition,AddGadget
  1793.  
  1794. ;Refresh gadget so its drawn on the screen
  1795.  
  1796.         lea.l    AStrGad1,a0
  1797.         move.l    Window1,a1
  1798.         move.l    #$00,a2
  1799.         move.l    #$01,d0
  1800.         lib    Intuition,RefreshGList
  1801.         rts
  1802.  
  1803. About:        jsr    MenusOff
  1804.         jsr    SleepPointer
  1805.  
  1806.         cmp.w    #$00,Mode
  1807.         bne    AboutCont1
  1808.         move.l    Window1,a0
  1809.         lea.l    MainMGad1,a1
  1810.         move.l    #-1,d0
  1811.         lib    Intuition,RemoveGList
  1812.  
  1813. AboutCont1:    lea.l    SS_About,a0
  1814.         jsr    Speaker
  1815.  
  1816.         move.l    Window1,a0
  1817.         lea.l    AboutTxt1,a1
  1818.         move.l    #$00,a2        ;positive text
  1819.         lea.l    OKTxt,a3    ;a bit the wrong way around but...
  1820.         move.l    #$00,d0
  1821.         move.l    #$00,d1
  1822.         move.l    #320,d2
  1823.         move.l    #$50,d3
  1824.         lib    Intuition,AutoRequest
  1825.         jsr    MenusOn
  1826.         jsr    NormalPointer
  1827. ;        cmp.w    #$00,Mode
  1828. ;        bne    Window1IDCMP
  1829.         jsr    MainMenu
  1830.         jmp    Window1IDCMP
  1831.  
  1832. Quit:        lea.l    SS_Quit,a0
  1833.         jsr    Speaker
  1834.  
  1835.         cmp.w    #$01,Mode
  1836.         beq    Game_Out
  1837.         cmp.w    #$02,Mode
  1838.         bne    Quit2
  1839.         jsr    SaveQuestion
  1840.         jsr    MenusOff
  1841.  
  1842.         move.l    mlist,a0
  1843.         move.l    #StudentMenuN,d0
  1844.         lib    Intuition,ItemAddress
  1845.         move.l    d0,a0
  1846.         or.w    #CHECKED,$c(a0)
  1847.  
  1848.         move.l    mlist,a0
  1849.         move.l    #TeachMenuN,d0
  1850.         lib    Intuition,ItemAddress
  1851.         move.l    d0,a0
  1852.         and.w    #~CHECKED,$c(a0)
  1853.  
  1854. Quit1.1:    jsr    MenusOn
  1855.         jmp    Student
  1856. Quit2:        jsr    MenusOff
  1857.         jsr    SleepPointer
  1858.  
  1859.         lea.l    SS_Quit2,a0
  1860.         jsr    Speaker
  1861.  
  1862.         jsr    AskDoIt
  1863.         cmp.l    #TRUE,d0
  1864.         bne    Quit3
  1865.         jsr    MenusOn
  1866.         jsr    NormalPointer
  1867.         jmp    ShutDown
  1868. Quit3:        jsr    MenusOn
  1869.         jsr    NormalPointer
  1870.         jmp    Window1IDCMP
  1871.  
  1872. FileRequester:    move.l    a5,FRTitle
  1873.         move.l    d5,FRFlags
  1874.         lea.l    FileRequest1,a0
  1875.         lib    Req,FileRequester
  1876. FROut:        rts
  1877.  
  1878. ;d4 = Position to HiLite
  1879.  
  1880. HiLite:        move.w    AnsCount,d4
  1881.         mulu.w    #10,d4
  1882.         move.l    RP1,a0
  1883.         move.l    #01,d0
  1884.         move.l    #MulTop-1,d1
  1885.         add.l    d4,d1
  1886.         move.l    a0,a1
  1887.         move.l    d0,d2
  1888.         move.l    d1,d3
  1889.         move.l    #637,d4
  1890.         move.l    #10,d5
  1891.         move.l    #$30,d6            ;replace with inverted source
  1892.         lib    Gfx,ClipBlit
  1893. HiLite_Out:    rts
  1894.  
  1895. CheckFile:    move.l    QueFile,d1
  1896.         move.l    #0,d2
  1897.         move.l    #-1,d3
  1898.         lib    Dos,Seek
  1899.         move.l    QueFile,d1
  1900.         lea.l    Que,a0
  1901.         move.l    a0,d2
  1902.         move.l    #$08,d3
  1903.         flib    Dos,Read
  1904.         tst.l    d0
  1905.         bne    CheckFile1
  1906.         jsr    FileError
  1907.         move.l    #0,d0
  1908.         rts
  1909. CheckFile1:    move.l    Que,d0
  1910.         cmp.l    #"Ques",d0
  1911.         bne    CheckFile2
  1912.         tst.w    NumQ
  1913.         beq    CheckFile3
  1914.         move.l    #-1,d0
  1915.         rts
  1916. CheckFile2:    move.l    Window1,a0
  1917.         lea.l    WrongTxt1,a1
  1918.         move.l    #$00,a2        ;positive text
  1919.         lea.l    OKTxt,a3    ;a bit the wrong way around but...
  1920.         move.l    #$00,d0
  1921.         move.l    #$00,d1
  1922.         move.l    #$90,d2
  1923.         move.l    #$40,d3
  1924.         lib    Intuition,AutoRequest
  1925.         rts
  1926. CheckFile3:    jsr    NoQues
  1927.         rts
  1928.  
  1929. KillQueMem1:    lea.l    RememberKey,a0
  1930.         move.l    #TRUE,d0
  1931.         lib    Intuition,FreeRemember
  1932. KillQM1_Out:    rts
  1933.  
  1934. AskDoIt:    move.l    Window1,a0
  1935.         lea.l    DoItTxt1,a1
  1936.         lea.l    OKTxt,a2    ;Positive text
  1937.         lea.l    CancelTxt,a3    ;Negative text
  1938.         move.l    #$00,d0
  1939.         move.l    #$00,d1
  1940.         move.l    #200,d2
  1941.         move.l    #$30,d3
  1942.         lib    Intuition,AutoRequest
  1943.         rts
  1944.  
  1945. NoMem1:        lea.l    SS_ERR_Mem1,a0
  1946.         jsr    Speaker
  1947.  
  1948.         move.l    Window1,a0
  1949.         lea.l    NoMemTxt1,a1
  1950.         move.l    #$00,a2        ;positive text
  1951.         lea.l    OKTxt,a3    ;a bit the wrong way around but...
  1952.         move.l    #$00,d0
  1953.         move.l    #$00,d1
  1954.         move.l    #320,d2
  1955.         move.l    #$40,d3
  1956.         lib    Intuition,AutoRequest
  1957.         rts
  1958.  
  1959. NoQues:        lea.l    SS_ERR_Que1,a0
  1960.         jsr    Speaker
  1961.  
  1962.         move.l    Window1,a0
  1963.         lea.l    NoQuesTxt1,a1
  1964.         move.l    #$00,a2        ;positive text
  1965.         lea.l    OKTxt,a3    ;a bit the wrong way around but...
  1966.         move.l    #$00,d0
  1967.         move.l    #$00,d1
  1968.         move.l    #320,d2
  1969.         move.l    #$40,d3
  1970.         lib    Intuition,AutoRequest
  1971.         rts
  1972.  
  1973. ShutDown:    move.l    OurTask,a0
  1974.         move.l    OldTaskWinPtr,$b8(a0)
  1975.  
  1976.         tst.l    _DosBase
  1977.         beq    ShutDown9200
  1978.         lea.l    SS_Quiting,a0
  1979.         jsr    Speaker
  1980.  
  1981. ShutDown9200:    tst.l    PrefsFile
  1982.         beq    ShutDown9100
  1983.         move.l    PrefsFile,d1
  1984.         lib    Dos,Close
  1985.         move.l    #$00,PrefsFile
  1986.  
  1987. ShutDown9100:    tst.l    SpeakFile
  1988.         beq    ShutDown9000
  1989.         move.l    SpeakFile,d1
  1990.         lib    Dos,Close
  1991.         move.l    #$00,SpeakFile
  1992.  
  1993. ShutDown9000:    tst.l    QueFile
  1994.         beq    ShutDown8100
  1995.         move.l    QueFile,d1
  1996.         lib    Dos,Close
  1997.         move.l    #$00,QueFile
  1998.  
  1999. ShutDown8100:    tst.l    DesMem1
  2000.         beq    ShutDown8000
  2001.         move.l    DesMem1,a1
  2002.         move.l    #DesLeng+12,d0
  2003.         lib    Exec,FreeMem
  2004.         move.l    #$00,DesMem1
  2005.  
  2006. ShutDown8000:    jsr    KillQueMem1
  2007.  
  2008. ShutDown7300:    tst.l    PrefsWin1
  2009.         beq    ShutDown7100
  2010.         move.l    PrefsWin1,a0
  2011.         jsr    ClearMSGs
  2012. ShutDown7200:    tst.l    AnyKeyWin1
  2013.         beq    ShutDown7100
  2014.         move.l    AnyKeyWin1,a0
  2015.         jsr    ClearMSGs
  2016. ShutDown7100:    tst.l    WrongWin1
  2017.         beq    ShutDown7000
  2018.         move.l    WrongWin1,a0
  2019.         jsr    ClearMSGs
  2020. ShutDown7000:    tst.l    RightWin1
  2021.         beq    ShutDown5000
  2022.         move.l    RightWin1,a0
  2023.         jsr    ClearMSGs
  2024.  
  2025. ShutDown5000:    tst.l    Window1
  2026.         beq    ShutDown4900
  2027.         move.l    Window1,a0
  2028.         lib    Intuition,ClearMenuStrip
  2029.         move.l    Window1,a0
  2030.         jsr    ClearMSGs
  2031.  
  2032. ShutDown4900:    jsr    Clean2.0Magic
  2033.  
  2034. ShutDown4500:    tst.l    Screen1
  2035.         beq    ShutDown3000
  2036.         move.l    Screen1,a0
  2037.         lib    Intuition,CloseScreen
  2038.  
  2039. ShutDown3000:    tst.l    _ReqBase
  2040.         beq    ShutDown2000
  2041.         lea.l    FileRequest1,a0
  2042.         lib    Req,PurgeFiles
  2043.         lea.l    FileRequest2,a0
  2044.         lib    Req,PurgeFiles
  2045. ShutDown2000:
  2046. ShutDown1100:    tst.l    _IntuitionBase
  2047.         beq    ShutDown1000
  2048.         lib    Intuition,OpenWorkBench        ;For that xtra touch
  2049. ShutDown1000:    closlib    Intuition
  2050.         closlib    GadTools
  2051.         closlib    Req
  2052.         closlib    Gfx
  2053. ;        closlib    Iff
  2054.         closlib    Dos
  2055. ShutDownOut:    move.l    #RETURN_OK,d0
  2056.         rts
  2057.  
  2058. NoKS20:        print    <"This program requires Kickstart 2.0 or higher!",13,10>
  2059.         lea.l    SS_ERR_KS20,a0
  2060.         jsr    Speaker
  2061.         jmp    ShutDown
  2062. NoInt:        print    <"Couldn't open intuition.library!",13,10>
  2063.         lea.l    SS_ERR_Lib1,a0
  2064.         jsr    Speaker
  2065.         jmp    ShutDown
  2066. NoGfx:        print    <"Couldn't open graphics.library!",13,10>
  2067.         lea.l    SS_ERR_Lib1,a0
  2068.         jsr    Speaker
  2069.         jmp    ShutDown
  2070. NoReq:        print    <"You need req.library 2.5 or higher!",13,10>
  2071.         move.l    #$00,a0
  2072.         lib    Intuition,DisplayBeep
  2073.         lea.l    SS_ERR_Lib1,a0
  2074.         jsr    Speaker
  2075.         jmp    ShutDown
  2076. NoScreen1.1:    print    <"Couldn't open (TagList) Screen1!",13,10>
  2077.         move.l    #$00,a0
  2078.         lib    Intuition,DisplayBeep
  2079.         lea.l    SS_ERR_Scr1,a0
  2080.         jsr    Speaker
  2081.         rts
  2082. NoWrongWin1:    print    <"Couldn't open Wrong-Window1!",13,10>
  2083.         move.l    Screen1,a0
  2084.         lib    Intuition,DisplayBeep
  2085.         lea.l    SS_ERR_Win1,a0
  2086.         jsr    Speaker
  2087.         jmp    ShutDown
  2088. NoRightWin1:    print    <"Couldn't open Right-Window1!",13,10>
  2089.         move.l    Screen1,a0
  2090.         lib    Intuition,DisplayBeep
  2091.         lea.l    SS_ERR_Win1,a0
  2092.         jsr    Speaker
  2093.         jmp    ShutDown
  2094. NoAnyKeyWin1:    print    <"Couldn't open AnyKey-Window1!",13,10>
  2095.         move.l    Screen1,a0
  2096.         lib    Intuition,DisplayBeep
  2097.         lea.l    SS_ERR_Win1,a0
  2098.         jsr    Speaker
  2099.         rts
  2100.  
  2101. NoWindow1:    print    <"Couldn't open Window1!",13,10>
  2102.         move.l    Screen1,a0
  2103.         lib    Intuition,DisplayBeep
  2104.         lea.l    SS_ERR_Win1,a0
  2105.         jsr    Speaker
  2106.         jmp    ShutDown
  2107.  
  2108. NoHelpWin1:    print    <"Couldn't open Help-Window!",13,10>
  2109.         move.l    Screen1,a0
  2110.         lib    Intuition,DisplayBeep
  2111.         lea.l    SS_ERR_Win1,a0
  2112.         jsr    Speaker
  2113.         jmp    ShutDown
  2114.  
  2115. NoSpeaking:    move.l    #$00,a0
  2116.         lib    Intuition,DisplayBeep
  2117.         lea.l    NoSPEAKText1,a0
  2118.         move.l    #$00,a1
  2119.         jsr    SimpleRequest
  2120.         move.w    #$00,Talk        ;Disable talking
  2121.         jmp    OpenLibs
  2122.  
  2123. SleepPointer:    move.l    Window1,a0
  2124.         lea.l    ClockPointer1,a1
  2125.         move.l    #16,d0
  2126.         move.l    #0,d1            ;WHAT-THE-HECK IS THIS FOR?
  2127.         move.l    #-6,d2
  2128.         move.l    #0,d3
  2129.         lib    Intuition,SetPointer
  2130.         rts
  2131.  
  2132. NormalPointer:    move.l    Window1,a0
  2133.         lib    Intuition,ClearPointer
  2134.         rts
  2135.  
  2136. MenusOn:    move.l    Window1,a0
  2137.         move.l    mlist,a1
  2138.         lib    Intuition,SetMenuStrip
  2139.         rts
  2140.  
  2141. MenusOff:    move.l    Window1,a0
  2142.         lib    Intuition,ClearMenuStrip
  2143.         rts
  2144.  
  2145. MenuNull:    move.l    d3,d6    
  2146.                 
  2147.         ror.l    #5,d6    
  2148.         lsr.l    #8,d6    
  2149.         lsr.l    #8,d6
  2150.         lsr.l    #8,d6
  2151.         lsr.l    #3,d6
  2152.  
  2153.         move.l    d3,d5
  2154.  
  2155.         ror.l    #5,d5    
  2156.         ror.l    #6,d5    
  2157.         lsr.l    #8,d5
  2158.         lsr.l    #8,d5
  2159.         lsr.l    #8,d5
  2160.         lsr.l    #2,d5
  2161.                 
  2162.         move.l    #$00,d4
  2163.         move.w    d3,d4
  2164.         lsr.l    #5,d4
  2165.         lsr.l    #6,d4
  2166.         rts
  2167.  
  2168. CheckIDCMP:    move.l    $56(a0),a2        ;Give it the window structure in a0
  2169.         move.l    #0,d1
  2170.         move.b    $0f(a2),d1
  2171.         move.l    #0,d0
  2172.         bset.l    d1,d0
  2173.         lib    Exec,Wait    
  2174.     
  2175. C2GetMsg1:    move.l    a2,a0    
  2176.         lib    GadTools,GT_GetIMsg
  2177.         tst.l    d0
  2178.         beq    C2GetMsg2
  2179.     
  2180.         move.l    d0,a1 
  2181.         move.l    $14(a1),d2        ;answers with Class in d2,
  2182.         move.w    $18(a1),d3        ;Code in d3 and
  2183.         move.w    $1a(a1),a4        ;Qualifier in a4
  2184.         move.l    $1c(a1),a5        ;IAddress in a5
  2185.         lib    GadTools,GT_ReplyIMsg
  2186.         jmp    C2GetMsg1
  2187. C2GetMsg2:    move.l    #-1,d0
  2188.         rts
  2189.  
  2190. ClearMSGs:    move.l    a0,d0
  2191.         tst.l    d0
  2192.         beq    C2ClearMsg3
  2193.         move.l    a0,a3
  2194.         lib    Exec,Forbid
  2195.         move.l    $56(a3),a2        ;Give it the window structure in a0
  2196. C2ClearMsg1:    move.l    a2,a0    
  2197.         lib    GadTools,GT_GetIMsg
  2198.         tst.l    d0
  2199.         beq    C2ClearMsg2
  2200.         move.l    d0,a1 
  2201.         lib    GadTools,GT_ReplyIMsg
  2202.         jmp    C2ClearMsg1
  2203. C2ClearMsg2:    move.l    a3,a0
  2204.         move.l    #$00,d0
  2205.         lib    Intuition,ModifyIDCMP
  2206.         lib    Exec,Permit
  2207.         move.l    a3,a0
  2208.         lib    Intuition,CloseWindow
  2209. C2ClearMsg3:    rts
  2210.  
  2211.         INCLUDE    "FH1:Language/WF/Questions/QFileRequester.i"
  2212.         INCLUDE    "FH1:Language/WF/Questions/DosError.i"
  2213.  
  2214. Do2.0Magic:    lea.l    NewScreen1,a0
  2215.         lea.l    Screen1TagList,a1
  2216.         lib    Intuition,OpenScreenTagList
  2217.         move.l    d0,Screen1
  2218.         beq    NoScreen1.1
  2219.  
  2220. ;New style gadget stuff
  2221.  
  2222.         lea.l    glist,a0
  2223.         lib    GadTools,CreateContext
  2224.         move.l    d0,ContextGad
  2225.         beq    Do2.0Magic2
  2226.  
  2227.         move.l    Screen1,a0
  2228.         lea.l    Screen1TagList,a1
  2229.         lib    GadTools,GetVisualInfoA
  2230.         move.l    d0,vi
  2231.  
  2232.         move.l    glist,a0
  2233.         lea.l    NGFirstGad,a1
  2234.         move.l    #BUTTON_KIND,d0
  2235.         move.l    vi,gng_VisualInfo(a1)
  2236.         lea.l    GadTagList,a2
  2237.         lib    GadTools,CreateGadgetA
  2238.  
  2239.         move.l    d0,a0
  2240.         move.l    a0,FirstGad1P
  2241.         add.w    #GADGDISABLED,$c(a0)
  2242.  
  2243.         lea.l    NGLastGad,a1
  2244.         move.l    #BUTTON_KIND,d0
  2245.         move.l    vi,gng_VisualInfo(a1)
  2246.         lea.l    GadTagList,a2
  2247.         lib    GadTools,CreateGadgetA
  2248.  
  2249.         move.l    d0,a0
  2250.         move.l    a0,LastGad1P
  2251.         add.w    #GADGDISABLED,$c(a0)
  2252.  
  2253.         lea.l    NGPrevGad,a1
  2254.         move.l    #BUTTON_KIND,d0
  2255.         move.l    vi,gng_VisualInfo(a1)
  2256.         lea.l    GadTagList,a2
  2257.         lib    GadTools,CreateGadgetA
  2258.  
  2259.         move.l    d0,a0
  2260.         move.l    a0,PrevGad1P
  2261.         add.w    #GADGDISABLED,$c(a0)
  2262.  
  2263.         lea.l    NGNextGad,a1
  2264.         move.l    #BUTTON_KIND,d0
  2265.         move.l    vi,gng_VisualInfo(a1)
  2266.         lea.l    GadTagList,a2
  2267.         lib    GadTools,CreateGadgetA
  2268.  
  2269.         move.l    d0,a0
  2270.         move.l    a0,NextGad1P
  2271.         add.w    #GADGDISABLED,$c(a0)
  2272.  
  2273.         lea.l    NGAddGad,a1
  2274.         move.l    #BUTTON_KIND,d0
  2275.         move.l    vi,gng_VisualInfo(a1)
  2276.         lea.l    GadTagList,a2
  2277.         lib    GadTools,CreateGadgetA
  2278.  
  2279.         move.l    d0,a0
  2280.         move.l    a0,AddGad1P
  2281.  
  2282.         lea.l    NGUndoGad,a1
  2283.         move.l    #BUTTON_KIND,d0
  2284.         move.l    vi,gng_VisualInfo(a1)
  2285.         lea.l    GadTagList,a2
  2286.         lib    GadTools,CreateGadgetA
  2287.  
  2288.         move.l    d0,a0
  2289.         move.l    a0,UndoGad1P
  2290.         add.w    #GADGDISABLED,$c(a0)
  2291.  
  2292.         lea.l    NGClearGad,a1
  2293.         move.l    #BUTTON_KIND,d0
  2294.         move.l    vi,gng_VisualInfo(a1)
  2295.         lea.l    GadTagList,a2
  2296.         lib    GadTools,CreateGadgetA
  2297.  
  2298.         move.l    d0,ClearGad1P
  2299.  
  2300.         move.b    #1,GadMagic
  2301.  
  2302. ;New style menu stuff
  2303.  
  2304. Do2.0Magic2:    lea.l    MNMainMenu1,a0
  2305.         lea.l    MenuTagList,a1
  2306.         lib    GadTools,CreateMenusA
  2307.         move.l    d0,mlist
  2308.  
  2309. Do2.0Magic3:    move.l    mlist,a0
  2310.         move.l    vi,a1
  2311.         lea.l    MenuTagList,a2
  2312.         lib    GadTools,LayoutMenusA
  2313.         move.b    #1,MenuMagic
  2314. Do2.0_OUT:    rts
  2315.  
  2316. Clean2.0Magic:    tst.b    GadMagic
  2317.         beq    Clean2.0M2
  2318.         move.l    glist,a0
  2319.         lib    GadTools,FreeGadgets
  2320.  
  2321. Clean2.0M2:    tst.b    MenuMagic
  2322.         beq    Clean2.0M3
  2323.         move.l    mlist,a0
  2324.         lib    GadTools,FreeMenus
  2325.  
  2326. Clean2.0M3:    tst.b    GadMagic2
  2327.         beq    Clean2.0M4
  2328.         move.l    glist2,a0
  2329.         lib    GadTools,FreeGadgets
  2330.  
  2331. Clean2.0M4:    tst.b    MenuMagic2
  2332.         beq    Clean2.0M5
  2333.         move.l    mlist2,a0
  2334.         lib    GadTools,FreeMenus
  2335.  
  2336. Clean2.0M5:    tst.b    GadMagic3
  2337.         beq    Clean2.0M6
  2338.         move.l    glist3,a0
  2339.         lib    GadTools,FreeGadgets
  2340.  
  2341. Clean2.0M6:    tst.b    MenuMagic3
  2342.         beq    Clean2.0M7
  2343.         move.l    mlist3,a0
  2344.         lib    GadTools,FreeMenus
  2345.  
  2346. Clean2.0M7:    tst.l    vi
  2347.         beq    Clean2.0_OUT
  2348.         move.l    vi,a0
  2349.         lib    GadTools,FreeVisualInfo
  2350.  
  2351. Clean2.0_OUT:    rts
  2352.  
  2353. ;Give this subroutine the address of the text in d2
  2354. ;
  2355. ;It will then write the text to the SPEAK: device
  2356. ;
  2357. ;This will hopefully be changed to something doing with narrator.device
  2358. ;
  2359.  
  2360. Speaker:    cmp.l    #$00,a0
  2361.         beq    Speaker_OUT
  2362.         tst.w    Talk
  2363.         beq    Speaker_OUT        ;No speech wanted
  2364.         move.l    SpeakFile,d1
  2365.         beq    Speaker_OUT        ;If we couldn't get SPEAK:
  2366. Speaker1:    tst.w    TalkDes
  2367.         beq    Speaker2
  2368.         cmp.l    DesMem1,a0
  2369.         beq    SpeakerDo
  2370.         cmp.l    #$CADBEEF,d2
  2371.         beq    SpeakerDo
  2372. Speaker2:    tst.w    TalkQue
  2373.         beq    Speaker3
  2374.         cmp.l    #$C0FFEE,d2
  2375.         beq    SpeakerDo
  2376. Speaker3:    tst.w    TalkAns
  2377.         beq    Speaker4
  2378.         cmp.l    #$DEADBEEF,d2
  2379.         beq    SpeakerDo
  2380. Speaker4:    tst.w    TalkScore
  2381.         beq    Speaker5
  2382.         cmp.l    #$DEAFBEEF,d2
  2383.         beq    SpeakerDo
  2384. Speaker5:    move.l    a0,d2
  2385.         jsr    GetLength
  2386.         tst.w    TalkSys
  2387.         beq    Speaker_OUT
  2388.         move.l    d2,a0
  2389.         cmp.b    #$dc,0(a0,d3.l)
  2390.         beq    SpeakerDo
  2391.         jmp    Speaker_OUT
  2392. SpeakerDo:    move.l    a0,d2
  2393.         jsr    GetLength
  2394.         lib    Dos,Write
  2395. Speaker_OUT:    rts
  2396.  
  2397.         INCLUDE    "FH1:Language/WF/Questions/Que.i"
  2398.         INCLUDE    "FH1:Language/WF/Questions/QueSpeak.i"
  2399.  
  2400. ;question file stuff - a straight copy of the .Que files and vice versa
  2401.  
  2402.         ds.l    0
  2403.  
  2404. Que:        dc.b    "Ques"        ;Header
  2405. NumQ:        dc.w    0        ;Number of questions (max 65535?)
  2406. Type:        dc.b    0        ;Multiple correct, One correct etc.
  2407. Timer:        dc.b    0        ;0=No timer, 1-255 Seconds
  2408.  
  2409. ;Pointers
  2410.  
  2411. ;GadTools stuff
  2412.  
  2413. vi:        dc.l    0
  2414. mlist:        dc.l    0
  2415. GadMagic:    dc.b    0        ;using new gadgets? (0=No, 1=Yes)
  2416. MenuMagic:    dc.b    0        ;using new menus? (0=No, 1=Yes)
  2417. ContextGad:    dc.l    0
  2418. FirstGad1P:    dc.l    0
  2419. LastGad1P:    dc.l    0
  2420. PrevGad1P:    dc.l    0
  2421. NextGad1P:    dc.l    0
  2422. AddGad1P:    dc.l    0
  2423. UndoGad1P:    dc.l    0
  2424. ClearGad1P:    dc.l    0
  2425.  
  2426.  
  2427. ;Display stuff
  2428.  
  2429. Screen1        dc.l    0
  2430. ViewPort1    dc.l    0
  2431. Window1        dc.l    0
  2432. RP1        dc.l    0
  2433. WrongWin1    dc.l    0
  2434. RightWin1    dc.l    0
  2435. AnyKeyWin1    dc.l    0
  2436.  
  2437. ;Library stuff (well what's needed anymore)
  2438.  
  2439.         libnames
  2440.  
  2441. ;_IffBase    dc.l    0
  2442. ;_IffLib    dc.b    "iff.library",0
  2443. ;        ds.l    0
  2444.  
  2445. ;File stuff
  2446.  
  2447. _stdout        dc.l    0
  2448. ;IffFile    dc.l    0
  2449. QueFile        dc.l    0
  2450.  
  2451. ;Memory stuff
  2452.  
  2453. DesMem1:    dc.l    0        ;Address of description
  2454.  
  2455. RememberKey:    dc.l    0        ;Our editing memory list of
  2456.         dc.l    0        ;questions & answers
  2457.         dc.l    0        ;1=NextRemember, 2=Size, 3=Memory
  2458.  
  2459. ;Other question stuff
  2460.  
  2461. QueCount:    dc.w    0        ;Asking QueCount'th question
  2462. AnsCount:    dc.w    0        ;Checking AnsCount'th answer,
  2463.                     ;also used for printing
  2464. Score:        dc.w    0        ;Player score
  2465. QueCount2:    dc.w    0        ;out of QueCount'th questions
  2466. LastAns:    dc.w    0        ;Wrong (0) or right (1)?
  2467. QueBegin:    dc.l    0        ;Question begin
  2468. CAnsBegin:    dc.l    0        ;Correct answer begin
  2469. CurrentQue:    dc.l    0        ;Current question 
  2470.  
  2471. ;Task stuff
  2472.  
  2473. OurTask        dc.l    0
  2474. OldTaskWinPtr    dc.l    0
  2475.  
  2476. ;Other stuff XIV
  2477.  
  2478. Mode:        dc.w    0        ;0=Waiting, 1=Running, 2=Editing
  2479.  
  2480. ;Texts, Part I
  2481.  
  2482. QName        dc.b    "Questions (C)opyright 1991 Tomi Blinnikka",0
  2483. LoadName    dc.b    "Load quiz.",0
  2484. SaveName    dc.b    "Save quiz.",0
  2485. NoSPEAKText1    dc.b    "Couldn't open SPEAK: device! No speaking available",0
  2486.         ds.l    0
  2487.  
  2488. ;Structures
  2489.  
  2490. ;New screen & new window structures
  2491.  
  2492. NewScreen1    dc.w    0,0            ;X,Y POS
  2493. Screen1MaxCol    dc.w    -1 ;640            ;WIDTH
  2494. Screen1MaxRow    dc.w    -1 ;200            ;HEIGHT
  2495.         dc.w    2            ;DEPTH
  2496.         dc.b    0,1            ;COLORS
  2497.         dc.w    V_HIRES            ;VIEWMODES
  2498.         dc.w    CUSTOMSCREEN        ;TYPE
  2499.         dc.l    0 ;Screen1Font        ;FONT
  2500.         dc.l    QName            ;DEFULT TITLE
  2501.         dc.l    0            ;GADGETS
  2502.         dc.l    0            ;CUSTOMBITMAP
  2503.  
  2504. Screen1TagList:    dc.l    SA_Pens,default_pens
  2505. ;        dc.l    SA_Width,640
  2506. ;        dc.l    SA_Height,200
  2507.         dc.l    WA_AutoAdjust,0
  2508.         dc.l    TAG_DONE,0
  2509.  
  2510. default_pens    dc.w    ~0
  2511.  
  2512. Screen1Font    dc.l    Screen1FontN        ;NAME
  2513.         dc.w    8            ;SIZE
  2514.         dc.b    0            ;STYLE
  2515.         dc.b    0            ;FLAGS
  2516.         ds.l    0
  2517. Screen1FontN    dc.b    "topaz.font",0
  2518.         ds.l    0
  2519.  
  2520. NewWindow1    dc.w    0,0            ;X,Y POS
  2521.         dc.w    640 ;724        ;WIDTH
  2522.         dc.w    200 ;283        ;HEIGHT
  2523.         dc.b    0,1            ;PENS
  2524.         dc.l    GADGETDOWN+GADGETUP+VANILLAKEY+RAWKEY+MENUPICK+ACTIVEWINDOW
  2525. NWin1Flags:    dc.l    ACTIVATE+BACKDROP+BORDERLESS
  2526.         dc.l    0,0            ;GADGETS, CHECKMARK
  2527.         dc.l    0            ;TITLE
  2528. SToW1        dc.l    0            ;SCREEN ADDRESS
  2529.         dc.l    0            ;BITMAP            
  2530.         dc.w    640,200,724,283        ;MINIMUM SIZE
  2531.         dc.w    CUSTOMSCREEN        ;TYPE
  2532.  
  2533. NewWrongWin1    dc.w    150,40            ;X,Y POS
  2534.         dc.w    80            ;WIDTH
  2535.         dc.w    25            ;HEIGHT
  2536.         dc.b    0,1            ;PENS
  2537.         dc.l    VANILLAKEY+RAWKEY+INACTIVEWINDOW+CLOSEWINDOW+MOUSEBUTTONS
  2538.         dc.l    GIMMEZEROZERO+ACTIVATE+WINDOWCLOSE
  2539.         dc.l    0,0            ;GADGETS, CHECKMARK
  2540.         dc.l    0            ;TITLE
  2541. SToW2        dc.l    0            ;SCREEN ADDRESS
  2542.         dc.l    0            ;BITMAP            
  2543.         dc.w    80,25,80,25        ;MINIMUM SIZE
  2544.         dc.w    CUSTOMSCREEN        ;TYPE
  2545.  
  2546. NWrongTL:    dc.l    WA_InnerWidth,80
  2547.         dc.l    WA_InnerHeight,12
  2548.         dc.l    TAG_DONE,0
  2549.  
  2550. NewRightWin1    dc.w    150,40            ;X,Y POS
  2551.         dc.w    80            ;WIDTH
  2552.         dc.w    25            ;HEIGHT
  2553.         dc.b    0,1            ;PENS
  2554.         dc.l    VANILLAKEY+RAWKEY+INACTIVEWINDOW+CLOSEWINDOW+MOUSEBUTTONS
  2555.         dc.l    GIMMEZEROZERO+ACTIVATE+WINDOWCLOSE
  2556.         dc.l    0,0            ;GADGETS, CHECKMARK
  2557.         dc.l    0            ;TITLE
  2558. SToW3        dc.l    0            ;SCREEN ADDRESS
  2559.         dc.l    0            ;BITMAP            
  2560.         dc.w    80,25,80,25        ;MINIMUM SIZE
  2561.         dc.w    CUSTOMSCREEN        ;TYPE
  2562.  
  2563. NewAnyKeyWin1    dc.w    150,50            ;X,Y POS
  2564.         dc.w    130            ;WIDTH
  2565.         dc.w    25            ;HEIGHT
  2566.         dc.b    0,1            ;PENS
  2567.         dc.l    VANILLAKEY+RAWKEY+INACTIVEWINDOW+CLOSEWINDOW+MOUSEBUTTONS
  2568.         dc.l    GIMMEZEROZERO+ACTIVATE+WINDOWCLOSE
  2569.         dc.l    0,0            ;GADGETS, CHECKMARK
  2570.         dc.l    0            ;TITLE
  2571. SToW4        dc.l    0            ;SCREEN ADDRESS
  2572.         dc.l    0            ;BITMAP            
  2573.         dc.w    130,25,130,25        ;MINIMUM SIZE
  2574.         dc.w    CUSTOMSCREEN        ;TYPE
  2575.  
  2576. NAnyKeyTL:    dc.l    WA_InnerWidth,130
  2577.         dc.l    WA_InnerHeight,12
  2578.         dc.l    TAG_DONE,0
  2579.  
  2580. AgainWin1    dc.w    150,50            ;X,Y POS
  2581.         dc.w    130            ;WIDTH
  2582.         dc.w    25            ;HEIGHT
  2583.         dc.b    0,1            ;PENS
  2584.         dc.l    VANILLAKEY+RAWKEY+INACTIVEWINDOW+CLOSEWINDOW+MOUSEBUTTONS
  2585.         dc.l    GIMMEZEROZERO+ACTIVATE+WINDOWCLOSE
  2586.         dc.l    0,0            ;GADGETS, CHECKMARK
  2587.         dc.l    0            ;TITLE
  2588. SToW6        dc.l    0            ;SCREEN ADDRESS
  2589.         dc.l    0            ;BITMAP            
  2590.         dc.w    130,25,130,25        ;MINIMUM SIZE
  2591.         dc.w    CUSTOMSCREEN        ;TYPE
  2592.  
  2593. NAgainTL:    dc.l    WA_InnerWidth,130
  2594.         dc.l    WA_InnerHeight,25
  2595.         dc.l    TAG_DONE,0
  2596.  
  2597. ;Fonts
  2598.  
  2599. Topaz        dc.l    FontName
  2600.         dc.w    8
  2601.         dc.b    0
  2602.         dc.b    0
  2603. FontName    dc.b    "topaz.font",0
  2604.         ds.l    0
  2605.  
  2606. ;Gadget TagLists
  2607.  
  2608. GadTagList:    dc.l    GT_Underscore,'_'
  2609.         dc.l    TAG_DONE,0
  2610.  
  2611. ;Gadet labels Part I
  2612.  
  2613. ;New gadget structures
  2614.  
  2615. NGFirstGad:    dc.w    13        ;gng_LeftEdge
  2616.         dc.w    OptionTop3    ;gng_TopEdge
  2617.         dc.w    50        ;gng_Width
  2618.         dc.w    12        ;gng_Height
  2619.         dc.l    FirstGadText2    ;gng_GadgetText
  2620.         dc.l    Topaz        ;gng_TextAttr
  2621.         dc.w    10        ;gng_GadgetID
  2622.         dc.l    PLACETEXT_IN    ;gng_Flags
  2623.         dc.l    0        ;gng_VisualInfo
  2624.         dc.l    0        ;gng_UserData
  2625.  
  2626. NGLastGad:    dc.w    13        ;gng_LeftEdge
  2627.         dc.w    OptionTop3+14    ;gng_TopEdge
  2628.         dc.w    50        ;gng_Width
  2629.         dc.w    12        ;gng_Height
  2630.         dc.l    LastGadText2    ;gng_GadgetText
  2631.         dc.l    Topaz        ;gng_TextAttr
  2632.         dc.w    15        ;gng_GadgetID
  2633.         dc.l    PLACETEXT_IN    ;gng_Flags
  2634.         dc.l    0        ;gng_VisualInfo
  2635.         dc.l    0        ;gng_UserData
  2636.  
  2637. NGPrevGad:    dc.w    133        ;gng_LeftEdge
  2638.         dc.w    OptionTop3    ;gng_TopEdge
  2639.         dc.w    50        ;gng_Width
  2640.         dc.w    12        ;gng_Height
  2641.         dc.l    PrevGadText2    ;gng_GadgetText
  2642.         dc.l    Topaz        ;gng_TextAttr
  2643.         dc.w    20        ;gng_GadgetID
  2644.         dc.l    PLACETEXT_IN    ;gng_Flags
  2645.         dc.l    0        ;gng_VisualInfo
  2646.         dc.l    0        ;gng_UserData
  2647.  
  2648. NGNextGad:    dc.w    133        ;gng_LeftEdge
  2649.         dc.w    OptionTop3+14    ;gng_TopEdge
  2650.         dc.w    50        ;gng_Width
  2651.         dc.w    12        ;gng_Height
  2652.         dc.l    NextGadText2    ;gng_GadgetText
  2653.         dc.l    Topaz        ;gng_TextAttr
  2654.         dc.w    30        ;gng_GadgetID
  2655.         dc.l    PLACETEXT_IN    ;gng_Flags
  2656.         dc.l    0        ;gng_VisualInfo
  2657.         dc.l    0        ;gng_UserData
  2658.  
  2659. NGAddGad:    dc.w    200        ;gng_LeftEdge
  2660.         dc.w    OptionTop2    ;gng_TopEdge
  2661.         dc.w    50        ;gng_Width
  2662.         dc.w    15        ;gng_Height
  2663.         dc.l    AddGadText2    ;gng_GadgetText
  2664.         dc.l    Topaz        ;gng_TextAttr
  2665.         dc.w    40        ;gng_GadgetID
  2666.         dc.l    PLACETEXT_IN    ;gng_Flags
  2667.         dc.l    0        ;gng_VisualInfo
  2668.         dc.l    0        ;gng_UserData
  2669.  
  2670. NGUndoGad:    dc.w    260        ;gng_LeftEdge
  2671.         dc.w    OptionTop2    ;gng_TopEdge
  2672.         dc.w    50        ;gng_Width
  2673.         dc.w    15        ;gng_Height
  2674.         dc.l    UndoGadText2    ;gng_GadgetText
  2675.         dc.l    Topaz        ;gng_TextAttr
  2676.         dc.w    50        ;gng_GadgetID
  2677.         dc.l    PLACETEXT_IN    ;gng_Flags
  2678.         dc.l    0        ;gng_VisualInfo
  2679.         dc.l    0        ;gng_UserData
  2680.  
  2681. NGClearGad:    dc.w    327        ;gng_LeftEdge
  2682.         dc.w    OptionTop2    ;gng_TopEdge
  2683.         dc.w    50        ;gng_Width
  2684.         dc.w    15        ;gng_Height
  2685.         dc.l    ClearGadText2    ;gng_GadgetText
  2686.         dc.l    Topaz        ;gng_TextAttr
  2687.         dc.w    60        ;gng_GadgetID
  2688.         dc.l    PLACETEXT_IN    ;gng_Flags
  2689.         dc.l    0        ;gng_VisualInfo
  2690.         dc.l    0        ;gng_UserData
  2691.  
  2692. glist:        dc.l    0        ;Next Gadget
  2693.         dc.w    0        ;"hit-box" left edge
  2694.         dc.w    0        ;"hit-box" top  edge
  2695.         dc.w    0        ;"hit-box" Width
  2696.         dc.w    0        ;"hit-box" Height
  2697.         dc.w    0        ;flags
  2698.         dc.w    0        ;activation
  2699.         dc.w    0        ;gadget type
  2700.         dc.l    0        ;gadget rendering
  2701.         dc.l    0        ;select rendering
  2702.         dc.l    0        ;gadget text
  2703.         dc.l    0        ;mutual exclude
  2704.         dc.l    0        ;special info
  2705.         dc.w    0        ;gadget ID (user definable)
  2706.         dc.l    0        ;ptr to general purpose user data
  2707.  
  2708.  
  2709. ;Gadget text strings
  2710.  
  2711. FirstGadText2:    dc.b    "_"        ;Must be before Text1
  2712. FirstGad1Text1:    dc.b    "First",0
  2713. LastGadText2:    dc.b    "Last",0
  2714. PrevGadText2:    dc.b    "_"        ;Must be before Text1
  2715. PrevGad1Text1:    dc.b    "Prev",0
  2716. NextGadText2:    dc.b    "_"        ;Must be before Text1
  2717. NextGad1Text1:    dc.b    "Next",0
  2718. AddGadText2:    dc.b    "_"        ;Must be before Text1
  2719. AddGad1Text1:    dc.b    "Add",0
  2720. UndoGadText2:    dc.b    "_"        ;Must be before Text1
  2721. UndoGad1Text1:    dc.b    "Undo",0
  2722. ClearGadText2:    dc.b    "_"        ;Must be before Text1
  2723. ClearGad1Text1:    dc.b    "Clear",0
  2724.  
  2725. MainMText1:    dc.b    "1. Start quiz",0
  2726. MainMText2:    dc.b    "2. Enter name",0
  2727. MainMText3:    dc.b    "3. Load quiz",0
  2728. MainMText4:    dc.b    "4. Teacher mode",0
  2729. MainMText5:    dc.b    "5. Set preferences",0
  2730. MainMText6:    dc.b    "6. Help",0
  2731. MainMText7:    dc.b    "7. About Questions",0
  2732. MainMText8:    dc.b    "8. Quit",0
  2733.         ds.l    0
  2734.  
  2735. NameGad1:    dc.l    0        ;Next Gadget
  2736.         dc.w    1        ;"hit-box" left edge
  2737.         dc.w    NameTop        ;"hit-box" top  edge
  2738.         dc.w    638        ;"hit-box" Width
  2739.         dc.w    9        ;"hit-box" Height
  2740.         dc.w    0        ;flags
  2741.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2742.         dc.w    STRGADGET    ;gadget type
  2743.         dc.l    OneLineBox1    ;gadget rendering
  2744.         dc.l    OneLineBox1    ;select rendering
  2745.         dc.l    NameGadTxt1    ;gadget text
  2746.         dc.l    0        ;mutual exclude
  2747.         dc.l    NameGadInfo    ;special info
  2748.         dc.w    1        ;gadget ID (user definable)
  2749.         dc.l    0        ;ptr to general purpose user data
  2750.  
  2751. NameGadInfo:    dc.l    NameGad1Buf    ;Gadget Buffer
  2752.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2753.         dc.w    0        ;Pos in Buffer
  2754.         dc.w    NameLeng-2    ;Max. Chars in Buffer
  2755.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2756.  
  2757.         dc.w    0        ;Intuition takes care of these.
  2758.         dc.w    0
  2759.         dc.w    0
  2760.         dc.w    0
  2761.         dc.w    0
  2762.         dc.l    0
  2763.  
  2764. NameGadTxt1:    dc.b    1,2            ;PENS
  2765.         dc.w    4            ;MODE
  2766.         dc.w    0,-10            ;LEFT+TOPEDGE
  2767.         dc.l    Topaz            ;FONT
  2768.         dc.l    NameGad1Text        ;TEXT
  2769.         dc.l    0            ;NEXTTEXT
  2770.  
  2771. NameGad1Text:    dc.b    "Please enter your name:",0
  2772.         ds.l    0
  2773.  
  2774. DesStrGad1:    dc.l    DesStrGad2    ;Next Gadget
  2775.         dc.w    1        ;"hit-box" left edge
  2776.         dc.w    DesTop        ;"hit-box" top  edge
  2777.         dc.w    638        ;"hit-box" Width
  2778.         dc.w    9        ;"hit-box" Height
  2779.         dc.w    0        ;flags
  2780.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2781.         dc.w    STRGADGET    ;gadget type
  2782.         dc.l    0        ;gadget rendering
  2783.         dc.l    0        ;select rendering
  2784.         dc.l    0        ;gadget text
  2785.         dc.l    0        ;mutual exclude
  2786.         dc.l    DesStr1Info    ;special info
  2787.         dc.w    1        ;gadget ID (user definable)
  2788.         dc.l    0        ;ptr to general purpose user data
  2789.  
  2790. DesStr1Info:    dc.l    DesStr1Buf    ;Gadget Buffer
  2791.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2792.         dc.w    0        ;Pos in Buffer
  2793.         dc.w    LineLeng    ;Max. Chars in Buffer
  2794.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2795.  
  2796.         dc.w    0        ;Intuition takes care of these.
  2797.         dc.w    0
  2798.         dc.w    0
  2799.         dc.w    0
  2800.         dc.w    0
  2801.         dc.l    0
  2802.  
  2803. DesStrGad2:    dc.l    QueStrGad1    ;Next Gadget
  2804.         dc.w    1        ;"hit-box" left edge
  2805.         dc.w    DesTop+10    ;"hit-box" top  edge
  2806.         dc.w    638        ;"hit-box" Width
  2807.         dc.w    9        ;"hit-box" Height
  2808.         dc.w    0        ;flags
  2809.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2810.         dc.w    STRGADGET    ;gadget type
  2811.         dc.l    0        ;gadget rendering
  2812.         dc.l    0        ;select rendering
  2813.         dc.l    0        ;gadget text
  2814.         dc.l    0        ;mutual exclude
  2815.         dc.l    DesStr2Info    ;special info
  2816.         dc.w    1        ;gadget ID (user definable)
  2817.         dc.l    0        ;ptr to general purpose user data
  2818.  
  2819. DesStr2Info:    dc.l    DesStr2Buf    ;Gadget Buffer
  2820.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2821.         dc.w    0        ;Pos in Buffer
  2822.         dc.w    LineLeng    ;Max. Chars in Buffer
  2823.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2824.  
  2825.         dc.w    0        ;Intuition takes care of these.
  2826.         dc.w    0
  2827.         dc.w    0
  2828.         dc.w    0
  2829.         dc.w    0
  2830.         dc.l    0
  2831.  
  2832. QueStrGad1:    dc.l    QueStrGad2    ;Next Gadget
  2833.         dc.w    1        ;"hit-box" left edge
  2834.         dc.w    QueTop        ;"hit-box" top  edge
  2835.         dc.w    638        ;"hit-box" Width
  2836.         dc.w    9        ;"hit-box" Height
  2837.         dc.w    0        ;flags
  2838.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2839.         dc.w    STRGADGET    ;gadget type
  2840.         dc.l    0        ;gadget rendering
  2841.         dc.l    0        ;select rendering
  2842.         dc.l    0        ;gadget text
  2843.         dc.l    0        ;mutual exclude
  2844.         dc.l    QueStr1Info    ;special info
  2845.         dc.w    1        ;gadget ID (user definable)
  2846.         dc.l    0        ;ptr to general purpose user data
  2847.  
  2848. QueStr1Info:    dc.l    QueStr1Buf    ;Gadget Buffer
  2849.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2850.         dc.w    0        ;Pos in Buffer
  2851.         dc.w    LineLeng    ;Max. Chars in Buffer
  2852.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2853.  
  2854.         dc.w    0        ;Intuition takes care of these.
  2855.         dc.w    0
  2856.         dc.w    0
  2857.         dc.w    0
  2858.         dc.w    0
  2859.         dc.l    0
  2860.  
  2861. QueStrGad2:    dc.l    MulStrGad1    ;Next Gadget
  2862.         dc.w    1        ;"hit-box" left edge
  2863.         dc.w    QueTop+10    ;"hit-box" top  edge
  2864.         dc.w    638        ;"hit-box" Width
  2865.         dc.w    9        ;"hit-box" Height
  2866.         dc.w    0        ;flags
  2867.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2868.         dc.w    STRGADGET    ;gadget type
  2869.         dc.l    0        ;gadget rendering
  2870.         dc.l    0        ;select rendering
  2871.         dc.l    0        ;gadget text
  2872.         dc.l    0        ;mutual exclude
  2873.         dc.l    QueStr2Info    ;special info
  2874.         dc.w    1        ;gadget ID (user definable)
  2875.         dc.l    0        ;ptr to general purpose user data
  2876.  
  2877. QueStr2Info:    dc.l    QueStr2Buf    ;Gadget Buffer
  2878.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2879.         dc.w    0        ;Pos in Buffer
  2880.         dc.w    LineLeng    ;Max. Chars in Buffer
  2881.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2882.  
  2883.         dc.w    0        ;Intuition takes care of these.
  2884.         dc.w    0
  2885.         dc.w    0
  2886.         dc.w    0
  2887.         dc.w    0
  2888.         dc.l    0
  2889.  
  2890. MulStrGad1:    dc.l    MulStrGad2    ;Next Gadget
  2891.         dc.w    1        ;"hit-box" left edge
  2892.         dc.w    MulTop        ;"hit-box" top  edge
  2893.         dc.w    638        ;"hit-box" Width
  2894.         dc.w    9        ;"hit-box" Height
  2895.         dc.w    0        ;flags
  2896.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2897.         dc.w    STRGADGET    ;gadget type
  2898.         dc.l    0        ;gadget rendering
  2899.         dc.l    0        ;select rendering
  2900.         dc.l    0        ;gadget text
  2901.         dc.l    0        ;mutual exclude
  2902.         dc.l    MulStr1Info    ;special info
  2903.         dc.w    1        ;gadget ID (user definable)
  2904.         dc.l    0        ;ptr to general purpose user data
  2905.  
  2906. MulStr1Info:    dc.l    MulStr1Buf    ;Gadget Buffer
  2907.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2908.         dc.w    0        ;Pos in Buffer
  2909.         dc.w    LineLeng    ;Max. Chars in Buffer
  2910.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2911.  
  2912.         dc.w    0        ;Intuition takes care of these.
  2913.         dc.w    0
  2914.         dc.w    0
  2915.         dc.w    0
  2916.         dc.w    0
  2917.         dc.l    0
  2918.  
  2919. MulStrGad2:    dc.l    MulStrGad3    ;Next Gadget
  2920.         dc.w    1        ;"hit-box" left edge
  2921.         dc.w    MulTop+10    ;"hit-box" top  edge
  2922.         dc.w    638        ;"hit-box" Width
  2923.         dc.w    9        ;"hit-box" Height
  2924.         dc.w    0        ;flags
  2925.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2926.         dc.w    STRGADGET    ;gadget type
  2927.         dc.l    0        ;gadget rendering
  2928.         dc.l    0        ;select rendering
  2929.         dc.l    0        ;gadget text
  2930.         dc.l    0        ;mutual exclude
  2931.         dc.l    MulStr2Info    ;special info
  2932.         dc.w    1        ;gadget ID (user definable)
  2933.         dc.l    0        ;ptr to general purpose user data
  2934.  
  2935. MulStr2Info:    dc.l    MulStr2Buf    ;Gadget Buffer
  2936.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2937.         dc.w    0        ;Pos in Buffer
  2938.         dc.w    LineLeng    ;Max. Chars in Buffer
  2939.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2940.  
  2941.         dc.w    0        ;Intuition takes care of these.
  2942.         dc.w    0
  2943.         dc.w    0
  2944.         dc.w    0
  2945.         dc.w    0
  2946.         dc.l    0
  2947.  
  2948. MulStrGad3:    dc.l    MulStrGad4    ;Next Gadget
  2949.         dc.w    1        ;"hit-box" left edge
  2950.         dc.w    MulTop+20    ;"hit-box" top  edge
  2951.         dc.w    638        ;"hit-box" Width
  2952.         dc.w    9        ;"hit-box" Height
  2953.         dc.w    0        ;flags
  2954.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2955.         dc.w    STRGADGET    ;gadget type
  2956.         dc.l    0        ;gadget rendering
  2957.         dc.l    0        ;select rendering
  2958.         dc.l    0        ;gadget text
  2959.         dc.l    0        ;mutual exclude
  2960.         dc.l    MulStr3Info    ;special info
  2961.         dc.w    1        ;gadget ID (user definable)
  2962.         dc.l    0        ;ptr to general purpose user data
  2963.  
  2964. MulStr3Info:    dc.l    MulStr3Buf    ;Gadget Buffer
  2965.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2966.         dc.w    0        ;Pos in Buffer
  2967.         dc.w    LineLeng    ;Max. Chars in Buffer
  2968.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2969.  
  2970.         dc.w    0        ;Intuition takes care of these.
  2971.         dc.w    0
  2972.         dc.w    0
  2973.         dc.w    0
  2974.         dc.w    0
  2975.         dc.l    0
  2976.  
  2977. MulStrGad4:    dc.l    MulStrGad5    ;Next Gadget
  2978.         dc.w    1        ;"hit-box" left edge
  2979.         dc.w    MulTop+30    ;"hit-box" top  edge
  2980.         dc.w    638        ;"hit-box" Width
  2981.         dc.w    9        ;"hit-box" Height
  2982.         dc.w    0        ;flags
  2983.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  2984.         dc.w    STRGADGET    ;gadget type
  2985.         dc.l    0        ;gadget rendering
  2986.         dc.l    0        ;select rendering
  2987.         dc.l    0        ;gadget text
  2988.         dc.l    0        ;mutual exclude
  2989.         dc.l    MulStr4Info    ;special info
  2990.         dc.w    1        ;gadget ID (user definable)
  2991.         dc.l    0        ;ptr to general purpose user data
  2992.  
  2993. MulStr4Info:    dc.l    MulStr4Buf    ;Gadget Buffer
  2994.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  2995.         dc.w    0        ;Pos in Buffer
  2996.         dc.w    LineLeng    ;Max. Chars in Buffer
  2997.         dc.w    1        ;Buffer Pos. of 1st disp. char
  2998.  
  2999.         dc.w    0        ;Intuition takes care of these.
  3000.         dc.w    0
  3001.         dc.w    0
  3002.         dc.w    0
  3003.         dc.w    0
  3004.         dc.l    0
  3005.  
  3006. MulStrGad5:    dc.l    MulStrGad6    ;Next Gadget
  3007.         dc.w    1        ;"hit-box" left edge
  3008.         dc.w    MulTop+40    ;"hit-box" top  edge
  3009.         dc.w    638        ;"hit-box" Width
  3010.         dc.w    9        ;"hit-box" Height
  3011.         dc.w    0        ;flags
  3012.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  3013.         dc.w    STRGADGET    ;gadget type
  3014.         dc.l    0        ;gadget rendering
  3015.         dc.l    0        ;select rendering
  3016.         dc.l    0        ;gadget text
  3017.         dc.l    0        ;mutual exclude
  3018.         dc.l    MulStr5Info    ;special info
  3019.         dc.w    1        ;gadget ID (user definable)
  3020.         dc.l    0        ;ptr to general purpose user data
  3021.  
  3022. MulStr5Info:    dc.l    MulStr5Buf    ;Gadget Buffer
  3023.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  3024.         dc.w    0        ;Pos in Buffer
  3025.         dc.w    LineLeng    ;Max. Chars in Buffer
  3026.         dc.w    1        ;Buffer Pos. of 1st disp. char
  3027.  
  3028.         dc.w    0        ;Intuition takes care of these.
  3029.         dc.w    0
  3030.         dc.w    0
  3031.         dc.w    0
  3032.         dc.w    0
  3033.         dc.l    0
  3034.  
  3035. MulStrGad6:    dc.l    MulStrGad7    ;Next Gadget
  3036.         dc.w    1        ;"hit-box" left edge
  3037.         dc.w    MulTop+50    ;"hit-box" top  edge
  3038.         dc.w    638        ;"hit-box" Width
  3039.         dc.w    9        ;"hit-box" Height
  3040.         dc.w    0        ;flags
  3041.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  3042.         dc.w    STRGADGET    ;gadget type
  3043.         dc.l    0        ;gadget rendering
  3044.         dc.l    0        ;select rendering
  3045.         dc.l    0        ;gadget text
  3046.         dc.l    0        ;mutual exclude
  3047.         dc.l    MulStr6Info    ;special info
  3048.         dc.w    1        ;gadget ID (user definable)
  3049.         dc.l    0        ;ptr to general purpose user data
  3050.  
  3051. MulStr6Info:    dc.l    MulStr6Buf    ;Gadget Buffer
  3052.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  3053.         dc.w    0        ;Pos in Buffer
  3054.         dc.w    LineLeng    ;Max. Chars in Buffer
  3055.         dc.w    1        ;Buffer Pos. of 1st disp. char
  3056.  
  3057.         dc.w    0        ;Intuition takes care of these.
  3058.         dc.w    0
  3059.         dc.w    0
  3060.         dc.w    0
  3061.         dc.w    0
  3062.         dc.l    0
  3063.  
  3064. MulStrGad7:    dc.l    MulStrGad8    ;Next Gadget
  3065.         dc.w    1        ;"hit-box" left edge
  3066.         dc.w    MulTop+60    ;"hit-box" top  edge
  3067.         dc.w    638        ;"hit-box" Width
  3068.         dc.w    9        ;"hit-box" Height
  3069.         dc.w    0        ;flags
  3070.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  3071.         dc.w    STRGADGET    ;gadget type
  3072.         dc.l    0        ;gadget rendering
  3073.         dc.l    0        ;select rendering
  3074.         dc.l    0        ;gadget text
  3075.         dc.l    0        ;mutual exclude
  3076.         dc.l    MulStr7Info    ;special info
  3077.         dc.w    1        ;gadget ID (user definable)
  3078.         dc.l    0        ;ptr to general purpose user data
  3079.  
  3080. MulStr7Info:    dc.l    MulStr7Buf    ;Gadget Buffer
  3081.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  3082.         dc.w    0        ;Pos in Buffer
  3083.         dc.w    LineLeng    ;Max. Chars in Buffer
  3084.         dc.w    1        ;Buffer Pos. of 1st disp. char
  3085.  
  3086.         dc.w    0        ;Intuition takes care of these.
  3087.         dc.w    0
  3088.         dc.w    0
  3089.         dc.w    0
  3090.         dc.w    0
  3091.         dc.l    0
  3092.  
  3093. MulStrGad8:    dc.l    MulStrGad9    ;Next Gadget
  3094.         dc.w    1        ;"hit-box" left edge
  3095.         dc.w    MulTop+70    ;"hit-box" top  edge
  3096.         dc.w    638        ;"hit-box" Width
  3097.         dc.w    9        ;"hit-box" Height
  3098.         dc.w    0        ;flags
  3099.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  3100.         dc.w    STRGADGET    ;gadget type
  3101.         dc.l    0        ;gadget rendering
  3102.         dc.l    0        ;select rendering
  3103.         dc.l    0        ;gadget text
  3104.         dc.l    0        ;mutual exclude
  3105.         dc.l    MulStr8Info    ;special info
  3106.         dc.w    1        ;gadget ID (user definable)
  3107.         dc.l    0        ;ptr to general purpose user data
  3108.  
  3109. MulStr8Info:    dc.l    MulStr8Buf    ;Gadget Buffer
  3110.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  3111.         dc.w    0        ;Pos in Buffer
  3112.         dc.w    LineLeng    ;Max. Chars in Buffer
  3113.         dc.w    1        ;Buffer Pos. of 1st disp. char
  3114.  
  3115.         dc.w    0        ;Intuition takes care of these.
  3116.         dc.w    0
  3117.         dc.w    0
  3118.         dc.w    0
  3119.         dc.w    0
  3120.         dc.l    0
  3121.  
  3122. MulStrGad9:    dc.l    MulStrGad10    ;Next Gadget
  3123.         dc.w    1        ;"hit-box" left edge
  3124.         dc.w    MulTop+80    ;"hit-box" top  edge
  3125.         dc.w    638        ;"hit-box" Width
  3126.         dc.w    9        ;"hit-box" Height
  3127.         dc.w    0        ;flags
  3128.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  3129.         dc.w    STRGADGET    ;gadget type
  3130.         dc.l    0        ;gadget rendering
  3131.         dc.l    0        ;select rendering
  3132.         dc.l    0        ;gadget text
  3133.         dc.l    0        ;mutual exclude
  3134.         dc.l    MulStr9Info    ;special info
  3135.         dc.w    1        ;gadget ID (user definable)
  3136.         dc.l    0        ;ptr to general purpose user data
  3137.  
  3138. MulStr9Info:    dc.l    MulStr9Buf    ;Gadget Buffer
  3139.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  3140.         dc.w    0        ;Pos in Buffer
  3141.         dc.w    LineLeng    ;Max. Chars in Buffer
  3142.         dc.w    1        ;Buffer Pos. of 1st disp. char
  3143.  
  3144.         dc.w    0        ;Intuition takes care of these.
  3145.         dc.w    0
  3146.         dc.w    0
  3147.         dc.w    0
  3148.         dc.w    0
  3149.         dc.l    0
  3150.  
  3151. MulStrGad10:    dc.l    0        ;Next Gadget
  3152.         dc.w    1        ;"hit-box" left edge
  3153.         dc.w    MulTop+90    ;"hit-box" top  edge
  3154.         dc.w    638        ;"hit-box" Width
  3155.         dc.w    9        ;"hit-box" Height
  3156.         dc.w    0        ;flags
  3157.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  3158.         dc.w    STRGADGET    ;gadget type
  3159.         dc.l    0        ;gadget rendering
  3160.         dc.l    0        ;select rendering
  3161.         dc.l    0        ;gadget text
  3162.         dc.l    0        ;mutual exclude
  3163.         dc.l    MulStr10Info    ;special info
  3164.         dc.w    1        ;gadget ID (user definable)
  3165.         dc.l    0        ;ptr to general purpose user data
  3166.  
  3167. MulStr10Info:    dc.l    MulStr10Buf    ;Gadget Buffer
  3168.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  3169.         dc.w    0        ;Pos in Buffer
  3170.         dc.w    LineLeng    ;Max. Chars in Buffer
  3171.         dc.w    1        ;Buffer Pos. of 1st disp. char
  3172.  
  3173.         dc.w    0        ;Intuition takes care of these.
  3174.         dc.w    0
  3175.         dc.w    0
  3176.         dc.w    0
  3177.         dc.w    0
  3178.         dc.l    0
  3179.  
  3180. AStrGad1:    dc.l    0 ;MultiGad1    ;Next Gadget
  3181.         dc.w    1        ;"hit-box" left edge
  3182.         dc.w    AnsTop        ;"hit-box" top  edge
  3183.         dc.w    638        ;"hit-box" Width
  3184.         dc.w    9        ;"hit-box" Height
  3185.         dc.w    0        ;flags
  3186.         dc.w    GADGIMMEDIATE+RELVERIFY    ;activation
  3187.         dc.w    STRGADGET    ;gadget type
  3188.         dc.l    OneLineBox1    ;gadget rendering
  3189.         dc.l    OneLineBox1    ;select rendering
  3190.         dc.l    0        ;gadget text
  3191.         dc.l    0        ;mutual exclude
  3192.         dc.l    Gad2StrInfo    ;special info
  3193.         dc.w    1        ;gadget ID (user definable)
  3194.         dc.l    0        ;ptr to general purpose user data
  3195.  
  3196. Gad2StrInfo:    dc.l    AStrGad1Buf    ;Gadget Buffer
  3197.         dc.l    GadUnBuf    ;Gadget Undo Buffer
  3198. Gad2PosInBuf:    dc.w    0        ;Pos in Buffer
  3199.         dc.w    AnsLeng        ;Max. Chars in Buffer
  3200.         dc.w    1        ;Buffer Pos. of 1st disp. char
  3201.  
  3202.         dc.w    0        ;Intuition takes care of these.
  3203.         dc.w    0
  3204.         dc.w    0
  3205.         dc.w    0
  3206.         dc.w    0
  3207.         dc.l    0
  3208.  
  3209. MainMGad1    dc.l    MainMGad2    ;Next Gadget
  3210.         dc.w    54        ;"hit-box" left edge
  3211.         dc.w    MainMTop+15    ;"hit-box" top  edge
  3212.         dc.w    533        ;"hit-box" Width
  3213.         dc.w    10        ;"hit-box" Height
  3214.         dc.w    GADGHCOMP
  3215.         dc.w    RELVERIFY    ;activation
  3216.         dc.w    BOOLGADGET    ;gadget type
  3217.         dc.l    0        ;gadget rendering
  3218.         dc.l    0        ;select rendering
  3219.         dc.l    MMGadTxt1    ;gadget text
  3220.         dc.l    0        ;mutual exclude
  3221.         dc.l    0        ;special info
  3222.         dc.w    70        ;gadget ID (user definable)
  3223.         dc.l    0        ;ptr to general purpose user data
  3224.  
  3225. MMGadTxt1    dc.b    1,2            ;PENS
  3226.         dc.w    0            ;MODE
  3227.         dc.w    3,1            ;LEFT+TOPEDGE
  3228.         dc.l    Topaz            ;FONT
  3229.         dc.l    MainMText1        ;TEXT
  3230.         dc.l    0            ;NEXTTEXT
  3231.  
  3232. MainMGad2    dc.l    MainMGad3    ;Next Gadget
  3233.         dc.w    54        ;"hit-box" left edge
  3234.         dc.w    MainMTop+25    ;"hit-box" top  edge
  3235.         dc.w    533        ;"hit-box" Width
  3236.         dc.w    10        ;"hit-box" Height
  3237.         dc.w    GADGHCOMP
  3238.         dc.w    RELVERIFY    ;activation
  3239.         dc.w    BOOLGADGET    ;gadget type
  3240.         dc.l    0        ;gadget rendering
  3241.         dc.l    0        ;select rendering
  3242.         dc.l    MMGadTxt2    ;gadget text
  3243.         dc.l    0        ;mutual exclude
  3244.         dc.l    0        ;special info
  3245.         dc.w    71        ;gadget ID (user definable)
  3246.         dc.l    0        ;ptr to general purpose user data
  3247.  
  3248. MMGadTxt2    dc.b    1,2            ;PENS
  3249.         dc.w    0            ;MODE
  3250.         dc.w    3,1            ;LEFT+TOPEDGE
  3251.         dc.l    Topaz            ;FONT
  3252.         dc.l    MainMText2        ;TEXT
  3253.         dc.l    0            ;NEXTTEXT
  3254.  
  3255. MainMGad3    dc.l    MainMGad4    ;Next Gadget
  3256.         dc.w    54        ;"hit-box" left edge
  3257.         dc.w    MainMTop+35    ;"hit-box" top  edge
  3258.         dc.w    533        ;"hit-box" Width
  3259.         dc.w    10        ;"hit-box" Height
  3260.         dc.w    GADGHCOMP
  3261.         dc.w    RELVERIFY    ;activation
  3262.         dc.w    BOOLGADGET    ;gadget type
  3263.         dc.l    0        ;gadget rendering
  3264.         dc.l    0        ;select rendering
  3265.         dc.l    MMGadTxt3    ;gadget text
  3266.         dc.l    0        ;mutual exclude
  3267.         dc.l    0        ;special info
  3268.         dc.w    72        ;gadget ID (user definable)
  3269.         dc.l    0        ;ptr to general purpose user data
  3270.  
  3271. MMGadTxt3    dc.b    1,2            ;PENS
  3272.         dc.w    0            ;MODE
  3273.         dc.w    3,1            ;LEFT+TOPEDGE
  3274.         dc.l    Topaz            ;FONT
  3275.         dc.l    MainMText3        ;TEXT
  3276.         dc.l    0            ;NEXTTEXT
  3277.  
  3278. MainMGad4    dc.l    MainMGad5    ;Next Gadget
  3279.         dc.w    54        ;"hit-box" left edge
  3280.         dc.w    MainMTop+45    ;"hit-box" top  edge
  3281.         dc.w    533        ;"hit-box" Width
  3282.         dc.w    10        ;"hit-box" Height
  3283.         dc.w    GADGHCOMP
  3284.         dc.w    RELVERIFY    ;activation
  3285.         dc.w    BOOLGADGET    ;gadget type
  3286.         dc.l    0        ;gadget rendering
  3287.         dc.l    0        ;select rendering
  3288.         dc.l    MMGadTxt4    ;gadget text
  3289.         dc.l    0        ;mutual exclude
  3290.         dc.l    0        ;special info
  3291.         dc.w    73        ;gadget ID (user definable)
  3292.         dc.l    0        ;ptr to general purpose user data
  3293.  
  3294. MMGadTxt4    dc.b    1,2            ;PENS
  3295.         dc.w    0            ;MODE
  3296.         dc.w    3,1            ;LEFT+TOPEDGE
  3297.         dc.l    Topaz            ;FONT
  3298.         dc.l    MainMText4        ;TEXT
  3299.         dc.l    0            ;NEXTTEXT
  3300.  
  3301. MainMGad5    dc.l    MainMGad6    ;Next Gadget
  3302.         dc.w    54        ;"hit-box" left edge
  3303.         dc.w    MainMTop+55    ;"hit-box" top  edge
  3304.         dc.w    533        ;"hit-box" Width
  3305.         dc.w    10        ;"hit-box" Height
  3306.         dc.w    GADGHCOMP
  3307.         dc.w    RELVERIFY    ;activation
  3308.         dc.w    BOOLGADGET    ;gadget type
  3309.         dc.l    0        ;gadget rendering
  3310.         dc.l    0        ;select rendering
  3311.         dc.l    MMGadTxt5    ;gadget text
  3312.         dc.l    0        ;mutual exclude
  3313.         dc.l    0        ;special info
  3314.         dc.w    74        ;gadget ID (user definable)
  3315.         dc.l    0        ;ptr to general purpose user data
  3316.  
  3317. MMGadTxt5    dc.b    1,2            ;PENS
  3318.         dc.w    0            ;MODE
  3319.         dc.w    3,1            ;LEFT+TOPEDGE
  3320.         dc.l    Topaz            ;FONT
  3321.         dc.l    MainMText5        ;TEXT
  3322.         dc.l    0            ;NEXTTEXT
  3323.  
  3324. MainMGad6    dc.l    MainMGad7    ;Next Gadget
  3325.         dc.w    54        ;"hit-box" left edge
  3326.         dc.w    MainMTop+65    ;"hit-box" top  edge
  3327.         dc.w    533        ;"hit-box" Width
  3328.         dc.w    10        ;"hit-box" Height
  3329.         dc.w    GADGHCOMP
  3330.         dc.w    RELVERIFY    ;activation
  3331.         dc.w    BOOLGADGET    ;gadget type
  3332.         dc.l    0        ;gadget rendering
  3333.         dc.l    0        ;select rendering
  3334.         dc.l    MMGadTxt6    ;gadget text
  3335.         dc.l    0        ;mutual exclude
  3336.         dc.l    0        ;special info
  3337.         dc.w    75        ;gadget ID (user definable)
  3338.         dc.l    0        ;ptr to general purpose user data
  3339.  
  3340. MMGadTxt6    dc.b    1,2            ;PENS
  3341.         dc.w    0            ;MODE
  3342.         dc.w    3,1            ;LEFT+TOPEDGE
  3343.         dc.l    Topaz            ;FONT
  3344.         dc.l    MainMText6        ;TEXT
  3345.         dc.l    0            ;NEXTTEXT
  3346.  
  3347. MainMGad7    dc.l    MainMGad8    ;Next Gadget
  3348.         dc.w    54        ;"hit-box" left edge
  3349.         dc.w    MainMTop+75    ;"hit-box" top  edge
  3350.         dc.w    533        ;"hit-box" Width
  3351.         dc.w    10        ;"hit-box" Height
  3352.         dc.w    GADGHCOMP
  3353.         dc.w    RELVERIFY    ;activation
  3354.         dc.w    BOOLGADGET    ;gadget type
  3355.         dc.l    0        ;gadget rendering
  3356.         dc.l    0        ;select rendering
  3357.         dc.l    MMGadTxt7    ;gadget text
  3358.         dc.l    0        ;mutual exclude
  3359.         dc.l    0        ;special info
  3360.         dc.w    76        ;gadget ID (user definable)
  3361.         dc.l    0        ;ptr to general purpose user data
  3362.  
  3363. MMGadTxt7    dc.b    1,2            ;PENS
  3364.         dc.w    0            ;MODE
  3365.         dc.w    3,1            ;LEFT+TOPEDGE
  3366.         dc.l    Topaz            ;FONT
  3367.         dc.l    MainMText7        ;TEXT
  3368.         dc.l    0            ;NEXTTEXT
  3369.  
  3370. MainMGad8    dc.l    0        ;Next Gadget
  3371.         dc.w    54        ;"hit-box" left edge
  3372.         dc.w    MainMTop+85    ;"hit-box" top  edge
  3373.         dc.w    533        ;"hit-box" Width
  3374.         dc.w    10        ;"hit-box" Height
  3375.         dc.w    GADGHCOMP
  3376.         dc.w    RELVERIFY    ;activation
  3377.         dc.w    BOOLGADGET    ;gadget type
  3378.         dc.l    0        ;gadget rendering
  3379.         dc.l    0        ;select rendering
  3380.         dc.l    MMGadTxt8    ;gadget text
  3381.         dc.l    0        ;mutual exclude
  3382.         dc.l    0        ;special info
  3383.         dc.w    77        ;gadget ID (user definable)
  3384.         dc.l    0        ;ptr to general purpose user data
  3385.  
  3386. MMGadTxt8    dc.b    1,2            ;PENS
  3387.         dc.w    0            ;MODE
  3388.         dc.w    3,1            ;LEFT+TOPEDGE
  3389.         dc.l    Topaz            ;FONT
  3390.         dc.l    MainMText8        ;TEXT
  3391.         dc.l    0            ;NEXTTEXT
  3392.  
  3393. ;Menu TagList(s)
  3394.  
  3395. MenuTagList:    ;dc.l    GTMN_TextAttr,Topaz
  3396.         dc.l    GTMN_Menu,MNMainMenu1
  3397.         dc.l    TAG_DONE,0
  3398.  
  3399. ;Menu texts
  3400.  
  3401. Menu1Name:    dc.b    "Main",0
  3402. StartMenu1I1Text: dc.b    "Start!",0
  3403. StartCommKey:    dc.b    "G",0
  3404. ENameMenu1I1Text: dc.b    "Enter name",0
  3405. ENameCommKey:    dc.b    "E",0
  3406. LoadMenu1I1Text: dc.b    "Load...",0
  3407. LoadCommKey:    dc.b    "L",0
  3408. SaveMenu1I1Text: dc.b    "Save",0
  3409. SaveCommKey:    dc.b    "S",0
  3410. SaveAsMenu1I1Text: dc.b    "Save as...",0
  3411. SaveAsCommKey:    dc.b    "W",0
  3412. HelpMenu1I1Text: dc.b    "Help...",0
  3413. HelpCommKey:    dc.b    "H",0
  3414. AboutMenu1I1Text: dc.b    "About...",0
  3415. AboutCommKey:    dc.b    "?",0
  3416. QuitMenu1I2Text: dc.b    "Quit",0
  3417. QuitCommKey:    dc.b    "Q",0
  3418.  
  3419. Menu2Name:    dc.b    "Edit",0
  3420. AddMenu1I1Text:    dc.b    "Add",0
  3421. AddCommKey:    dc.b    "A",0
  3422. UndoMenu1I1Text: dc.b    "Undo",0
  3423. UndoCommKey:    dc.b    "U",0
  3424.  
  3425. Menu3Name:    dc.b    "Edit all",0
  3426. ClearMenu1I1Text: dc.b    "Clear",0
  3427. ClearCommKey:    dc.b    "C",0
  3428.  
  3429. Menu4Name:    dc.b    "Move",0
  3430. FirstMenu1I1Text: dc.b    "First",0
  3431. FirstCommKey:    dc.b    "F",0
  3432. LastMenu1I1Text: dc.b    "Last",0
  3433. LastCommKey:    dc.b    ".",0
  3434. NextMenu1I1Text: dc.b    "Next",0
  3435. NextCommKey:    dc.b    "N",0
  3436. PrevMenu1I1Text: dc.b    "Previous",0
  3437. PrevCommKey:    dc.b    "P",0
  3438.  
  3439. Menu5Name:    dc.b    "Mode",0
  3440. Menu2I1Text:    dc.b    "   "
  3441. StuMenu1Text:    dc.b    "Student",0
  3442. StudentCommKey:    dc.b    "1"
  3443. Menu2I2Text:    dc.b    "   "
  3444. TeachMenu1Text:    dc.b    "Teacher",0
  3445. TeacherCommKey:    dc.b    "2"
  3446.  
  3447. Menu6Name:    dc.b    "Preferences",0
  3448. PrefsM1Text:    dc.b    "Set prefs",0
  3449. PrefsCommKey:    dc.b    "3"
  3450. PrefsM2Text:    dc.b    "Load prefs",0
  3451. PrefsCommKey2:    dc.b    "4"
  3452. PrefsM3Text:    dc.b    "Save prefs",0
  3453. PrefsCommKey3:    dc.b    "5"
  3454. PrefsM4Text:    dc.b    "Get defaults",0
  3455. PrefsCommKey4:    dc.b    "6"
  3456.         ds.l    0
  3457.  
  3458. ;NewMenus
  3459.  
  3460. MNMainMenu1:    dc.b    NM_TITLE        ;gnm_Type
  3461.         dc.b    0            ;gnm_Pad
  3462.         dc.l    Menu1Name        ;gnm_Label
  3463.         dc.l    0            ;gnm_CommKey
  3464.         dc.w    0            ;gnm_Flags
  3465.         dc.l    0            ;gnm_MutualExclude
  3466.         dc.l    0            ;gnm_UserData
  3467.  
  3468. MNStartMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3469.         dc.b    0            ;gnm_Pad
  3470.         dc.l    StartMenu1I1Text    ;gnm_Label
  3471.         dc.l    StartCommKey        ;gnm_CommKey
  3472.         dc.w    0            ;gnm_Flags
  3473.         dc.l    0            ;gnm_MutualExclude
  3474.         dc.l    0            ;gnm_UserData
  3475.  
  3476. MNEnterNMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3477.         dc.b    0            ;gnm_Pad
  3478.         dc.l    ENameMenu1I1Text    ;gnm_Label
  3479.         dc.l    ENameCommKey        ;gnm_CommKey
  3480.         dc.w    0            ;gnm_Flags
  3481.         dc.l    0            ;gnm_MutualExclude
  3482.         dc.l    0            ;gnm_UserData
  3483.  
  3484. MNLoadMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3485.         dc.b    0            ;gnm_Pad
  3486.         dc.l    LoadMenu1I1Text        ;gnm_Label
  3487.         dc.l    LoadCommKey        ;gnm_CommKey
  3488.         dc.w    0            ;gnm_Flags
  3489.         dc.l    0            ;gnm_MutualExclude
  3490.         dc.l    0            ;gnm_UserData
  3491.  
  3492. MNSaveMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3493.         dc.b    0            ;gnm_Pad
  3494.         dc.l    SaveMenu1I1Text        ;gnm_Label
  3495.         dc.l    SaveCommKey        ;gnm_CommKey
  3496.         dc.w    NM_ITEMDISABLED        ;gnm_Flags
  3497.         dc.l    0            ;gnm_MutualExclude
  3498.         dc.l    0            ;gnm_UserData
  3499.  
  3500. MNSaveAsMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3501.         dc.b    0            ;gnm_Pad
  3502.         dc.l    SaveAsMenu1I1Text    ;gnm_Label
  3503.         dc.l    SaveAsCommKey        ;gnm_CommKey
  3504.         dc.w    NM_ITEMDISABLED        ;gnm_Flags
  3505.         dc.l    0            ;gnm_MutualExclude
  3506.         dc.l    0            ;gnm_UserData
  3507.  
  3508. MNHelpMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3509.         dc.b    0            ;gnm_Pad
  3510.         dc.l    HelpMenu1I1Text        ;gnm_Label
  3511.         dc.l    HelpCommKey        ;gnm_CommKey
  3512.         dc.w    0            ;gnm_Flags
  3513.         dc.l    0            ;gnm_MutualExclude
  3514.         dc.l    0            ;gnm_UserData
  3515.  
  3516. MNAboutMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3517.         dc.b    0            ;gnm_Pad
  3518.         dc.l    AboutMenu1I1Text    ;gnm_Label
  3519.         dc.l    AboutCommKey        ;gnm_CommKey
  3520.         dc.w    0            ;gnm_Flags
  3521.         dc.l    0            ;gnm_MutualExclude
  3522.         dc.l    0            ;gnm_UserData
  3523.  
  3524. MNSepMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3525.         dc.b    0            ;gnm_Pad
  3526.         dc.l    NM_BARLABEL        ;gnm_Label
  3527.         dc.l    0            ;gnm_CommKey
  3528.         dc.w    0            ;gnm_Flags
  3529.         dc.l    0            ;gnm_MutualExclude
  3530.         dc.l    0            ;gnm_UserData
  3531.  
  3532. MNQuitMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3533.         dc.b    0            ;gnm_Pad
  3534.         dc.l    QuitMenu1I2Text        ;gnm_Label
  3535.         dc.l    QuitCommKey        ;gnm_CommKey
  3536.         dc.w    0            ;gnm_Flags
  3537.         dc.l    0            ;gnm_MutualExclude
  3538.         dc.l    0            ;gnm_UserData
  3539.  
  3540. MNMenu2:    dc.b    NM_TITLE        ;gnm_Type
  3541.         dc.b    0            ;gnm_Pad
  3542.         dc.l    Menu2Name        ;gnm_Label
  3543.         dc.l    0            ;gnm_CommKey
  3544.         dc.w    NM_MENUDISABLED        ;gnm_Flags
  3545.         dc.l    0            ;gnm_MutualExclude
  3546.         dc.l    0            ;gnm_UserData
  3547.  
  3548. MNAddMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3549.         dc.b    0            ;gnm_Pad
  3550.         dc.l    AddMenu1I1Text        ;gnm_Label
  3551.         dc.l    AddCommKey        ;gnm_CommKey
  3552.         dc.w    0            ;gnm_Flags
  3553.         dc.l    0            ;gnm_MutualExclude
  3554.         dc.l    0            ;gnm_UserData
  3555.  
  3556. MNSepMenu2:    dc.b    NM_ITEM            ;gnm_Type
  3557.         dc.b    0            ;gnm_Pad
  3558.         dc.l    NM_BARLABEL        ;gnm_Label
  3559.         dc.l    0            ;gnm_CommKey
  3560.         dc.w    0            ;gnm_Flags
  3561.         dc.l    0            ;gnm_MutualExclude
  3562.         dc.l    0            ;gnm_UserData
  3563.  
  3564. MNUndoMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3565.         dc.b    0            ;gnm_Pad
  3566.         dc.l    UndoMenu1I1Text        ;gnm_Label
  3567.         dc.l    UndoCommKey        ;gnm_CommKey
  3568.         dc.w    0            ;gnm_Flags
  3569.         dc.l    0            ;gnm_MutualExclude
  3570.         dc.l    0            ;gnm_UserData
  3571.  
  3572. MNMenu3:    dc.b    NM_TITLE        ;gnm_Type
  3573.         dc.b    0            ;gnm_Pad
  3574.         dc.l    Menu3Name        ;gnm_Label
  3575.         dc.l    0            ;gnm_CommKey
  3576.         dc.w    NM_MENUDISABLED        ;gnm_Flags
  3577.         dc.l    0            ;gnm_MutualExclude
  3578.         dc.l    0            ;gnm_UserData
  3579.  
  3580. MNClearMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3581.         dc.b    0            ;gnm_Pad
  3582.         dc.l    ClearMenu1I1Text    ;gnm_Label
  3583.         dc.l    ClearCommKey        ;gnm_CommKey
  3584.         dc.w    0            ;gnm_Flags
  3585.         dc.l    0            ;gnm_MutualExclude
  3586.         dc.l    0            ;gnm_UserData
  3587.  
  3588. MNMenu4:    dc.b    NM_TITLE        ;gnm_Type
  3589.         dc.b    0            ;gnm_Pad
  3590.         dc.l    Menu4Name        ;gnm_Label
  3591.         dc.l    0            ;gnm_CommKey
  3592.         dc.w    NM_MENUDISABLED        ;gnm_Flags
  3593.         dc.l    0            ;gnm_MutualExclude
  3594.         dc.l    0            ;gnm_UserData
  3595.  
  3596. MNFirstMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3597.         dc.b    0            ;gnm_Pad
  3598.         dc.l    FirstMenu1I1Text    ;gnm_Label
  3599.         dc.l    FirstCommKey        ;gnm_CommKey
  3600.         dc.w    0            ;gnm_Flags
  3601.         dc.l    0            ;gnm_MutualExclude
  3602.         dc.l    0            ;gnm_UserData
  3603.  
  3604. MNLastMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3605.         dc.b    0            ;gnm_Pad
  3606.         dc.l    LastMenu1I1Text        ;gnm_Label
  3607.         dc.l    LastCommKey        ;gnm_CommKey
  3608.         dc.w    0            ;gnm_Flags
  3609.         dc.l    0            ;gnm_MutualExclude
  3610.         dc.l    0            ;gnm_UserData
  3611.  
  3612. MNPrevMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3613.         dc.b    0            ;gnm_Pad
  3614.         dc.l    PrevMenu1I1Text        ;gnm_Label
  3615.         dc.l    PrevCommKey        ;gnm_CommKey
  3616.         dc.w    0            ;gnm_Flags
  3617.         dc.l    0            ;gnm_MutualExclude
  3618.         dc.l    0            ;gnm_UserData
  3619.  
  3620. MNNextMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3621.         dc.b    0            ;gnm_Pad
  3622.         dc.l    NextMenu1I1Text        ;gnm_Label
  3623.         dc.l    NextCommKey        ;gnm_CommKey
  3624.         dc.w    0            ;gnm_Flags
  3625.         dc.l    0            ;gnm_MutualExclude
  3626.         dc.l    0            ;gnm_UserData
  3627.  
  3628. MNMenu5:    dc.b    NM_TITLE        ;gnm_Type
  3629.         dc.b    0            ;gnm_Pad
  3630.         dc.l    Menu5Name        ;gnm_Label
  3631.         dc.l    0            ;gnm_CommKey
  3632.         dc.w    0            ;gnm_Flags
  3633.         dc.l    0            ;gnm_MutualExclude
  3634.         dc.l    0            ;gnm_UserData
  3635.  
  3636. MNStudentMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3637.         dc.b    0            ;gnm_Pad
  3638.         dc.l    StuMenu1Text        ;gnm_Label
  3639.         dc.l    StudentCommKey        ;gnm_CommKey
  3640.         dc.w    CHECKIT+CHECKED        ;gnm_Flags
  3641.         dc.l    ~1            ;gnm_MutualExclude
  3642.         dc.l    0            ;gnm_UserData
  3643.  
  3644. MNTeacherMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3645.         dc.b    0            ;gnm_Pad
  3646.         dc.l    TeachMenu1Text        ;gnm_Label
  3647.         dc.l    TeacherCommKey        ;gnm_CommKey
  3648.         dc.w    CHECKIT            ;gnm_Flags
  3649.         dc.l    ~2            ;gnm_MutualExclude
  3650.         dc.l    0            ;gnm_UserData
  3651.  
  3652. MNMenu6:    dc.b    NM_TITLE        ;gnm_Type
  3653.         dc.b    0            ;gnm_Pad
  3654.         dc.l    Menu6Name        ;gnm_Label
  3655.         dc.l    0            ;gnm_CommKey
  3656.         dc.w    0             ;gnm_Flags
  3657.         dc.l    0            ;gnm_MutualExclude
  3658.         dc.l    0            ;gnm_UserData
  3659.  
  3660. MNPrefsMenu1:    dc.b    NM_ITEM            ;gnm_Type
  3661.         dc.b    0            ;gnm_Pad
  3662.         dc.l    PrefsM1Text        ;gnm_Label
  3663.         dc.l    PrefsCommKey        ;gnm_CommKey
  3664.         dc.w    0            ;gnm_Flags
  3665.         dc.l    0            ;gnm_MutualExclude
  3666.         dc.l    0            ;gnm_UserData
  3667.  
  3668. MNPrefsMenu2:    dc.b    NM_ITEM            ;gnm_Type
  3669.         dc.b    0            ;gnm_Pad
  3670.         dc.l    PrefsM2Text        ;gnm_Label
  3671.         dc.l    PrefsCommKey2        ;gnm_CommKey
  3672.         dc.w    NM_ITEMDISABLED        ;gnm_Flags
  3673.         dc.l    0            ;gnm_MutualExclude
  3674.         dc.l    0            ;gnm_UserData
  3675.  
  3676. MNPrefsMenu3:    dc.b    NM_ITEM            ;gnm_Type
  3677.         dc.b    0            ;gnm_Pad
  3678.         dc.l    PrefsM3Text        ;gnm_Label
  3679.         dc.l    PrefsCommKey3        ;gnm_CommKey
  3680.         dc.w    NM_ITEMDISABLED        ;gnm_Flags
  3681.         dc.l    0            ;gnm_MutualExclude
  3682.         dc.l    0            ;gnm_UserData
  3683.  
  3684. MNSepMenu3:    dc.b    NM_ITEM            ;gnm_Type
  3685.         dc.b    0            ;gnm_Pad
  3686.         dc.l    NM_BARLABEL        ;gnm_Label
  3687.         dc.l    0            ;gnm_CommKey
  3688.         dc.w    0            ;gnm_Flags
  3689.         dc.l    0            ;gnm_MutualExclude
  3690.         dc.l    0            ;gnm_UserData
  3691.  
  3692. MNPrefsMenu4:    dc.b    NM_ITEM            ;gnm_Type
  3693.         dc.b    0            ;gnm_Pad
  3694.         dc.l    PrefsM4Text        ;gnm_Label
  3695.         dc.l    PrefsCommKey4        ;gnm_CommKey
  3696.         dc.w    NM_ITEMDISABLED        ;gnm_Flags
  3697.         dc.l    0            ;gnm_MutualExclude
  3698.         dc.l    0            ;gnm_UserData
  3699.  
  3700.         dc.w    0            ;ITEM_END?
  3701.  
  3702. ;Borders, Images etc...
  3703.  
  3704. OneLineBox1    dc.w    -1        ;Initial offsets from the origin
  3705.         dc.w    -2        ;LeftEdge and TopEdge
  3706.         dc.b    1,2        ;Pens
  3707.         dc.b    1        ;Draw Mode
  3708.         dc.b    5        ;Line Count (XY)
  3709.         dc.l    BorderXY1    ;XY's
  3710.         dc.l    0        ;Next Border
  3711.         dc.b    0
  3712.         ds.l    0
  3713. BorderXY1    dc.w    0,0
  3714.         dc.w    639,0        
  3715.         dc.w    639,11
  3716.         dc.w    0,11
  3717.         dc.w    0,0
  3718.         dc.b    0
  3719.         ds.l    0
  3720.  
  3721. TwoLineBox1    dc.w    0        ;Initial offsets from the origin
  3722.         dc.w    -2        ;LeftEdge and TopEdge
  3723.         dc.b    1,2        ;Pens
  3724.         dc.b    1        ;Draw Mode
  3725.         dc.b    5        ;Line Count (XY)
  3726.         dc.l    BorderXY2    ;XY's
  3727.         dc.l    0        ;Next Border
  3728.         dc.b    0
  3729.         ds.l    0
  3730. BorderXY2    dc.w    0,0
  3731.         dc.w    639,0        
  3732.         dc.w    639,22
  3733.         dc.w    0,22
  3734.         dc.w    0,0
  3735.         dc.b    0
  3736.         ds.l    0
  3737.  
  3738. TenLineBox1    dc.w    0        ;Initial offsets from the origin
  3739.         dc.w    -2        ;LeftEdge and TopEdge
  3740.         dc.b    1,2        ;Pens
  3741.         dc.b    1        ;Draw Mode
  3742.         dc.b    5        ;Line Count (XY)
  3743.         dc.l    BorderXY3    ;XY's
  3744.         dc.l    0        ;Next Border
  3745.         dc.b    0
  3746.         ds.l    0
  3747. BorderXY3    dc.w    0,0
  3748.         dc.w    639,0        
  3749.         dc.w    639,101
  3750.         dc.w    0,101
  3751.         dc.w    0,0
  3752.         dc.b    0
  3753.         ds.l    0
  3754.  
  3755. MoveBorder1    dc.w    6        ;Initial offsets from the origin
  3756.         dc.w    0        ;LeftEdge and TopEdge
  3757.         dc.b    1,2        ;Pens
  3758.         dc.b    1        ;Draw Mode
  3759.         dc.b    5        ;Line Count (XY)
  3760.         dc.l    BorderXY4    ;XY's
  3761.         dc.l    OneBorder1    ;Next Border
  3762.         dc.b    0
  3763.         ds.l    0
  3764. BorderXY4    dc.w    0,0
  3765.         dc.w    184,0        
  3766.         dc.w    184,27
  3767.         dc.w    0,27
  3768.         dc.w    0,0
  3769.         dc.b    0
  3770.         ds.l    0
  3771.  
  3772. OneBorder1    dc.w    193        ;Initial offsets from the origin
  3773.         dc.w    0        ;LeftEdge and TopEdge
  3774.         dc.b    1,2        ;Pens
  3775.         dc.b    1        ;Draw Mode
  3776.         dc.b    5        ;Line Count (XY)
  3777.         dc.l    BorderXY5    ;XY's
  3778.         dc.l    AllBorder1    ;Next Border
  3779.         dc.b    0
  3780.         ds.l    0
  3781. BorderXY5    dc.w    0,0
  3782.         dc.w    124,0        
  3783.         dc.w    124,27
  3784.         dc.w    0,27
  3785.         dc.w    0,0
  3786.         dc.b    0
  3787.         ds.l    0
  3788.  
  3789. AllBorder1    dc.w    320        ;Initial offsets from the origin
  3790.         dc.w    0        ;LeftEdge and TopEdge
  3791.         dc.b    1,2        ;Pens
  3792.         dc.b    1        ;Draw Mode
  3793.         dc.b    5        ;Line Count (XY)
  3794.         dc.l    BorderXY6    ;XY's
  3795.         dc.l    0        ;Next Border
  3796.         dc.b    0
  3797.         ds.l    0
  3798. BorderXY6    dc.w    0,0
  3799.         dc.w    64,0        
  3800.         dc.w    64,27
  3801.         dc.w    0,27
  3802.         dc.w    0,0
  3803.         dc.b    0
  3804.         ds.l    0
  3805.  
  3806. MainMBorder1    dc.w    0        ;Initial offsets from the origin
  3807.         dc.w    0        ;LeftEdge and TopEdge
  3808.         dc.b    2,2        ;Pens
  3809.         dc.b    1        ;Draw Mode
  3810.         dc.b    3        ;Line Count (XY)
  3811.         dc.l    BorderXY7    ;XY's
  3812.         dc.l    MainMBorder2    ;Next Border
  3813.         dc.b    0
  3814.         ds.l    0
  3815. BorderXY7    dc.w    0,100
  3816.         dc.w    0,0    
  3817.         dc.w    540,0
  3818.         dc.b    0
  3819.         ds.l    0
  3820.  
  3821. MainMBorder2    dc.w    3        ;Initial offsets from the origin
  3822.         dc.w    2        ;LeftEdge and TopEdge
  3823.         dc.b    2,2        ;Pens
  3824.         dc.b    1        ;Draw Mode
  3825.         dc.b    3        ;Line Count (XY)
  3826.         dc.l    BorderXY8    ;XY's
  3827.         dc.l    MainMBorder3    ;Next Border
  3828.         dc.b    0
  3829.         ds.l    0
  3830. BorderXY8    dc.w    0,96
  3831.         dc.w    0,0        
  3832.         dc.w    534,0
  3833.         dc.b    0
  3834.         ds.l    0
  3835.  
  3836. MainMBorder3    dc.w    0        ;Initial offsets from the origin
  3837.         dc.w    0        ;LeftEdge and TopEdge
  3838.         dc.b    1,2        ;Pens
  3839.         dc.b    1        ;Draw Mode
  3840.         dc.b    3        ;Line Count (XY)
  3841.         dc.l    BorderXY9    ;XY's
  3842.         dc.l    MainMBorder4    ;Next Border
  3843.         dc.b    0
  3844.         ds.l    0
  3845. BorderXY9    dc.w    540,1
  3846.         dc.w    540,100        
  3847.         dc.w    0,100
  3848.         dc.b    0
  3849.         ds.l    0
  3850.  
  3851. MainMBorder4    dc.w    3        ;Initial offsets from the origin
  3852.         dc.w    2        ;LeftEdge and TopEdge
  3853.         dc.b    1,2        ;Pens
  3854.         dc.b    1        ;Draw Mode
  3855.         dc.b    3        ;Line Count (XY)
  3856.         dc.l    BorderXY10    ;XY's
  3857.         dc.l    0        ;Next Border
  3858.         dc.b    0
  3859.         ds.l    0
  3860. BorderXY10    dc.w    534,1
  3861.         dc.w    534,96        
  3862.         dc.w    0,96
  3863.         dc.b    0
  3864.         ds.l    0
  3865.  
  3866. ;Texts, Part II
  3867.  
  3868. AboutTxt1:    dc.b    3,1            ;PENS
  3869.         dc.w    0            ;MODE
  3870.         dc.w    10,10            ;LEFT+TOPEDGE
  3871.         dc.l    0            ;FONT
  3872.         dc.l    AboutText1        ;TEXT
  3873.         dc.l    AboutTxt2        ;NEXTTEXT
  3874.         
  3875. AboutTxt2:    dc.b    3,2            ;PENS
  3876.         dc.w    4            ;MODE
  3877.         dc.w    10,20            ;LEFT+TOPEDGE
  3878.         dc.l    0            ;FONT
  3879.         dc.l    AboutText2        ;TEXT
  3880.         dc.l    AboutTxt3        ;NEXTTEXT
  3881.  
  3882. AboutTxt3:    dc.b    3,1            ;PENS
  3883.         dc.w    4            ;MODE
  3884.         dc.w    10,30            ;LEFT+TOPEDGE
  3885.         dc.l    0            ;FONT
  3886.         dc.l    AboutText3        ;TEXT
  3887.         dc.l    AboutTxt4        ;NEXTTEXT
  3888.  
  3889. AboutTxt4:    dc.b    3,1            ;PENS
  3890.         dc.w    4            ;MODE
  3891.         dc.w    10,50            ;LEFT+TOPEDGE
  3892.         dc.l    0            ;FONT
  3893.         dc.l    AboutText4        ;TEXT
  3894.         dc.l    0            ;NEXTTEXT
  3895.  
  3896. DoItTxt1:    dc.b    3,1            ;PENS
  3897.         dc.w    0            ;MODE
  3898.         dc.w    6,3            ;LEFT+TOPEDGE
  3899.         dc.l    0            ;FONT
  3900.         dc.l    DoItText1        ;TEXT
  3901.         dc.l    0            ;NEXTTEXT
  3902.  
  3903. OKTxt:        dc.b    3,1            ;PENS
  3904.         dc.w    0            ;MODE
  3905.         dc.w    6,3            ;LEFT+TOPEDGE
  3906.         dc.l    0            ;FONT
  3907.         dc.l    OKText1            ;TEXT
  3908.         dc.l    0            ;NEXTTEXT
  3909.  
  3910. CancelTxt:    dc.b    3,1            ;PENS
  3911.         dc.w    0            ;MODE
  3912.         dc.w    6,3            ;LEFT+TOPEDGE
  3913.         dc.l    0            ;FONT
  3914.         dc.l    CancelText1        ;TEXT
  3915.         dc.l    0            ;NEXTTEXT
  3916.  
  3917. WrongTxt1:    dc.b    3,1            ;PENS
  3918.         dc.w    4            ;MODE
  3919.         dc.w    10,10            ;LEFT+TOPEDGE
  3920.         dc.l    Topaz            ;FONT
  3921.         dc.l    FWrongText1        ;TEXT
  3922.         dc.l    0            ;NEXTTEXT
  3923.  
  3924. NoMemTxt1:    dc.b    3,1            ;PENS
  3925.         dc.w    4            ;MODE
  3926.         dc.w    10,10            ;LEFT+TOPEDGE
  3927.         dc.l    Topaz            ;FONT
  3928.         dc.l    NoMemText1        ;TEXT
  3929.         dc.l    0            ;NEXTTEXT
  3930.  
  3931. NoQuesTxt1:    dc.b    3,1            ;PENS
  3932.         dc.w    4            ;MODE
  3933.         dc.w    10,10            ;LEFT+TOPEDGE
  3934.         dc.l    Topaz            ;FONT
  3935.         dc.l    NoQuesText1        ;TEXT
  3936.         dc.l    0            ;NEXTTEXT
  3937.  
  3938. DesTxt1:    dc.b    1,2            ;PENS
  3939.         dc.w    4            ;MODE
  3940.         dc.w    1,0            ;LEFT+TOPEDGE
  3941.         dc.l    Topaz            ;FONT
  3942. DesTextAdd:    dc.l    0            ;TEXT
  3943.         dc.l    0            ;NEXTTEXT
  3944.  
  3945. QueTxt1:    dc.b    1,2            ;PENS
  3946.         dc.w    4            ;MODE
  3947.         dc.w    1,0            ;LEFT+TOPEDGE
  3948.         dc.l    Topaz            ;FONT
  3949. QueTextAdd:    dc.l    0            ;TEXT
  3950.         dc.l    0            ;NEXTTEXT
  3951.  
  3952. AnsTxt1:    dc.b    1,2            ;PENS
  3953.         dc.w    4            ;MODE
  3954.         dc.w    30,0            ;LEFT+TOPEDGE
  3955.         dc.l    Topaz            ;FONT
  3956. AnsTextAdd:    dc.l    0            ;TEXT
  3957.         dc.l    0            ;NEXTTEXT
  3958.  
  3959. WrongTxt2:    dc.b    3,2            ;PENS
  3960.         dc.w    4            ;MODE
  3961.         dc.w    17,2            ;LEFT+TOPEDGE
  3962.         dc.l    Topaz            ;FONT
  3963.         dc.l    WrongText1        ;TEXT
  3964.         dc.l    0            ;NEXTTEXT
  3965.  
  3966. RightTxt1:    dc.b    3,2            ;PENS
  3967.         dc.w    4            ;MODE
  3968.         dc.w    12,2            ;LEFT+TOPEDGE
  3969.         dc.l    Topaz            ;FONT
  3970.         dc.l    RightText1        ;TEXT
  3971.         dc.l    0            ;NEXTTEXT
  3972.  
  3973. AnyKeyTxt1:    dc.b    1,2            ;PENS
  3974.         dc.w    4            ;MODE
  3975.         dc.w    12,2            ;LEFT+TOPEDGE
  3976.         dc.l    Topaz            ;FONT
  3977.         dc.l    AnyKeyText1        ;TEXT
  3978.         dc.l    0            ;NEXTTEXT
  3979.  
  3980. AgainTxt1:    dc.b    1,2            ;PENS
  3981.         dc.w    4            ;MODE
  3982.         dc.w    12,2            ;LEFT+TOPEDGE
  3983.         dc.l    Topaz            ;FONT
  3984.         dc.l    AgainText1        ;TEXT
  3985.         dc.l    0            ;NEXTTEXT
  3986.  
  3987. Num1Txt1:    dc.b    1,2            ;PENS
  3988.         dc.w    4            ;MODE
  3989.         dc.w    2,0            ;LEFT+TOPEDGE
  3990.         dc.l    Topaz            ;FONT
  3991.         dc.l    Num1Text1        ;TEXT
  3992.         dc.l    Num2Txt1        ;NEXTTEXT
  3993.  
  3994. Num2Txt1:    dc.b    1,2            ;PENS
  3995.         dc.w    4            ;MODE
  3996.         dc.w    2,10            ;LEFT+TOPEDGE
  3997.         dc.l    Topaz            ;FONT
  3998.         dc.l    Num2Text1        ;TEXT
  3999.         dc.l    Num3Txt1        ;NEXTTEXT
  4000.  
  4001. Num3Txt1:    dc.b    1,2            ;PENS
  4002.         dc.w    4            ;MODE
  4003.         dc.w    2,20            ;LEFT+TOPEDGE
  4004.         dc.l    Topaz            ;FONT
  4005.         dc.l    Num3Text1        ;TEXT
  4006.         dc.l    Num4Txt1        ;NEXTTEXT
  4007.  
  4008. Num4Txt1:    dc.b    1,2            ;PENS
  4009.         dc.w    4            ;MODE
  4010.         dc.w    2,30            ;LEFT+TOPEDGE
  4011.         dc.l    Topaz            ;FONT
  4012.         dc.l    Num4Text1        ;TEXT
  4013.         dc.l    Num5Txt1        ;NEXTTEXT
  4014.  
  4015. Num5Txt1:    dc.b    1,2            ;PENS
  4016.         dc.w    4            ;MODE
  4017.         dc.w    2,40            ;LEFT+TOPEDGE
  4018.         dc.l    Topaz            ;FONT
  4019.         dc.l    Num5Text1        ;TEXT
  4020.         dc.l    Num6Txt1        ;NEXTTEXT
  4021.  
  4022. Num6Txt1:    dc.b    1,2            ;PENS
  4023.         dc.w    4            ;MODE
  4024.         dc.w    2,50            ;LEFT+TOPEDGE
  4025.         dc.l    Topaz            ;FONT
  4026.         dc.l    Num6Text1        ;TEXT
  4027.         dc.l    Num7Txt1        ;NEXTTEXT
  4028.  
  4029. Num7Txt1:    dc.b    1,2            ;PENS
  4030.         dc.w    4            ;MODE
  4031.         dc.w    2,60            ;LEFT+TOPEDGE
  4032.         dc.l    Topaz            ;FONT
  4033.         dc.l    Num7Text1        ;TEXT
  4034.         dc.l    Num8Txt1        ;NEXTTEXT
  4035.  
  4036. Num8Txt1:    dc.b    1,2            ;PENS
  4037.         dc.w    4            ;MODE
  4038.         dc.w    2,70            ;LEFT+TOPEDGE
  4039.         dc.l    Topaz            ;FONT
  4040.         dc.l    Num8Text1        ;TEXT
  4041.         dc.l    Num9Txt1        ;NEXTTEXT
  4042.  
  4043. Num9Txt1:    dc.b    1,2            ;PENS
  4044.         dc.w    4            ;MODE
  4045.         dc.w    2,80            ;LEFT+TOPEDGE
  4046.         dc.l    Topaz            ;FONT
  4047.         dc.l    Num9Text1        ;TEXT
  4048.         dc.l    Num10Txt1        ;NEXTTEXT
  4049.  
  4050. Num10Txt1:    dc.b    1,2            ;PENS
  4051.         dc.w    4            ;MODE
  4052.         dc.w    2,90            ;LEFT+TOPEDGE
  4053.         dc.l    Topaz            ;FONT
  4054.         dc.l    Num10Text1        ;TEXT
  4055.         dc.l    0            ;NEXTTEXT
  4056.  
  4057. ScoreTxt1:    dc.b    1,2            ;PENS
  4058.         dc.w    4            ;MODE
  4059.         dc.w    2,0            ;LEFT+TOPEDGE
  4060.         dc.l    Topaz            ;FONT
  4061.         dc.l    ScoreText1        ;TEXT
  4062.         dc.l    0            ;NEXTTEXT
  4063.  
  4064. NumQTxt1:    dc.b    1,2            ;PENS
  4065.         dc.w    4            ;MODE
  4066.         dc.w    2,0            ;LEFT+TOPEDGE
  4067.         dc.l    Topaz            ;FONT
  4068.         dc.l    NumQText1        ;TEXT
  4069.         dc.l    0            ;NEXTTEXT
  4070.  
  4071. TimerTxt1:    dc.b    1,2            ;PENS
  4072.         dc.w    4            ;MODE
  4073.         dc.w    2,0            ;LEFT+TOPEDGE
  4074.         dc.l    Topaz            ;FONT
  4075.         dc.l    TimerText1        ;TEXT
  4076.         dc.l    0            ;NEXTTEXT
  4077.  
  4078. TimerTxt2:    dc.b    1,2            ;PENS
  4079.         dc.w    4            ;MODE
  4080.         dc.w    0,0            ;LEFT+TOPEDGE
  4081.         dc.l    Topaz            ;FONT
  4082.         dc.l    TimerText3        ;TEXT
  4083.         dc.l    0            ;NEXTTEXT
  4084.  
  4085. MoveTxt1:    dc.b    1,2            ;PENS
  4086.         dc.w    4            ;MODE
  4087.         dc.w    83,0            ;LEFT+TOPEDGE
  4088.         dc.l    Topaz            ;FONT
  4089.         dc.l    MoveText1        ;TEXT
  4090.         dc.l    OneTxt1            ;NEXTTEXT
  4091.  
  4092. OneTxt1:    dc.b    1,2            ;PENS
  4093.         dc.w    4            ;MODE
  4094.         dc.w    244,0            ;LEFT+TOPEDGE
  4095.         dc.l    Topaz            ;FONT
  4096.         dc.l    OneText1        ;TEXT
  4097.         dc.l    AllTxt1            ;NEXTTEXT
  4098.  
  4099. AllTxt1:    dc.b    1,2            ;PENS
  4100.         dc.w    4            ;MODE
  4101.         dc.w    341,0            ;LEFT+TOPEDGE
  4102.         dc.l    Topaz            ;FONT
  4103.         dc.l    AllText1        ;TEXT
  4104.         dc.l    0            ;NEXTTEXT
  4105.  
  4106. SelectTxt1:    dc.b    1,2            ;PENS
  4107.         dc.w    4            ;MODE
  4108.         dc.w    0,0            ;LEFT+TOPEDGE
  4109.         dc.l    Topaz            ;FONT
  4110.         dc.l    SelectText1        ;TEXT
  4111.         dc.l    0            ;NEXTTEXT
  4112.  
  4113.         dc.b    "$VER: Questions 0.99e",0
  4114.  
  4115. NoMemText1:    dc.b    "Out of memory, can't load!",0
  4116. NoQuesText1:    dc.b    "There aren't any questions",0
  4117. FWrongText1:    dc.b    "Not a question-answer file!",0
  4118. DoItText1:    dc.b    "Are you sure?",0
  4119.  
  4120. OKText1:    dc.b    "OK",0
  4121. CancelText1:    dc.b    "CANCEL!",0
  4122.  
  4123. WrongText1:    dc.b    "Wrong!",0
  4124. RightText1:    dc.b    "Correct",0
  4125. AnyKeyText1:    dc.b    "Press any key",0
  4126. AgainText1:    dc.b    "Try again? (Y/N)",0
  4127.  
  4128. Num1Text1:    dc.b    "01.",0
  4129. Num2Text1:    dc.b    "02.",0
  4130. Num3Text1:    dc.b    "03.",0
  4131. Num4Text1:    dc.b    "04.",0
  4132. Num5Text1:    dc.b    "05.",0
  4133. Num6Text1:    dc.b    "06.",0
  4134. Num7Text1:    dc.b    "07.",0
  4135. Num8Text1:    dc.b    "08.",0
  4136. Num9Text1:    dc.b    "09.",0
  4137. Num10Text1:    dc.b    "10.",0
  4138.  
  4139. MoveText1:    dc.b    "Move",0
  4140. OneText1:    dc.b    "One",0
  4141. AllText1:    dc.b    "All",0
  4142.  
  4143. TimerText1:    dc.b    "Timer: "
  4144. TimerText2:    dc.b    "  0",0
  4145. TimerText3:    dc.b    "Timer: No",0
  4146.  
  4147. NumQText1:    dc.b    "No.  of  questions "
  4148. NumQText2:    dc.b    "    0",0
  4149.  
  4150. ScoreText1:    dc.b    "Score "
  4151. ScoreText2:    dc.b    "    0 "
  4152. ScoreText3:    dc.b    "out of "
  4153. ScoreText4:    dc.b    "    0",0
  4154. fstrl:        dc.b    "%5.d",0
  4155.  
  4156. SelectText1:    dc.b    "Please select option:",0
  4157.  
  4158. AboutText1:    dc.b    "   Questions -The Amiga version-",0
  4159. AboutText2:    dc.b    "           v.0.99e  by",0
  4160. AboutText3:    dc.b    "         Tomi Blinnikka",0
  4161. AboutText4:    dc.b    "        (C)opyright 1991",0
  4162.         ds.l    0
  4163.  
  4164. ;Gadget buffers
  4165.  
  4166. MenuBarName:    dc.b    "Name: "
  4167. NameGad1Buf:    dcb.b    NameLeng,0
  4168.  
  4169. DesStr1Buf:    dcb.b    LineLeng,0
  4170. DesStr2Buf:    dcb.b    LineLeng,0
  4171. QueStr1Buf:    dcb.b    LineLeng,0
  4172. QueStr2Buf:    dcb.b    LineLeng,0
  4173. MulStr1Buf:    dcb.b    LineLeng,0
  4174. MulStr2Buf:    dcb.b    LineLeng,0
  4175. MulStr3Buf:    dcb.b    LineLeng,0
  4176. MulStr4Buf:    dcb.b    LineLeng,0
  4177. MulStr5Buf:    dcb.b    LineLeng,0
  4178. MulStr6Buf:    dcb.b    LineLeng,0
  4179. MulStr7Buf:    dcb.b    LineLeng,0
  4180. MulStr8Buf:    dcb.b    LineLeng,0
  4181. MulStr9Buf:    dcb.b    LineLeng,0
  4182. MulStr10Buf:    dcb.b    LineLeng,0
  4183. AStrGad1Buf:    dcb.b    AnsLeng,0
  4184.  
  4185. GadUnBuf:    dcb.b    QueLeng,0
  4186.         ds.l    0
  4187.  
  4188. SysPrefsBuf:    dcb.b    120,0
  4189.  
  4190.         Section    Q,DATA,CHIP
  4191.  
  4192.         ds.l    0
  4193.  
  4194. ClockPointer1:    dc.w    0,0
  4195.         dc.l    $40007C0
  4196.         dc.l    $7C0
  4197.         dc.l    $1000380
  4198.         dc.l    $7E0
  4199.         dc.l    $7C01FF8
  4200.         dc.l    $1FF03FEC
  4201.         dc.l    $3FF87FDE
  4202.         dc.l    $3FF87FBE
  4203.         dc.l    $7FFCFF7F
  4204.         dc.l    $7EFCFFFF
  4205.         dc.l    $7FFCFFFF
  4206.         dc.l    $3FF87FFE
  4207.         dc.l    $3FF87FFE
  4208.         dc.l    $1FF03FFC
  4209.         dc.l    $7C01FF8
  4210.         dc.l    $7E0
  4211.         dc.w    0,0
  4212.         dc.w    0,0        ;Just in case
  4213.  
  4214.         END
  4215.  
  4216. ;GADGETDOWN+GADGETUP+
  4217.  
  4218. ;turn on menu bar
  4219.  
  4220. ;        move.l    Screen1,a0
  4221. ;        move.l    #$01,d0
  4222. ;        lib    Intuition,ShowTitle
  4223.  
  4224.  
  4225. ;turn off menu bar
  4226.  
  4227. ;        move.l    Screen1,a0
  4228. ;        move.l    #$00,d0
  4229. ;        lib    Intuition,ShowTitle
  4230.  
  4231.