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