home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / njchim.zip / NJCHIME.ASM < prev    next >
Assembly Source File  |  1988-06-21  |  18KB  |  798 lines

  1.  
  2.  
  3. ; NJCHIME.ASM
  4.  
  5. ; Nifty James' Famous Chimer Program
  6. ; Version 1.00 of 31 June 1988
  7.  
  8. ; (C) Copyright 1988 by Mike "Nifty James" Blaszczak
  9. ; All Rights Reserved
  10.  
  11.  
  12. ;    ASCII codes
  13.  
  14. tab    equ    9
  15. lf    equ    10        ; linefeed
  16. cr    equ    13        ; carriage return
  17. slash    equ    '/'        ; slash
  18. dash    equ    '-'        ; minus
  19. eos    equ    '$'        ; end of string
  20.  
  21. ;    DOS Interrupt Functions
  22.  
  23. PrintString    equ    009h        ; print a '$'-terminated string
  24. SetVec    equ    025h        ; set an interrupt vector
  25. GetTime    equ    02Ch        ; get the system time
  26. KeepProc           equ    031h            ; keep this process resident
  27. GetVec    equ    035h        ; get an interrupt vector
  28. WriteHandle    equ    040h        ; Write to a handle or device
  29. Terminate    equ    04Ch        ; exit with ERRORLEVEL
  30.  
  31. ;    Interrupt Numbers
  32.  
  33. ClockTick    equ    01Ch
  34. DOSINT    equ    021h
  35.  
  36. ;    I/O Port Numbers
  37.  
  38. TimerPort    equ    042h        ; 8253 timer data latch port
  39. TimerCtrl    equ    043h        ; 8253 timer control port
  40. SpeakerPort    equ    061h
  41. SpkrMaskOff    equ    011111100b    ; Maks to turn speaker off
  42. SpkrMaskOn    equ    000000011b    ; Mask to turn speaker on
  43.  
  44. ;    General Constants
  45.  
  46. BongTime    equ    15        ; bong 5/6 ths of a second
  47. BongRest    equ    15        ; rest 5/6 ths between each bong
  48.  
  49. Middle_C    equ    2280
  50. Treble_D    equ    2032
  51. Treble_E    equ    1810
  52. Treble_F    equ    1708
  53. Treble_G    equ    1522
  54. Treble_A    equ    1356
  55. Treble_B    equ    1208
  56. Upper_C    equ    1140
  57. Upper_D    equ    1016
  58. Upper_E    equ    905
  59. Upper_F    equ    854
  60.  
  61.  
  62. code    segment    para public 'CODE'
  63.     assume es:nothing, ds:nothing, ss:nothing, cs:code
  64.  
  65.     org    100h
  66. OfTheWorldAsWeKnowIt:
  67.     jmp    OverResident
  68.  
  69.     dw    156 dup (0)
  70.     dw    0
  71.     dw    0
  72.     dw    0    ; padding
  73.     dw    0
  74.  
  75. t_hours    db    ?
  76. t_minutes    db    ?
  77. t_ticks    dw    ?
  78.  
  79. TicksMinute    equ    1092    ; (18.2*60)
  80. Ticks57Seconds    equ    1026    ; (18.2*57)
  81.  
  82. Resting    db    0
  83. RestDuration    db    0
  84.  
  85. Bonging    db    0
  86. BongCount    db    0
  87. BongResting    db    0
  88. BongDuration    db    0
  89.  
  90. Playing    db    0
  91. Duration    db    0
  92.  
  93. NotePointer    dw    0
  94.  
  95. Pacing    db    0
  96.  
  97. WorkCount    db    0    ; length of this note
  98. Working    db    0    ; set to one if we are playing a note
  99. Selection    db    0    ; which chimeset we're playing
  100.  
  101. QuarterOffset    dw    0
  102. HalfOffset    dw    0
  103. ThreesOffset    dw    0
  104. HourOffset    dw    0
  105.  
  106.  
  107. OldTimerVec    label    dword    ; the old tick vector
  108. OldTimerVecO    dw    ?
  109. OldTimerVecS    dw    ?
  110.  
  111.     assume    cs:code, ds:nothing, es:nothing, ss:nothing
  112.     dw    'NJ'            ; signature
  113. Handler:
  114.     pushf
  115.     push    ax
  116.     push    bx
  117.     push    cx
  118.  
  119.     push    ds
  120.     push    cs
  121.     pop    ds
  122.  
  123.     assume    cs:code, ds:code, es:nothing, ss:nothing
  124.  
  125.     mov    ax,t_ticks    ; increment our divide by 18 count
  126.     inc    ax
  127.     cmp    ax,TicksMinute
  128.     mov    t_ticks,ax
  129.     jne    FallOut        ; if it's not 18, return
  130.  
  131.     xor    ax,ax        ; zero the eighteen count
  132.     mov    t_ticks,ax
  133.  
  134. FixMinutes:    mov    al,t_minutes    ; increment minutes
  135.     inc    al
  136.     mov    t_minutes,al    ; is it 60 minutes?
  137.     cmp    al,60
  138.     jne    FallOut        ; nope, skip all that
  139.  
  140.     xor    al,al
  141.  
  142.     mov    t_minutes,al
  143.     inc    t_hours
  144.  
  145. ; ---------------------------------------------------------------------------
  146.  
  147. FallOut:    mov    al,Playing    ; are we playing a note?
  148.     and    al,al
  149.     je    NotPlaying
  150.  
  151.     dec    Duration    ; decrement the duration
  152.     je    NoteOver
  153.  
  154. ReturnHome:    pop    ds
  155.     pop    cx
  156.     pop    bx
  157.     pop    ax
  158.     popf
  159.     jmp    cs:[OldTimerVec]
  160.  
  161. NoteOver:    in    al,SpeakerPort    ; stop the speaker, the note is done
  162.     and    al,SpkrMaskOff
  163.     out    SpeakerPort,al
  164.  
  165.     mov    al,1
  166.     mov    Resting,al    ; set resting flag
  167.     dec    al
  168.     mov    Playing,al    ; reset note-playing flag
  169.     jmp    short ReturnHome
  170.  
  171. NotPlaying:    mov    al,Resting    ; check and see if we're playing
  172.     and    al,al        ;    a rest
  173.     jne    WereResting
  174.     jmp    NotResting
  175.  
  176. WereResting:    dec    RestDuration    ; decrement the rest duration
  177.     jne    ReturnHome
  178.  
  179.     push    si
  180.     mov    ax,NotePointer
  181.     mov    si,ax
  182.     add    ax,4
  183.     mov    NotePointer,ax    ; increment the note pointer - store it
  184.     mov    ax,[si]        ; get this note
  185.  
  186.     cmp    ax,0FFFFh    ; is it the last one?
  187.     je    GotLastNote
  188.  
  189.     out    TimerPort,al
  190.     xchg    ah,al
  191.     out    TimerPort,al    ; set the frequency
  192.  
  193.     in    al,SpeakerPort
  194.     or    al,SpkrMaskOn
  195.     out    SpeakerPort,al    ; set the speaker on
  196.  
  197.     add    si,2        ; get the note duration
  198.     mov    ax,[si]        ;  and rest duration
  199.     mov    Duration,al
  200.     mov    RestDuration,ah
  201.     pop    si        ; restore old SI
  202.  
  203.     mov    al,1
  204.     mov    Playing,al    ; turn Playing on
  205.     dec    al        ; turn Resting off
  206.     mov    Resting,al
  207. WayBackHome:    jmp    short ReturnHome    ; and boogie
  208.  
  209.  
  210. GotLastNote:    pop    si        ; restore SI register
  211.  
  212.     mov    al,0
  213.     mov    Playing,al
  214.     mov    Resting,al    ; neither playing nor resting
  215.  
  216.     mov    al,Selection    ; are we just chirping?
  217.     and    al,al
  218.     je    ReturnHome    ; yes ... don't bong
  219.  
  220.     mov    al,t_minutes
  221.     mov    ah,1        ; one bong for the
  222.     cmp    al,30        ; half hour?
  223.     je    DoBong
  224.     mov    ah,t_hours    ; hour bongs for the
  225.     cmp    ah,12        ; adjust it?
  226.     jle    noadjust
  227.     sub    ah,12
  228.  
  229. noadjust:    and    al,al        ; top of hour?
  230.     jne    WayBackHome    ; nope ... return home
  231.  
  232. DoBong:    mov    BongCount,ah    ; store the count
  233. DoBongAgain:    mov    ax,5424        ; bong at 220Hz
  234.     out    TimerPort,al
  235.     xchg    al,ah
  236.     out    TimerPort,al    ; send it to the timer
  237.  
  238.     in    al,SpeakerPort
  239.     or    al,SpkrMaskOn
  240.     out    SpeakerPort,al    ; set the speaker on
  241.  
  242.     mov    al,BongTime    ; bong for 5/6ths of a second
  243.     mov    Bonging,al    ; set the bonging flag
  244.     mov    BongDuration,al    ; set duration
  245.     mov    al,0
  246.     mov    Playing,al    ; turn playing off
  247.     mov    Resting,al    ; turn resting off
  248.     jmp    WayBackHome
  249.  
  250. NotResting:    mov    al,Bonging    ; are we bonging?
  251.     and    al,al
  252.     je    NotBonging
  253.  
  254.     dec    BongDuration
  255.     jne    WayBackHome
  256.  
  257.     in    al,SpeakerPort
  258.     and    al,SpkrMaskOff
  259.     out    SpeakerPort,al    ; turn speaker off
  260.  
  261.     mov    al,BongRest
  262.     mov    BongResting,al    ; setup bong pause length (1/6th)
  263.     mov    BongDuration,al    ;set bong pausing
  264.  
  265.     mov    al,0
  266.     mov    Bonging,al    ; set bonging to zero
  267. OnWayBackHome:    jmp    short WayBackHome
  268.  
  269.  
  270. NotBonging:    mov    al,BongResting    ; are we bong resting?
  271.     and    al,al
  272.     je    NotBongResting
  273.  
  274.     dec    BongDuration    ; decrement duration
  275.     jne    WayBackHome
  276.  
  277.     mov    al,0        ; set bonging flag to zero
  278.     mov    BongResting,al
  279.  
  280.     dec    BongCount    ; decrement the bong count
  281.     jne    DoBongAgain
  282.  
  283.     mov    al,0
  284.     mov    Bonging,al
  285.     je    OnWayBackHome
  286.  
  287. NotBongResting:
  288.     mov    ax,t_ticks    ; see if we're at a 1 second
  289.     mov    cl,18        ; interval
  290.     div    cl
  291.     and    ah,ah        ; zero?
  292.     jne    OnWayBackHome
  293.  
  294.     mov    al,Selection    ; see what kind of thing we should do
  295.     and    al,al
  296.     je    Chirping
  297.  
  298.     mov    ax,t_ticks
  299.     cmp    ax,20        ; is it in the first second?
  300.     jge    OnWayBackHome    ; nope, get out of here
  301.  
  302.     mov    al,t_minutes    ; get minutes count
  303.     mov    bx,HourOffset
  304.     and    al,al
  305.     je    DoIt
  306.  
  307.     mov    bx,QuarterOffset
  308.     cmp    al,15
  309.     je    DoIt
  310.  
  311.     mov    bx,HalfOffset
  312.     cmp    al,30
  313.     je    DoIt
  314.  
  315.     mov    bx,ThreesOffset
  316.     cmp    al,45
  317.     je    DoIt
  318.     jne    OnWayBackHome
  319.  
  320. DoIt:    mov    NotePointer,bx
  321.     mov    ah,1
  322.     mov    Playing,ah
  323.     mov    ax,[bx]        ; get the note
  324.     out    TimerPort,al
  325.     xchg    al,ah
  326.     out    TimerPort,al    ; set up the timing
  327.  
  328.     add    bx,2
  329.     in    al,SpeakerPort
  330.     or    al,SpkrMaskOn
  331.     out    SpeakerPort,al
  332.  
  333.     mov    ax,[bx]        ; get rest and duration
  334.     add    bx,2
  335.     mov    NotePointer,bx    ; but save the note pointer first
  336.  
  337.     mov    Duration,al
  338.     mov    RestDuration,ah
  339. GetBack:    jmp    ReturnHome
  340.  
  341.  
  342. Chirping:    mov    al,t_minutes    ; is minutes == 59
  343.     cmp    al,59
  344.     jne    GetBack
  345.  
  346.     mov    ax,t_ticks
  347.     cmp    ax,Ticks57Seconds
  348.     jne    GetBack
  349.  
  350.     mov    bx,005Ch
  351.     jmp    DoIt
  352.  
  353. LastResident:        
  354.  
  355. ; ---------------------------------------------------------------------------
  356.  
  357. OverResident:
  358.     assume es:code, ds:code, ss:code, cs:code
  359.  
  360.     mov    dx,offset Banner    ; tell 'em who you are
  361.     mov    cx,BannerLen
  362.     call    ShowMessage
  363.  
  364.     mov    ah,GetVec        ; are we already installed?
  365.     mov    al,ClockTick
  366.     int    DOSINT
  367.  
  368.     assume es:nothing, ds:code, ss:code, cs:code
  369.  
  370.     mov    OldTimerVecS,es        ; save the vector
  371.     mov    OldTimerVecO,bx
  372.     dec    bx
  373.     dec    bx
  374.     cmp    es:[bx],'NJ'
  375.     jne    NotAlready
  376.  
  377.     mov    dx,offset Already    ; already installed, error!
  378.     mov    cx,AlreadyLen
  379.     call    ShowMessage
  380. BadGo:    mov    ah,Terminate
  381.     mov    al,1
  382.     int    DOSINT
  383.  
  384. NotAlready:    mov    si,080h            ; look at the command line
  385.  
  386. CommLoop:    inc    si
  387.     mov    al,[si]
  388.     cmp    al,cr            ; is it end of line?
  389.     je    CommLooped
  390.     cmp    al,slash        ; is it an option?
  391.     je    GotOption
  392.     cmp    al,dash
  393.     jne    CommLoop
  394.  
  395. GotOption:    inc    si
  396.     mov    al,[si]            ; get the option char
  397.     cmp    al,cr
  398.     je    CommLooped
  399.     cmp    al,'m'            ; is it the mode option?
  400.     je    GotMOption
  401.     cmp    al,'M'
  402.     je    GotMOption
  403.  
  404. ShowUsage:    mov    dx,offset Usage
  405.     mov    cx,UsageLen
  406.     call    ShowMessage
  407.  
  408.     mov    ah,Terminate
  409.     mov    al,1
  410.     int    021h
  411.  
  412. GotMOption:    inc    si            ; get parameter
  413.     mov    al,[si]
  414.     cmp    al,cr
  415.     je    CommLooped
  416.  
  417.     sub    al,'0'
  418.     cmp    al,3
  419.     jg    ShowUsage        ; error if it is out of range
  420.  
  421.     mov    Selection,al
  422.     jmp    CommLoop        ; loop back for more
  423.  
  424.  
  425.  
  426. CommLooped:
  427.     mov    ah,GetTime        ; Get our copy of the system
  428.     int    DOSINT            ; time initialized
  429.     mov    t_hours,ch
  430.            mov    t_minutes,cl
  431.  
  432.     mov    al,dh
  433.     mov    ah,0
  434.     mov    cl,18
  435.     mul    cl
  436.     mov    t_ticks,ax
  437.  
  438.     mov    al,dl            ; make hundreths into ticks
  439.                    cbw
  440.     mov    cl,5            ; 1 tick = 5 hundreths 
  441.     div    cl
  442.     mov    ah,0
  443.                    add    t_ticks,ax
  444.  
  445.     mov    ah,SetVec        ; set up our int vector
  446.     mov    al,ClockTick
  447.     mov    dx,offset Handler
  448.     int    DOSINT
  449.  
  450.     mov    dx,offset Installed    ; print installed message
  451.     mov    cx,InstalledLen
  452.                    call    ShowMessage
  453.  
  454.     mov    al,Selection
  455.     cbw
  456.     shl    ax,1
  457.     mov    si,offset ChimePtrs
  458.     add    si,ax
  459.     mov    si,[si]
  460.     mov    di,05Ch
  461.     mov    bx,offset QuarterOffset
  462.  
  463. BunchLoop:    mov    [bx],di        ; save pointer to this one
  464.     inc    bx
  465.     inc    bx
  466.  
  467. MoveLoop:    mov    ax,[si]
  468.     mov    [di],ax        ; move this word
  469.     inc    si
  470.     inc    si        ; up pointers
  471.     inc    di
  472.     inc    di
  473.  
  474.     cmp    ax,0FFFFh    ; is it the end of this batch?
  475.     jne    NotTheEnd
  476.  
  477.     mov    ax,[si]        ; see if its the complete end
  478.     and    ax,ax
  479.     je    DoneMoving
  480.     jne    BunchLoop    ; nope ... move the next bunch
  481.  
  482. NotTheEnd:    mov    ax,[si]
  483.     mov    [di],ax        ; move the next words
  484.     inc    si
  485.     inc    si
  486.     inc    di
  487.     inc    di
  488.     jne    MoveLoop    ; move more
  489.     
  490.  
  491. DoneMoving:    mov    si,offset SelectionPtrs ; print selection title
  492.     mov    al,Selection
  493.     cbw
  494.     shl    ax,1
  495.     add    si,ax
  496.                    mov    dx,[si]
  497.     mov    ah,PrintString
  498.     int    DOSINT
  499.  
  500.                    mov    ah,KeepProc             ; now we'll TSR
  501.                    mov    al,0                    ; with no ERRORLEVEL
  502.                    mov    dx,offset LastResident
  503.                    add    dx,15                   ; round size up
  504.                    mov    cl,4
  505.                    shr    dx,cl
  506.                    int    DOSINT
  507.  
  508. ; ---------------------------------------------------------------------------
  509.  
  510. ShowMessage    proc    near
  511.  
  512.     push    ax
  513.     push    bx
  514.  
  515.     mov    ah,WriteHandle        ; write it to stdout
  516.     mov    bx,1
  517.     int    DOSINT
  518.  
  519.                    pop    bx
  520.     pop    ax
  521.     ret
  522. ShowMessage    endp
  523.  
  524. ; ---------------------------------------------------------------------------
  525.  
  526. Banner    db    lf,"Nifty James' Famous Chimer Program",cr,lf
  527.     db    "Version 1.00 of 30 March 1988",cr,lf
  528.     db    "(C) Copyright 1988 by Mike Blaszczak",cr,lf
  529. BannerLen    equ    this byte - Banner
  530.  
  531. Already    db    lf,"NJCHIME was already installed!",cr,lf
  532. AlreadyLen    equ    this byte - Already
  533.  
  534. Installed    db    lf,"NJCHIME has been installed to play "
  535. InstalledLen    equ    this byte - Installed
  536.  
  537. Usage    db    cr,lf,"Usage:",cr,lf
  538.     db    tab,"NJCHIME [/M<mode>]",cr,lf,lf
  539.     db    tab,"Mode is the chime to be played.",cr,lf,lf
  540.     db    tab,"Mode 0 - Time Tones (default)",cr,lf
  541.     db    tab,"Mode 1 - Westminster Chimes",cr,lf
  542.     db    tab,"Mode 2 - Saint Michael Chimes",cr,lf
  543.     db    tab,"Mode 3 - Whittington Chimes",cr,lf,lf
  544. UsageLen    equ    this byte - Usage
  545.  
  546. SelectionPtrs    dw    offset    TimeTones
  547.     dw    offset    Westminster
  548.     dw    offset    StMichael
  549.     dw    offset    Whittington
  550.  
  551. ChimePtrs    dw    offset    TimerChime
  552.     dw    offset    WestMinsterChime
  553.     dw    offset    SaintMichaelChime
  554.     dw    offset    WhittingtonChime
  555.  
  556. TimeTones    db    "Time Tones.",cr,lf,eos
  557. Westminster    db    "Westminster Chimes.",cr,lf,eos
  558. StMichael    db    "Saint Michael's Chimes.",cr,lf,eos
  559. Whittington    db    "Whittington Chimes.",cr,lf,eos
  560.  
  561. NoteStruc    struc
  562.     divisor    dw    ?
  563.     duration    db    ?
  564.     intrarest    db    ?
  565. NoteStruc    ends
  566.  
  567. TimerChime    NoteStruc    <0254h, 3, 15>
  568.     NoteStruc    <0254h, 3, 15>
  569.     NoteStruc    <0254h, 3, 15>
  570.     NoteStruc    <04A8h, 10, 8>
  571.     dw        0FFFFh
  572.     dw        00000h
  573.  
  574. WestMinsterChime    NoteStruc    <Upper_E,14, 4>
  575.     NoteStruc    <Upper_D,14, 4>
  576.     NoteStruc    <Upper_C,14, 4>
  577.     NoteStruc    <Treble_G,14, 2>
  578.     dw        0FFFFh
  579.     NoteStruc    <Upper_C,14, 4>
  580.     NoteStruc    <Upper_E,14, 4>
  581.     NoteStruc    <Upper_D,14, 4>
  582.     NoteStruc    <Treble_G,14, 4>
  583.     NoteStruc    <Upper_C,14, 4>
  584.     NoteStruc    <Upper_D,14, 4>
  585.     NoteStruc    <Upper_E,14, 4>
  586.     NoteStruc    <Upper_C,14, 4>
  587.     dw        0FFFFh
  588.     NoteStruc    <Treble_E,14, 4>
  589.     NoteStruc    <Upper_C,14, 4>
  590.     NoteStruc    <Upper_D,14, 4>
  591.     NoteStruc    <Treble_G,14, 4>
  592.     NoteStruc    <Treble_G,14, 4>
  593.     NoteStruc    <Upper_D,14, 4>
  594.     NoteStruc    <Upper_E,14, 4>
  595.     NoteStruc    <Upper_C,14, 4>
  596.     NoteStruc    <Upper_D,14, 4>
  597.     NoteStruc    <Upper_C,14, 4>
  598.     NoteStruc    <Treble_B,14, 4>
  599.     NoteStruc    <Treble_G,14, 4>
  600.     dw        0FFFFh
  601.     NoteStruc    <Upper_C,14, 4>
  602.     NoteStruc    <Upper_E,14, 4>
  603.     NoteStruc    <Upper_D,14, 4>
  604.     NoteStruc    <Treble_G,14, 4>
  605.     NoteStruc    <Upper_C,14, 4>
  606.     NoteStruc    <Upper_D,14, 4>
  607.     NoteStruc    <Upper_E,14, 4>
  608.     NoteStruc    <Upper_C,14, 4>
  609.     NoteStruc    <Upper_E,14, 4>
  610.     NoteStruc    <Upper_C,14, 4>
  611.     NoteStruc    <Upper_D,14, 4>
  612.     NoteStruc    <Treble_G,14, 4>
  613.     NoteStruc    <Treble_G,14, 4>
  614.     NoteStruc    <Upper_D,14, 4>
  615.     NoteStruc    <Upper_E,14, 4>
  616.     NoteStruc    <Upper_C,14, 4>
  617.     dw        0FFFFh
  618.     dw        00000h
  619.  
  620.  
  621. SaintMichaelChime    NoteStruc    <Upper_F, 7, 2>
  622.     NoteStruc    <Upper_E , 7, 2>
  623.     NoteStruc    <Upper_D , 7, 2>
  624.     NoteStruc    <Upper_C , 7, 2>
  625.     NoteStruc    <Treble_B, 7, 2>
  626.     NoteStruc    <Treble_A, 7, 2>
  627.     NoteStruc    <Treble_G, 7, 2>
  628.     NoteStruc    <Treble_F, 7, 2>
  629.     dw        0FFFFh
  630.     NoteStruc    <Upper_F , 7, 2>
  631.     NoteStruc    <Treble_G, 7, 2>
  632.     NoteStruc    <Treble_A, 7, 2>
  633.     NoteStruc    <Treble_B, 7, 2>
  634.     NoteStruc    <Upper_E , 7, 2>
  635.     NoteStruc    <Upper_C , 7, 2>
  636.     NoteStruc    <Upper_D , 7, 2>
  637.     NoteStruc    <Treble_F, 7, 2>    ;
  638.     NoteStruc    <Upper_C , 7, 2>
  639.     NoteStruc    <Treble_B, 7, 2>
  640.     NoteStruc    <Treble_A, 7, 2>
  641.     NoteStruc    <Upper_D , 7, 2>
  642.     NoteStruc    <Treble_G, 7, 2>
  643.     NoteStruc    <Upper_E , 7, 2>
  644.     NoteStruc    <Upper_F , 7, 2>
  645.     NoteStruc    <Treble_F, 7, 2>    ;
  646.     dw        0FFFFh
  647.     NoteStruc    <Upper_E , 7, 2>
  648.     NoteStruc    <Upper_F , 7, 2>
  649.     NoteStruc    <Treble_A, 7, 2>
  650.     NoteStruc    <Treble_B, 7, 2>
  651.     NoteStruc    <Treble_G, 7, 2>
  652.     NoteStruc    <Upper_C , 7, 2>
  653.     NoteStruc    <Upper_D , 7, 2>
  654.     NoteStruc    <Treble_F, 7, 2>    ;
  655.     NoteStruc    <Upper_C , 7, 2>
  656.     NoteStruc    <Upper_E , 7, 2>
  657.     NoteStruc    <Treble_A, 7, 2>
  658.     NoteStruc    <Treble_F, 7, 2>
  659.     NoteStruc    <Treble_B, 7, 2>
  660.     NoteStruc    <Treble_G, 7, 2>
  661.     NoteStruc    <Upper_D , 7, 2>
  662.     NoteStruc    <Treble_F, 7, 2>    ;
  663.     NoteStruc    <Upper_F , 7, 2>
  664.     NoteStruc    <Upper_E , 7, 2>
  665.     NoteStruc    <Upper_D , 7, 2>
  666.     NoteStruc    <Upper_C , 7, 2>
  667.     NoteStruc    <Treble_B, 7, 2>
  668.     NoteStruc    <Treble_A, 7, 2>
  669.     NoteStruc    <Treble_G, 7, 2>
  670.     NoteStruc    <Treble_F, 7, 2>    ;
  671.     dw        0FFFFh
  672.     NoteStruc    <Upper_F , 7, 2>
  673.     NoteStruc    <Treble_G, 7, 2>
  674.     NoteStruc    <Treble_A, 7, 2>
  675.     NoteStruc    <Treble_B, 7, 2>
  676.     NoteStruc    <Upper_E , 7, 2>
  677.     NoteStruc    <Upper_C , 7, 2>
  678.     NoteStruc    <Upper_D , 7, 2>
  679.     NoteStruc    <Treble_F, 7, 2>    ;
  680.     NoteStruc    <Upper_C , 7, 2>
  681.     NoteStruc    <Treble_B, 7, 2>
  682.     NoteStruc    <Treble_A, 7, 2>
  683.     NoteStruc    <Upper_D , 7, 2>
  684.     NoteStruc    <Treble_G, 7, 2>
  685.     NoteStruc    <Upper_E , 7, 2>
  686.     NoteStruc    <Upper_F , 7, 2>
  687.     NoteStruc    <Treble_F, 7, 2>    ;
  688.     NoteStruc    <Upper_E , 7, 2>
  689.     NoteStruc    <Upper_F , 7, 2>
  690.     NoteStruc    <Treble_A, 7, 2>
  691.     NoteStruc    <Treble_B, 7, 2>
  692.     NoteStruc    <Treble_G, 7, 2>
  693.     NoteStruc    <Upper_C , 7, 2>
  694.     NoteStruc    <Upper_D , 7, 2>
  695.     NoteStruc    <Treble_F, 7, 2>    ;
  696.     NoteStruc    <Upper_C , 7, 2>
  697.     NoteStruc    <Upper_E , 7, 2>
  698.     NoteStruc    <Treble_A, 7, 2>
  699.     NoteStruc    <Treble_F, 7, 2>
  700.     NoteStruc    <Treble_B, 7, 2>
  701.     NoteStruc    <Treble_G, 7, 2>
  702.     NoteStruc    <Upper_D , 7, 2>
  703.     NoteStruc    <Treble_F, 7, 2>    ;
  704.     dw        0FFFFh
  705.     dw        00000h
  706.  
  707. WhittingtonChime    NoteStruc    <Upper_D , 7, 2>
  708.     NoteStruc    <Upper_C , 7, 2>
  709.     NoteStruc    <Treble_B, 7, 2>
  710.     NoteStruc    <Treble_A, 7, 2>    ;
  711.     NoteStruc    <Treble_G, 7, 2>
  712.     NoteStruc    <Treble_F, 7, 2>
  713.     NoteStruc    <Treble_E, 7, 2>
  714.     NoteStruc    <Treble_D, 7, 2>
  715.     dw        0FFFFh
  716.     NoteStruc    <Upper_D , 7, 2>
  717.     NoteStruc    <Treble_B, 7, 2>
  718.     NoteStruc    <Treble_G, 7, 2>
  719.     NoteStruc    <Treble_E, 7, 2>    ;
  720.     NoteStruc    <Upper_C , 7, 2>
  721.     NoteStruc    <Treble_A, 7, 2>
  722.     NoteStruc    <Treble_F, 7, 2>
  723.     NoteStruc    <Treble_D, 7, 2>    ;
  724.     NoteStruc    <Treble_E, 7, 2>
  725.     NoteStruc    <Treble_F, 7, 2>
  726.     NoteStruc    <Treble_G, 7, 2>
  727.     NoteStruc    <Treble_B, 7, 2>    ;
  728.     NoteStruc    <Treble_A, 7, 2>
  729.     NoteStruc    <Upper_C , 7, 2>
  730.     NoteStruc    <Upper_D , 7, 2>
  731.     NoteStruc    <Treble_D, 7, 2>
  732.     dw        0FFFFh
  733.     NoteStruc    <Upper_D , 7, 2>
  734.     NoteStruc    <Upper_C , 7, 2>
  735.     NoteStruc    <Treble_E, 7, 2>
  736.     NoteStruc    <Treble_G, 7, 2>
  737.     NoteStruc    <Treble_B, 7, 2>
  738.     NoteStruc    <Treble_A, 7, 2>
  739.     NoteStruc    <Treble_F, 7, 2>
  740.     NoteStruc    <Treble_D, 7, 2>
  741.     NoteStruc    <Treble_E, 7, 2>
  742.     NoteStruc    <Treble_G, 7, 2>
  743.     NoteStruc    <Treble_B, 7, 2>
  744.     NoteStruc    <Upper_D , 7, 2>
  745.     NoteStruc    <Upper_C , 7, 2>
  746.     NoteStruc    <Treble_A, 7, 2>
  747.     NoteStruc    <Treble_F, 7, 2>
  748.     NoteStruc    <Treble_D, 7, 2>
  749.     NoteStruc    <Upper_D , 7, 2>
  750.     NoteStruc    <Upper_C , 7, 2>
  751.     NoteStruc    <Treble_B, 7, 2>
  752.     NoteStruc    <Treble_A, 7, 2>    ;
  753.     NoteStruc    <Treble_G, 7, 2>
  754.     NoteStruc    <Treble_F, 7, 2>
  755.     NoteStruc    <Treble_E, 7, 2>
  756.     NoteStruc    <Treble_D, 7, 2>
  757.     dw        0FFFFh
  758.     NoteStruc    <Upper_D , 7, 2>
  759.     NoteStruc    <Treble_B, 7, 2>
  760.     NoteStruc    <Treble_G, 7, 2>
  761.     NoteStruc    <Treble_E, 7, 2>    ;
  762.     NoteStruc    <Upper_C , 7, 2>
  763.     NoteStruc    <Treble_A, 7, 2>
  764.     NoteStruc    <Treble_F, 7, 2>
  765.     NoteStruc    <Treble_D, 7, 2>    ;
  766.     NoteStruc    <Treble_E, 7, 2>
  767.     NoteStruc    <Treble_F, 7, 2>
  768.     NoteStruc    <Treble_G, 7, 2>
  769.     NoteStruc    <Treble_B, 7, 2>    ;
  770.     NoteStruc    <Treble_A, 7, 2>
  771.     NoteStruc    <Upper_C , 7, 2>
  772.     NoteStruc    <Upper_D , 7, 2>
  773.     NoteStruc    <Treble_D, 7, 2>
  774.     NoteStruc    <Upper_D , 7, 2>
  775.     NoteStruc    <Upper_C , 7, 2>
  776.     NoteStruc    <Treble_E, 7, 2>
  777.     NoteStruc    <Treble_G, 7, 2>
  778.     NoteStruc    <Treble_B, 7, 2>
  779.     NoteStruc    <Treble_A, 7, 2>
  780.     NoteStruc    <Treble_F, 7, 2>
  781.     NoteStruc    <Treble_D, 7, 2>
  782.     NoteStruc    <Treble_E, 7, 2>
  783.     NoteStruc    <Treble_G, 7, 2>
  784.     NoteStruc    <Treble_B, 7, 2>
  785.     NoteStruc    <Upper_D , 7, 2>
  786.     NoteStruc    <Upper_C , 7, 2>
  787.     NoteStruc    <Treble_A, 7, 2>
  788.     NoteStruc    <Treble_F, 7, 2>
  789.     NoteStruc    <Treble_D, 7, 2>
  790.     dw        0FFFFh
  791.     dw        00000h
  792.  
  793. code    ends
  794.     end    OfTheWorldAsWeKnowIt
  795.  
  796.  
  797.  
  798.