home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1988-11-04 | 28.0 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: MIDI.Txt
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Swift 3D 3D Graphic (poly/swift3D3DGraphic)
| ext
| Unsupported |
1%
| dexvert
| Boost Text serialization (other/boostTextSerialization)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Fri Nov 4 21:02:16 1988, modified Fri Nov 4 21:02:16 1988, creator Think C, type ASCII, 28087 bytes "MIDI.Txt" , at 0x6e37 348 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
| |
100%
| unp64ID
| P64 Guessed entry=$0806, unpacker=$0001
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 4d 49 44 49 2e 54 | 78 74 00 00 00 00 00 00 |..MIDI.T|xt......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 6d b7 00 | 00 01 5c 9f 98 11 a8 9f |.....m..|..\.....|
|00000060| 98 11 a8 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f9 36 00 00 |........|.....6..|
|00000080| 3b 20 4c 6f 77 20 4c 65 | 76 65 6c 20 4d 49 44 49 |; Low Le|vel MIDI|
|00000090| 20 72 6f 75 74 69 6e 65 | 73 20 77 69 74 68 20 74 | routine|s with t|
|000000a0| 69 6d 65 2d 73 74 61 6d | 70 69 6e 67 0d 3b 20 57 |ime-stam|ping.; W|
|000000b0| 72 69 74 74 65 6e 20 62 | 79 20 4b 69 72 6b 20 41 |ritten b|y Kirk A|
|000000c0| 75 73 74 69 6e 20 35 2f | 31 37 2f 38 37 0d 3b 20 |ustin 5/|17/87.; |
|000000d0| 54 68 69 73 20 63 6f 64 | 65 20 69 73 20 69 6e 20 |This cod|e is in |
|000000e0| 74 68 65 20 70 75 62 6c | 69 63 20 64 6f 6d 61 69 |the publ|ic domai|
|000000f0| 6e 20 61 6e 64 20 69 73 | 20 61 62 73 6f 6c 75 74 |n and is| absolut|
|00000100| 65 6c 79 20 66 72 65 65 | 0d 3b 20 4e 6f 74 65 3a |ely free|.; Note:|
|00000110| 20 42 65 20 73 75 72 65 | 20 61 6e 64 20 74 75 72 | Be sure| and tur|
|00000120| 6e 20 6f 66 66 20 72 61 | 6e 67 65 20 63 68 65 63 |n off ra|nge chec|
|00000130| 6b 69 6e 67 20 69 6e 20 | 4c 53 20 50 61 73 63 61 |king in |LS Pasca|
|00000140| 6c 0d 3b 20 20 20 20 20 | 20 20 20 20 20 74 6f 20 |l.; | to |
|00000150| 70 72 65 76 65 6e 74 20 | 61 20 63 72 61 73 68 2e |prevent |a crash.|
|00000160| 0d 0d 3b 20 53 65 72 69 | 61 6c 20 43 68 69 70 20 |..; Seri|al Chip |
|00000170| 65 71 75 61 74 65 73 0d | 53 43 43 52 64 09 09 45 |equates.|SCCRd..E|
|00000180| 51 55 20 24 31 44 38 0d | 53 43 43 57 72 09 09 45 |QU $1D8.|SCCWr..E|
|00000190| 51 55 20 24 31 44 43 0d | 61 44 61 74 61 09 09 45 |QU $1DC.|aData..E|
|000001a0| 51 55 20 36 0d 61 43 74 | 6c 09 09 09 45 51 55 20 |QU 6.aCt|l...EQU |
|000001b0| 32 0d 62 44 61 74 61 09 | 09 45 51 55 20 34 0d 62 |2.bData.|.EQU 4.b|
|000001c0| 43 74 6c 09 09 09 45 51 | 55 20 30 0d 54 42 45 09 |Ctl...EQ|U 0.TBE.|
|000001d0| 09 09 45 51 55 20 32 0d | 0d 3b 20 49 6e 74 65 72 |..EQU 2.|.; Inter|
|000001e0| 72 75 70 74 20 76 65 63 | 74 6f 72 20 65 71 75 61 |rupt vec|tor equa|
|000001f0| 74 65 73 0d 4c 76 6c 31 | 44 54 09 09 45 51 55 20 |tes.Lvl1|DT..EQU |
|00000200| 24 31 39 32 0d 4c 76 6c | 32 44 54 09 09 45 51 55 |$192.Lvl|2DT..EQU|
|00000210| 20 24 31 42 32 0d 52 78 | 49 6e 74 4f 66 66 73 65 | $1B2.Rx|IntOffse|
|00000220| 74 41 09 45 51 55 20 32 | 34 0d 54 78 49 6e 74 4f |tA.EQU 2|4.TxIntO|
|00000230| 66 66 73 65 74 41 09 45 | 51 55 20 31 36 0d 53 70 |ffsetA.E|QU 16.Sp|
|00000240| 65 63 52 65 63 43 6f 6e | 64 41 09 45 51 55 20 32 |ecRecCon|dA.EQU 2|
|00000250| 38 0d 52 78 49 6e 74 4f | 66 66 73 65 74 42 09 45 |8.RxIntO|ffsetB.E|
|00000260| 51 55 20 38 0d 54 78 49 | 6e 74 4f 66 66 73 65 74 |QU 8.TxI|ntOffset|
|00000270| 42 09 45 51 55 20 30 0d | 53 70 65 63 52 65 63 43 |B.EQU 0.|SpecRecC|
|00000280| 6f 6e 64 42 09 45 51 55 | 20 31 32 0d 0d 3b 20 36 |ondB.EQU| 12..; 6|
|00000290| 35 32 32 20 65 71 75 61 | 74 65 73 0d 56 49 41 09 |522 equa|tes.VIA.|
|000002a0| 09 09 45 51 55 20 24 31 | 44 34 0d 76 54 31 43 09 |..EQU $1|D4.vT1C.|
|000002b0| 09 45 51 55 20 24 38 30 | 30 0d 76 54 31 43 48 09 |.EQU $80|0.vT1CH.|
|000002c0| 09 45 51 55 20 24 41 30 | 30 0d 76 54 31 4c 09 09 |.EQU $A0|0.vT1L..|
|000002d0| 45 51 55 20 24 43 30 30 | 0d 76 41 43 52 09 09 45 |EQU $C00|.vACR..E|
|000002e0| 51 55 20 24 31 36 30 30 | 0d 76 49 45 52 09 09 45 |QU $1600|.vIER..E|
|000002f0| 51 55 20 24 31 43 30 30 | 0d 0d 3b 20 58 44 45 46 |QU $1C00|..; XDEF|
|00000300| 20 61 6c 6c 20 72 6f 75 | 74 69 6e 65 73 20 74 68 | all rou|tines th|
|00000310| 61 74 20 6e 65 65 64 20 | 74 6f 20 62 65 20 61 63 |at need |to be ac|
|00000320| 63 65 73 73 65 64 20 65 | 78 74 65 72 6e 61 6c 6c |cessed e|xternall|
|00000330| 79 0d 0d 09 09 09 58 44 | 45 46 09 09 49 6e 69 74 |y.....XD|EF..Init|
|00000340| 53 43 43 41 0d 09 09 09 | 58 44 45 46 09 09 49 6e |SCCA....|XDEF..In|
|00000350| 69 74 53 43 43 42 0d 09 | 09 09 58 44 45 46 09 09 |itSCCB..|..XDEF..|
|00000360| 54 78 4d 49 44 49 41 0d | 09 09 09 58 44 45 46 09 |TxMIDIA.|...XDEF.|
|00000370| 09 54 78 4d 49 44 49 42 | 0d 09 09 09 58 44 45 46 |.TxMIDIB|....XDEF|
|00000380| 09 09 52 78 4d 49 44 49 | 41 0d 09 09 09 58 44 45 |..RxMIDI|A....XDE|
|00000390| 46 09 09 52 78 4d 49 44 | 49 42 0d 09 09 09 58 44 |F..RxMID|IB....XD|
|000003a0| 45 46 09 09 52 65 73 65 | 74 53 43 43 41 0d 09 09 |EF..Rese|tSCCA...|
|000003b0| 09 58 44 45 46 09 09 52 | 65 73 65 74 53 43 43 42 |.XDEF..R|esetSCCB|
|000003c0| 0d 09 09 09 58 44 45 46 | 09 09 49 6e 69 74 54 69 |....XDEF|..InitTi|
|000003d0| 6d 65 72 0d 09 09 09 58 | 44 45 46 09 09 4c 6f 61 |mer....X|DEF..Loa|
|000003e0| 64 54 69 6d 65 72 0d 09 | 09 09 58 44 45 46 09 09 |dTimer..|..XDEF..|
|000003f0| 53 74 61 72 74 43 6f 75 | 6e 74 65 72 0d 09 09 09 |StartCou|nter....|
|00000400| 58 44 45 46 09 09 47 65 | 74 43 6f 75 6e 74 65 72 |XDEF..Ge|tCounter|
|00000410| 0d 09 09 09 58 44 45 46 | 09 09 51 75 69 74 54 69 |....XDEF|..QuitTi|
|00000420| 6d 65 72 0d 09 09 09 0d | 3b 20 54 68 65 73 65 20 |mer.....|; These |
|00000430| 61 72 65 20 74 68 65 20 | 72 6f 75 74 69 6e 65 73 |are the |routines|
|00000440| 20 66 6f 72 20 74 68 65 | 20 4d 6f 64 65 6d 20 50 | for the| Modem P|
|00000450| 6f 72 74 0d 0d 3b 20 20 | 20 20 20 50 52 4f 43 45 |ort..; | PROCE|
|00000460| 44 55 52 45 20 49 6e 69 | 74 53 43 43 41 3b 0d 3b |DURE Ini|tSCCA;.;|
|00000470| 20 43 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | Call th|is routi|
|00000480| 6e 65 20 61 74 20 74 68 | 65 20 62 65 67 69 6e 6e |ne at th|e beginn|
|00000490| 69 6e 67 20 6f 66 20 79 | 6f 75 72 20 61 70 70 6c |ing of y|our appl|
|000004a0| 69 63 61 74 69 6f 6e 20 | 69 66 0d 3b 20 75 73 69 |ication |if.; usi|
|000004b0| 6e 67 20 74 68 65 20 6d | 6f 64 65 6d 20 70 6f 72 |ng the m|odem por|
|000004c0| 74 20 66 6f 72 20 4d 49 | 44 49 20 69 6e 66 6f 72 |t for MI|DI infor|
|000004d0| 6d 61 74 69 6f 6e 20 74 | 72 61 6e 73 66 65 72 73 |mation t|ransfers|
|000004e0| 2e 0d 0d 49 6e 69 74 53 | 43 43 41 09 0d 09 09 09 |...InitS|CCA.....|
|000004f0| 4d 4f 56 45 09 09 53 52 | 2c 2d 28 53 50 29 09 09 |MOVE..SR|,-(SP)..|
|00000500| 3b 20 53 61 76 65 20 69 | 6e 74 65 72 72 75 70 74 |; Save i|nterrupt|
|00000510| 73 0d 09 09 09 4d 4f 56 | 45 4d 2e 4c 09 09 44 30 |s....MOV|EM.L..D0|
|00000520| 2f 41 30 2d 41 32 2c 2d | 28 53 50 29 09 3b 20 53 |/A0-A2,-|(SP).; S|
|00000530| 61 76 65 20 72 65 67 69 | 73 74 65 72 73 0d 09 09 |ave regi|sters...|
|00000540| 09 4f 52 49 09 09 09 23 | 24 30 33 30 30 2c 53 52 |.ORI...#|$0300,SR|
|00000550| 09 09 3b 20 44 69 73 61 | 62 6c 65 20 69 6e 74 65 |..; Disa|ble inte|
|00000560| 72 72 75 70 74 73 0d 09 | 09 09 0d 09 09 09 4d 4f |rrupts..|......MO|
|00000570| 56 45 2e 4c 09 09 53 43 | 43 52 64 2c 41 31 09 09 |VE.L..SC|CRd,A1..|
|00000580| 3b 20 47 65 74 20 62 61 | 73 65 20 52 65 61 64 20 |; Get ba|se Read |
|00000590| 61 64 64 72 65 73 73 0d | 09 09 09 41 44 44 09 09 |address.|...ADD..|
|000005a0| 09 23 61 43 74 6c 2c 41 | 31 09 09 09 3b 20 41 64 |.#aCtl,A|1...; Ad|
|000005b0| 64 20 6f 66 66 73 65 74 | 20 66 6f 72 20 63 6f 6e |d offset| for con|
|000005c0| 74 72 6f 6c 0d 09 09 09 | 4d 4f 56 45 2e 42 09 09 |trol....|MOVE.B..|
|000005d0| 28 41 31 29 2c 44 30 09 | 09 09 3b 20 44 75 6d 6d |(A1),D0.|..; Dumm|
|000005e0| 79 20 72 65 61 64 0d 09 | 09 09 4d 4f 56 45 2e 4c |y read..|..MOVE.L|
|000005f0| 09 09 28 53 50 29 2c 28 | 53 50 29 09 09 3b 20 44 |..(SP),(|SP)..; D|
|00000600| 65 6c 61 79 0d 09 09 09 | 4d 4f 56 45 2e 4c 09 09 |elay....|MOVE.L..|
|00000610| 53 43 43 57 72 2c 41 30 | 09 09 3b 20 47 65 74 20 |SCCWr,A0|..; Get |
|00000620| 62 61 73 65 20 57 72 69 | 74 65 20 61 64 64 72 65 |base Wri|te addre|
|00000630| 73 73 0d 09 09 09 41 44 | 44 09 09 09 23 61 43 74 |ss....AD|D...#aCt|
|00000640| 6c 2c 41 30 09 09 09 3b | 20 41 64 64 20 6f 66 66 |l,A0...;| Add off|
|00000650| 73 65 74 20 66 6f 72 20 | 63 6f 6e 74 72 6f 6c 0d |set for |control.|
|00000660| 09 09 09 4d 4f 56 45 2e | 42 09 09 23 39 2c 28 41 |...MOVE.|B..#9,(A|
|00000670| 30 29 09 09 09 3b 20 20 | 70 6f 69 6e 74 65 72 20 |0)...; |pointer |
|00000680| 66 6f 72 20 53 43 43 20 | 72 65 67 20 39 0d 09 09 |for SCC |reg 9...|
|00000690| 09 4d 4f 56 45 2e 4c 09 | 09 28 53 50 29 2c 28 53 |.MOVE.L.|.(SP),(S|
|000006a0| 50 29 09 09 3b 20 44 65 | 6c 61 79 0d 09 09 09 4d |P)..; De|lay....M|
|000006b0| 4f 56 45 2e 42 09 09 23 | 25 31 30 30 30 30 30 30 |OVE.B..#|%1000000|
|000006c0| 30 2c 28 41 30 29 09 3b | 20 52 65 73 65 74 20 63 |0,(A0).;| Reset c|
|000006d0| 68 61 6e 6e 65 6c 0d 09 | 09 09 4d 4f 56 45 2e 4c |hannel..|..MOVE.L|
|000006e0| 09 09 28 53 50 29 2c 28 | 53 50 29 09 09 3b 20 44 |..(SP),(|SP)..; D|
|000006f0| 65 6c 61 79 0d 09 09 09 | 42 53 52 09 09 09 49 6e |elay....|BSR...In|
|00000700| 69 74 53 43 43 43 68 61 | 6e 09 09 3b 20 62 72 61 |itSCCCha|n..; bra|
|00000710| 6e 63 68 20 74 6f 20 63 | 6f 6d 6d 6f 6e 20 69 6e |nch to c|ommon in|
|00000720| 69 74 20 72 6f 75 74 69 | 6e 65 0d 09 09 09 0d 3b |it routi|ne.....;|
|00000730| 20 73 65 74 20 75 70 20 | 69 6e 74 65 72 72 75 70 | set up |interrup|
|00000740| 74 20 76 65 63 74 6f 72 | 73 0d 0d 09 09 09 4d 4f |t vector|s.....MO|
|00000750| 56 45 2e 4c 09 09 23 4c | 76 6c 32 44 54 2c 41 30 |VE.L..#L|vl2DT,A0|
|00000760| 09 09 3b 20 67 65 74 20 | 64 69 73 70 61 74 63 68 |..; get |dispatch|
|00000770| 20 74 61 62 6c 65 20 70 | 74 72 0d 09 09 09 4d 4f | table p|tr....MO|
|00000780| 56 45 09 09 23 52 78 49 | 6e 74 4f 66 66 73 65 74 |VE..#RxI|ntOffset|
|00000790| 41 2c 44 30 09 3b 20 67 | 65 74 20 6f 66 66 73 65 |A,D0.; g|et offse|
|000007a0| 74 20 74 6f 20 52 78 20 | 76 65 63 74 6f 72 0d 09 |t to Rx |vector..|
|000007b0| 09 09 4c 45 41 09 09 09 | 50 52 78 49 6e 74 48 61 |..LEA...|PRxIntHa|
|000007c0| 6e 64 41 2c 41 31 09 3b | 20 70 6f 69 6e 74 20 74 |ndA,A1.;| point t|
|000007d0| 6f 20 70 72 65 76 69 6f | 75 73 20 76 65 63 74 6f |o previo|us vecto|
|000007e0| 72 20 73 74 6f 72 61 67 | 65 0d 09 09 09 4d 4f 56 |r storag|e....MOV|
|000007f0| 45 2e 4c 09 09 30 28 41 | 30 2c 44 30 29 2c 28 41 |E.L..0(A|0,D0),(A|
|00000800| 31 29 09 3b 20 73 61 76 | 65 20 70 72 65 76 69 6f |1).; sav|e previo|
|00000810| 75 73 20 69 6e 74 65 72 | 72 75 70 74 20 76 65 63 |us inter|rupt vec|
|00000820| 74 6f 72 0d 09 09 09 4c | 45 41 09 09 09 52 78 49 |tor....L|EA...RxI|
|00000830| 6e 74 48 61 6e 64 41 2c | 41 31 09 3b 20 73 65 74 |ntHandA,|A1.; set|
|00000840| 20 52 78 20 76 65 63 74 | 6f 72 0d 09 09 09 4d 4f | Rx vect|or....MO|
|00000850| 56 45 2e 4c 09 09 41 31 | 2c 30 28 41 30 2c 44 30 |VE.L..A1|,0(A0,D0|
|00000860| 29 0d 09 09 09 4d 4f 56 | 45 09 09 23 54 78 49 6e |)....MOV|E..#TxIn|
|00000870| 74 4f 66 66 73 65 74 41 | 2c 44 30 09 3b 20 67 65 |tOffsetA|,D0.; ge|
|00000880| 74 20 6f 66 66 73 65 74 | 20 74 6f 20 54 78 20 76 |t offset| to Tx v|
|00000890| 65 63 74 6f 72 0d 09 09 | 09 4c 45 41 09 09 09 50 |ector...|.LEA...P|
|000008a0| 54 78 49 6e 74 48 61 6e | 64 41 2c 41 31 09 3b 20 |TxIntHan|dA,A1.; |
|000008b0| 70 6f 69 6e 74 20 74 6f | 20 70 72 65 76 69 6f 75 |point to| previou|
|000008c0| 73 20 76 65 63 74 6f 72 | 20 73 74 6f 72 61 67 65 |s vector| storage|
|000008d0| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 30 28 41 30 |....MOVE|.L..0(A0|
|000008e0| 2c 44 30 29 2c 41 31 09 | 09 3b 20 73 61 76 65 20 |,D0),A1.|.; save |
|000008f0| 70 72 65 76 69 6f 75 73 | 20 69 6e 74 65 72 72 75 |previous| interru|
|00000900| 70 74 20 76 65 63 74 6f | 72 0d 09 09 09 4c 45 41 |pt vecto|r....LEA|
|00000910| 09 09 09 54 78 49 6e 74 | 48 61 6e 64 41 2c 41 31 |...TxInt|HandA,A1|
|00000920| 09 3b 20 73 65 74 20 54 | 78 20 76 65 63 74 6f 72 |.; set T|x vector|
|00000930| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 41 31 2c 30 |....MOVE|.L..A1,0|
|00000940| 28 41 30 2c 44 30 29 0d | 09 09 09 4d 4f 56 45 09 |(A0,D0).|...MOVE.|
|00000950| 09 23 53 70 65 63 52 65 | 63 43 6f 6e 64 41 2c 44 |.#SpecRe|cCondA,D|
|00000960| 30 09 3b 20 6f 66 66 73 | 65 74 20 74 6f 20 53 70 |0.; offs|et to Sp|
|00000970| 65 63 69 61 6c 20 76 65 | 63 74 6f 72 0d 09 09 09 |ecial ve|ctor....|
|00000980| 4c 45 41 09 09 09 53 74 | 75 62 41 2c 41 31 0d 09 |LEA...St|ubA,A1..|
|00000990| 09 09 4d 4f 56 45 2e 4c | 09 09 41 31 2c 30 28 41 |..MOVE.L|..A1,0(A|
|000009a0| 30 2c 44 30 29 0d 09 09 | 09 0d 3b 20 69 6e 69 74 |0,D0)...|..; init|
|000009b0| 69 61 6c 69 7a 65 20 74 | 68 65 20 66 6c 61 67 73 |ialize t|he flags|
|000009c0| 20 26 20 70 6f 69 6e 74 | 65 72 73 0d 0d 09 09 09 | & point|ers.....|
|000009d0| 4c 45 41 09 09 09 52 78 | 42 79 74 65 49 6e 41 2c |LEA...Rx|ByteInA,|
|000009e0| 41 32 09 09 3b 20 67 65 | 74 20 74 68 65 20 61 64 |A2..; ge|t the ad|
|000009f0| 64 72 65 73 73 0d 09 09 | 09 43 4c 52 09 09 09 28 |dress...|.CLR...(|
|00000a00| 41 32 29 0d 09 09 09 4c | 45 41 09 09 09 52 78 42 |A2)....L|EA...RxB|
|00000a10| 79 74 65 4f 75 74 41 2c | 41 32 09 3b 20 67 65 74 |yteOutA,|A2.; get|
|00000a20| 20 74 68 65 20 61 64 64 | 72 65 73 73 0d 09 09 09 | the add|ress....|
|00000a30| 43 4c 52 09 09 09 28 41 | 32 29 0d 09 09 09 4c 45 |CLR...(A|2)....LE|
|00000a40| 41 09 09 09 52 78 51 45 | 6d 70 74 79 41 2c 41 32 |A...RxQE|mptyA,A2|
|00000a50| 09 3b 20 67 65 74 20 74 | 68 65 20 61 64 64 72 65 |.; get t|he addre|
|00000a60| 73 73 0d 09 09 09 4d 4f | 56 45 09 09 23 24 46 46 |ss....MO|VE..#$FF|
|00000a70| 46 46 2c 28 41 32 29 0d | 09 09 09 4c 45 41 09 09 |FF,(A2).|...LEA..|
|00000a80| 09 54 78 42 79 74 65 49 | 6e 41 2c 41 32 09 09 3b |.TxByteI|nA,A2..;|
|00000a90| 20 67 65 74 20 74 68 65 | 20 61 64 64 72 65 73 73 | get the| address|
|00000aa0| 0d 09 09 09 43 4c 52 09 | 09 09 28 41 32 29 0d 09 |....CLR.|..(A2)..|
|00000ab0| 09 09 4c 45 41 09 09 09 | 54 78 51 45 6d 70 74 79 |..LEA...|TxQEmpty|
|00000ac0| 41 2c 41 32 09 3b 20 67 | 65 74 20 74 68 65 20 61 |A,A2.; g|et the a|
|00000ad0| 64 64 72 65 73 73 0d 09 | 09 09 4d 4f 56 45 09 09 |ddress..|..MOVE..|
|00000ae0| 23 24 46 46 46 46 2c 28 | 41 32 29 0d 09 09 09 0d |#$FFFF,(|A2).....|
|00000af0| 09 09 09 4d 4f 56 45 4d | 2e 4c 09 09 28 53 50 29 |...MOVEM|.L..(SP)|
|00000b00| 2b 2c 44 30 2f 41 30 2d | 41 32 09 3b 20 52 65 73 |+,D0/A0-|A2.; Res|
|00000b10| 74 6f 72 65 20 72 65 67 | 69 73 74 65 72 73 0d 09 |tore reg|isters..|
|00000b20| 09 09 4d 4f 56 45 09 09 | 28 53 50 29 2b 2c 53 52 |..MOVE..|(SP)+,SR|
|00000b30| 09 09 3b 20 52 65 73 74 | 6f 72 65 20 69 6e 74 65 |..; Rest|ore inte|
|00000b40| 72 72 75 70 74 73 0d 09 | 09 09 52 54 53 09 09 09 |rrupts..|..RTS...|
|00000b50| 09 09 09 09 3b 20 61 6e | 64 20 72 65 74 75 72 6e |....; an|d return|
|00000b60| 0d 09 09 09 0d 3b 20 54 | 68 69 73 20 69 73 20 74 |.....; T|his is t|
|00000b70| 68 65 20 63 6f 6d 6d 6f | 6e 20 69 6e 69 74 69 61 |he commo|n initia|
|00000b80| 6c 69 7a 61 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |lization| routine|
|00000b90| 20 66 6f 72 20 62 6f 74 | 68 20 63 68 61 6e 6e 65 | for bot|h channe|
|00000ba0| 6c 73 0d 0d 49 6e 69 74 | 53 43 43 43 68 61 6e 0d |ls..Init|SCCChan.|
|00000bb0| 09 09 09 4d 4f 56 45 2e | 42 09 09 23 34 2c 28 41 |...MOVE.|B..#4,(A|
|00000bc0| 30 29 09 09 09 3b 20 70 | 6f 69 6e 74 65 72 20 66 |0)...; p|ointer f|
|00000bd0| 6f 72 20 53 43 43 20 72 | 65 67 20 34 0d 09 09 09 |or SCC r|eg 4....|
|00000be0| 4d 4f 56 45 2e 4c 09 09 | 28 53 50 29 2c 28 53 50 |MOVE.L..|(SP),(SP|
|00000bf0| 29 09 09 3b 20 44 65 6c | 61 79 0d 09 09 09 4d 4f |)..; Del|ay....MO|
|00000c00| 56 45 2e 42 09 09 23 25 | 31 30 30 30 30 31 30 30 |VE.B..#%|10000100|
|00000c10| 2c 28 41 30 29 09 3b 20 | 33 32 78 20 63 6c 6f 63 |,(A0).; |32x cloc|
|00000c20| 6b 2c 20 31 20 73 74 6f | 70 20 62 69 74 0d 09 09 |k, 1 sto|p bit...|
|00000c30| 09 4d 4f 56 45 2e 4c 09 | 09 28 53 50 29 2c 28 53 |.MOVE.L.|.(SP),(S|
|00000c40| 50 29 09 09 3b 20 44 65 | 6c 61 79 0d 09 09 09 4d |P)..; De|lay....M|
|00000c50| 4f 56 45 2e 42 09 09 23 | 31 2c 28 41 30 29 09 09 |OVE.B..#|1,(A0)..|
|00000c60| 09 3b 20 70 6f 69 6e 74 | 65 72 20 66 6f 72 20 53 |.; point|er for S|
|00000c70| 43 43 20 72 65 67 20 31 | 0d 09 09 09 4d 4f 56 45 |CC reg 1|....MOVE|
|00000c80| 2e 4c 09 09 28 53 50 29 | 2c 28 53 50 29 09 09 3b |.L..(SP)|,(SP)..;|
|00000c90| 20 44 65 6c 61 79 0d 09 | 09 09 4d 4f 56 45 2e 42 | Delay..|..MOVE.B|
|00000ca0| 09 09 23 25 30 30 30 30 | 30 30 30 30 2c 28 41 30 |..#%0000|0000,(A0|
|00000cb0| 29 09 3b 20 4e 6f 20 57 | 2f 52 65 71 0d 09 09 09 |).; No W|/Req....|
|00000cc0| 4d 4f 56 45 2e 4c 09 09 | 28 53 50 29 2c 28 53 50 |MOVE.L..|(SP),(SP|
|00000cd0| 29 09 09 3b 20 44 65 6c | 61 79 0d 09 09 09 4d 4f |)..; Del|ay....MO|
|00000ce0| 56 45 2e 42 09 09 23 33 | 2c 28 41 30 29 09 09 09 |VE.B..#3|,(A0)...|
|00000cf0| 3b 20 70 6f 69 6e 74 65 | 72 20 66 6f 72 20 53 43 |; pointe|r for SC|
|00000d00| 43 20 72 65 67 20 33 0d | 09 09 09 4d 4f 56 45 2e |C reg 3.|...MOVE.|
|00000d10| 4c 09 09 28 53 50 29 2c | 28 53 50 29 09 09 3b 20 |L..(SP),|(SP)..; |
|00000d20| 44 65 6c 61 79 0d 09 09 | 09 4d 4f 56 45 2e 42 09 |Delay...|.MOVE.B.|
|00000d30| 09 23 25 30 30 30 30 30 | 30 30 30 2c 28 41 30 29 |.#%00000|000,(A0)|
|00000d40| 09 3b 20 54 75 72 6e 20 | 6f 66 66 20 52 78 0d 09 |.; Turn |off Rx..|
|00000d50| 09 09 4d 4f 56 45 2e 4c | 09 09 28 53 50 29 2c 28 |..MOVE.L|..(SP),(|
|00000d60| 53 50 29 09 09 3b 20 44 | 65 6c 61 79 0d 09 09 09 |SP)..; D|elay....|
|00000d70| 4d 4f 56 45 2e 42 09 09 | 23 35 2c 28 41 30 29 09 |MOVE.B..|#5,(A0).|
|00000d80| 09 09 3b 20 70 6f 69 6e | 74 65 72 20 66 6f 72 20 |..; poin|ter for |
|00000d90| 53 43 43 20 72 65 67 20 | 35 0d 09 09 09 4d 4f 56 |SCC reg |5....MOV|
|00000da0| 45 2e 4c 09 09 28 53 50 | 29 2c 28 53 50 29 09 09 |E.L..(SP|),(SP)..|
|00000db0| 3b 20 44 65 6c 61 79 0d | 09 09 09 4d 4f 56 45 2e |; Delay.|...MOVE.|
|00000dc0| 42 09 09 23 25 30 30 30 | 30 30 30 30 30 2c 28 41 |B..#%000|00000,(A|
|00000dd0| 30 29 09 3b 20 54 75 72 | 6e 20 6f 66 66 20 54 78 |0).; Tur|n off Tx|
|00000de0| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 28 53 50 29 |....MOVE|.L..(SP)|
|00000df0| 2c 28 53 50 29 09 09 3b | 20 44 65 6c 61 79 0d 09 |,(SP)..;| Delay..|
|00000e00| 09 09 4d 4f 56 45 2e 42 | 09 09 23 31 31 2c 28 41 |..MOVE.B|..#11,(A|
|00000e10| 30 29 09 09 3b 20 70 6f | 69 6e 74 65 72 20 66 6f |0)..; po|inter fo|
|00000e20| 72 20 53 43 43 20 72 65 | 67 20 31 31 0d 09 09 09 |r SCC re|g 11....|
|00000e30| 4d 4f 56 45 2e 4c 09 09 | 28 53 50 29 2c 28 53 50 |MOVE.L..|(SP),(SP|
|00000e40| 29 09 09 3b 20 44 65 6c | 61 79 0d 09 09 09 4d 4f |)..; Del|ay....MO|
|00000e50| 56 45 2e 42 09 09 23 25 | 30 30 31 30 31 30 30 30 |VE.B..#%|00101000|
|00000e60| 2c 28 41 30 29 09 3b 20 | 4d 61 6b 65 20 54 52 78 |,(A0).; |Make TRx|
|00000e70| 43 20 63 6c 6f 63 6b 20 | 73 6f 75 72 63 65 0d 09 |C clock |source..|
|00000e80| 09 09 4d 4f 56 45 2e 4c | 09 09 28 53 50 29 2c 28 |..MOVE.L|..(SP),(|
|00000e90| 53 50 29 09 09 3b 20 44 | 65 6c 61 79 0d 09 09 09 |SP)..; D|elay....|
|00000ea0| 4d 4f 56 45 2e 42 09 09 | 23 31 34 2c 28 41 30 29 |MOVE.B..|#14,(A0)|
|00000eb0| 09 09 3b 20 70 6f 69 6e | 74 65 72 20 66 6f 72 20 |..; poin|ter for |
|00000ec0| 53 43 43 20 72 65 67 20 | 31 34 0d 09 09 09 4d 4f |SCC reg |14....MO|
|00000ed0| 56 45 2e 4c 09 09 28 53 | 50 29 2c 28 53 50 29 09 |VE.L..(S|P),(SP).|
|00000ee0| 09 3b 20 44 65 6c 61 79 | 0d 09 09 09 4d 4f 56 45 |.; Delay|....MOVE|
|00000ef0| 2e 42 09 09 23 25 30 30 | 30 30 30 30 30 30 2c 28 |.B..#%00|000000,(|
|00000f00| 41 30 29 09 3b 20 44 69 | 73 61 62 6c 65 20 42 52 |A0).; Di|sable BR|
|00000f10| 47 65 6e 0d 09 09 09 4d | 4f 56 45 2e 4c 09 09 28 |Gen....M|OVE.L..(|
|00000f20| 53 50 29 2c 28 53 50 29 | 09 09 3b 20 44 65 6c 61 |SP),(SP)|..; Dela|
|00000f30| 79 0d 09 09 09 4d 4f 56 | 45 2e 42 09 09 23 33 2c |y....MOV|E.B..#3,|
|00000f40| 28 41 30 29 09 09 09 3b | 20 70 6f 69 6e 74 65 72 |(A0)...;| pointer|
|00000f50| 20 66 6f 72 20 53 43 43 | 20 72 65 67 20 33 0d 09 | for SCC| reg 3..|
|00000f60| 09 09 4d 4f 56 45 2e 4c | 09 09 28 53 50 29 2c 28 |..MOVE.L|..(SP),(|
|00000f70| 53 50 29 09 09 3b 20 44 | 65 6c 61 79 0d 09 09 09 |SP)..; D|elay....|
|00000f80| 4d 4f 56 45 2e 42 09 09 | 23 25 31 31 30 30 30 30 |MOVE.B..|#%110000|
|00000f90| 30 31 2c 28 41 30 29 09 | 3b 20 45 6e 61 62 6c 65 |01,(A0).|; Enable|
|00000fa0| 20 52 78 0d 09 09 09 4d | 4f 56 45 2e 4c 09 09 28 | Rx....M|OVE.L..(|
|00000fb0| 53 50 29 2c 28 53 50 29 | 09 09 3b 20 44 65 6c 61 |SP),(SP)|..; Dela|
|00000fc0| 79 0d 09 09 09 4d 4f 56 | 45 2e 42 09 09 23 35 2c |y....MOV|E.B..#5,|
|00000fd0| 28 41 30 29 09 09 09 3b | 20 20 70 6f 69 6e 74 65 |(A0)...;| pointe|
|00000fe0| 72 20 66 6f 72 20 53 43 | 43 20 72 65 67 20 35 0d |r for SC|C reg 5.|
|00000ff0| 09 09 09 4d 4f 56 45 2e | 4c 09 09 28 53 50 29 2c |...MOVE.|L..(SP),|
|00001000| 28 53 50 29 09 09 3b 20 | 44 65 6c 61 79 0d 09 09 |(SP)..; |Delay...|
|00001010| 09 4d 4f 56 45 2e 42 09 | 09 23 25 30 31 31 30 31 |.MOVE.B.|.#%01101|
|00001020| 30 31 30 2c 28 41 30 29 | 09 3b 20 45 6e 61 62 6c |010,(A0)|.; Enabl|
|00001030| 65 20 54 78 20 61 6e 64 | 20 64 72 69 76 65 72 73 |e Tx and| drivers|
|00001040| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 28 53 50 29 |....MOVE|.L..(SP)|
|00001050| 2c 28 53 50 29 09 09 3b | 20 44 65 6c 61 79 0d 09 |,(SP)..;| Delay..|
|00001060| 09 09 4d 4f 56 45 2e 42 | 09 09 23 31 35 2c 28 41 |..MOVE.B|..#15,(A|
|00001070| 30 29 09 09 3b 20 70 6f | 69 6e 74 65 72 20 66 6f |0)..; po|inter fo|
|00001080| 72 20 53 43 43 20 72 65 | 67 20 31 35 0d 09 09 09 |r SCC re|g 15....|
|00001090| 4d 4f 56 45 2e 4c 09 09 | 28 53 50 29 2c 28 53 50 |MOVE.L..|(SP),(SP|
|000010a0| 29 09 09 3b 20 44 65 6c | 61 79 0d 09 09 09 4d 4f |)..; Del|ay....MO|
|000010b0| 56 45 2e 42 09 09 23 25 | 30 30 30 30 31 30 30 30 |VE.B..#%|00001000|
|000010c0| 2c 28 41 30 29 09 3b 20 | 45 6e 61 62 6c 65 20 44 |,(A0).; |Enable D|
|000010d0| 43 44 20 69 6e 74 20 66 | 6f 72 20 6d 6f 75 73 65 |CD int f|or mouse|
|000010e0| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 28 53 50 29 |....MOVE|.L..(SP)|
|000010f0| 2c 28 53 50 29 09 09 3b | 20 44 65 6c 61 79 0d 09 |,(SP)..;| Delay..|
|00001100| 09 09 4d 4f 56 45 2e 42 | 09 09 23 30 2c 28 41 30 |..MOVE.B|..#0,(A0|
|00001110| 29 09 09 09 3b 20 70 6f | 69 6e 74 65 72 20 66 6f |)...; po|inter fo|
|00001120| 72 20 53 43 43 20 72 65 | 67 20 30 0d 09 09 09 4d |r SCC re|g 0....M|
|00001130| 4f 56 45 2e 4c 09 09 28 | 53 50 29 2c 28 53 50 29 |OVE.L..(|SP),(SP)|
|00001140| 09 09 3b 20 44 65 6c 61 | 79 0d 09 09 09 4d 4f 56 |..; Dela|y....MOV|
|00001150| 45 2e 42 09 09 23 25 30 | 30 30 31 30 30 30 30 2c |E.B..#%0|0010000,|
|00001160| 28 41 30 29 09 3b 20 52 | 65 73 65 74 20 45 58 54 |(A0).; R|eset EXT|
|00001170| 2f 53 54 41 54 55 53 0d | 09 09 09 4d 4f 56 45 2e |/STATUS.|...MOVE.|
|00001180| 4c 09 09 28 53 50 29 2c | 28 53 50 29 09 09 3b 20 |L..(SP),|(SP)..; |
|00001190| 44 65 6c 61 79 0d 09 09 | 09 4d 4f 56 45 2e 42 09 |Delay...|.MOVE.B.|
|000011a0| 09 23 30 2c 28 41 30 29 | 09 09 09 3b 20 70 6f 69 |.#0,(A0)|...; poi|
|000011b0| 6e 74 65 72 20 66 6f 72 | 20 53 43 43 20 72 65 67 |nter for| SCC reg|
|000011c0| 20 30 0d 09 09 09 4d 4f | 56 45 2e 4c 09 09 28 53 | 0....MO|VE.L..(S|
|000011d0| 50 29 2c 28 53 50 29 09 | 09 3b 20 44 65 6c 61 79 |P),(SP).|.; Delay|
|000011e0| 0d 09 09 09 4d 4f 56 45 | 2e 42 09 09 23 25 30 30 |....MOVE|.B..#%00|
|000011f0| 30 31 30 30 30 30 2c 28 | 41 30 29 09 3b 20 52 65 |010000,(|A0).; Re|
|00001200| 73 65 74 20 45 58 54 2f | 53 54 41 54 55 53 20 61 |set EXT/|STATUS a|
|00001210| 67 61 69 6e 0d 09 09 09 | 4d 4f 56 45 2e 4c 09 09 |gain....|MOVE.L..|
|00001220| 28 53 50 29 2c 28 53 50 | 29 09 09 3b 20 44 65 6c |(SP),(SP|)..; Del|
|00001230| 61 79 0d 09 09 09 4d 4f | 56 45 2e 42 09 09 23 31 |ay....MO|VE.B..#1|
|00001240| 2c 28 41 30 29 09 09 09 | 3b 20 70 6f 69 6e 74 65 |,(A0)...|; pointe|
|00001250| 72 20 66 6f 72 20 53 43 | 43 20 72 65 67 20 31 0d |r for SC|C reg 1.|
|00001260| 09 09 09 4d 4f 56 45 2e | 4c 09 09 28 53 50 29 2c |...MOVE.|L..(SP),|
|00001270| 28 53 50 29 09 09 3b 20 | 44 65 6c 61 79 0d 09 09 |(SP)..; |Delay...|
|00001280| 09 4d 4f 56 45 2e 42 09 | 09 23 25 30 30 30 31 30 |.MOVE.B.|.#%00010|
|00001290| 30 31 31 2c 28 41 30 29 | 09 3b 20 45 6e 61 62 6c |011,(A0)|.; Enabl|
|000012a0| 65 20 69 6e 74 65 72 72 | 75 70 74 73 0d 09 09 09 |e interr|upts....|
|000012b0| 4d 4f 56 45 2e 4c 09 09 | 28 53 50 29 2c 28 53 50 |MOVE.L..|(SP),(SP|
|000012c0| 29 09 09 3b 20 44 65 6c | 61 79 0d 09 09 09 4d 4f |)..; Del|ay....MO|
|000012d0| 56 45 2e 42 09 09 23 39 | 2c 28 41 30 29 09 09 09 |VE.B..#9|,(A0)...|
|000012e0| 3b 20 70 6f 69 6e 74 65 | 72 20 66 6f 72 20 53 43 |; pointe|r for SC|
|000012f0| 43 20 72 65 67 20 39 0d | 09 09 09 4d 4f 56 45 2e |C reg 9.|...MOVE.|
|00001300| 4c 09 09 28 53 50 29 2c | 28 53 50 29 09 09 3b 20 |L..(SP),|(SP)..; |
|00001310| 44 65 6c 61 79 0d 09 09 | 09 4d 4f 56 45 2e 42 09 |Delay...|.MOVE.B.|
|00001320| 09 23 25 30 30 30 30 31 | 30 31 30 2c 28 41 30 29 |.#%00001|010,(A0)|
|00001330| 09 3b 20 53 65 74 20 6d | 61 73 74 65 72 20 69 6e |.; Set m|aster in|
|00001340| 74 20 65 6e 61 62 6c 65 | 0d 09 09 09 4d 4f 56 45 |t enable|....MOVE|
|00001350| 2e 4c 09 09 28 53 50 29 | 2c 28 53 50 29 09 09 3b |.L..(SP)|,(SP)..;|
|00001360| 20 44 65 6c 61 79 0d 09 | 09 09 52 54 53 0d 09 09 | Delay..|..RTS...|
|00001370| 09 0d 3b 20 20 20 20 20 | 20 50 52 4f 43 45 44 55 |..; | PROCEDU|
|00001380| 52 45 20 54 78 4d 49 44 | 49 41 20 28 54 68 65 44 |RE TxMID|IA (TheD|
|00001390| 61 74 61 20 3a 20 69 6e | 74 65 67 65 72 29 3b 0d |ata : in|teger);.|
|000013a0| 3b 20 54 68 69 73 20 69 | 73 20 74 68 65 20 72 6f |; This i|s the ro|
|000013b0| 75 74 69 6e 65 20 74 6f | 20 74 72 61 6e 73 6d 69 |utine to| transmi|
|000013c0| 74 20 61 20 4d 49 44 49 | 20 62 79 74 65 20 6f 66 |t a MIDI| byte of|
|000013d0| 20 64 61 74 61 0d 3b 20 | 74 68 72 6f 75 67 68 20 | data.; |through |
|000013e0| 74 68 65 20 4d 6f 64 65 | 6d 20 50 6f 72 74 2e 20 |the Mode|m Port. |
|000013f0| 20 54 6f 20 75 73 65 20 | 74 68 69 73 20 72 6f 75 | To use |this rou|
|00001400| 74 69 6e 65 20 70 6c 61 | 63 65 0d 3b 20 74 68 65 |tine pla|ce.; the|
|00001410| 20 62 79 74 65 20 74 6f | 20 62 65 20 74 72 61 6e | byte to| be tran|
|00001420| 73 6d 69 74 74 65 64 20 | 61 73 20 74 68 65 20 6c |smitted |as the l|
|00001430| 6f 77 65 72 20 38 20 62 | 69 74 73 0d 3b 20 6f 66 |ower 8 b|its.; of|
|00001440| 20 61 20 77 6f 72 64 20 | 6f 6e 20 74 68 65 20 73 | a word |on the s|
|00001450| 74 61 63 6b 2c 20 74 68 | 65 6e 20 63 61 6c 6c 20 |tack, th|en call |
|00001460| 54 78 4d 49 44 49 41 2e | 0d 0d 54 78 4d 49 44 49 |TxMIDIA.|..TxMIDI|
|00001470| 41 0d 09 09 09 4c 49 4e | 4b 09 09 41 36 2c 23 30 |A....LIN|K..A6,#0|
|00001480| 09 09 09 3b 20 73 65 74 | 20 66 72 61 6d 65 20 70 |...; set| frame p|
|00001490| 6f 69 6e 74 65 72 0d 09 | 09 09 4d 4f 56 45 09 09 |ointer..|..MOVE..|
|000014a0| 53 52 2c 2d 28 53 50 29 | 09 09 3b 20 53 61 76 65 |SR,-(SP)|..; Save|
|000014b0| 20 69 6e 74 65 72 72 75 | 70 74 73 0d 09 09 09 4d | interru|pts....M|
|000014c0| 4f 56 45 4d 2e 4c 09 09 | 44 30 2f 41 30 2d 41 33 |OVEM.L..|D0/A0-A3|
|000014d0| 2c 2d 28 53 50 29 09 3b | 20 53 61 76 65 20 72 65 |,-(SP).;| Save re|
|000014e0| 67 69 73 74 65 72 73 0d | 09 09 09 4f 52 49 09 09 |gisters.|...ORI..|
|000014f0| 09 23 24 30 33 30 30 2c | 53 52 09 09 3b 20 44 69 |.#$0300,|SR..; Di|
|00001500| 73 61 62 6c 65 20 69 6e | 74 65 72 72 75 70 74 73 |sable in|terrupts|
|00001510| 0d 09 09 09 0d 09 09 09 | 4c 45 41 09 09 09 54 78 |........|LEA...Tx|
|00001520| 51 45 6d 70 74 79 41 2c | 41 33 09 3b 20 67 65 74 |QEmptyA,|A3.; get|
|00001530| 20 74 68 65 20 61 64 64 | 72 65 73 73 0d 09 09 09 | the add|ress....|
|00001540| 54 53 54 2e 42 09 09 28 | 41 33 29 09 09 09 3b 20 |TST.B..(|A3)...; |
|00001550| 69 73 20 54 78 51 75 65 | 75 65 20 65 6d 70 74 79 |is TxQue|ue empty|
|00001560| 3f 0d 09 09 09 42 4e 45 | 09 09 09 54 78 51 45 41 |?....BNE|...TxQEA|
|00001570| 09 09 09 3b 20 69 66 20 | 73 6f 20 62 72 61 6e 63 |...; if |so branc|
|00001580| 68 0d 09 09 09 4c 45 41 | 09 09 09 54 78 42 79 74 |h....LEA|...TxByt|
|00001590| 65 49 6e 41 2c 41 33 09 | 09 3b 20 67 65 74 20 74 |eInA,A3.|.; get t|
|000015a0| 68 65 20 61 64 64 72 65 | 73 73 0d 09 09 09 4d 4f |he addre|ss....MO|
|000015b0| 56 45 09 09 28 41 33 29 | 2c 44 30 09 09 09 3b 20 |VE..(A3)|,D0...; |
|000015c0| 69 66 20 6e 6f 74 20 61 | 64 64 20 62 79 74 65 20 |if not a|dd byte |
|000015d0| 74 6f 20 71 75 65 75 65 | 0d 09 09 09 4c 45 41 09 |to queue|....LEA.|
|000015e0| 09 09 54 78 51 75 65 75 | 65 41 2c 41 32 09 09 3b |..TxQueu|eA,A2..;|
|000015f0| 20 70 6f 69 6e 74 20 74 | 6f 20 71 75 65 75 65 0d | point t|o queue.|
|00001600| 09 09 09 4d 4f 56 45 2e | 42 09 09 39 28 41 36 29 |...MOVE.|B..9(A6)|
|00001610| 2c 30 28 41 32 2c 44 30 | 29 09 3b 20 70 6c 61 63 |,0(A2,D0|).; plac|
|00001620| 65 20 62 79 74 65 20 69 | 6e 20 71 75 65 75 65 0d |e byte i|n queue.|
|00001630| 09 09 09 41 44 44 51 09 | 09 23 31 2c 44 30 09 09 |...ADDQ.|.#1,D0..|
|00001640| 09 3b 20 75 70 64 61 74 | 65 20 54 78 42 79 74 65 |.; updat|e TxByte|
|00001650| 49 6e 0d 09 09 09 43 4d | 50 09 09 09 23 24 31 30 |In....CM|P...#$10|
|00001660| 30 2c 44 30 0d 09 09 09 | 42 4e 45 09 09 09 40 31 |0,D0....|BNE...@1|
|00001670| 0d 09 09 09 4d 4f 56 45 | 09 09 23 30 2c 44 30 0d |....MOVE|..#0,D0.|
|00001680| 40 31 09 09 09 4d 4f 56 | 45 09 09 44 30 2c 28 41 |@1...MOV|E..D0,(A|
|00001690| 33 29 0d 09 09 09 42 52 | 41 09 09 09 54 78 45 78 |3)....BR|A...TxEx|
|000016a0| 69 74 41 09 09 09 3b 20 | 61 6e 64 20 65 78 69 74 |itA...; |and exit|
|000016b0| 0d 09 09 09 0d 54 78 51 | 45 41 0d 09 09 09 4d 4f |.....TxQ|EA....MO|
|000016c0| 56 45 2e 4c 09 09 53 43 | 43 52 64 2c 41 30 09 09 |VE.L..SC|CRd,A0..|
|000016d0| 3b 20 67 65 74 20 53 43 | 43 20 52 65 61 64 20 41 |; get SC|C Read A|
|000016e0| 64 64 72 65 73 73 0d 09 | 09 09 4d 4f 56 45 2e 4c |ddress..|..MOVE.L|
|000016f0| 09 09 53 43 43 57 72 2c | 41 31 09 09 3b 20 67 65 |..SCCWr,|A1..; ge|
|00001700| 74 20 53 43 43 20 57 72 | 69 74 65 20 41 64 64 72 |t SCC Wr|ite Addr|
|00001710| 65 73 73 0d 09 09 09 4d | 4f 56 45 09 09 23 61 43 |ess....M|OVE..#aC|
|00001720| 74 6c 2c 44 30 09 09 09 | 3b 20 67 65 74 20 69 6e |tl,D0...|; get in|
|00001730| 64 65 78 20 66 6f 72 20 | 43 74 6c 0d 09 09 09 42 |dex for |Ctl....B|
|00001740| 54 53 54 2e 42 09 09 23 | 54 42 45 2c 30 28 41 30 |TST.B..#|TBE,0(A0|
|00001750| 2c 44 30 29 09 3b 20 74 | 72 61 6e 73 6d 69 74 20 |,D0).; t|ransmit |
|00001760| 62 75 66 66 65 72 20 65 | 6d 70 74 79 3f 0d 09 09 |buffer e|mpty?...|
|00001770| 09 42 4e 45 09 09 09 46 | 69 72 73 74 42 79 74 65 |.BNE...F|irstByte|
|00001780| 41 09 09 3b 20 69 66 20 | 73 6f 20 62 72 61 6e 63 |A..; if |so branc|
|00001790| 68 0d 09 09 09 4c 45 41 | 09 09 09 54 78 42 79 74 |h....LEA|...TxByt|
|000017a0| 65 49 6e 41 2c 41 33 09 | 09 3b 20 67 65 74 20 74 |eInA,A3.|.; get t|
|000017b0| 68 65 20 61 64 64 72 65 | 73 73 0d 09 09 09 4d 4f |he addre|ss....MO|
|000017c0| 56 45 09 09 28 41 33 29 | 2c 44 30 09 09 09 3b 20 |VE..(A3)|,D0...; |
|000017d0| 69 66 20 6e 6f 74 20 61 | 64 64 20 74 6f 20 71 75 |if not a|dd to qu|
|000017e0| 65 75 65 0d 09 09 09 4c | 45 41 09 09 09 54 78 51 |eue....L|EA...TxQ|
|000017f0| 75 65 75 65 41 2c 41 32 | 09 09 3b 20 70 6f 69 6e |ueueA,A2|..; poin|
|00001800| 74 20 74 6f 20 71 75 65 | 75 65 0d 09 09 09 4d 4f |t to que|ue....MO|
|00001810| 56 45 2e 42 09 09 39 28 | 41 36 29 2c 30 28 41 32 |VE.B..9(|A6),0(A2|
|00001820| 2c 44 30 29 09 3b 20 70 | 6c 61 63 65 20 62 79 74 |,D0).; p|lace byt|
|00001830| 65 20 69 6e 20 71 75 65 | 75 65 0d 09 09 09 41 44 |e in que|ue....AD|
|00001840| 44 51 09 09 23 31 2c 44 | 30 09 09 09 3b 20 75 70 |DQ..#1,D|0...; up|
|00001850| 64 61 74 65 20 70 6f 69 | 6e 74 65 72 0d 09 09 09 |date poi|nter....|
|00001860| 43 4d 50 09 09 09 23 24 | 31 30 30 2c 44 30 0d 09 |CMP...#$|100,D0..|
|00001870| 09 09 42 4e 45 09 09 09 | 40 31 0d 09 09 09 4d 4f |..BNE...|@1....MO|
|00001880| 56 45 09 09 23 30 2c 44 | 30 0d 40 31 09 09 09 4d |VE..#0,D|0.@1...M|
|00001890| 4f 56 45 09 09 44 30 2c | 28 41 33 29 0d 09 09 09 |OVE..D0,|(A3)....|
|000018a0| 4c 45 41 09 09 09 54 78 | 51 45 6d 70 74 79 41 2c |LEA...Tx|QEmptyA,|
|000018b0| 41 33 09 3b 20 67 65 74 | 20 74 68 65 20 61 64 64 |A3.; get| the add|
|000018c0| 72 65 73 73 0d 09 09 09 | 4d 4f 56 45 09 09 23 30 |ress....|MOVE..#0|
|000018d0| 2c 28 41 33 29 09 09 09 | 3b 20 72 65 73 65 74 20 |,(A3)...|; reset |
|000018e0| 71 75 65 75 65 20 65 6d | 70 74 79 20 66 6c 61 67 |queue em|pty flag|
|000018f0| 0d 09 09 09 42 52 41 09 | 09 09 54 78 45 78 69 74 |....BRA.|..TxExit|
|00001900| 41 09 09 09 3b 20 61 6e | 64 20 65 78 69 74 0d 09 |A...; an|d exit..|
|00001910| 09 09 0d 46 69 72 73 74 | 42 79 74 65 41 0d 09 09 |...First|ByteA...|
|00001920| 09 4d 4f 56 45 09 09 23 | 61 44 61 74 61 2c 44 30 |.MOVE..#|aData,D0|
|00001930| 09 09 3b 20 67 65 74 20 | 69 6e 64 65 78 20 74 6f |..; get |index to|
|00001940| 20 64 61 74 61 0d 09 09 | 09 4d 4f 56 45 2e 4c 09 | data...|.MOVE.L.|
|00001950| 09 28 53 50 29 2c 28 53 | 50 29 09 09 3b 20 44 65 |.(SP),(S|P)..; De|
|00001960| 6c 61 79 0d 09 09 09 4d | 4f 56 45 2e 42 09 09 39 |lay....M|OVE.B..9|
|00001970| 28 41 36 29 2c 30 28 41 | 31 2c 44 30 29 09 3b 20 |(A6),0(A|1,D0).; |
|00001980| 77 72 69 74 65 20 64 61 | 74 61 20 74 6f 20 53 43 |write da|ta to SC|
|00001990| 43 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 28 53 50 |C....MOV|E.L..(SP|
|000019a0| 29 2c 28 53 50 29 09 09 | 3b 20 44 65 6c 61 79 0d |),(SP)..|; Delay.|
|000019b0| 09 09 09 0d 54 78 45 78 | 69 74 41 0d 09 09 09 4d |....TxEx|itA....M|
|000019c0| 4f 56 45 4d 2e 4c 09 09 | 28 53 50 29 2b 2c 44 30 |OVEM.L..|(SP)+,D0|
|000019d0| 2f 41 30 2d 41 33 09 3b | 20 52 65 73 74 6f 72 65 |/A0-A3.;| Restore|
|000019e0| 20 72 65 67 69 73 74 65 | 72 73 0d 09 09 09 4d 4f | registe|rs....MO|
|000019f0| 56 45 09 09 28 53 50 29 | 2b 2c 53 52 09 09 3b 20 |VE..(SP)|+,SR..; |
|00001a00| 52 65 73 74 6f 72 65 20 | 69 6e 74 65 72 72 75 70 |Restore |interrup|
|00001a10| 74 73 0d 09 09 09 55 4e | 4c 4b 09 09 41 36 09 09 |ts....UN|LK..A6..|
|00001a20| 09 09 3b 20 72 65 6c 65 | 61 73 65 20 66 72 61 6d |..; rele|ase fram|
|00001a30| 65 20 70 6f 69 6e 74 65 | 72 0d 09 09 09 4d 4f 56 |e pointe|r....MOV|
|00001a40| 45 2e 4c 09 09 28 53 50 | 29 2b 2c 41 31 09 09 3b |E.L..(SP|)+,A1..;|
|00001a50| 20 73 61 76 65 20 72 65 | 74 75 72 6e 20 61 64 64 | save re|turn add|
|00001a60| 72 65 73 73 0d 09 09 09 | 41 44 44 2e 4c 09 09 23 |ress....|ADD.L..#|
|00001a70| 32 2c 53 50 09 09 09 3b | 20 6d 6f 76 65 20 70 61 |2,SP...;| move pa|
|00001a80| 73 74 20 64 61 74 61 20 | 77 6f 72 64 0d 09 09 09 |st data |word....|
|00001a90| 4d 4f 56 45 2e 4c 09 09 | 41 31 2c 2d 28 53 50 29 |MOVE.L..|A1,-(SP)|
|00001aa0| 09 09 3b 20 70 75 74 20 | 61 64 64 72 65 73 73 20 |..; put |address |
|00001ab0| 62 61 63 6b 20 6f 6e 20 | 73 74 61 63 6b 0d 09 09 |back on |stack...|
|00001ac0| 09 52 54 53 09 09 09 09 | 09 09 09 3b 20 61 6e 64 |.RTS....|...; and|
|00001ad0| 20 72 65 74 75 72 6e 0d | 09 09 09 0d 3b 20 20 20 | return.|....; |
|00001ae0| 20 20 20 46 75 6e 63 74 | 69 6f 6e 20 52 78 4d 49 | Funct|ion RxMI|
|00001af0| 44 49 41 20 3a 20 4c 6f | 6e 67 49 6e 74 3b 0d 3b |DIA : Lo|ngInt;.;|
|00001b00| 20 54 68 69 73 20 72 6f | 75 74 69 6e 65 20 67 65 | This ro|utine ge|
|00001b10| 74 73 20 61 20 62 79 74 | 65 20 74 68 72 6f 75 67 |ts a byt|e throug|
|00001b20| 68 20 74 68 65 20 6d 6f | 64 65 6d 20 70 6f 72 74 |h the mo|dem port|
|00001b30| 2e 0d 3b 20 54 6f 20 75 | 73 65 20 74 68 69 73 20 |..; To u|se this |
|00001b40| 72 6f 75 74 69 6e 65 20 | 74 72 65 61 74 20 69 74 |routine |treat it|
|00001b50| 20 6c 69 6b 65 20 61 20 | 50 61 73 63 61 6c 0d 3b | like a |Pascal.;|
|00001b60| 20 66 75 6e 63 74 69 6f | 6e 2e 20 20 4c 65 61 76 | functio|n. Leav|
|00001b70| 65 20 73 70 61 63 65 20 | 6f 6e 20 74 68 65 20 73 |e space |on the s|
|00001b80| 74 61 63 6b 20 66 6f 72 | 20 61 20 6c 6f 6e 67 77 |tack for| a longw|
|00001b90| 6f 72 64 0d 3b 20 6f 66 | 20 64 61 74 61 20 62 65 |ord.; of| data be|
|00001ba0| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |fore cal|ling thi|
|00001bb0| 73 20 72 6f 75 74 69 6e | 65 2e 20 20 49 66 20 74 |s routin|e. If t|
|00001bc0| 68 65 20 64 61 74 61 0d | 3b 20 6f 6e 20 74 68 65 |he data.|; on the|
|00001bd0| 20 73 74 61 63 6b 20 61 | 66 74 65 72 0d 3b 20 74 | stack a|fter.; t|
|00001be0| 68 65 20 72 6f 75 74 69 | 6e 65 20 65 78 65 63 75 |he routi|ne execu|
|00001bf0| 74 65 73 20 69 73 20 30 | 20 74 68 65 72 65 20 77 |tes is 0| there w|
|00001c00| 61 73 20 6e 6f 20 4d 49 | 44 49 20 64 61 74 61 20 |as no MI|DI data |
|00001c10| 61 76 61 69 6c 61 62 6c | 65 2e 0d 3b 20 49 66 20 |availabl|e..; If |
|00001c20| 69 74 27 73 20 6e 6f 6e | 2d 30 20 74 68 65 20 75 |it's non|-0 the u|
|00001c30| 70 70 65 72 20 33 20 62 | 79 74 65 73 20 63 6f 6e |pper 3 b|ytes con|
|00001c40| 74 61 69 6e 20 74 68 65 | 20 63 6f 75 6e 74 65 72 |tain the| counter|
|00001c50| 0d 3b 20 76 61 6c 75 65 | 2c 20 74 68 65 20 4d 49 |.; value|, the MI|
|00001c60| 44 49 20 62 79 74 65 20 | 69 73 20 74 68 65 20 6c |DI byte |is the l|
|00001c70| 6f 77 20 62 79 74 65 2e | 0d 0d 52 78 4d 49 44 49 |ow byte.|..RxMIDI|
|00001c80| 41 0d 09 09 09 4c 49 4e | 4b 09 09 41 36 2c 23 30 |A....LIN|K..A6,#0|
|00001c90| 09 09 09 3b 20 73 65 74 | 20 66 72 61 6d 65 20 70 |...; set| frame p|
|00001ca0| 6f 69 6e 74 65 72 0d 09 | 09 09 4d 4f 56 45 09 09 |ointer..|..MOVE..|
|00001cb0| 53 52 2c 2d 28 53 50 29 | 09 09 3b 20 73 61 76 65 |SR,-(SP)|..; save|
|00001cc0| 20 69 6e 74 65 72 72 75 | 70 74 73 0d 09 09 09 4d | interru|pts....M|
|00001cd0| 4f 56 45 4d 2e 4c 09 09 | 44 30 2d 44 31 2f 41 30 |OVEM.L..|D0-D1/A0|
|00001ce0| 2d 41 33 2c 2d 28 53 50 | 29 09 3b 20 53 61 76 65 |-A3,-(SP|).; Save|
|00001cf0| 20 72 65 67 69 73 74 65 | 72 73 0d 09 09 09 4f 52 | registe|rs....OR|
|00001d00| 49 09 09 09 23 24 30 33 | 30 30 2c 53 52 09 09 3b |I...#$03|00,SR..;|
|00001d10| 20 64 69 73 61 62 6c 65 | 20 69 6e 74 65 72 72 75 | disable| interru|
|00001d20| 70 74 73 0d 09 09 09 0d | 09 09 09 4c 45 41 09 09 |pts.....|...LEA..|
|00001d30| 09 52 78 51 45 6d 70 74 | 79 41 2c 41 33 09 3b 20 |.RxQEmpt|yA,A3.; |
|00001d40| 67 65 74 20 74 68 65 20 | 61 64 64 72 65 73 73 0d |get the |address.|
|00001d50| 09 09 09 54 53 54 2e 42 | 09 09 28 41 33 29 09 09 |...TST.B|..(A3)..|
|00001d60| 09 3b 20 61 6e 79 20 64 | 61 74 61 20 61 76 61 69 |.; any d|ata avai|
|00001d70| 6c 61 62 6c 65 3f 0d 09 | 09 09 42 45 51 09 09 09 |lable?..|..BEQ...|
|00001d80| 40 31 09 09 09 09 3b 20 | 69 66 20 73 6f 2c 20 62 |@1....; |if so, b|
|00001d90| 72 61 6e 63 68 0d 09 09 | 09 4d 4f 56 45 2e 4c 09 |ranch...|.MOVE.L.|
|00001da0| 09 23 30 2c 38 28 41 36 | 29 09 09 3b 20 69 66 20 |.#0,8(A6|)..; if |
|00001db0| 6e 6f 74 2c 20 72 65 74 | 75 72 6e 20 77 69 74 68 |not, ret|urn with|
|00001dc0| 20 30 0d 09 09 09 42 52 | 41 09 09 09 52 78 45 78 | 0....BR|A...RxEx|
|00001dd0| 69 74 41 0d 40 31 09 09 | 09 4c 45 41 09 09 09 52 |itA.@1..|.LEA...R|
|00001de0| 78 42 79 74 65 4f 75 74 | 41 2c 41 33 09 3b 20 67 |xByteOut|A,A3.; g|
|00001df0| 65 74 20 74 68 65 20 61 | 64 64 72 65 73 73 0d 09 |et the a|ddress..|
|00001e00| 09 09 4d 4f 56 45 09 09 | 28 41 33 29 2c 44 30 09 |..MOVE..|(A3),D0.|
|00001e10| 09 09 3b 20 67 65 74 20 | 69 6e 64 65 78 20 74 6f |..; get |index to|
|00001e20| 20 62 79 74 65 20 6f 75 | 74 0d 09 09 09 4c 45 41 | byte ou|t....LEA|
|00001e30| 09 09 09 52 78 51 75 65 | 75 65 41 2c 41 32 09 09 |...RxQue|ueA,A2..|
|00001e40| 3b 20 70 6f 69 6e 74 20 | 74 6f 20 71 75 65 75 65 |; point |to queue|
|00001e50| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 23 30 2c 44 |....MOVE|.L..#0,D|
|00001e60| 31 09 09 09 3b 20 63 6c | 65 61 72 20 64 61 74 61 |1...; cl|ear data|
|00001e70| 20 72 65 67 69 73 74 65 | 72 0d 09 09 09 4d 4f 56 | registe|r....MOV|
|00001e80| 45 2e 4c 09 09 30 28 41 | 32 2c 44 30 29 2c 44 31 |E.L..0(A|2,D0),D1|
|00001e90| 09 09 3b 20 67 65 74 20 | 4d 49 44 49 20 64 61 74 |..; get |MIDI dat|
|00001ea0| 61 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 44 31 2c |a....MOV|E.L..D1,|
|00001eb0| 38 28 41 36 29 09 09 3b | 20 70 6c 61 63 65 20 6f |8(A6)..;| place o|
|00001ec0| 6e 20 73 74 61 63 6b 20 | 66 6f 72 20 72 65 74 75 |n stack |for retu|
|00001ed0| 72 6e 0d 09 09 09 41 44 | 44 51 09 09 23 34 2c 44 |rn....AD|DQ..#4,D|
|00001ee0| 30 09 09 09 3b 20 75 70 | 64 61 74 65 20 69 6e 64 |0...; up|date ind|
|00001ef0| 65 78 0d 09 09 09 43 4d | 50 09 09 09 23 24 34 30 |ex....CM|P...#$40|
|00001f00| 30 2c 44 30 0d 09 09 09 | 42 4e 45 09 09 09 40 32 |0,D0....|BNE...@2|
|00001f10| 0d 09 09 09 4d 4f 56 45 | 09 09 23 30 2c 44 30 0d |....MOVE|..#0,D0.|
|00001f20| 40 32 09 09 09 4c 45 41 | 09 09 09 52 78 42 79 74 |@2...LEA|...RxByt|
|00001f30| 65 4f 75 74 41 2c 41 33 | 09 3b 20 67 65 74 20 74 |eOutA,A3|.; get t|
|00001f40| 68 65 20 61 64 64 72 65 | 73 73 0d 09 09 09 4d 4f |he addre|ss....MO|
|00001f50| 56 45 09 09 44 30 2c 28 | 41 33 29 0d 09 09 09 4c |VE..D0,(|A3)....L|
|00001f60| 45 41 09 09 09 52 78 42 | 79 74 65 49 6e 41 2c 41 |EA...RxB|yteInA,A|
|00001f70| 33 09 09 3b 20 67 65 74 | 20 74 68 65 20 61 64 64 |3..; get| the add|
|00001f80| 72 65 73 73 0d 09 09 09 | 4d 4f 56 45 09 09 28 41 |ress....|MOVE..(A|
|00001f90| 33 29 2c 44 31 0d 09 09 | 09 43 4d 50 09 09 09 44 |3),D1...|.CMP...D|
|00001fa0| 30 2c 44 31 09 09 09 3b | 20 69 73 20 71 75 65 75 |0,D1...;| is queu|
|00001fb0| 65 20 65 6d 70 74 79 3f | 0d 09 09 09 42 4e 45 09 |e empty?|....BNE.|
|00001fc0| 09 09 52 78 45 78 69 74 | 41 09 09 09 3b 20 69 66 |..RxExit|A...; if|
|00001fd0| 20 6e 6f 74 20 65 78 69 | 74 0d 09 09 09 4c 45 41 | not exi|t....LEA|
|00001fe0| 09 09 09 52 78 51 45 6d | 70 74 79 41 2c 41 33 09 |...RxQEm|ptyA,A3.|
|00001ff0| 3b 20 67 65 74 20 74 68 | 65 20 61 64 64 72 65 73 |; get th|e addres|
|00002000| 73 0d 09 09 09 4d 4f 56 | 45 09 09 23 24 46 46 46 |s....MOV|E..#$FFF|
|00002010| 46 2c 28 41 33 29 09 09 | 3b 20 69 66 20 65 6d 70 |F,(A3)..|; if emp|
|00002020| 74 79 2c 20 73 65 74 20 | 66 6c 61 67 0d 09 09 09 |ty, set |flag....|
|00002030| 0d 52 78 45 78 69 74 41 | 0d 09 09 09 4d 4f 56 45 |.RxExitA|....MOVE|
|00002040| 4d 2e 4c 09 09 28 53 50 | 29 2b 2c 44 30 2d 44 31 |M.L..(SP|)+,D0-D1|
|00002050| 2f 41 30 2d 41 33 09 3b | 20 52 65 73 74 6f 72 65 |/A0-A3.;| Restore|
|00002060| 20 72 65 67 69 73 74 65 | 72 73 0d 09 09 09 4d 4f | registe|rs....MO|
|00002070| 56 45 09 09 28 53 50 29 | 2b 2c 53 52 09 09 3b 20 |VE..(SP)|+,SR..; |
|00002080| 72 65 73 74 6f 72 65 20 | 69 6e 74 65 72 72 75 70 |restore |interrup|
|00002090| 74 73 0d 09 09 09 55 4e | 4c 4b 09 09 41 36 0d 09 |ts....UN|LK..A6..|
|000020a0| 09 09 52 54 53 09 09 09 | 09 09 09 09 3b 20 61 6e |..RTS...|....; an|
|000020b0| 64 20 72 65 74 75 72 6e | 0d 09 09 09 0d 3b 20 20 |d return|.....; |
|000020c0| 54 68 69 73 20 69 73 20 | 74 68 65 20 69 6e 74 65 |This is |the inte|
|000020d0| 72 72 75 70 74 20 72 6f | 75 74 69 6e 65 20 66 6f |rrupt ro|utine fo|
|000020e0| 72 20 72 65 63 65 69 76 | 69 6e 67 20 74 68 72 6f |r receiv|ing thro|
|000020f0| 75 67 68 0d 3b 20 74 68 | 65 20 6d 6f 64 65 6d 20 |ugh.; th|e modem |
|00002100| 70 6f 72 74 2e 20 20 49 | 74 20 70 6c 61 63 65 73 |port. I|t places|
|00002110| 20 74 68 65 20 63 6f 75 | 6e 74 65 72 20 76 61 6c | the cou|nter val|
|00002120| 75 65 20 61 6e 64 20 74 | 68 65 0d 3b 20 4d 49 44 |ue and t|he.; MID|
|00002130| 49 20 62 79 74 65 20 69 | 6e 20 61 20 63 69 72 63 |I byte i|n a circ|
|00002140| 75 6c 61 72 20 71 75 65 | 75 65 20 74 6f 20 62 65 |ular que|ue to be|
|00002150| 0d 3b 20 61 63 63 65 73 | 73 65 64 20 6c 61 74 65 |.; acces|sed late|
|00002160| 72 20 62 79 20 74 68 65 | 20 61 70 70 6c 69 63 61 |r by the| applica|
|00002170| 74 69 6f 6e 2e 0d 3b 20 | 57 68 65 6e 20 74 68 65 |tion..; |When the|
|00002180| 20 73 79 73 74 65 6d 20 | 67 65 74 73 20 74 68 69 | system |gets thi|
|00002190| 73 20 66 61 72 2c 20 41 | 30 20 63 6f 6e 74 61 69 |s far, A|0 contai|
|000021a0| 6e 73 20 74 68 65 0d 3b | 20 53 43 43 20 62 61 73 |ns the.;| SCC bas|
|000021b0| 65 20 72 65 61 64 20 43 | 74 6c 20 61 64 64 72 65 |e read C|tl addre|
|000021c0| 73 73 0d 3b 20 61 6e 64 | 20 41 31 20 63 6f 6e 74 |ss.; and| A1 cont|
|000021d0| 61 69 6e 73 20 74 68 65 | 20 53 43 43 20 62 61 73 |ains the| SCC bas|
|000021e0| 65 20 77 72 69 74 65 20 | 43 74 6c 20 61 64 64 72 |e write |Ctl addr|
|000021f0| 65 73 73 0d 3b 20 66 6f | 72 20 74 68 69 73 20 63 |ess.; fo|r this c|
|00002200| 68 61 6e 6e 65 6c 2e 20 | 20 54 68 65 20 64 61 74 |hannel. | The dat|
|00002210| 61 20 61 64 64 72 65 73 | 73 65 73 20 61 72 65 20 |a addres|ses are |
|00002220| 6f 66 66 73 65 74 20 62 | 79 20 34 0d 3b 20 66 72 |offset b|y 4.; fr|
|00002230| 6f 6d 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 20 61 |om the c|ontrol a|
|00002240| 64 64 72 65 73 73 65 73 | 2e 0d 3b 20 44 30 2d 44 |ddresses|..; D0-D|
|00002250| 33 2f 41 30 2d 41 33 20 | 61 72 65 20 61 6c 72 65 |3/A0-A3 |are alre|
|00002260| 61 64 79 20 70 72 65 73 | 65 72 76 65 64 2c 20 73 |ady pres|erved, s|
|00002270| 6f 20 74 68 65 79 20 6d | 61 79 0d 3b 20 62 65 20 |o they m|ay.; be |
|00002280| 75 73 65 64 20 66 72 65 | 65 6c 79 2e 0d 0d 52 78 |used fre|ely...Rx|
|00002290| 49 6e 74 48 61 6e 64 41 | 0d 09 09 09 4f 52 49 09 |IntHandA|....ORI.|
|000022a0| 09 09 23 24 30 33 30 30 | 2c 53 52 09 09 3b 20 64 |..#$0300|,SR..; d|
|000022b0| 69 73 61 62 6c 65 20 69 | 6e 74 65 72 72 75 70 74 |isable i|nterrupt|
|000022c0| 73 0d 09 09 09 0d 40 33 | 09 09 09 4d 4f 56 45 09 |s.....@3|...MOVE.|
|000022d0| 09 23 34 2c 44 30 09 09 | 09 3b 20 67 65 74 20 64 |.#4,D0..|.; get d|
|000022e0| 61 74 61 20 6f 66 66 73 | 65 74 0d 09 09 09 43 4c |ata offs|et....CL|
|000022f0| 52 2e 4c 09 09 44 31 09 | 09 09 09 3b 20 70 72 65 |R.L..D1.|...; pre|
|00002300| 70 61 72 65 20 66 6f 72 | 20 64 61 74 61 0d 09 09 |pare for| data...|
|00002310| 09 4d 4f 56 45 2e 4c 09 | 09 28 53 50 29 2c 28 53 |.MOVE.L.|.(SP),(S|
|00002320| 50 29 09 09 3b 20 44 65 | 6c 61 79 0d 09 09 09 4d |P)..; De|lay....M|
|00002330| 4f 56 45 2e 42 09 09 30 | 28 41 30 2c 44 30 29 2c |OVE.B..0|(A0,D0),|
|00002340| 44 31 09 09 3b 20 72 65 | 61 64 20 64 61 74 61 20 |D1..; re|ad data |
|00002350| 66 72 6f 6d 20 53 43 43 | 0d 09 09 09 4d 4f 56 45 |from SCC|....MOVE|
|00002360| 2e 4c 09 09 28 53 50 29 | 2c 28 53 50 29 09 09 3b |.L..(SP)|,(SP)..;|
|00002370| 20 44 65 6c 61 79 0d 09 | 09 09 4c 45 41 09 09 09 | Delay..|..LEA...|
|00002380| 52 78 51 75 65 75 65 41 | 2c 41 32 09 09 3b 20 70 |RxQueueA|,A2..; p|
|00002390| 6f 69 6e 74 20 74 6f 20 | 71 75 65 75 65 0d 09 09 |oint to |queue...|
|000023a0| 09 4c 45 41 09 09 09 52 | 78 42 79 74 65 49 6e 41 |.LEA...R|xByteInA|
|000023b0| 2c 41 33 09 09 3b 20 67 | 65 74 20 74 68 65 20 61 |,A3..; g|et the a|
|000023c0| 64 64 72 65 73 73 0d 09 | 09 09 4d 4f 56 45 09 09 |ddress..|..MOVE..|
|000023d0| 28 41 33 29 2c 44 30 09 | 09 09 3b 20 67 65 74 20 |(A3),D0.|..; get |
|000023e0| 6f 66 66 73 65 74 20 74 | 6f 20 6e 65 78 74 20 63 |offset t|o next c|
|000023f0| 65 6c 6c 0d 09 09 09 4c | 45 41 09 09 09 43 6f 75 |ell....L|EA...Cou|
|00002400| 6e 74 65 72 2c 41 33 09 | 09 3b 20 67 65 74 20 74 |nter,A3.|.; get t|
|00002410| 68 65 20 61 64 64 72 65 | 73 73 0d 09 09 09 4d 4f |he addre|ss....MO|
|00002420| 56 45 2e 4c 09 09 28 41 | 33 29 2c 44 32 09 09 09 |VE.L..(A|3),D2...|
|00002430| 3b 20 70 75 74 20 63 6f | 75 6e 74 65 72 20 76 61 |; put co|unter va|
|00002440| 6c 75 65 20 69 6e 20 44 | 32 0d 09 09 09 4c 53 4c |lue in D|2....LSL|
|00002450| 2e 4c 09 09 23 38 2c 44 | 32 09 09 09 3b 20 73 68 |.L..#8,D|2...; sh|
|00002460| 69 66 74 20 63 6f 75 6e | 74 65 72 20 6f 6e 65 20 |ift coun|ter one |
|00002470| 62 79 74 65 0d 09 09 09 | 41 44 44 2e 4c 09 09 44 |byte....|ADD.L..D|
|00002480| 32 2c 44 31 09 09 09 3b | 20 63 6f 6d 62 69 6e 65 |2,D1...;| combine|
|00002490| 20 63 6f 75 6e 74 65 72 | 20 61 6e 64 20 64 61 74 | counter| and dat|
|000024a0| 61 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 44 31 2c |a....MOV|E.L..D1,|
|000024b0| 30 28 41 32 2c 44 30 29 | 09 09 3b 20 70 75 74 20 |0(A2,D0)|..; put |
|000024c0| 6c 6f 6e 67 77 6f 72 64 | 20 69 6e 20 71 75 65 75 |longword| in queu|
|000024d0| 65 0d 09 09 09 4c 45 41 | 09 09 09 52 78 51 45 6d |e....LEA|...RxQEm|
|000024e0| 70 74 79 41 2c 41 33 09 | 3b 20 67 65 74 20 74 68 |ptyA,A3.|; get th|
|000024f0| 65 20 61 64 64 72 65 73 | 73 0d 09 09 09 4d 4f 56 |e addres|s....MOV|
|00002500| 45 09 09 23 30 2c 28 41 | 33 29 09 09 09 3b 20 72 |E..#0,(A|3)...; r|
|00002510| 65 73 65 74 20 71 75 65 | 75 65 20 65 6d 70 74 79 |eset que|ue empty|
|00002520| 20 66 6c 61 67 0d 09 09 | 09 41 44 44 51 09 09 23 | flag...|.ADDQ..#|
|00002530| 34 2c 44 30 09 09 09 3b | 20 75 70 64 61 74 65 20 |4,D0...;| update |
|00002540| 69 6e 64 65 78 0d 09 09 | 09 43 4d 50 09 09 09 23 |index...|.CMP...#|
|00002550| 24 34 30 30 2c 44 30 0d | 09 09 09 42 4e 45 09 09 |$400,D0.|...BNE..|
|00002560| 09 40 31 0d 09 09 09 4d | 4f 56 45 09 09 23 30 2c |.@1....M|OVE..#0,|
|00002570| 44 30 0d 40 31 09 09 09 | 4c 45 41 09 09 09 52 78 |D0.@1...|LEA...Rx|
|00002580| 42 79 74 65 49 6e 41 2c | 41 33 09 09 3b 20 67 65 |ByteInA,|A3..; ge|
|00002590| 74 20 74 68 65 20 61 64 | 64 72 65 73 73 0d 09 09 |t the ad|dress...|
|000025a0| 09 4d 4f 56 45 09 09 44 | 30 2c 28 41 33 29 0d 09 |.MOVE..D|0,(A3)..|
|000025b0| 09 09 0d 40 32 09 09 09 | 42 54 53 54 2e 42 09 09 |...@2...|BTST.B..|
|000025c0| 23 30 2c 28 41 30 29 09 | 09 09 3b 20 69 73 20 74 |#0,(A0).|..; is t|
|000025d0| 68 65 72 65 20 6d 6f 72 | 65 20 64 61 74 61 3f 0d |here mor|e data?.|
|000025e0| 09 09 09 42 4e 45 09 09 | 09 40 33 09 09 09 09 3b |...BNE..|.@3....;|
|000025f0| 20 64 6f 20 69 74 20 61 | 67 61 69 6e 20 69 66 20 | do it a|gain if |
|00002600| 74 68 65 72 65 20 69 73 | 0d 09 09 09 0d 09 09 09 |there is|........|
|00002610| 41 4e 44 49 09 09 23 24 | 46 38 46 46 2c 53 52 09 |ANDI..#$|F8FF,SR.|
|00002620| 09 3b 20 65 6e 61 62 6c | 65 20 69 6e 74 65 72 72 |.; enabl|e interr|
|00002630| 75 70 74 73 0d 09 09 09 | 52 54 53 09 09 09 09 09 |upts....|RTS.....|
|00002640| 09 09 3b 20 61 6e 64 20 | 72 65 74 75 72 6e 0d 09 |..; and |return..|
|00002650| 09 09 0d 3b 20 54 68 69 | 73 20 69 73 20 74 68 65 |...; Thi|s is the|
|00002660| 20 69 6e 74 65 72 72 75 | 70 74 20 72 6f 75 74 69 | interru|pt routi|
|00002670| 6e 65 20 66 6f 72 20 74 | 72 61 6e 73 6d 69 74 74 |ne for t|ransmitt|
|00002680| 69 6e 67 20 61 20 62 79 | 74 65 0d 3b 20 74 68 72 |ing a by|te.; thr|
|00002690| 6f 75 67 68 20 74 68 65 | 20 6d 6f 64 65 6d 20 70 |ough the| modem p|
|000026a0| 6f 72 74 2e 20 20 49 74 | 20 63 68 65 63 6b 73 20 |ort. It| checks |
|000026b0| 74 6f 20 73 65 65 20 69 | 66 20 74 68 65 72 65 0d |to see i|f there.|
|000026c0| 3b 20 69 73 20 61 6e 79 | 20 64 61 74 61 20 74 6f |; is any| data to|
|000026d0| 20 73 65 6e 64 2c 20 61 | 6e 64 20 69 66 20 74 68 | send, a|nd if th|
|000026e0| 65 72 65 20 69 73 20 69 | 74 20 73 65 6e 64 73 20 |ere is i|t sends |
|000026f0| 69 74 20 74 6f 0d 3b 20 | 74 68 65 20 53 43 43 2e |it to.; |the SCC.|
|00002700| 20 20 49 66 20 74 68 65 | 72 65 20 69 73 6e 27 74 | If the|re isn't|
|00002710| 20 69 74 20 72 65 73 65 | 74 73 20 74 68 65 20 54 | it rese|ts the T|
|00002720| 42 45 20 69 6e 74 65 72 | 72 75 70 74 0d 3b 20 69 |BE inter|rupt.; i|
|00002730| 6e 20 74 68 65 20 53 43 | 43 20 61 6e 64 20 65 78 |n the SC|C and ex|
|00002740| 69 74 73 2e 0d 3b 20 57 | 68 65 6e 20 74 68 65 20 |its..; W|hen the |
|00002750| 73 79 73 74 65 6d 20 67 | 65 74 73 20 74 68 69 73 |system g|ets this|
|00002760| 20 66 61 72 2c 20 41 30 | 20 63 6f 6e 74 61 69 6e | far, A0| contain|
|00002770| 73 20 74 68 65 20 53 43 | 43 0d 3b 20 62 61 73 65 |s the SC|C.; base|
|00002780| 20 72 65 61 64 20 43 74 | 6c 20 61 64 64 72 65 73 | read Ct|l addres|
|00002790| 73 20 61 6e 64 20 41 31 | 20 63 6f 6e 74 61 69 6e |s and A1| contain|
|000027a0| 73 20 74 68 65 20 53 43 | 43 20 62 61 73 65 0d 3b |s the SC|C base.;|
|000027b0| 20 77 72 69 74 65 20 43 | 74 6c 20 61 64 64 72 65 | write C|tl addre|
|000027c0| 73 73 20 66 6f 72 20 74 | 68 69 73 20 63 68 61 6e |ss for t|his chan|
|000027d0| 6e 65 6c 2e 0d 3b 20 54 | 68 65 20 64 61 74 61 20 |nel..; T|he data |
|000027e0| 61 64 64 72 65 73 73 65 | 73 20 61 72 65 20 6f 66 |addresse|s are of|
|000027f0| 66 73 65 74 20 62 79 20 | 34 20 66 72 6f 6d 20 74 |fset by |4 from t|
|00002800| 68 65 20 63 6f 6e 74 72 | 6f 6c 0d 3b 20 61 64 64 |he contr|ol.; add|
|00002810| 72 65 73 73 65 73 2e 20 | 44 30 2d 44 33 2f 41 30 |resses. |D0-D3/A0|
|00002820| 2d 41 33 20 61 72 65 20 | 61 6c 72 65 61 64 79 20 |-A3 are |already |
|00002830| 70 72 65 73 65 72 76 65 | 64 2c 20 73 6f 0d 3b 20 |preserve|d, so.; |
|00002840| 74 68 65 79 20 6d 61 79 | 20 62 65 20 75 73 65 64 |they may| be used|
|00002850| 20 66 72 65 65 6c 79 2e | 0d 0d 54 78 49 6e 74 48 | freely.|..TxIntH|
|00002860| 61 6e 64 41 0d 09 09 09 | 4f 52 49 09 09 09 23 24 |andA....|ORI...#$|
|00002870| 30 33 30 30 2c 53 52 09 | 09 3b 20 64 69 73 61 62 |0300,SR.|.; disab|
|00002880| 6c 65 20 69 6e 74 65 72 | 72 75 70 74 73 0d 09 09 |le inter|rupts...|
|00002890| 09 0d 09 09 09 4c 45 41 | 09 09 09 54 78 51 45 6d |.....LEA|...TxQEm|
|000028a0| 70 74 79 41 2c 41 33 09 | 3b 20 67 65 74 20 74 68 |ptyA,A3.|; get th|
|000028b0| 65 20 61 64 64 72 65 73 | 73 0d 09 09 09 54 53 54 |e addres|s....TST|
|000028c0| 2e 42 09 09 28 41 33 29 | 09 09 09 3b 20 49 73 20 |.B..(A3)|...; Is |
|000028d0| 71 75 65 75 65 20 65 6d | 70 74 79 3f 0d 09 09 09 |queue em|pty?....|
|000028e0| 42 45 51 09 09 09 40 31 | 09 09 09 09 3b 20 69 66 |BEQ...@1|....; if|
|000028f0| 20 6e 6f 74 20 62 72 61 | 6e 63 68 0d 09 09 09 4d | not bra|nch....M|
|00002900| 4f 56 45 2e 42 09 09 23 | 24 32 38 2c 28 41 31 29 |OVE.B..#|$28,(A1)|
|00002910| 09 09 3b 20 69 66 20 73 | 6f 2c 20 72 65 73 65 74 |..; if s|o, reset|
|00002920| 20 54 42 45 20 69 6e 74 | 65 72 72 75 70 74 0d 09 | TBE int|errupt..|
|00002930| 09 09 4d 4f 56 45 2e 4c | 09 09 28 53 50 29 2c 28 |..MOVE.L|..(SP),(|
|00002940| 53 50 29 09 09 3b 20 44 | 65 6c 61 79 0d 09 09 09 |SP)..; D|elay....|
|00002950| 42 52 41 09 09 09 54 78 | 49 45 78 69 74 41 09 09 |BRA...Tx|IExitA..|
|00002960| 09 3b 20 61 6e 64 20 65 | 78 69 74 0d 40 31 09 09 |.; and e|xit.@1..|
|00002970| 09 4c 45 41 09 09 09 54 | 78 42 79 74 65 4f 75 74 |.LEA...T|xByteOut|
|00002980| 41 2c 41 33 09 3b 20 67 | 65 74 20 74 68 65 20 61 |A,A3.; g|et the a|
|00002990| 64 64 72 65 73 73 0d 09 | 09 09 4d 4f 56 45 09 09 |ddress..|..MOVE..|
|000029a0| 28 41 33 29 2c 44 30 09 | 09 09 3b 20 67 65 74 20 |(A3),D0.|..; get |
|000029b0| 69 6e 64 65 78 20 74 6f | 20 6e 65 78 74 20 64 61 |index to| next da|
|000029c0| 74 61 20 62 79 74 65 0d | 09 09 09 4c 45 41 09 09 |ta byte.|...LEA..|
|000029d0| 09 54 78 51 75 65 75 65 | 41 2c 41 32 09 09 3b 20 |.TxQueue|A,A2..; |
|000029e0| 70 6f 69 6e 74 20 74 6f | 20 71 75 65 75 65 0d 09 |point to| queue..|
|000029f0| 09 09 4d 4f 56 45 09 09 | 23 34 2c 44 31 09 09 09 |..MOVE..|#4,D1...|
|00002a00| 3b 20 67 65 74 20 64 61 | 74 61 20 6f 66 66 73 65 |; get da|ta offse|
|00002a10| 74 0d 09 09 09 4d 4f 56 | 45 2e 42 09 09 30 28 41 |t....MOV|E.B..0(A|
|00002a20| 32 2c 44 30 29 2c 30 28 | 41 31 2c 44 31 29 09 3b |2,D0),0(|A1,D1).;|
|00002a30| 20 77 72 69 74 65 20 64 | 61 74 61 20 74 6f 20 53 | write d|ata to S|
|00002a40| 43 43 0d 09 09 09 4d 4f | 56 45 2e 4c 09 09 28 53 |CC....MO|VE.L..(S|
|00002a50| 50 29 2c 28 53 50 29 09 | 09 3b 20 44 65 6c 61 79 |P),(SP).|.; Delay|
|00002a60| 0d 09 09 09 41 44 44 51 | 09 09 23 31 2c 44 30 09 |....ADDQ|..#1,D0.|
|00002a70| 09 09 3b 20 75 70 64 61 | 74 65 20 69 6e 64 65 78 |..; upda|te index|
|00002a80| 0d 09 09 09 43 4d 50 09 | 09 09 23 24 31 30 30 2c |....CMP.|..#$100,|
|00002a90| 44 30 0d 09 09 09 42 4e | 45 09 09 09 40 32 0d 09 |D0....BN|E...@2..|
|00002aa0| 09 09 4d 4f 56 45 09 09 | 23 30 2c 44 30 0d 40 32 |..MOVE..|#0,D0.@2|
|00002ab0| 09 09 09 4c 45 41 09 09 | 09 54 78 42 79 74 65 4f |...LEA..|.TxByteO|
|00002ac0| 75 74 41 2c 41 33 09 3b | 20 67 65 74 20 74 68 65 |utA,A3.;| get the|
|00002ad0| 20 61 64 64 72 65 73 73 | 0d 09 09 09 4d 4f 56 45 | address|....MOVE|
|00002ae0| 09 09 44 30 2c 28 41 33 | 29 0d 09 09 09 4c 45 41 |..D0,(A3|)....LEA|
|00002af0| 09 09 09 54 78 42 79 74 | 65 49 6e 41 2c 41 33 09 |...TxByt|eInA,A3.|
|00002b00| 09 3b 20 67 65 74 20 74 | 68 65 20 61 64 64 72 65 |.; get t|he addre|
|00002b10| 73 73 0d 09 09 09 4d 4f | 56 45 09 09 28 41 33 29 |ss....MO|VE..(A3)|
|00002b20| 2c 44 31 0d 09 09 09 43 | 4d 50 09 09 09 44 30 2c |,D1....C|MP...D0,|
|00002b30| 44 31 09 09 09 3b 20 69 | 73 20 54 78 51 75 65 75 |D1...; i|s TxQueu|
|00002b40| 65 20 65 6d 70 74 79 3f | 0d 09 09 09 42 4e 45 09 |e empty?|....BNE.|
|00002b50| 09 09 54 78 49 45 78 69 | 74 41 09 09 09 3b 20 69 |..TxIExi|tA...; i|
|00002b60| 66 20 6e 6f 74 20 65 78 | 69 74 0d 09 09 09 4c 45 |f not ex|it....LE|
|00002b70| 41 09 09 09 54 78 51 45 | 6d 70 74 79 41 2c 41 33 |A...TxQE|mptyA,A3|
|00002b80| 09 3b 20 67 65 74 20 74 | 68 65 20 61 64 64 72 65 |.; get t|he addre|
|00002b90| 73 73 0d 09 09 09 4d 4f | 56 45 09 09 23 24 46 46 |ss....MO|VE..#$FF|
|00002ba0| 46 46 2c 28 41 33 29 09 | 09 3b 20 69 66 20 65 6d |FF,(A3).|.; if em|
|00002bb0| 70 74 79 20 73 65 74 20 | 66 6c 61 67 0d 09 09 09 |pty set |flag....|
|00002bc0| 0d 54 78 49 45 78 69 74 | 41 0d 09 09 09 41 4e 44 |.TxIExit|A....AND|
|00002bd0| 49 09 09 23 24 46 38 46 | 46 2c 53 52 09 09 3b 20 |I..#$F8F|F,SR..; |
|00002be0| 65 6e 61 62 6c 65 20 69 | 6e 74 65 72 72 75 70 74 |enable i|nterrupt|
|00002bf0| 73 0d 09 09 09 52 54 53 | 09 09 09 09 09 09 09 3b |s....RTS|.......;|
|00002c00| 20 61 6e 64 20 72 65 74 | 75 72 6e 0d 09 09 09 0d | and ret|urn.....|
|00002c10| 3b 20 20 20 20 20 20 50 | 52 4f 43 45 44 55 52 45 |; P|ROCEDURE|
|00002c20| 20 52 65 73 65 74 53 43 | 43 41 3b 0d 3b 20 49 66 | ResetSC|CA;.; If|
|00002c30| 20 79 6f 75 20 63 61 6c | 6c 65 64 20 49 6e 69 74 | you cal|led Init|
|00002c40| 53 43 43 41 20 61 74 20 | 74 68 65 20 62 65 67 69 |SCCA at |the begi|
|00002c50| 6e 6e 69 6e 67 20 6f 66 | 20 79 6f 75 72 0d 3b 20 |nning of| your.; |
|00002c60| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 74 68 69 73 |applicat|ion this|
|00002c70| 0d 3b 20 72 6f 75 74 69 | 6e 65 20 6d 75 73 74 20 |.; routi|ne must |
|00002c80| 62 65 20 63 61 6c 6c 65 | 64 20 77 68 65 6e 20 74 |be calle|d when t|
|00002c90| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 0d 3b |he appli|cation.;|
|00002ca0| 20 71 75 69 74 73 20 6f | 72 20 74 68 65 20 73 79 | quits o|r the sy|
|00002cb0| 73 74 65 6d 20 77 69 6c | 6c 0d 3b 20 63 72 61 73 |stem wil|l.; cras|
|00002cc0| 68 20 64 75 65 20 74 6f | 20 74 68 65 20 69 6e 74 |h due to| the int|
|00002cd0| 65 72 72 75 70 74 20 68 | 61 6e 64 6c 69 6e 67 20 |errupt h|andling |
|00002ce0| 70 6f 69 6e 74 65 72 73 | 0d 3b 20 62 65 63 6f 6d |pointers|.; becom|
|00002cf0| 69 6e 67 20 69 6e 76 61 | 6c 69 64 2e 0d 0d 52 65 |ing inva|lid...Re|
|00002d00| 73 65 74 53 43 43 41 0d | 09 09 09 4d 4f 56 45 4d |setSCCA.|...MOVEM|
|00002d10| 2e 4c 09 09 44 30 2f 41 | 30 2d 41 31 2c 2d 28 53 |.L..D0/A|0-A1,-(S|
|00002d20| 50 29 09 3b 20 73 61 76 | 65 20 72 65 67 69 73 74 |P).; sav|e regist|
|00002d30| 65 72 73 0d 09 09 09 4d | 4f 56 45 09 09 53 52 2c |ers....M|OVE..SR,|
|00002d40| 2d 28 53 50 29 09 09 3b | 20 53 61 76 65 20 69 6e |-(SP)..;| Save in|
|00002d50| 74 65 72 72 75 70 74 73 | 0d 09 09 09 4f 52 49 09 |terrupts|....ORI.|
|00002d60| 09 09 23 24 30 33 30 30 | 2c 53 52 09 09 3b 20 44 |..#$0300|,SR..; D|
|00002d70| 69 73 61 62 6c 65 20 69 | 6e 74 65 72 72 75 70 74 |isable i|nterrupt|
|00002d80| 73 0d 09 09 09 0d 09 09 | 09 4d 4f 56 45 2e 4c 09 |s.......|.MOVE.L.|
|00002d90| 09 53 43 43 57 72 2c 41 | 30 09 09 3b 20 47 65 74 |.SCCWr,A|0..; Get|
|00002da0| 20 62 61 73 65 20 57 72 | 69 74 65 20 61 64 64 72 | base Wr|ite addr|
|00002db0| 65 73 73 0d 09 09 09 41 | 44 44 09 09 09 23 61 43 |ess....A|DD...#aC|
|00002dc0| 74 6c 2c 41 30 09 09 09 | 3b 20 41 64 64 20 6f 66 |tl,A0...|; Add of|
|00002dd0| 66 73 65 74 20 66 6f 72 | 20 63 6f 6e 74 72 6f 6c |fset for| control|
|00002de0| 0d 09 09 09 4d 4f 56 45 | 2e 42 09 09 23 39 2c 28 |....MOVE|.B..#9,(|
|00002df0| 41 30 29 09 09 09 3b 20 | 70 6f 69 6e 74 65 72 20 |A0)...; |pointer |
|00002e00| 66 6f 72 20 53 43 43 20 | 72 65 67 20 39 0d 09 09 |for SCC |reg 9...|
|00002e10| 09 4d 4f 56 45 2e 4c 09 | 09 28 53 50 29 2c 28 53 |.MOVE.L.|.(SP),(S|
|00002e20| 50 29 09 09 3b 20 44 65 | 6c 61 79 0d 09 09 09 4d |P)..; De|lay....M|
|00002e30| 4f 56 45 2e 42 09 09 23 | 25 31 30 30 30 30 30 30 |OVE.B..#|%1000000|
|00002e40| 30 2c 28 41 30 29 09 3b | 20 52 65 73 65 74 20 63 |0,(A0).;| Reset c|
|00002e50| 68 61 6e 6e 65 6c 0d 09 | 09 09 4d 4f 56 45 2e 4c |hannel..|..MOVE.L|
|00002e60| 09 09 28 53 50 29 2c 28 | 53 50 29 09 09 3b 20 44 |..(SP),(|SP)..; D|
|00002e70| 65 6c 61 79 0d 09 09 09 | 42 53 52 09 09 09 52 65 |elay....|BSR...Re|
|00002e80| 73 65 74 53 43 43 43 68 | 61 6e 09 09 3b 20 62 72 |setSCCCh|an..; br|
|00002e90| 61 6e 63 68 20 74 6f 20 | 63 6f 6d 6d 6f 6e 20 72 |anch to |common r|
|00002ea0| 65 73 65 74 20 72 6f 75 | 74 69 6e 65 0d 09 09 09 |eset rou|tine....|
|00002eb0| 4d 4f 56 45 2e 4c 09 09 | 23 4c 76 6c 32 44 54 2c |MOVE.L..|#Lvl2DT,|
|00002ec0| 41 30 09 09 3b 20 67 65 | 74 20 64 69 73 70 61 74 |A0..; ge|t dispat|
|00002ed0| 63 68 20 74 61 62 6c 65 | 20 70 6f 69 6e 74 65 72 |ch table| pointer|
|00002ee0| 0d 09 09 09 4d 4f 56 45 | 09 09 23 52 78 49 6e 74 |....MOVE|..#RxInt|
|00002ef0| 4f 66 66 73 65 74 41 2c | 44 30 09 3b 20 67 65 74 |OffsetA,|D0.; get|
|00002f00| 20 6f 66 66 73 65 74 20 | 74 6f 20 52 78 20 76 65 | offset |to Rx ve|
|00002f10| 63 74 6f 72 0d 09 09 09 | 4c 45 41 09 09 09 50 52 |ctor....|LEA...PR|
|00002f20| 78 49 6e 74 48 61 6e 64 | 41 2c 41 31 09 3b 20 70 |xIntHand|A,A1.; p|
|00002f30| 6f 69 6e 74 20 74 6f 20 | 70 72 65 76 69 6f 75 73 |oint to |previous|
|00002f40| 20 76 65 63 74 6f 72 20 | 73 74 6f 72 61 67 65 0d | vector |storage.|
|00002f50| 09 09 09 4d 4f 56 45 2e | 4c 09 09 28 41 31 29 2c |...MOVE.|L..(A1),|
|00002f60| 30 28 41 30 2c 44 30 29 | 09 3b 20 72 65 73 74 6f |0(A0,D0)|.; resto|
|00002f70| 72 65 20 70 72 65 76 69 | 6f 75 73 20 69 6e 74 20 |re previ|ous int |
|00002f80| 76 65 63 74 6f 72 0d 09 | 09 09 4d 4f 56 45 09 09 |vector..|..MOVE..|
|00002f90| 23 54 78 49 6e 74 4f 66 | 66 73 65 74 41 2c 44 30 |#TxIntOf|fsetA,D0|
|00002fa0| 09 3b 20 67 65 74 20 6f | 66 66 73 65 74 20 74 6f |.; get o|ffset to|
|00002fb0| 20 54 78 20 76 65 63 74 | 6f 72 0d 09 09 09 4c 45 | Tx vect|or....LE|
|00002fc0| 41 09 09 09 50 54 78 49 | 6e 74 48 61 6e 64 41 2c |A...PTxI|ntHandA,|
|00002fd0| 41 31 09 3b 20 73 65 74 | 20 52 78 20 76 65 63 74 |A1.; set| Rx vect|
|00002fe0| 6f 72 0d 09 09 09 4d 4f | 56 45 2e 4c 09 09 28 41 |or....MO|VE.L..(A|
|00002ff0| 31 29 2c 30 28 41 30 2c | 44 30 29 09 3b 20 72 65 |1),0(A0,|D0).; re|
|00003000| 73 74 6f 72 65 20 70 72 | 65 76 69 6f 75 73 20 69 |store pr|evious i|
|00003010| 6e 74 20 76 65 63 74 6f | 72 0d 09 09 09 0d 09 09 |nt vecto|r.......|
|00003020| 09 4d 4f 56 45 09 09 28 | 53 50 29 2b 2c 53 52 09 |.MOVE..(|SP)+,SR.|
|00003030| 09 3b 20 52 65 73 74 6f | 72 65 20 69 6e 74 65 72 |.; Resto|re inter|
|00003040| 72 75 70 74 73 0d 09 09 | 09 4d 4f 56 45 4d 2e 4c |rupts...|.MOVEM.L|
|00003050| 09 09 28 53 50 29 2b 2c | 44 30 2f 41 30 2d 41 31 |..(SP)+,|D0/A0-A1|
|00003060| 09 3b 20 72 65 73 74 6f | 72 65 20 72 65 67 69 73 |.; resto|re regis|
|00003070| 74 65 72 73 0d 09 09 09 | 52 54 53 09 09 09 09 09 |ters....|RTS.....|
|00003080| 09 09 3b 20 61 6e 64 20 | 72 65 74 75 72 6e 0d 0d |..; and |return..|
|00003090| 3b 20 54 68 69 73 20 69 | 73 20 74 68 65 20 63 6f |; This i|s the co|
|000030a0| 6d 6d 6f 6e 20 72 65 73 | 65 74 20 72 6f 75 74 69 |mmon res|et routi|
|000030b0| 6e 65 20 66 6f 72 20 62 | 6f 74 68 20 63 68 61 6e |ne for b|oth chan|
|000030c0| 6e 65 6c 73 0d 0d 52 65 | 73 65 74 53 43 43 43 68 |nels..Re|setSCCCh|
|000030d0| 61 6e 0d 09 09 09 4d 4f | 56 45 2e 42 09 09 23 31 |an....MO|VE.B..#1|
|000030e0| 35 2c 28 41 30 29 09 09 | 3b 20 70 6f 69 6e 74 65 |5,(A0)..|; pointe|
|000030f0| 72 20 66 6f 72 20 53 43 | 43 20 72 65 67 20 31 35 |r for SC|C reg 15|
|00003100| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 28 53 50 29 |....MOVE|.L..(SP)|
|00003110| 2c 28 53 50 29 09 09 3b | 20 44 65 6c 61 79 0d 09 |,(SP)..;| Delay..|
|00003120| 09 09 4d 4f 56 45 2e 42 | 09 09 23 25 30 30 30 30 |..MOVE.B|..#%0000|
|00003130| 31 30 30 30 2c 28 41 30 | 29 09 3b 20 45 6e 61 62 |1000,(A0|).; Enab|
|00003140| 6c 65 20 44 43 44 20 69 | 6e 74 0d 09 09 09 4d 4f |le DCD i|nt....MO|
|00003150| 56 45 2e 4c 09 09 28 53 | 50 29 2c 28 53 50 29 09 |VE.L..(S|P),(SP).|
|00003160| 09 3b 20 44 65 6c 61 79 | 0d 09 09 09 4d 4f 56 45 |.; Delay|....MOVE|
|00003170| 2e 42 09 09 23 30 2c 28 | 41 30 29 09 09 09 3b 20 |.B..#0,(|A0)...; |
|00003180| 70 6f 69 6e 74 65 72 20 | 66 6f 72 20 53 43 43 20 |pointer |for SCC |
|00003190| 72 65 67 20 30 0d 09 09 | 09 4d 4f 56 45 2e 4c 09 |reg 0...|.MOVE.L.|
|000031a0| 09 28 53 50 29 2c 28 53 | 50 29 09 09 3b 20 44 65 |.(SP),(S|P)..; De|
|000031b0| 6c 61 79 0d 09 09 09 4d | 4f 56 45 2e 42 09 09 23 |lay....M|OVE.B..#|
|000031c0| 25 30 30 30 31 30 30 30 | 30 2c 28 41 30 29 09 3b |%0001000|0,(A0).;|
|000031d0| 20 52 65 73 65 74 20 45 | 58 54 2f 53 54 41 54 55 | Reset E|XT/STATU|
|000031e0| 53 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 28 53 50 |S....MOV|E.L..(SP|
|000031f0| 29 2c 28 53 50 29 09 09 | 3b 20 44 65 6c 61 79 0d |),(SP)..|; Delay.|
|00003200| 09 09 09 4d 4f 56 45 2e | 42 09 09 23 30 2c 28 41 |...MOVE.|B..#0,(A|
|00003210| 30 29 09 09 09 3b 20 70 | 6f 69 6e 74 65 72 20 66 |0)...; p|ointer f|
|00003220| 6f 72 20 53 43 43 20 72 | 65 67 20 30 0d 09 09 09 |or SCC r|eg 0....|
|00003230| 4d 4f 56 45 2e 4c 09 09 | 28 53 50 29 2c 28 53 50 |MOVE.L..|(SP),(SP|
|00003240| 29 09 09 3b 20 44 65 6c | 61 79 0d 09 09 09 4d 4f |)..; Del|ay....MO|
|00003250| 56 45 2e 42 09 09 23 25 | 30 30 30 31 30 30 30 30 |VE.B..#%|00010000|
|00003260| 2c 28 41 30 29 09 3b 20 | 52 65 73 65 74 20 45 58 |,(A0).; |Reset EX|
|00003270| 54 2f 53 54 41 54 55 53 | 20 61 67 61 69 6e 0d 09 |T/STATUS| again..|
|00003280| 09 09 4d 4f 56 45 2e 4c | 09 09 28 53 50 29 2c 28 |..MOVE.L|..(SP),(|
|00003290| 53 50 29 09 09 3b 20 44 | 65 6c 61 79 0d 09 09 09 |SP)..; D|elay....|
|000032a0| 4d 4f 56 45 2e 42 09 09 | 23 31 2c 28 41 30 29 09 |MOVE.B..|#1,(A0).|
|000032b0| 09 09 3b 20 70 6f 69 6e | 74 65 72 20 66 6f 72 20 |..; poin|ter for |
|000032c0| 53 43 43 20 72 65 67 20 | 31 0d 09 09 09 4d 4f 56 |SCC reg |1....MOV|
|000032d0| 45 2e 4c 09 09 28 53 50 | 29 2c 28 53 50 29 09 09 |E.L..(SP|),(SP)..|
|000032e0| 3b 20 44 65 6c 61 79 0d | 09 09 09 4d 4f 56 45 2e |; Delay.|...MOVE.|
|000032f0| 42 09 09 23 25 30 30 30 | 30 30 30 30 31 2c 28 41 |B..#%000|00001,(A|
|00003300| 30 29 09 3b 20 45 6e 61 | 62 6c 65 20 6d 6f 75 73 |0).; Ena|ble mous|
|00003310| 65 20 69 6e 74 65 72 72 | 75 70 74 73 0d 09 09 09 |e interr|upts....|
|00003320| 4d 4f 56 45 2e 4c 09 09 | 28 53 50 29 2c 28 53 50 |MOVE.L..|(SP),(SP|
|00003330| 29 09 09 3b 20 44 65 6c | 61 79 0d 09 09 09 4d 4f |)..; Del|ay....MO|
|00003340| 56 45 2e 42 09 09 23 39 | 2c 28 41 30 29 09 09 09 |VE.B..#9|,(A0)...|
|00003350| 3b 20 70 6f 69 6e 74 65 | 72 20 66 6f 72 20 53 43 |; pointe|r for SC|
|00003360| 43 20 72 65 67 20 39 0d | 09 09 09 4d 4f 56 45 2e |C reg 9.|...MOVE.|
|00003370| 4c 09 09 28 53 50 29 2c | 28 53 50 29 09 09 3b 20 |L..(SP),|(SP)..; |
|00003380| 44 65 6c 61 79 0d 09 09 | 09 4d 4f 56 45 2e 42 09 |Delay...|.MOVE.B.|
|00003390| 09 23 25 30 30 30 30 31 | 30 31 30 2c 28 41 30 29 |.#%00001|010,(A0)|
|000033a0| 09 3b 20 53 65 74 20 6d | 61 73 74 65 72 20 69 6e |.; Set m|aster in|
|000033b0| 74 20 65 6e 61 62 6c 65 | 0d 09 09 09 4d 4f 56 45 |t enable|....MOVE|
|000033c0| 2e 4c 09 09 28 53 50 29 | 2c 28 53 50 29 09 09 3b |.L..(SP)|,(SP)..;|
|000033d0| 20 44 65 6c 61 79 0d 09 | 09 09 52 54 53 0d 09 09 | Delay..|..RTS...|
|000033e0| 09 0d 54 78 51 75 65 75 | 65 41 09 09 44 43 42 2e |..TxQueu|eA..DCB.|
|000033f0| 42 09 09 24 31 30 30 2c | 30 09 09 09 3b 20 74 68 |B..$100,|0...; th|
|00003400| 69 73 20 69 73 20 74 68 | 65 20 71 75 65 75 65 0d |is is th|e queue.|
|00003410| 54 78 51 45 6d 70 74 79 | 41 09 44 43 09 09 09 30 |TxQEmpty|A.DC...0|
|00003420| 09 09 09 09 3b 20 74 68 | 65 20 71 75 65 75 65 20 |....; th|e queue |
|00003430| 65 6d 70 74 79 20 66 6c | 61 67 0d 54 78 42 79 74 |empty fl|ag.TxByt|
|00003440| 65 49 6e 41 09 44 43 09 | 09 09 30 09 09 09 09 3b |eInA.DC.|..0....;|
|00003450| 20 69 6e 64 65 78 20 74 | 6f 20 6e 65 78 74 20 63 | index t|o next c|
|00003460| 65 6c 6c 20 69 6e 0d 54 | 78 42 79 74 65 4f 75 74 |ell in.T|xByteOut|
|00003470| 41 09 44 43 09 09 09 30 | 09 09 09 09 3b 20 69 6e |A.DC...0|....; in|
|00003480| 64 65 78 20 74 6f 20 6e | 65 78 74 20 63 65 6c 6c |dex to n|ext cell|
|00003490| 20 6f 75 74 0d 52 78 51 | 75 65 75 65 41 09 44 43 | out.RxQ|ueueA.DC|
|000034a0| 42 2e 42 09 09 24 34 30 | 30 2c 30 09 09 09 3b 20 |B.B..$40|0,0...; |
|000034b0| 74 68 69 73 20 69 73 20 | 74 68 65 20 71 75 65 75 |this is |the queu|
|000034c0| 65 0d 52 78 51 45 6d 70 | 74 79 41 09 44 43 09 09 |e.RxQEmp|tyA.DC..|
|000034d0| 09 30 09 09 09 09 3b 20 | 74 68 65 20 65 6d 70 74 |.0....; |the empt|
|000034e0| 79 20 71 75 65 75 65 20 | 66 6c 61 67 0d 52 78 42 |y queue |flag.RxB|
|000034f0| 79 74 65 49 6e 41 09 44 | 43 09 09 09 30 09 09 09 |yteInA.D|C...0...|
|00003500| 09 3b 20 69 6e 64 65 78 | 20 74 6f 20 6e 65 78 74 |.; index| to next|
|00003510| 20 63 65 6c 6c 20 69 6e | 0d 52 78 42 79 74 65 4f | cell in|.RxByteO|
|00003520| 75 74 41 09 44 43 09 09 | 09 30 09 09 09 09 3b 20 |utA.DC..|.0....; |
|00003530| 69 6e 64 65 78 20 74 6f | 20 6e 65 78 74 20 63 65 |index to| next ce|
|00003540| 6c 6c 20 6f 75 74 0d 50 | 52 78 49 6e 74 48 61 6e |ll out.P|RxIntHan|
|00003550| 64 41 09 44 43 09 09 09 | 30 09 09 09 09 3b 20 50 |dA.DC...|0....; P|
|00003560| 72 65 76 69 6f 75 73 20 | 69 6e 74 65 72 72 75 70 |revious |interrup|
|00003570| 74 20 76 65 63 74 6f 72 | 0d 50 54 78 49 6e 74 48 |t vector|.PTxIntH|
|00003580| 61 6e 64 41 09 44 43 09 | 09 09 30 09 09 09 09 3b |andA.DC.|..0....;|
|00003590| 20 50 72 65 76 69 6f 75 | 73 20 69 6e 74 65 72 72 | Previou|s interr|
|000035a0| 75 70 74 20 76 65 63 74 | 6f 72 0d 0d 3b 20 54 68 |upt vect|or..; Th|
|000035b0| 65 73 65 20 61 72 65 20 | 74 68 65 20 72 6f 75 74 |ese are |the rout|
|000035c0| 69 6e 65 73 20 66 6f 72 | 20 74 68 65 20 50 72 69 |ines for| the Pri|
|000035d0| 6e 74 65 72 20 50 6f 72 | 74 0d 0d 3b 20 20 20 20 |nter Por|t..; |
|000035e0| 20 50 52 4f 43 45 44 55 | 52 45 20 49 6e 69 74 53 | PROCEDU|RE InitS|
|000035f0| 43 43 42 3b 0d 3b 20 43 | 61 6c 6c 20 74 68 69 73 |CCB;.; C|all this|
|00003600| 20 72 6f 75 74 69 6e 65 | 20 61 74 20 74 68 65 20 | routine| at the |
|00003610| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 79 6f 75 |beginnin|g of you|
|00003620| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 69 66 |r applic|ation if|
|00003630| 0d 3b 20 75 73 69 6e 67 | 20 74 68 65 20 70 72 69 |.; using| the pri|
|00003640| 6e 74 65 72 20 70 6f 72 | 74 20 66 6f 72 20 4d 49 |nter por|t for MI|
|00003650| 44 49 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 74 |DI infor|mation t|
|00003660| 72 61 6e 73 66 65 72 73 | 2e 0d 0d 49 6e 69 74 53 |ransfers|...InitS|
|00003670| 43 43 42 0d 09 09 09 4d | 4f 56 45 09 09 53 52 2c |CCB....M|OVE..SR,|
|00003680| 2d 28 53 50 29 09 09 3b | 20 53 61 76 65 20 69 6e |-(SP)..;| Save in|
|00003690| 74 65 72 72 75 70 74 73 | 0d 09 09 09 4d 4f 56 45 |terrupts|....MOVE|
|000036a0| 4d 2e 4c 09 09 44 30 2f | 41 30 2d 41 32 2c 2d 28 |M.L..D0/|A0-A2,-(|
|000036b0| 53 50 29 09 3b 20 53 61 | 76 65 20 72 65 67 69 73 |SP).; Sa|ve regis|
|000036c0| 74 65 72 73 0d 09 09 09 | 4f 52 49 09 09 09 23 24 |ters....|ORI...#$|
|000036d0| 30 33 30 30 2c 53 52 09 | 09 3b 20 44 69 73 61 62 |0300,SR.|.; Disab|
|000036e0| 6c 65 20 69 6e 74 65 72 | 72 75 70 74 73 0d 09 09 |le inter|rupts...|
|000036f0| 09 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 53 43 43 |.....MOV|E.L..SCC|
|00003700| 52 64 2c 41 31 09 09 3b | 20 47 65 74 20 62 61 73 |Rd,A1..;| Get bas|
|00003710| 65 20 52 65 61 64 20 61 | 64 64 72 65 73 73 0d 09 |e Read a|ddress..|
|00003720| 09 09 41 44 44 09 09 09 | 23 62 43 74 6c 2c 41 31 |..ADD...|#bCtl,A1|
|00003730| 09 09 09 3b 20 41 64 64 | 20 6f 66 66 73 65 74 20 |...; Add| offset |
|00003740| 66 6f 72 20 63 6f 6e 74 | 72 6f 6c 0d 09 09 09 4d |for cont|rol....M|
|00003750| 4f 56 45 2e 42 09 09 28 | 41 31 29 2c 44 30 09 09 |OVE.B..(|A1),D0..|
|00003760| 09 3b 20 44 75 6d 6d 79 | 20 72 65 61 64 0d 09 09 |.; Dummy| read...|
|00003770| 09 4d 4f 56 45 2e 4c 09 | 09 28 53 50 29 2c 28 53 |.MOVE.L.|.(SP),(S|
|00003780| 50 29 09 09 3b 20 44 65 | 6c 61 79 0d 09 09 09 4d |P)..; De|lay....M|
|00003790| 4f 56 45 2e 4c 09 09 53 | 43 43 57 72 2c 41 30 09 |OVE.L..S|CCWr,A0.|
|000037a0| 09 3b 20 47 65 74 20 62 | 61 73 65 20 57 72 69 74 |.; Get b|ase Writ|
|000037b0| 65 20 61 64 64 72 65 73 | 73 0d 09 09 09 41 44 44 |e addres|s....ADD|
|000037c0| 09 09 09 23 62 43 74 6c | 2c 41 30 09 09 09 3b 20 |...#bCtl|,A0...; |
|000037d0| 41 64 64 20 6f 66 66 73 | 65 74 20 66 6f 72 20 63 |Add offs|et for c|
|000037e0| 6f 6e 74 72 6f 6c 0d 09 | 09 09 4d 4f 56 45 2e 42 |ontrol..|..MOVE.B|
|000037f0| 09 09 23 39 2c 28 41 30 | 29 09 09 09 3b 20 20 70 |..#9,(A0|)...; p|
|00003800| 6f 69 6e 74 65 72 20 66 | 6f 72 20 53 43 43 20 72 |ointer f|or SCC r|
|00003810| 65 67 20 39 0d 09 09 09 | 4d 4f 56 45 2e 4c 09 09 |eg 9....|MOVE.L..|
|00003820| 28 53 50 29 2c 28 53 50 | 29 09 09 3b 20 44 65 6c |(SP),(SP|)..; Del|
|00003830| 61 79 0d 09 09 09 4d 4f | 56 45 2e 42 09 09 23 25 |ay....MO|VE.B..#%|
|00003840| 30 31 30 30 30 30 30 30 | 2c 28 41 30 29 09 3b 20 |01000000|,(A0).; |
|00003850| 52 65 73 65 74 20 63 68 | 61 6e 6e 65 6c 0d 09 09 |Reset ch|annel...|
|00003860| 09 4d 4f 56 45 2e 4c 09 | 09 28 53 50 29 2c 28 53 |.MOVE.L.|.(SP),(S|
|00003870| 50 29 09 09 3b 20 44 65 | 6c 61 79 0d 09 09 09 42 |P)..; De|lay....B|
|00003880| 53 52 09 09 09 49 6e 69 | 74 53 43 43 43 68 61 6e |SR...Ini|tSCCChan|
|00003890| 09 09 3b 20 62 72 61 6e | 63 68 20 74 6f 20 63 6f |..; bran|ch to co|
|000038a0| 6d 6d 6f 6e 20 69 6e 69 | 74 20 72 6f 75 74 69 6e |mmon ini|t routin|
|000038b0| 65 0d 09 09 09 0d 3b 20 | 73 65 74 20 75 70 20 69 |e.....; |set up i|
|000038c0| 6e 74 65 72 72 75 70 74 | 20 76 65 63 74 6f 72 73 |nterrupt| vectors|
|000038d0| 0d 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 23 4c 76 |.....MOV|E.L..#Lv|
|000038e0| 6c 32 44 54 2c 41 30 09 | 09 3b 20 67 65 74 20 64 |l2DT,A0.|.; get d|
|000038f0| 69 73 70 61 74 63 68 20 | 74 61 62 6c 65 20 70 74 |ispatch |table pt|
|00003900| 72 0d 09 09 09 4d 4f 56 | 45 09 09 23 52 78 49 6e |r....MOV|E..#RxIn|
|00003910| 74 4f 66 66 73 65 74 42 | 2c 44 30 09 3b 20 67 65 |tOffsetB|,D0.; ge|
|00003920| 74 20 6f 66 66 73 65 74 | 20 74 6f 20 52 78 20 76 |t offset| to Rx v|
|00003930| 65 63 74 6f 72 0d 09 09 | 09 4c 45 41 09 09 09 50 |ector...|.LEA...P|
|00003940| 52 78 49 6e 74 48 61 6e | 64 42 2c 41 31 09 3b 20 |RxIntHan|dB,A1.; |
|00003950| 70 6f 69 6e 74 20 74 6f | 20 70 72 65 76 69 6f 75 |point to| previou|
|00003960| 73 20 76 65 63 74 6f 72 | 20 73 74 6f 72 61 67 65 |s vector| storage|
|00003970| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 30 28 41 30 |....MOVE|.L..0(A0|
|00003980| 2c 44 30 29 2c 28 41 31 | 29 09 3b 20 73 61 76 65 |,D0),(A1|).; save|
|00003990| 20 70 72 65 76 69 6f 75 | 73 20 69 6e 74 65 72 72 | previou|s interr|
|000039a0| 75 70 74 20 76 65 63 74 | 6f 72 0d 09 09 09 4c 45 |upt vect|or....LE|
|000039b0| 41 09 09 09 52 78 49 6e | 74 48 61 6e 64 42 2c 41 |A...RxIn|tHandB,A|
|000039c0| 31 09 3b 20 73 65 74 20 | 52 78 20 76 65 63 74 6f |1.; set |Rx vecto|
|000039d0| 72 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 41 31 2c |r....MOV|E.L..A1,|
|000039e0| 30 28 41 30 2c 44 30 29 | 0d 09 09 09 4d 4f 56 45 |0(A0,D0)|....MOVE|
|000039f0| 09 09 23 54 78 49 6e 74 | 4f 66 66 73 65 74 42 2c |..#TxInt|OffsetB,|
|00003a00| 44 30 09 3b 20 67 65 74 | 20 6f 66 66 73 65 74 20 |D0.; get| offset |
|00003a10| 74 6f 20 54 78 20 76 65 | 63 74 6f 72 0d 09 09 09 |to Tx ve|ctor....|
|00003a20| 4c 45 41 09 09 09 50 54 | 78 49 6e 74 48 61 6e 64 |LEA...PT|xIntHand|
|00003a30| 42 2c 41 31 09 3b 20 70 | 6f 69 6e 74 20 74 6f 20 |B,A1.; p|oint to |
|00003a40| 70 72 65 76 69 6f 75 73 | 20 76 65 63 74 6f 72 20 |previous| vector |
|00003a50| 73 74 6f 72 61 67 65 0d | 09 09 09 4d 4f 56 45 2e |storage.|...MOVE.|
|00003a60| 4c 09 09 30 28 41 30 2c | 44 30 29 2c 41 31 09 09 |L..0(A0,|D0),A1..|
|00003a70| 3b 20 73 61 76 65 20 70 | 72 65 76 69 6f 75 73 20 |; save p|revious |
|00003a80| 69 6e 74 65 72 72 75 70 | 74 20 76 65 63 74 6f 72 |interrup|t vector|
|00003a90| 0d 09 09 09 4c 45 41 09 | 09 09 54 78 49 6e 74 48 |....LEA.|..TxIntH|
|00003aa0| 61 6e 64 42 2c 41 31 09 | 3b 20 73 65 74 20 54 78 |andB,A1.|; set Tx|
|00003ab0| 20 76 65 63 74 6f 72 0d | 09 09 09 4d 4f 56 45 2e | vector.|...MOVE.|
|00003ac0| 4c 09 09 41 31 2c 30 28 | 41 30 2c 44 30 29 0d 09 |L..A1,0(|A0,D0)..|
|00003ad0| 09 09 4d 4f 56 45 09 09 | 23 53 70 65 63 52 65 63 |..MOVE..|#SpecRec|
|00003ae0| 43 6f 6e 64 42 2c 44 30 | 09 3b 20 6f 66 66 73 65 |CondB,D0|.; offse|
|00003af0| 74 20 74 6f 20 53 70 65 | 63 69 61 6c 20 76 65 63 |t to Spe|cial vec|
|00003b00| 74 6f 72 0d 09 09 09 4c | 45 41 09 09 09 53 74 75 |tor....L|EA...Stu|
|00003b10| 62 42 2c 41 31 0d 09 09 | 09 4d 4f 56 45 2e 4c 09 |bB,A1...|.MOVE.L.|
|00003b20| 09 41 31 2c 30 28 41 30 | 2c 44 30 29 0d 09 09 09 |.A1,0(A0|,D0)....|
|00003b30| 0d 3b 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 74 68 |.; initi|alize th|
|00003b40| 65 20 66 6c 61 67 73 20 | 26 20 70 6f 69 6e 74 65 |e flags |& pointe|
|00003b50| 72 73 0d 0d 09 09 09 4c | 45 41 09 09 09 52 78 42 |rs.....L|EA...RxB|
|00003b60| 79 74 65 49 6e 42 2c 41 | 32 09 09 3b 20 67 65 74 |yteInB,A|2..; get|
|00003b70| 20 74 68 65 20 61 64 64 | 72 65 73 73 0d 09 09 09 | the add|ress....|
|00003b80| 43 4c 52 09 09 09 28 41 | 32 29 0d 09 09 09 4c 45 |CLR...(A|2)....LE|
|00003b90| 41 09 09 09 52 78 42 79 | 74 65 4f 75 74 42 2c 41 |A...RxBy|teOutB,A|
|00003ba0| 32 09 3b 20 67 65 74 20 | 74 68 65 20 61 64 64 72 |2.; get |the addr|
|00003bb0| 65 73 73 0d 09 09 09 43 | 4c 52 09 09 09 28 41 32 |ess....C|LR...(A2|
|00003bc0| 29 0d 09 09 09 4c 45 41 | 09 09 09 52 78 51 45 6d |)....LEA|...RxQEm|
|00003bd0| 70 74 79 42 2c 41 32 09 | 3b 20 67 65 74 20 74 68 |ptyB,A2.|; get th|
|00003be0| 65 20 61 64 64 72 65 73 | 73 0d 09 09 09 4d 4f 56 |e addres|s....MOV|
|00003bf0| 45 09 09 23 24 46 46 46 | 46 2c 28 41 32 29 0d 09 |E..#$FFF|F,(A2)..|
|00003c00| 09 09 4c 45 41 09 09 09 | 54 78 42 79 74 65 49 6e |..LEA...|TxByteIn|
|00003c10| 42 2c 41 32 09 09 3b 20 | 67 65 74 20 74 68 65 20 |B,A2..; |get the |
|00003c20| 61 64 64 72 65 73 73 0d | 09 09 09 43 4c 52 09 09 |address.|...CLR..|
|00003c30| 09 28 41 32 29 0d 09 09 | 09 4c 45 41 09 09 09 54 |.(A2)...|.LEA...T|
|00003c40| 78 51 45 6d 70 74 79 42 | 2c 41 32 09 3b 20 67 65 |xQEmptyB|,A2.; ge|
|00003c50| 74 20 74 68 65 20 61 64 | 64 72 65 73 73 0d 09 09 |t the ad|dress...|
|00003c60| 09 4d 4f 56 45 09 09 23 | 24 46 46 46 46 2c 28 41 |.MOVE..#|$FFFF,(A|
|00003c70| 32 29 0d 09 09 09 0d 09 | 09 09 4d 4f 56 45 4d 2e |2)......|..MOVEM.|
|00003c80| 4c 09 09 28 53 50 29 2b | 2c 44 30 2f 41 30 2d 41 |L..(SP)+|,D0/A0-A|
|00003c90| 32 09 3b 20 52 65 73 74 | 6f 72 65 20 72 65 67 69 |2.; Rest|ore regi|
|00003ca0| 73 74 65 72 73 0d 09 09 | 09 4d 4f 56 45 09 09 28 |sters...|.MOVE..(|
|00003cb0| 53 50 29 2b 2c 53 52 09 | 09 3b 20 52 65 73 74 6f |SP)+,SR.|.; Resto|
|00003cc0| 72 65 20 69 6e 74 65 72 | 72 75 70 74 73 0d 09 09 |re inter|rupts...|
|00003cd0| 09 52 54 53 09 09 09 09 | 09 09 09 3b 20 61 6e 64 |.RTS....|...; and|
|00003ce0| 20 72 65 74 75 72 6e 0d | 09 09 09 0d 3b 20 20 20 | return.|....; |
|00003cf0| 20 20 20 50 52 4f 43 45 | 44 55 52 45 20 54 78 4d | PROCE|DURE TxM|
|00003d00| 49 44 49 42 20 28 54 68 | 65 44 61 74 61 20 3a 20 |IDIB (Th|eData : |
|00003d10| 69 6e 74 65 67 65 72 29 | 3b 0d 3b 20 54 68 69 73 |integer)|;.; This|
|00003d20| 20 69 73 20 74 68 65 20 | 72 6f 75 74 69 6e 65 20 | is the |routine |
|00003d30| 74 6f 20 74 72 61 6e 73 | 6d 69 74 20 61 20 4d 49 |to trans|mit a MI|
|00003d40| 44 49 20 62 79 74 65 20 | 6f 66 20 64 61 74 61 0d |DI byte |of data.|
|00003d50| 3b 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 50 72 |; throug|h the Pr|
|00003d60| 69 6e 74 65 72 20 50 6f | 72 74 2e 20 20 54 6f 20 |inter Po|rt. To |
|00003d70| 75 73 65 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |use this| routine|
|00003d80| 20 70 6c 61 63 65 0d 3b | 20 74 68 65 20 62 79 74 | place.;| the byt|
|00003d90| 65 20 74 6f 20 62 65 20 | 74 72 61 6e 73 6d 69 74 |e to be |transmit|
|00003da0| 74 65 64 20 61 73 20 74 | 68 65 20 6c 6f 77 65 72 |ted as t|he lower|
|00003db0| 20 38 20 62 69 74 73 0d | 3b 20 6f 66 20 61 20 77 | 8 bits.|; of a w|
|00003dc0| 6f 72 64 20 6f 6e 20 74 | 68 65 20 73 74 61 63 6b |ord on t|he stack|
|00003dd0| 2c 20 74 68 65 6e 20 63 | 61 6c 6c 20 54 78 4d 49 |, then c|all TxMI|
|00003de0| 44 49 42 2e 0d 0d 54 78 | 4d 49 44 49 42 0d 09 09 |DIB...Tx|MIDIB...|
|00003df0| 09 4c 49 4e 4b 09 09 41 | 36 2c 23 30 09 09 09 3b |.LINK..A|6,#0...;|
|00003e00| 20 73 65 74 20 66 72 61 | 6d 65 20 70 6f 69 6e 74 | set fra|me point|
|00003e10| 65 72 0d 09 09 09 4d 4f | 56 45 09 09 53 52 2c 2d |er....MO|VE..SR,-|
|00003e20| 28 53 50 29 09 09 3b 20 | 53 61 76 65 20 69 6e 74 |(SP)..; |Save int|
|00003e30| 65 72 72 75 70 74 73 0d | 09 09 09 4d 4f 56 45 4d |errupts.|...MOVEM|
|00003e40| 2e 4c 09 09 44 30 2f 41 | 30 2d 41 33 2c 2d 28 53 |.L..D0/A|0-A3,-(S|
|00003e50| 50 29 09 3b 20 53 61 76 | 65 20 72 65 67 69 73 74 |P).; Sav|e regist|
|00003e60| 65 72 73 0d 09 09 09 4f | 52 49 09 09 09 23 24 30 |ers....O|RI...#$0|
|00003e70| 33 30 30 2c 53 52 09 09 | 3b 20 44 69 73 61 62 6c |300,SR..|; Disabl|
|00003e80| 65 20 69 6e 74 65 72 72 | 75 70 74 73 0d 09 09 09 |e interr|upts....|
|00003e90| 0d 09 09 09 4c 45 41 09 | 09 09 54 78 51 45 6d 70 |....LEA.|..TxQEmp|
|00003ea0| 74 79 42 2c 41 33 09 3b | 20 67 65 74 20 74 68 65 |tyB,A3.;| get the|
|00003eb0| 20 61 64 64 72 65 73 73 | 0d 09 09 09 54 53 54 2e | address|....TST.|
|00003ec0| 42 09 09 28 41 33 29 09 | 09 09 3b 20 69 73 20 54 |B..(A3).|..; is T|
|00003ed0| 78 51 75 65 75 65 20 65 | 6d 70 74 79 3f 0d 09 09 |xQueue e|mpty?...|
|00003ee0| 09 42 4e 45 09 09 09 54 | 78 51 45 42 09 09 09 3b |.BNE...T|xQEB...;|
|00003ef0| 20 69 66 20 73 6f 20 62 | 72 61 6e 63 68 0d 09 09 | if so b|ranch...|
|00003f00| 09 4c 45 41 09 09 09 54 | 78 42 79 74 65 49 6e 42 |.LEA...T|xByteInB|
|00003f10| 2c 41 33 09 09 3b 20 67 | 65 74 20 74 68 65 20 61 |,A3..; g|et the a|
|00003f20| 64 64 72 65 73 73 0d 09 | 09 09 4d 4f 56 45 09 09 |ddress..|..MOVE..|
|00003f30| 28 41 33 29 2c 44 30 09 | 09 09 3b 20 69 66 20 6e |(A3),D0.|..; if n|
|00003f40| 6f 74 20 61 64 64 20 62 | 79 74 65 20 74 6f 20 71 |ot add b|yte to q|
|00003f50| 75 65 75 65 0d 09 09 09 | 4c 45 41 09 09 09 54 78 |ueue....|LEA...Tx|
|00003f60| 51 75 65 75 65 42 2c 41 | 32 09 09 3b 20 70 6f 69 |QueueB,A|2..; poi|
|00003f70| 6e 74 20 74 6f 20 71 75 | 65 75 65 0d 09 09 09 4d |nt to qu|eue....M|
|00003f80| 4f 56 45 2e 42 09 09 39 | 28 41 36 29 2c 30 28 41 |OVE.B..9|(A6),0(A|
|00003f90| 32 2c 44 30 29 09 3b 20 | 70 6c 61 63 65 20 62 79 |2,D0).; |place by|
|00003fa0| 74 65 20 69 6e 20 71 75 | 65 75 65 0d 09 09 09 41 |te in qu|eue....A|
|00003fb0| 44 44 51 09 09 23 31 2c | 44 30 09 09 09 3b 20 75 |DDQ..#1,|D0...; u|
|00003fc0| 70 64 61 74 65 20 54 78 | 42 79 74 65 49 6e 0d 09 |pdate Tx|ByteIn..|
|00003fd0| 09 09 43 4d 50 09 09 09 | 23 24 31 30 30 2c 44 30 |..CMP...|#$100,D0|
|00003fe0| 0d 09 09 09 42 4e 45 09 | 09 09 40 31 0d 09 09 09 |....BNE.|..@1....|
|00003ff0| 4d 4f 56 45 09 09 23 30 | 2c 44 30 0d 40 31 09 09 |MOVE..#0|,D0.@1..|
|00004000| 09 4d 4f 56 45 09 09 44 | 30 2c 28 41 33 29 0d 09 |.MOVE..D|0,(A3)..|
|00004010| 09 09 42 52 41 09 09 09 | 54 78 45 78 69 74 42 09 |..BRA...|TxExitB.|
|00004020| 09 09 3b 20 61 6e 64 20 | 65 78 69 74 0d 09 09 09 |..; and |exit....|
|00004030| 0d 54 78 51 45 42 0d 09 | 09 09 4d 4f 56 45 2e 4c |.TxQEB..|..MOVE.L|
|00004040| 09 09 53 43 43 52 64 2c | 41 30 09 09 3b 20 67 65 |..SCCRd,|A0..; ge|
|00004050| 74 20 53 43 43 20 52 65 | 61 64 20 41 64 64 72 65 |t SCC Re|ad Addre|
|00004060| 73 73 0d 09 09 09 4d 4f | 56 45 2e 4c 09 09 53 43 |ss....MO|VE.L..SC|
|00004070| 43 57 72 2c 41 31 09 09 | 3b 20 67 65 74 20 53 43 |CWr,A1..|; get SC|
|00004080| 43 20 57 72 69 74 65 20 | 41 64 64 72 65 73 73 0d |C Write |Address.|
|00004090| 09 09 09 4d 4f 56 45 09 | 09 23 62 43 74 6c 2c 44 |...MOVE.|.#bCtl,D|
|000040a0| 30 09 09 09 3b 20 67 65 | 74 20 69 6e 64 65 78 20 |0...; ge|t index |
|000040b0| 66 6f 72 20 43 74 6c 0d | 09 09 09 42 54 53 54 2e |for Ctl.|...BTST.|
|000040c0| 42 09 09 23 54 42 45 2c | 30 28 41 30 2c 44 30 29 |B..#TBE,|0(A0,D0)|
|000040d0| 09 3b 20 74 72 61 6e 73 | 6d 69 74 20 62 75 66 66 |.; trans|mit buff|
|000040e0| 65 72 20 65 6d 70 74 79 | 3f 0d 09 09 09 42 4e 45 |er empty|?....BNE|
|000040f0| 09 09 09 46 69 72 73 74 | 42 79 74 65 42 09 09 3b |...First|ByteB..;|
|00004100| 20 69 66 20 73 6f 20 62 | 72 61 6e 63 68 0d 09 09 | if so b|ranch...|
|00004110| 09 4c 45 41 09 09 09 54 | 78 42 79 74 65 49 6e 42 |.LEA...T|xByteInB|
|00004120| 2c 41 33 09 09 3b 20 67 | 65 74 20 74 68 65 20 61 |,A3..; g|et the a|
|00004130| 64 64 72 65 73 73 0d 09 | 09 09 4d 4f 56 45 09 09 |ddress..|..MOVE..|
|00004140| 28 41 33 29 2c 44 30 09 | 09 09 3b 20 69 66 20 6e |(A3),D0.|..; if n|
|00004150| 6f 74 20 61 64 64 20 74 | 6f 20 71 75 65 75 65 0d |ot add t|o queue.|
|00004160| 09 09 09 4c 45 41 09 09 | 09 54 78 51 75 65 75 65 |...LEA..|.TxQueue|
|00004170| 42 2c 41 32 09 09 3b 20 | 70 6f 69 6e 74 20 74 6f |B,A2..; |point to|
|00004180| 20 71 75 65 75 65 0d 09 | 09 09 4d 4f 56 45 2e 42 | queue..|..MOVE.B|
|00004190| 09 09 39 28 41 36 29 2c | 30 28 41 32 2c 44 30 29 |..9(A6),|0(A2,D0)|
|000041a0| 09 3b 20 70 6c 61 63 65 | 20 62 79 74 65 20 69 6e |.; place| byte in|
|000041b0| 20 71 75 65 75 65 0d 09 | 09 09 41 44 44 51 09 09 | queue..|..ADDQ..|
|000041c0| 23 31 2c 44 30 09 09 09 | 3b 20 75 70 64 61 74 65 |#1,D0...|; update|
|000041d0| 20 70 6f 69 6e 74 65 72 | 0d 09 09 09 43 4d 50 09 | pointer|....CMP.|
|000041e0| 09 09 23 24 31 30 30 2c | 44 30 0d 09 09 09 42 4e |..#$100,|D0....BN|
|000041f0| 45 09 09 09 40 31 0d 09 | 09 09 4d 4f 56 45 09 09 |E...@1..|..MOVE..|
|00004200| 23 30 2c 44 30 0d 40 31 | 09 09 09 4d 4f 56 45 09 |#0,D0.@1|...MOVE.|
|00004210| 09 44 30 2c 28 41 33 29 | 0d 09 09 09 4c 45 41 09 |.D0,(A3)|....LEA.|
|00004220| 09 09 54 78 51 45 6d 70 | 74 79 42 2c 41 33 09 3b |..TxQEmp|tyB,A3.;|
|00004230| 20 67 65 74 20 74 68 65 | 20 61 64 64 72 65 73 73 | get the| address|
|00004240| 0d 09 09 09 4d 4f 56 45 | 09 09 23 30 2c 28 41 33 |....MOVE|..#0,(A3|
|00004250| 29 09 09 09 3b 20 72 65 | 73 65 74 20 71 75 65 75 |)...; re|set queu|
|00004260| 65 20 65 6d 70 74 79 20 | 66 6c 61 67 0d 09 09 09 |e empty |flag....|
|00004270| 42 52 41 09 09 09 54 78 | 45 78 69 74 42 09 09 09 |BRA...Tx|ExitB...|
|00004280| 3b 20 61 6e 64 20 65 78 | 69 74 0d 09 09 09 0d 46 |; and ex|it.....F|
|00004290| 69 72 73 74 42 79 74 65 | 42 0d 09 09 09 4d 4f 56 |irstByte|B....MOV|
|000042a0| 45 09 09 23 62 44 61 74 | 61 2c 44 30 09 09 3b 20 |E..#bDat|a,D0..; |
|000042b0| 67 65 74 20 69 6e 64 65 | 78 20 74 6f 20 64 61 74 |get inde|x to dat|
|000042c0| 61 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 28 53 50 |a....MOV|E.L..(SP|
|000042d0| 29 2c 28 53 50 29 09 09 | 3b 20 44 65 6c 61 79 0d |),(SP)..|; Delay.|
|000042e0| 09 09 09 4d 4f 56 45 2e | 42 09 09 39 28 41 36 29 |...MOVE.|B..9(A6)|
|000042f0| 2c 30 28 41 31 2c 44 30 | 29 09 3b 20 77 72 69 74 |,0(A1,D0|).; writ|
|00004300| 65 20 64 61 74 61 20 74 | 6f 20 53 43 43 0d 09 09 |e data t|o SCC...|
|00004310| 09 4d 4f 56 45 2e 4c 09 | 09 28 53 50 29 2c 28 53 |.MOVE.L.|.(SP),(S|
|00004320| 50 29 09 09 3b 20 44 65 | 6c 61 79 0d 09 09 09 0d |P)..; De|lay.....|
|00004330| 54 78 45 78 69 74 42 0d | 09 09 09 4d 4f 56 45 4d |TxExitB.|...MOVEM|
|00004340| 2e 4c 09 09 28 53 50 29 | 2b 2c 44 30 2f 41 30 2d |.L..(SP)|+,D0/A0-|
|00004350| 41 33 09 3b 20 52 65 73 | 74 6f 72 65 20 72 65 67 |A3.; Res|tore reg|
|00004360| 69 73 74 65 72 73 0d 09 | 09 09 4d 4f 56 45 09 09 |isters..|..MOVE..|
|00004370| 28 53 50 29 2b 2c 53 52 | 09 09 3b 20 52 65 73 74 |(SP)+,SR|..; Rest|
|00004380| 6f 72 65 20 69 6e 74 65 | 72 72 75 70 74 73 0d 09 |ore inte|rrupts..|
|00004390| 09 09 55 4e 4c 4b 09 09 | 41 36 09 09 09 09 3b 20 |..UNLK..|A6....; |
|000043a0| 72 65 6c 65 61 73 65 20 | 66 72 61 6d 65 20 70 6f |release |frame po|
|000043b0| 69 6e 74 65 72 0d 09 09 | 09 4d 4f 56 45 2e 4c 09 |inter...|.MOVE.L.|
|000043c0| 09 28 53 50 29 2b 2c 41 | 31 09 09 3b 20 73 61 76 |.(SP)+,A|1..; sav|
|000043d0| 65 20 72 65 74 75 72 6e | 20 61 64 64 72 65 73 73 |e return| address|
|000043e0| 0d 09 09 09 41 44 44 2e | 4c 09 09 23 32 2c 53 50 |....ADD.|L..#2,SP|
|000043f0| 09 09 09 3b 20 6d 6f 76 | 65 20 70 61 73 74 20 64 |...; mov|e past d|
|00004400| 61 74 61 20 77 6f 72 64 | 0d 09 09 09 4d 4f 56 45 |ata word|....MOVE|
|00004410| 2e 4c 09 09 41 31 2c 2d | 28 53 50 29 09 09 3b 20 |.L..A1,-|(SP)..; |
|00004420| 70 75 74 20 61 64 64 72 | 65 73 73 20 62 61 63 6b |put addr|ess back|
|00004430| 20 6f 6e 20 73 74 61 63 | 6b 0d 09 09 09 52 54 53 | on stac|k....RTS|
|00004440| 09 09 09 09 09 09 09 3b | 20 61 6e 64 20 72 65 74 |.......;| and ret|
|00004450| 75 72 6e 0d 09 09 09 0d | 3b 20 20 20 20 20 20 46 |urn.....|; F|
|00004460| 75 6e 63 74 69 6f 6e 20 | 52 78 4d 49 44 49 42 20 |unction |RxMIDIB |
|00004470| 3a 20 4c 6f 6e 67 49 6e | 74 3b 0d 3b 20 54 68 69 |: LongIn|t;.; Thi|
|00004480| 73 20 72 6f 75 74 69 6e | 65 20 67 65 74 73 20 61 |s routin|e gets a|
|00004490| 20 62 79 74 65 20 74 68 | 72 6f 75 67 68 20 74 68 | byte th|rough th|
|000044a0| 65 20 70 72 69 6e 74 65 | 72 20 70 6f 72 74 2e 0d |e printe|r port..|
|000044b0| 3b 20 54 6f 20 75 73 65 | 20 74 68 69 73 20 72 6f |; To use| this ro|
|000044c0| 75 74 69 6e 65 20 74 72 | 65 61 74 20 69 74 20 6c |utine tr|eat it l|
|000044d0| 69 6b 65 20 61 20 50 61 | 73 63 61 6c 0d 3b 20 66 |ike a Pa|scal.; f|
|000044e0| 75 6e 63 74 69 6f 6e 2e | 20 20 4c 65 61 76 65 20 |unction.| Leave |
|000044f0| 73 70 61 63 65 20 6f 6e | 20 74 68 65 20 73 74 61 |space on| the sta|
|00004500| 63 6b 20 66 6f 72 20 61 | 20 6c 6f 6e 67 77 6f 72 |ck for a| longwor|
|00004510| 64 0d 3b 20 6f 66 20 64 | 61 74 61 20 62 65 66 6f |d.; of d|ata befo|
|00004520| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|00004530| 72 6f 75 74 69 6e 65 2e | 20 20 49 66 20 74 68 65 |routine.| If the|
|00004540| 20 64 61 74 61 0d 3b 20 | 6f 6e 20 74 68 65 20 73 | data.; |on the s|
|00004550| 74 61 63 6b 20 61 66 74 | 65 72 0d 3b 20 74 68 65 |tack aft|er.; the|
|00004560| 20 72 6f 75 74 69 6e 65 | 20 65 78 65 63 75 74 65 | routine| execute|
|00004570| 73 20 69 73 20 30 20 74 | 68 65 72 65 20 77 61 73 |s is 0 t|here was|
|00004580| 20 6e 6f 20 4d 49 44 49 | 20 64 61 74 61 20 61 76 | no MIDI| data av|
|00004590| 61 69 6c 61 62 6c 65 2e | 0d 3b 20 49 66 20 69 74 |ailable.|.; If it|
|000045a0| 27 73 20 6e 6f 6e 2d 30 | 20 74 68 65 20 75 70 70 |'s non-0| the upp|
|000045b0| 65 72 20 33 20 62 79 74 | 65 73 20 63 6f 6e 74 61 |er 3 byt|es conta|
|000045c0| 69 6e 20 74 68 65 20 63 | 6f 75 6e 74 65 72 0d 3b |in the c|ounter.;|
|000045d0| 20 76 61 6c 75 65 2c 20 | 74 68 65 20 4d 49 44 49 | value, |the MIDI|
|000045e0| 20 62 79 74 65 20 69 73 | 20 74 68 65 20 6c 6f 77 | byte is| the low|
|000045f0| 20 62 79 74 65 2e 0d 0d | 52 78 4d 49 44 49 42 0d | byte...|RxMIDIB.|
|00004600| 09 09 09 4c 49 4e 4b 09 | 09 41 36 2c 23 30 09 09 |...LINK.|.A6,#0..|
|00004610| 09 3b 20 73 65 74 20 66 | 72 61 6d 65 20 70 6f 69 |.; set f|rame poi|
|00004620| 6e 74 65 72 0d 09 09 09 | 4d 4f 56 45 09 09 53 52 |nter....|MOVE..SR|
|00004630| 2c 2d 28 53 50 29 09 09 | 3b 20 73 61 76 65 20 69 |,-(SP)..|; save i|
|00004640| 6e 74 65 72 72 75 70 74 | 73 0d 09 09 09 4d 4f 56 |nterrupt|s....MOV|
|00004650| 45 4d 2e 4c 09 09 44 30 | 2d 44 31 2f 41 30 2d 41 |EM.L..D0|-D1/A0-A|
|00004660| 33 2c 2d 28 53 50 29 09 | 3b 20 53 61 76 65 20 72 |3,-(SP).|; Save r|
|00004670| 65 67 69 73 74 65 72 73 | 0d 09 09 09 4f 52 49 09 |egisters|....ORI.|
|00004680| 09 09 23 24 30 33 30 30 | 2c 53 52 09 09 3b 20 64 |..#$0300|,SR..; d|
|00004690| 69 73 61 62 6c 65 20 69 | 6e 74 65 72 72 75 70 74 |isable i|nterrupt|
|000046a0| 73 0d 09 09 09 0d 09 09 | 09 4c 45 41 09 09 09 52 |s.......|.LEA...R|
|000046b0| 78 51 45 6d 70 74 79 42 | 2c 41 33 09 3b 20 67 65 |xQEmptyB|,A3.; ge|
|000046c0| 74 20 74 68 65 20 61 64 | 64 72 65 73 73 0d 09 09 |t the ad|dress...|
|000046d0| 09 54 53 54 2e 42 09 09 | 28 41 33 29 09 09 09 3b |.TST.B..|(A3)...;|
|000046e0| 20 61 6e 79 20 64 61 74 | 61 20 61 76 61 69 6c 61 | any dat|a availa|
|000046f0| 62 6c 65 3f 0d 09 09 09 | 42 45 51 09 09 09 40 31 |ble?....|BEQ...@1|
|00004700| 09 09 09 09 3b 20 69 66 | 20 73 6f 2c 20 62 72 61 |....; if| so, bra|
|00004710| 6e 63 68 0d 09 09 09 4d | 4f 56 45 2e 4c 09 09 23 |nch....M|OVE.L..#|
|00004720| 30 2c 38 28 41 36 29 09 | 09 3b 20 69 66 20 6e 6f |0,8(A6).|.; if no|
|00004730| 74 2c 20 72 65 74 75 72 | 6e 20 77 69 74 68 20 30 |t, retur|n with 0|
|00004740| 0d 09 09 09 42 52 41 09 | 09 09 52 78 45 78 69 74 |....BRA.|..RxExit|
|00004750| 42 0d 40 31 09 09 09 4c | 45 41 09 09 09 52 78 42 |B.@1...L|EA...RxB|
|00004760| 79 74 65 4f 75 74 42 2c | 41 33 09 3b 20 67 65 74 |yteOutB,|A3.; get|
|00004770| 20 74 68 65 20 61 64 64 | 72 65 73 73 0d 09 09 09 | the add|ress....|
|00004780| 4d 4f 56 45 09 09 28 41 | 33 29 2c 44 30 09 09 09 |MOVE..(A|3),D0...|
|00004790| 3b 20 67 65 74 20 69 6e | 64 65 78 20 74 6f 20 62 |; get in|dex to b|
|000047a0| 79 74 65 20 6f 75 74 0d | 09 09 09 4c 45 41 09 09 |yte out.|...LEA..|
|000047b0| 09 52 78 51 75 65 75 65 | 42 2c 41 32 09 09 3b 20 |.RxQueue|B,A2..; |
|000047c0| 70 6f 69 6e 74 20 74 6f | 20 71 75 65 75 65 0d 09 |point to| queue..|
|000047d0| 09 09 4d 4f 56 45 2e 4c | 09 09 23 30 2c 44 31 09 |..MOVE.L|..#0,D1.|
|000047e0| 09 09 3b 20 63 6c 65 61 | 72 20 64 61 74 61 20 72 |..; clea|r data r|
|000047f0| 65 67 69 73 74 65 72 0d | 09 09 09 4d 4f 56 45 2e |egister.|...MOVE.|
|00004800| 4c 09 09 30 28 41 32 2c | 44 30 29 2c 44 31 09 09 |L..0(A2,|D0),D1..|
|00004810| 3b 20 67 65 74 20 4d 49 | 44 49 20 64 61 74 61 0d |; get MI|DI data.|
|00004820| 09 09 09 4d 4f 56 45 2e | 4c 09 09 44 31 2c 38 28 |...MOVE.|L..D1,8(|
|00004830| 41 36 29 09 09 3b 20 70 | 6c 61 63 65 20 6f 6e 20 |A6)..; p|lace on |
|00004840| 73 74 61 63 6b 20 66 6f | 72 20 72 65 74 75 72 6e |stack fo|r return|
|00004850| 0d 09 09 09 41 44 44 51 | 09 09 23 34 2c 44 30 09 |....ADDQ|..#4,D0.|
|00004860| 09 09 3b 20 75 70 64 61 | 74 65 20 69 6e 64 65 78 |..; upda|te index|
|00004870| 0d 09 09 09 43 4d 50 09 | 09 09 23 24 34 30 30 2c |....CMP.|..#$400,|
|00004880| 44 30 0d 09 09 09 42 4e | 45 09 09 09 40 32 0d 09 |D0....BN|E...@2..|
|00004890| 09 09 4d 4f 56 45 09 09 | 23 30 2c 44 30 0d 40 32 |..MOVE..|#0,D0.@2|
|000048a0| 09 09 09 4c 45 41 09 09 | 09 52 78 42 79 74 65 4f |...LEA..|.RxByteO|
|000048b0| 75 74 42 2c 41 33 09 3b | 20 67 65 74 20 74 68 65 |utB,A3.;| get the|
|000048c0| 20 61 64 64 72 65 73 73 | 0d 09 09 09 4d 4f 56 45 | address|....MOVE|
|000048d0| 09 09 44 30 2c 28 41 33 | 29 0d 09 09 09 4c 45 41 |..D0,(A3|)....LEA|
|000048e0| 09 09 09 52 78 42 79 74 | 65 49 6e 42 2c 41 33 09 |...RxByt|eInB,A3.|
|000048f0| 09 3b 20 67 65 74 20 74 | 68 65 20 61 64 64 72 65 |.; get t|he addre|
|00004900| 73 73 0d 09 09 09 4d 4f | 56 45 09 09 28 41 33 29 |ss....MO|VE..(A3)|
|00004910| 2c 44 31 0d 09 09 09 43 | 4d 50 09 09 09 44 30 2c |,D1....C|MP...D0,|
|00004920| 44 31 09 09 09 3b 20 69 | 73 20 71 75 65 75 65 20 |D1...; i|s queue |
|00004930| 65 6d 70 74 79 3f 0d 09 | 09 09 42 4e 45 09 09 09 |empty?..|..BNE...|
|00004940| 52 78 45 78 69 74 42 09 | 09 09 3b 20 69 66 20 6e |RxExitB.|..; if n|
|00004950| 6f 74 20 65 78 69 74 0d | 09 09 09 4c 45 41 09 09 |ot exit.|...LEA..|
|00004960| 09 52 78 51 45 6d 70 74 | 79 42 2c 41 33 09 3b 20 |.RxQEmpt|yB,A3.; |
|00004970| 67 65 74 20 74 68 65 20 | 61 64 64 72 65 73 73 0d |get the |address.|
|00004980| 09 09 09 4d 4f 56 45 09 | 09 23 24 46 46 46 46 2c |...MOVE.|.#$FFFF,|
|00004990| 28 41 33 29 09 09 3b 20 | 69 66 20 65 6d 70 74 79 |(A3)..; |if empty|
|000049a0| 2c 20 73 65 74 20 66 6c | 61 67 0d 09 09 09 0d 52 |, set fl|ag.....R|
|000049b0| 78 45 78 69 74 42 0d 09 | 09 09 4d 4f 56 45 4d 2e |xExitB..|..MOVEM.|
|000049c0| 4c 09 09 28 53 50 29 2b | 2c 44 30 2d 44 31 2f 41 |L..(SP)+|,D0-D1/A|
|000049d0| 30 2d 41 33 09 3b 20 52 | 65 73 74 6f 72 65 20 72 |0-A3.; R|estore r|
|000049e0| 65 67 69 73 74 65 72 73 | 0d 09 09 09 4d 4f 56 45 |egisters|....MOVE|
|000049f0| 09 09 28 53 50 29 2b 2c | 53 52 09 09 3b 20 72 65 |..(SP)+,|SR..; re|
|00004a00| 73 74 6f 72 65 20 69 6e | 74 65 72 72 75 70 74 73 |store in|terrupts|
|00004a10| 0d 09 09 09 55 4e 4c 4b | 09 09 41 36 0d 09 09 09 |....UNLK|..A6....|
|00004a20| 52 54 53 09 09 09 09 09 | 09 09 3b 20 61 6e 64 20 |RTS.....|..; and |
|00004a30| 72 65 74 75 72 6e 0d 09 | 09 09 0d 3b 20 20 54 68 |return..|...; Th|
|00004a40| 69 73 20 69 73 20 74 68 | 65 20 69 6e 74 65 72 72 |is is th|e interr|
|00004a50| 75 70 74 20 72 6f 75 74 | 69 6e 65 20 66 6f 72 20 |upt rout|ine for |
|00004a60| 72 65 63 65 69 76 69 6e | 67 20 74 68 72 6f 75 67 |receivin|g throug|
|00004a70| 68 0d 3b 20 74 68 65 20 | 70 72 69 6e 74 65 72 20 |h.; the |printer |
|00004a80| 70 6f 72 74 2e 20 20 49 | 74 20 70 6c 61 63 65 73 |port. I|t places|
|00004a90| 20 74 68 65 20 63 6f 75 | 6e 74 65 72 20 76 61 6c | the cou|nter val|
|00004aa0| 75 65 20 61 6e 64 20 74 | 68 65 0d 3b 20 4d 49 44 |ue and t|he.; MID|
|00004ab0| 49 20 62 79 74 65 20 69 | 6e 20 61 20 63 69 72 63 |I byte i|n a circ|
|00004ac0| 75 6c 61 72 20 71 75 65 | 75 65 20 74 6f 20 62 65 |ular que|ue to be|
|00004ad0| 0d 3b 20 61 63 63 65 73 | 73 65 64 20 6c 61 74 65 |.; acces|sed late|
|00004ae0| 72 20 62 79 20 74 68 65 | 20 61 70 70 6c 69 63 61 |r by the| applica|
|00004af0| 74 69 6f 6e 2e 0d 3b 20 | 57 68 65 6e 20 74 68 65 |tion..; |When the|
|00004b00| 20 73 79 73 74 65 6d 20 | 67 65 74 73 20 74 68 69 | system |gets thi|
|00004b10| 73 20 66 61 72 2c 20 41 | 30 20 63 6f 6e 74 61 69 |s far, A|0 contai|
|00004b20| 6e 73 20 74 68 65 0d 3b | 20 53 43 43 20 62 61 73 |ns the.;| SCC bas|
|00004b30| 65 20 72 65 61 64 20 43 | 74 6c 20 61 64 64 72 65 |e read C|tl addre|
|00004b40| 73 73 0d 3b 20 61 6e 64 | 20 41 31 20 63 6f 6e 74 |ss.; and| A1 cont|
|00004b50| 61 69 6e 73 20 74 68 65 | 20 53 43 43 20 62 61 73 |ains the| SCC bas|
|00004b60| 65 20 77 72 69 74 65 20 | 43 74 6c 20 61 64 64 72 |e write |Ctl addr|
|00004b70| 65 73 73 0d 3b 20 66 6f | 72 20 74 68 69 73 20 63 |ess.; fo|r this c|
|00004b80| 68 61 6e 6e 65 6c 2e 20 | 20 54 68 65 20 64 61 74 |hannel. | The dat|
|00004b90| 61 20 61 64 64 72 65 73 | 73 65 73 20 61 72 65 20 |a addres|ses are |
|00004ba0| 6f 66 66 73 65 74 20 62 | 79 20 34 0d 3b 20 66 72 |offset b|y 4.; fr|
|00004bb0| 6f 6d 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 20 61 |om the c|ontrol a|
|00004bc0| 64 64 72 65 73 73 65 73 | 2e 0d 3b 20 44 30 2d 44 |ddresses|..; D0-D|
|00004bd0| 33 2f 41 30 2d 41 33 20 | 61 72 65 20 61 6c 72 65 |3/A0-A3 |are alre|
|00004be0| 61 64 79 20 70 72 65 73 | 65 72 76 65 64 2c 20 73 |ady pres|erved, s|
|00004bf0| 6f 20 74 68 65 79 20 6d | 61 79 0d 3b 20 62 65 20 |o they m|ay.; be |
|00004c00| 75 73 65 64 20 66 72 65 | 65 6c 79 2e 0d 0d 52 78 |used fre|ely...Rx|
|00004c10| 49 6e 74 48 61 6e 64 42 | 0d 09 09 09 4f 52 49 09 |IntHandB|....ORI.|
|00004c20| 09 09 23 24 30 33 30 30 | 2c 53 52 09 09 3b 20 64 |..#$0300|,SR..; d|
|00004c30| 69 73 61 62 6c 65 20 69 | 6e 74 65 72 72 75 70 74 |isable i|nterrupt|
|00004c40| 73 0d 09 09 09 0d 40 33 | 09 09 09 4d 4f 56 45 09 |s.....@3|...MOVE.|
|00004c50| 09 23 34 2c 44 30 09 09 | 09 3b 20 67 65 74 20 64 |.#4,D0..|.; get d|
|00004c60| 61 74 61 20 6f 66 66 73 | 65 74 0d 09 09 09 43 4c |ata offs|et....CL|
|00004c70| 52 2e 4c 09 09 44 31 09 | 09 09 09 3b 20 70 72 65 |R.L..D1.|...; pre|
|00004c80| 70 61 72 65 20 66 6f 72 | 20 64 61 74 61 0d 09 09 |pare for| data...|
|00004c90| 09 4d 4f 56 45 2e 4c 09 | 09 28 53 50 29 2c 28 53 |.MOVE.L.|.(SP),(S|
|00004ca0| 50 29 09 09 3b 20 44 65 | 6c 61 79 0d 09 09 09 4d |P)..; De|lay....M|
|00004cb0| 4f 56 45 2e 42 09 09 30 | 28 41 30 2c 44 30 29 2c |OVE.B..0|(A0,D0),|
|00004cc0| 44 31 09 09 3b 20 72 65 | 61 64 20 64 61 74 61 20 |D1..; re|ad data |
|00004cd0| 66 72 6f 6d 20 53 43 43 | 0d 09 09 09 4d 4f 56 45 |from SCC|....MOVE|
|00004ce0| 2e 4c 09 09 28 53 50 29 | 2c 28 53 50 29 09 09 3b |.L..(SP)|,(SP)..;|
|00004cf0| 20 44 65 6c 61 79 0d 09 | 09 09 4c 45 41 09 09 09 | Delay..|..LEA...|
|00004d00| 52 78 51 75 65 75 65 42 | 2c 41 32 09 09 3b 20 70 |RxQueueB|,A2..; p|
|00004d10| 6f 69 6e 74 20 74 6f 20 | 71 75 65 75 65 0d 09 09 |oint to |queue...|
|00004d20| 09 4c 45 41 09 09 09 52 | 78 42 79 74 65 49 6e 42 |.LEA...R|xByteInB|
|00004d30| 2c 41 33 09 09 3b 20 67 | 65 74 20 74 68 65 20 61 |,A3..; g|et the a|
|00004d40| 64 64 72 65 73 73 0d 09 | 09 09 4d 4f 56 45 09 09 |ddress..|..MOVE..|
|00004d50| 28 41 33 29 2c 44 30 09 | 09 09 3b 20 67 65 74 20 |(A3),D0.|..; get |
|00004d60| 6f 66 66 73 65 74 20 74 | 6f 20 6e 65 78 74 20 63 |offset t|o next c|
|00004d70| 65 6c 6c 0d 09 09 09 4c | 45 41 09 09 09 43 6f 75 |ell....L|EA...Cou|
|00004d80| 6e 74 65 72 2c 41 33 09 | 09 3b 20 67 65 74 20 74 |nter,A3.|.; get t|
|00004d90| 68 65 20 61 64 64 72 65 | 73 73 0d 09 09 09 4d 4f |he addre|ss....MO|
|00004da0| 56 45 2e 4c 09 09 28 41 | 33 29 2c 44 32 09 09 09 |VE.L..(A|3),D2...|
|00004db0| 3b 20 70 75 74 20 63 6f | 75 6e 74 65 72 20 76 61 |; put co|unter va|
|00004dc0| 6c 75 65 20 69 6e 20 44 | 32 0d 09 09 09 4c 53 4c |lue in D|2....LSL|
|00004dd0| 2e 4c 09 09 23 38 2c 44 | 32 09 09 09 3b 20 73 68 |.L..#8,D|2...; sh|
|00004de0| 69 66 74 20 63 6f 75 6e | 74 65 72 20 6f 6e 65 20 |ift coun|ter one |
|00004df0| 62 79 74 65 0d 09 09 09 | 41 44 44 2e 4c 09 09 44 |byte....|ADD.L..D|
|00004e00| 32 2c 44 31 09 09 09 3b | 20 63 6f 6d 62 69 6e 65 |2,D1...;| combine|
|00004e10| 20 63 6f 75 6e 74 65 72 | 20 61 6e 64 20 64 61 74 | counter| and dat|
|00004e20| 61 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 44 31 2c |a....MOV|E.L..D1,|
|00004e30| 30 28 41 32 2c 44 30 29 | 09 09 3b 20 70 75 74 20 |0(A2,D0)|..; put |
|00004e40| 6c 6f 6e 67 77 6f 72 64 | 20 69 6e 20 71 75 65 75 |longword| in queu|
|00004e50| 65 0d 09 09 09 4c 45 41 | 09 09 09 52 78 51 45 6d |e....LEA|...RxQEm|
|00004e60| 70 74 79 42 2c 41 33 09 | 3b 20 67 65 74 20 74 68 |ptyB,A3.|; get th|
|00004e70| 65 20 61 64 64 72 65 73 | 73 0d 09 09 09 4d 4f 56 |e addres|s....MOV|
|00004e80| 45 09 09 23 30 2c 28 41 | 33 29 09 09 09 3b 20 72 |E..#0,(A|3)...; r|
|00004e90| 65 73 65 74 20 71 75 65 | 75 65 20 65 6d 70 74 79 |eset que|ue empty|
|00004ea0| 20 66 6c 61 67 0d 09 09 | 09 41 44 44 51 09 09 23 | flag...|.ADDQ..#|
|00004eb0| 34 2c 44 30 09 09 09 3b | 20 75 70 64 61 74 65 20 |4,D0...;| update |
|00004ec0| 69 6e 64 65 78 0d 09 09 | 09 43 4d 50 09 09 09 23 |index...|.CMP...#|
|00004ed0| 24 34 30 30 2c 44 30 0d | 09 09 09 42 4e 45 09 09 |$400,D0.|...BNE..|
|00004ee0| 09 40 31 0d 09 09 09 4d | 4f 56 45 09 09 23 30 2c |.@1....M|OVE..#0,|
|00004ef0| 44 30 0d 40 31 09 09 09 | 4c 45 41 09 09 09 52 78 |D0.@1...|LEA...Rx|
|00004f00| 42 79 74 65 49 6e 42 2c | 41 33 09 09 3b 20 67 65 |ByteInB,|A3..; ge|
|00004f10| 74 20 74 68 65 20 61 64 | 64 72 65 73 73 0d 09 09 |t the ad|dress...|
|00004f20| 09 4d 4f 56 45 09 09 44 | 30 2c 28 41 33 29 0d 09 |.MOVE..D|0,(A3)..|
|00004f30| 09 09 0d 40 32 09 09 09 | 42 54 53 54 2e 42 09 09 |...@2...|BTST.B..|
|00004f40| 23 30 2c 28 41 30 29 09 | 09 09 3b 20 69 73 20 74 |#0,(A0).|..; is t|
|00004f50| 68 65 72 65 20 6d 6f 72 | 65 20 64 61 74 61 3f 0d |here mor|e data?.|
|00004f60| 09 09 09 42 4e 45 09 09 | 09 40 33 09 09 09 09 3b |...BNE..|.@3....;|
|00004f70| 20 64 6f 20 69 74 20 61 | 67 61 69 6e 20 69 66 20 | do it a|gain if |
|00004f80| 74 68 65 72 65 20 69 73 | 0d 09 09 09 0d 09 09 09 |there is|........|
|00004f90| 41 4e 44 49 09 09 23 24 | 46 38 46 46 2c 53 52 09 |ANDI..#$|F8FF,SR.|
|00004fa0| 09 3b 20 65 6e 61 62 6c | 65 20 69 6e 74 65 72 72 |.; enabl|e interr|
|00004fb0| 75 70 74 73 0d 09 09 09 | 52 54 53 09 09 09 09 09 |upts....|RTS.....|
|00004fc0| 09 09 3b 20 61 6e 64 20 | 72 65 74 75 72 6e 0d 09 |..; and |return..|
|00004fd0| 09 09 0d 3b 20 54 68 69 | 73 20 69 73 20 74 68 65 |...; Thi|s is the|
|00004fe0| 20 69 6e 74 65 72 72 75 | 70 74 20 72 6f 75 74 69 | interru|pt routi|
|00004ff0| 6e 65 20 66 6f 72 20 74 | 72 61 6e 73 6d 69 74 74 |ne for t|ransmitt|
|00005000| 69 6e 67 20 61 20 62 79 | 74 65 0d 3b 20 74 68 72 |ing a by|te.; thr|
|00005010| 6f 75 67 68 20 74 68 65 | 20 70 72 69 6e 74 65 72 |ough the| printer|
|00005020| 20 70 6f 72 74 2e 20 20 | 49 74 20 63 68 65 63 6b | port. |It check|
|00005030| 73 20 74 6f 20 73 65 65 | 20 69 66 20 74 68 65 72 |s to see| if ther|
|00005040| 65 0d 3b 20 69 73 20 61 | 6e 79 20 64 61 74 61 20 |e.; is a|ny data |
|00005050| 74 6f 20 73 65 6e 64 2c | 20 61 6e 64 20 69 66 20 |to send,| and if |
|00005060| 74 68 65 72 65 20 69 73 | 20 69 74 20 73 65 6e 64 |there is| it send|
|00005070| 73 20 69 74 20 74 6f 0d | 3b 20 74 68 65 20 53 43 |s it to.|; the SC|
|00005080| 43 2e 20 20 49 66 20 74 | 68 65 72 65 20 69 73 6e |C. If t|here isn|
|00005090| 27 74 20 69 74 20 72 65 | 73 65 74 73 20 74 68 65 |'t it re|sets the|
|000050a0| 20 54 42 45 20 69 6e 74 | 65 72 72 75 70 74 0d 3b | TBE int|errupt.;|
|000050b0| 20 69 6e 20 74 68 65 20 | 53 43 43 20 61 6e 64 20 | in the |SCC and |
|000050c0| 65 78 69 74 73 2e 0d 3b | 20 57 68 65 6e 20 74 68 |exits..;| When th|
|000050d0| 65 20 73 79 73 74 65 6d | 20 67 65 74 73 20 74 68 |e system| gets th|
|000050e0| 69 73 20 66 61 72 2c 20 | 41 30 20 63 6f 6e 74 61 |is far, |A0 conta|
|000050f0| 69 6e 73 20 74 68 65 20 | 53 43 43 0d 3b 20 62 61 |ins the |SCC.; ba|
|00005100| 73 65 20 72 65 61 64 20 | 43 74 6c 20 61 64 64 72 |se read |Ctl addr|
|00005110| 65 73 73 20 61 6e 64 20 | 41 31 20 63 6f 6e 74 61 |ess and |A1 conta|
|00005120| 69 6e 73 20 74 68 65 20 | 53 43 43 20 62 61 73 65 |ins the |SCC base|
|00005130| 0d 3b 20 77 72 69 74 65 | 20 43 74 6c 20 61 64 64 |.; write| Ctl add|
|00005140| 72 65 73 73 20 66 6f 72 | 20 74 68 69 73 20 63 68 |ress for| this ch|
|00005150| 61 6e 6e 65 6c 2e 0d 3b | 20 54 68 65 20 64 61 74 |annel..;| The dat|
|00005160| 61 20 61 64 64 72 65 73 | 73 65 73 20 61 72 65 20 |a addres|ses are |
|00005170| 6f 66 66 73 65 74 20 62 | 79 20 34 20 66 72 6f 6d |offset b|y 4 from|
|00005180| 20 74 68 65 20 63 6f 6e | 74 72 6f 6c 0d 3b 20 61 | the con|trol.; a|
|00005190| 64 64 72 65 73 73 65 73 | 2e 20 44 30 2d 44 33 2f |ddresses|. D0-D3/|
|000051a0| 41 30 2d 41 33 20 61 72 | 65 20 61 6c 72 65 61 64 |A0-A3 ar|e alread|
|000051b0| 79 20 70 72 65 73 65 72 | 76 65 64 2c 20 73 6f 0d |y preser|ved, so.|
|000051c0| 3b 20 74 68 65 79 20 6d | 61 79 20 62 65 20 75 73 |; they m|ay be us|
|000051d0| 65 64 20 66 72 65 65 6c | 79 2e 0d 0d 54 78 49 6e |ed freel|y...TxIn|
|000051e0| 74 48 61 6e 64 42 0d 09 | 09 09 4f 52 49 09 09 09 |tHandB..|..ORI...|
|000051f0| 23 24 30 33 30 30 2c 53 | 52 09 09 3b 20 64 69 73 |#$0300,S|R..; dis|
|00005200| 61 62 6c 65 20 69 6e 74 | 65 72 72 75 70 74 73 0d |able int|errupts.|
|00005210| 09 09 09 0d 09 09 09 4c | 45 41 09 09 09 54 78 51 |.......L|EA...TxQ|
|00005220| 45 6d 70 74 79 42 2c 41 | 33 09 3b 20 67 65 74 20 |EmptyB,A|3.; get |
|00005230| 74 68 65 20 61 64 64 72 | 65 73 73 0d 09 09 09 54 |the addr|ess....T|
|00005240| 53 54 2e 42 09 09 28 41 | 33 29 09 09 09 3b 20 49 |ST.B..(A|3)...; I|
|00005250| 73 20 71 75 65 75 65 20 | 65 6d 70 74 79 3f 0d 09 |s queue |empty?..|
|00005260| 09 09 42 45 51 09 09 09 | 40 31 09 09 09 09 3b 20 |..BEQ...|@1....; |
|00005270| 69 66 20 6e 6f 74 20 62 | 72 61 6e 63 68 0d 09 09 |if not b|ranch...|
|00005280| 09 4d 4f 56 45 2e 42 09 | 09 23 24 32 38 2c 28 41 |.MOVE.B.|.#$28,(A|
|00005290| 31 29 09 09 3b 20 69 66 | 20 73 6f 2c 20 72 65 73 |1)..; if| so, res|
|000052a0| 65 74 20 54 42 45 20 69 | 6e 74 65 72 72 75 70 74 |et TBE i|nterrupt|
|000052b0| 0d 09 09 09 4d 4f 56 45 | 2e 4c 09 09 28 53 50 29 |....MOVE|.L..(SP)|
|000052c0| 2c 28 53 50 29 09 09 3b | 20 44 65 6c 61 79 0d 09 |,(SP)..;| Delay..|
|000052d0| 09 09 42 52 41 09 09 09 | 54 78 49 45 78 69 74 42 |..BRA...|TxIExitB|
|000052e0| 09 09 09 3b 20 61 6e 64 | 20 65 78 69 74 0d 40 31 |...; and| exit.@1|
|000052f0| 09 09 09 4c 45 41 09 09 | 09 54 78 42 79 74 65 4f |...LEA..|.TxByteO|
|00005300| 75 74 42 2c 41 33 09 3b | 20 67 65 74 20 74 68 65 |utB,A3.;| get the|
|00005310| 20 61 64 64 72 65 73 73 | 0d 09 09 09 4d 4f 56 45 | address|....MOVE|
|00005320| 09 09 28 41 33 29 2c 44 | 30 09 09 09 3b 20 67 65 |..(A3),D|0...; ge|
|00005330| 74 20 69 6e 64 65 78 20 | 74 6f 20 6e 65 78 74 20 |t index |to next |
|00005340| 64 61 74 61 20 62 79 74 | 65 0d 09 09 09 4c 45 41 |data byt|e....LEA|
|00005350| 09 09 09 54 78 51 75 65 | 75 65 42 2c 41 32 09 09 |...TxQue|ueB,A2..|
|00005360| 3b 20 70 6f 69 6e 74 20 | 74 6f 20 71 75 65 75 65 |; point |to queue|
|00005370| 0d 09 09 09 4d 4f 56 45 | 09 09 23 34 2c 44 31 09 |....MOVE|..#4,D1.|
|00005380| 09 09 3b 20 67 65 74 20 | 64 61 74 61 20 6f 66 66 |..; get |data off|
|00005390| 73 65 74 0d 09 09 09 4d | 4f 56 45 2e 42 09 09 30 |set....M|OVE.B..0|
|000053a0| 28 41 32 2c 44 30 29 2c | 30 28 41 31 2c 44 31 29 |(A2,D0),|0(A1,D1)|
|000053b0| 09 3b 20 77 72 69 74 65 | 20 64 61 74 61 20 74 6f |.; write| data to|
|000053c0| 20 53 43 43 0d 09 09 09 | 4d 4f 56 45 2e 4c 09 09 | SCC....|MOVE.L..|
|000053d0| 28 53 50 29 2c 28 53 50 | 29 09 09 3b 20 44 65 6c |(SP),(SP|)..; Del|
|000053e0| 61 79 0d 09 09 09 41 44 | 44 51 09 09 23 31 2c 44 |ay....AD|DQ..#1,D|
|000053f0| 30 09 09 09 3b 20 75 70 | 64 61 74 65 20 69 6e 64 |0...; up|date ind|
|00005400| 65 78 0d 09 09 09 43 4d | 50 09 09 09 23 24 31 30 |ex....CM|P...#$10|
|00005410| 30 2c 44 30 0d 09 09 09 | 42 4e 45 09 09 09 40 32 |0,D0....|BNE...@2|
|00005420| 0d 09 09 09 4d 4f 56 45 | 09 09 23 30 2c 44 30 0d |....MOVE|..#0,D0.|
|00005430| 40 32 09 09 09 4c 45 41 | 09 09 09 54 78 42 79 74 |@2...LEA|...TxByt|
|00005440| 65 4f 75 74 42 2c 41 33 | 09 3b 20 67 65 74 20 74 |eOutB,A3|.; get t|
|00005450| 68 65 20 61 64 64 72 65 | 73 73 0d 09 09 09 4d 4f |he addre|ss....MO|
|00005460| 56 45 09 09 44 30 2c 28 | 41 33 29 0d 09 09 09 4c |VE..D0,(|A3)....L|
|00005470| 45 41 09 09 09 54 78 42 | 79 74 65 49 6e 42 2c 41 |EA...TxB|yteInB,A|
|00005480| 33 09 09 3b 20 67 65 74 | 20 74 68 65 20 61 64 64 |3..; get| the add|
|00005490| 72 65 73 73 0d 09 09 09 | 4d 4f 56 45 09 09 28 41 |ress....|MOVE..(A|
|000054a0| 33 29 2c 44 31 0d 09 09 | 09 43 4d 50 09 09 09 44 |3),D1...|.CMP...D|
|000054b0| 30 2c 44 31 09 09 09 3b | 20 69 73 20 54 78 51 75 |0,D1...;| is TxQu|
|000054c0| 65 75 65 20 65 6d 70 74 | 79 3f 0d 09 09 09 42 4e |eue empt|y?....BN|
|000054d0| 45 09 09 09 54 78 49 45 | 78 69 74 42 09 09 09 3b |E...TxIE|xitB...;|
|000054e0| 20 69 66 20 6e 6f 74 20 | 65 78 69 74 0d 09 09 09 | if not |exit....|
|000054f0| 4c 45 41 09 09 09 54 78 | 51 45 6d 70 74 79 42 2c |LEA...Tx|QEmptyB,|
|00005500| 41 33 09 3b 20 67 65 74 | 20 74 68 65 20 61 64 64 |A3.; get| the add|
|00005510| 72 65 73 73 0d 09 09 09 | 4d 4f 56 45 09 09 23 24 |ress....|MOVE..#$|
|00005520| 46 46 46 46 2c 28 41 33 | 29 09 09 3b 20 69 66 20 |FFFF,(A3|)..; if |
|00005530| 65 6d 70 74 79 20 73 65 | 74 20 66 6c 61 67 0d 09 |empty se|t flag..|
|00005540| 09 09 0d 54 78 49 45 78 | 69 74 42 0d 09 09 09 41 |...TxIEx|itB....A|
|00005550| 4e 44 49 09 09 23 24 46 | 38 46 46 2c 53 52 09 09 |NDI..#$F|8FF,SR..|
|00005560| 3b 20 65 6e 61 62 6c 65 | 20 69 6e 74 65 72 72 75 |; enable| interru|
|00005570| 70 74 73 0d 09 09 09 52 | 54 53 09 09 09 09 09 09 |pts....R|TS......|
|00005580| 09 3b 20 61 6e 64 20 72 | 65 74 75 72 6e 0d 09 09 |.; and r|eturn...|
|00005590| 09 0d 3b 20 20 20 20 20 | 20 50 52 4f 43 45 44 55 |..; | PROCEDU|
|000055a0| 52 45 20 52 65 73 65 74 | 53 43 43 42 3b 0d 3b 20 |RE Reset|SCCB;.; |
|000055b0| 49 66 20 79 6f 75 20 63 | 61 6c 6c 65 64 20 49 6e |If you c|alled In|
|000055c0| 69 74 53 43 43 42 20 61 | 74 20 74 68 65 20 62 65 |itSCCB a|t the be|
|000055d0| 67 69 6e 6e 69 6e 67 20 | 6f 66 20 79 6f 75 72 0d |ginning |of your.|
|000055e0| 3b 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 68 |; applic|ation th|
|000055f0| 69 73 0d 3b 20 72 6f 75 | 74 69 6e 65 20 6d 75 73 |is.; rou|tine mus|
|00005600| 74 20 62 65 20 63 61 6c | 6c 65 64 20 77 68 65 6e |t be cal|led when|
|00005610| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00005620| 0d 3b 20 71 75 69 74 73 | 20 6f 72 20 74 68 65 20 |.; quits| or the |
|00005630| 73 79 73 74 65 6d 20 77 | 69 6c 6c 0d 3b 20 63 72 |system w|ill.; cr|
|00005640| 61 73 68 20 64 75 65 20 | 74 6f 20 74 68 65 20 69 |ash due |to the i|
|00005650| 6e 74 65 72 72 75 70 74 | 20 68 61 6e 64 6c 69 6e |nterrupt| handlin|
|00005660| 67 20 70 6f 69 6e 74 65 | 72 73 0d 3b 20 62 65 63 |g pointe|rs.; bec|
|00005670| 6f 6d 69 6e 67 20 69 6e | 76 61 6c 69 64 2e 0d 0d |oming in|valid...|
|00005680| 52 65 73 65 74 53 43 43 | 42 0d 09 09 09 4d 4f 56 |ResetSCC|B....MOV|
|00005690| 45 4d 2e 4c 09 09 44 30 | 2f 41 30 2d 41 31 2c 2d |EM.L..D0|/A0-A1,-|
|000056a0| 28 53 50 29 09 3b 20 73 | 61 76 65 20 72 65 67 69 |(SP).; s|ave regi|
|000056b0| 73 74 65 72 73 0d 09 09 | 09 4d 4f 56 45 09 09 53 |sters...|.MOVE..S|
|000056c0| 52 2c 2d 28 53 50 29 09 | 09 3b 20 53 61 76 65 20 |R,-(SP).|.; Save |
|000056d0| 69 6e 74 65 72 72 75 70 | 74 73 0d 09 09 09 4f 52 |interrup|ts....OR|
|000056e0| 49 09 09 09 23 24 30 33 | 30 30 2c 53 52 09 09 3b |I...#$03|00,SR..;|
|000056f0| 20 44 69 73 61 62 6c 65 | 20 69 6e 74 65 72 72 75 | Disable| interru|
|00005700| 70 74 73 0d 09 09 09 0d | 09 09 09 4d 4f 56 45 2e |pts.....|...MOVE.|
|00005710| 4c 09 09 53 43 43 57 72 | 2c 41 30 09 09 3b 20 47 |L..SCCWr|,A0..; G|
|00005720| 65 74 20 62 61 73 65 20 | 57 72 69 74 65 20 61 64 |et base |Write ad|
|00005730| 64 72 65 73 73 0d 09 09 | 09 41 44 44 09 09 09 23 |dress...|.ADD...#|
|00005740| 62 43 74 6c 2c 41 30 09 | 09 09 3b 20 41 64 64 20 |bCtl,A0.|..; Add |
|00005750| 6f 66 66 73 65 74 20 66 | 6f 72 20 63 6f 6e 74 72 |offset f|or contr|
|00005760| 6f 6c 0d 09 09 09 4d 4f | 56 45 2e 42 09 09 23 39 |ol....MO|VE.B..#9|
|00005770| 2c 28 41 30 29 09 09 09 | 3b 20 70 6f 69 6e 74 65 |,(A0)...|; pointe|
|00005780| 72 20 66 6f 72 20 53 43 | 43 20 72 65 67 20 39 0d |r for SC|C reg 9.|
|00005790| 09 09 09 4d 4f 56 45 2e | 4c 09 09 28 53 50 29 2c |...MOVE.|L..(SP),|
|000057a0| 28 53 50 29 09 09 3b 20 | 44 65 6c 61 79 0d 09 09 |(SP)..; |Delay...|
|000057b0| 09 4d 4f 56 45 2e 42 09 | 09 23 25 30 31 30 30 30 |.MOVE.B.|.#%01000|
|000057c0| 30 30 30 2c 28 41 30 29 | 09 3b 20 52 65 73 65 74 |000,(A0)|.; Reset|
|000057d0| 20 63 68 61 6e 6e 65 6c | 0d 09 09 09 4d 4f 56 45 | channel|....MOVE|
|000057e0| 2e 4c 09 09 28 53 50 29 | 2c 28 53 50 29 09 09 3b |.L..(SP)|,(SP)..;|
|000057f0| 20 44 65 6c 61 79 0d 09 | 09 09 42 53 52 09 09 09 | Delay..|..BSR...|
|00005800| 52 65 73 65 74 53 43 43 | 43 68 61 6e 09 09 3b 20 |ResetSCC|Chan..; |
|00005810| 62 72 61 6e 63 68 20 74 | 6f 20 63 6f 6d 6d 6f 6e |branch t|o common|
|00005820| 20 72 65 73 65 74 20 72 | 6f 75 74 69 6e 65 0d 09 | reset r|outine..|
|00005830| 09 09 4d 4f 56 45 2e 4c | 09 09 23 4c 76 6c 32 44 |..MOVE.L|..#Lvl2D|
|00005840| 54 2c 41 30 09 09 3b 20 | 67 65 74 20 64 69 73 70 |T,A0..; |get disp|
|00005850| 61 74 63 68 20 74 61 62 | 6c 65 20 70 6f 69 6e 74 |atch tab|le point|
|00005860| 65 72 0d 09 09 09 4d 4f | 56 45 09 09 23 52 78 49 |er....MO|VE..#RxI|
|00005870| 6e 74 4f 66 66 73 65 74 | 42 2c 44 30 09 3b 20 67 |ntOffset|B,D0.; g|
|00005880| 65 74 20 6f 66 66 73 65 | 74 20 74 6f 20 52 78 20 |et offse|t to Rx |
|00005890| 76 65 63 74 6f 72 0d 09 | 09 09 4c 45 41 09 09 09 |vector..|..LEA...|
|000058a0| 50 52 78 49 6e 74 48 61 | 6e 64 42 2c 41 31 09 3b |PRxIntHa|ndB,A1.;|
|000058b0| 20 70 6f 69 6e 74 20 74 | 6f 20 70 72 65 76 69 6f | point t|o previo|
|000058c0| 75 73 20 76 65 63 74 6f | 72 20 73 74 6f 72 61 67 |us vecto|r storag|
|000058d0| 65 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 09 28 41 31 |e....MOV|E.L..(A1|
|000058e0| 29 2c 30 28 41 30 2c 44 | 30 29 09 3b 20 72 65 73 |),0(A0,D|0).; res|
|000058f0| 74 6f 72 65 20 70 72 65 | 76 69 6f 75 73 20 69 6e |tore pre|vious in|
|00005900| 74 20 76 65 63 74 6f 72 | 0d 09 09 09 4d 4f 56 45 |t vector|....MOVE|
|00005910| 09 09 23 54 78 49 6e 74 | 4f 66 66 73 65 74 42 2c |..#TxInt|OffsetB,|
|00005920| 44 30 09 3b 20 67 65 74 | 20 6f 66 66 73 65 74 20 |D0.; get| offset |
|00005930| 74 6f 20 54 78 20 76 65 | 63 74 6f 72 0d 09 09 09 |to Tx ve|ctor....|
|00005940| 4c 45 41 09 09 09 50 54 | 78 49 6e 74 48 61 6e 64 |LEA...PT|xIntHand|
|00005950| 42 2c 41 31 09 3b 20 73 | 65 74 20 52 78 20 76 65 |B,A1.; s|et Rx ve|
|00005960| 63 74 6f 72 0d 09 09 09 | 4d 4f 56 45 2e 4c 09 09 |ctor....|MOVE.L..|
|00005970| 28 41 31 29 2c 30 28 41 | 30 2c 44 30 29 09 3b 20 |(A1),0(A|0,D0).; |
|00005980| 72 65 73 74 6f 72 65 20 | 70 72 65 76 69 6f 75 73 |restore |previous|
|00005990| 20 69 6e 74 20 76 65 63 | 74 6f 72 0d 09 09 09 0d | int vec|tor.....|
|000059a0| 09 09 09 4d 4f 56 45 09 | 09 28 53 50 29 2b 2c 53 |...MOVE.|.(SP)+,S|
|000059b0| 52 09 09 3b 20 52 65 73 | 74 6f 72 65 20 69 6e 74 |R..; Res|tore int|
|000059c0| 65 72 72 75 70 74 73 0d | 09 09 09 4d 4f 56 45 4d |errupts.|...MOVEM|
|000059d0| 2e 4c 09 09 28 53 50 29 | 2b 2c 44 30 2f 41 30 2d |.L..(SP)|+,D0/A0-|
|000059e0| 41 31 09 3b 20 72 65 73 | 74 6f 72 65 20 72 65 67 |A1.; res|tore reg|
|000059f0| 69 73 74 65 72 73 0d 09 | 09 09 52 54 53 09 09 09 |isters..|..RTS...|
|00005a00| 09 09 09 09 3b 20 61 6e | 64 20 72 65 74 75 72 6e |....; an|d return|
|00005a10| 0d 0d 54 78 51 75 65 75 | 65 42 09 44 43 42 2e 42 |..TxQueu|eB.DCB.B|
|00005a20| 09 09 24 31 30 30 2c 30 | 09 09 09 3b 20 74 68 69 |..$100,0|...; thi|
|00005a30| 73 20 69 73 20 74 68 65 | 20 71 75 65 75 65 0d 54 |s is the| queue.T|
|00005a40| 78 51 45 6d 70 74 79 42 | 09 44 43 09 09 09 30 09 |xQEmptyB|.DC...0.|
|00005a50| 09 09 09 3b 20 74 68 65 | 20 71 75 65 75 65 20 65 |...; the| queue e|
|00005a60| 6d 70 74 79 20 66 6c 61 | 67 0d 54 78 42 79 74 65 |mpty fla|g.TxByte|
|00005a70| 49 6e 42 09 44 43 09 09 | 09 30 09 09 09 09 3b 20 |InB.DC..|.0....; |
|00005a80| 69 6e 64 65 78 20 74 6f | 20 6e 65 78 74 20 63 65 |index to| next ce|
|00005a90| 6c 6c 20 69 6e 0d 54 78 | 42 79 74 65 4f 75 74 42 |ll in.Tx|ByteOutB|
|00005aa0| 09 44 43 09 09 09 30 09 | 09 09 09 3b 20 69 6e 64 |.DC...0.|...; ind|
|00005ab0| 65 78 20 74 6f 20 6e 65 | 78 74 20 63 65 6c 6c 20 |ex to ne|xt cell |
|00005ac0| 6f 75 74 0d 52 78 51 75 | 65 75 65 42 09 44 43 42 |out.RxQu|eueB.DCB|
|00005ad0| 2e 42 09 09 24 34 30 30 | 2c 30 09 09 09 3b 20 74 |.B..$400|,0...; t|
|00005ae0| 68 69 73 20 69 73 20 74 | 68 65 20 71 75 65 75 65 |his is t|he queue|
|00005af0| 0d 52 78 51 45 6d 70 74 | 79 42 09 44 43 09 09 09 |.RxQEmpt|yB.DC...|
|00005b00| 30 09 09 09 09 3b 20 74 | 68 65 20 65 6d 70 74 79 |0....; t|he empty|
|00005b10| 20 71 75 65 75 65 20 66 | 6c 61 67 0d 52 78 42 79 | queue f|lag.RxBy|
|00005b20| 74 65 49 6e 42 09 44 43 | 09 09 09 30 09 09 09 09 |teInB.DC|...0....|
|00005b30| 3b 20 69 6e 64 65 78 20 | 74 6f 20 6e 65 78 74 20 |; index |to next |
|00005b40| 63 65 6c 6c 20 69 6e 0d | 52 78 42 79 74 65 4f 75 |cell in.|RxByteOu|
|00005b50| 74 42 09 44 43 09 09 09 | 30 09 09 09 09 3b 20 69 |tB.DC...|0....; i|
|00005b60| 6e 64 65 78 20 74 6f 20 | 6e 65 78 74 20 63 65 6c |ndex to |next cel|
|00005b70| 6c 20 6f 75 74 0d 50 52 | 78 49 6e 74 48 61 6e 64 |l out.PR|xIntHand|
|00005b80| 42 09 44 43 09 09 09 30 | 09 09 09 09 3b 20 50 72 |B.DC...0|....; Pr|
|00005b90| 65 76 69 6f 75 73 20 69 | 6e 74 65 72 72 75 70 74 |evious i|nterrupt|
|00005ba0| 20 76 65 63 74 6f 72 0d | 50 54 78 49 6e 74 48 61 | vector.|PTxIntHa|
|00005bb0| 6e 64 42 09 44 43 09 09 | 09 30 09 09 09 09 3b 20 |ndB.DC..|.0....; |
|00005bc0| 50 72 65 76 69 6f 75 73 | 20 69 6e 74 65 72 72 75 |Previous| interru|
|00005bd0| 70 74 20 76 65 63 74 6f | 72 0d 0d 3b 20 54 68 69 |pt vecto|r..; Thi|
|00005be0| 73 20 69 73 20 74 68 65 | 20 73 70 61 63 65 20 66 |s is the| space f|
|00005bf0| 6f 72 20 61 20 73 70 65 | 63 69 61 6c 20 63 6f 6e |or a spe|cial con|
|00005c00| 64 69 74 69 6f 6e 20 69 | 6e 74 65 72 72 75 70 74 |dition i|nterrupt|
|00005c10| 0d 3b 20 72 6f 75 74 69 | 6e 65 2e 20 41 6c 6c 20 |.; routi|ne. All |
|00005c20| 49 20 64 6f 20 68 65 72 | 65 20 69 73 20 72 65 73 |I do her|e is res|
|00005c30| 65 74 20 74 68 65 20 65 | 72 72 6f 72 20 66 6c 61 |et the e|rror fla|
|00005c40| 67 20 69 6e 20 74 68 65 | 20 53 43 43 0d 3b 20 61 |g in the| SCC.; a|
|00005c50| 6e 64 20 72 65 74 75 72 | 6e 2e 20 20 57 68 65 6e |nd retur|n. When|
|00005c60| 20 74 68 65 20 73 79 73 | 74 65 6d 20 67 65 74 73 | the sys|tem gets|
|00005c70| 20 74 68 69 73 20 66 61 | 72 2c 20 41 30 20 63 6f | this fa|r, A0 co|
|00005c80| 6e 74 61 69 6e 73 0d 3b | 20 74 68 65 20 53 43 43 |ntains.;| the SCC|
|00005c90| 20 62 61 73 65 20 72 65 | 61 64 20 43 74 6c 20 61 | base re|ad Ctl a|
|00005ca0| 64 64 72 65 73 73 0d 3b | 20 61 6e 64 20 41 31 20 |ddress.;| and A1 |
|00005cb0| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 53 43 43 |contains| the SCC|
|00005cc0| 20 62 61 73 65 20 77 72 | 69 74 65 20 43 74 6c 20 | base wr|ite Ctl |
|00005cd0| 61 64 64 72 65 73 73 0d | 3b 20 66 6f 72 20 74 68 |address.|; for th|
|00005ce0| 69 73 20 63 68 61 6e 6e | 65 6c 2e 0d 3b 20 54 68 |is chann|el..; Th|
|00005cf0| 65 20 64 61 74 61 20 61 | 64 64 72 65 73 73 65 73 |e data a|ddresses|
|00005d00| 20 61 72 65 20 6f 66 66 | 73 65 74 20 62 79 20 34 | are off|set by 4|
|00005d10| 20 66 72 6f 6d 20 74 68 | 65 20 63 6f 6e 74 72 6f | from th|e contro|
|00005d20| 6c 0d 3b 20 61 64 64 72 | 65 73 73 65 73 2e 20 20 |l.; addr|esses. |
|00005d30| 44 30 2d 44 33 2f 41 30 | 2d 41 33 20 61 72 65 20 |D0-D3/A0|-A3 are |
|00005d40| 61 6c 72 65 61 64 79 20 | 70 72 65 73 65 72 76 65 |already |preserve|
|00005d50| 64 2c 20 73 6f 0d 3b 20 | 74 68 65 79 20 6d 61 79 |d, so.; |they may|
|00005d60| 20 62 65 20 75 73 65 64 | 20 66 72 65 65 6c 79 2e | be used| freely.|
|00005d70| 0d 0d 53 74 75 62 41 0d | 09 09 09 4f 52 49 09 09 |..StubA.|...ORI..|
|00005d80| 09 23 24 30 33 30 30 2c | 53 52 09 09 3b 20 44 69 |.#$0300,|SR..; Di|
|00005d90| 73 61 62 6c 65 20 69 6e | 74 65 72 72 75 70 74 73 |sable in|terrupts|
|00005da0| 0d 09 09 09 4d 4f 56 45 | 2e 42 09 09 23 25 30 30 |....MOVE|.B..#%00|
|00005db0| 31 31 30 30 30 30 2c 28 | 41 31 29 09 3b 20 52 65 |110000,(|A1).; Re|
|00005dc0| 73 65 74 20 45 72 72 6f | 72 0d 09 09 09 4d 4f 56 |set Erro|r....MOV|
|00005dd0| 45 2e 4c 09 09 28 53 50 | 29 2c 28 53 50 29 09 09 |E.L..(SP|),(SP)..|
|00005de0| 3b 20 20 44 65 6c 61 79 | 0d 09 09 09 41 4e 44 49 |; Delay|....ANDI|
|00005df0| 09 09 23 24 46 38 46 46 | 2c 53 52 09 09 3b 20 52 |..#$F8FF|,SR..; R|
|00005e00| 65 73 74 6f 72 65 20 69 | 6e 74 65 72 72 75 70 74 |estore i|nterrupt|
|00005e10| 73 0d 09 09 09 52 54 53 | 0d 0d 3b 20 54 68 69 73 |s....RTS|..; This|
|00005e20| 20 69 73 20 74 68 65 20 | 73 70 61 63 65 20 66 6f | is the |space fo|
|00005e30| 72 20 61 20 73 70 65 63 | 69 61 6c 20 63 6f 6e 64 |r a spec|ial cond|
|00005e40| 69 74 69 6f 6e 20 69 6e | 74 65 72 72 75 70 74 0d |ition in|terrupt.|
|00005e50| 3b 20 72 6f 75 74 69 6e | 65 2e 20 41 6c 6c 20 49 |; routin|e. All I|
|00005e60| 20 64 6f 20 68 65 72 65 | 20 69 73 20 72 65 73 65 | do here| is rese|
|00005e70| 74 20 74 68 65 20 65 72 | 72 6f 72 20 66 6c 61 67 |t the er|ror flag|
|00005e80| 20 69 6e 20 74 68 65 20 | 53 43 43 0d 3b 20 61 6e | in the |SCC.; an|
|00005e90| 64 20 72 65 74 75 72 6e | 2e 20 20 57 68 65 6e 20 |d return|. When |
|00005ea0| 74 68 65 20 73 79 73 74 | 65 6d 20 67 65 74 73 20 |the syst|em gets |
|00005eb0| 74 68 69 73 20 66 61 72 | 2c 20 41 30 20 63 6f 6e |this far|, A0 con|
|00005ec0| 74 61 69 6e 73 0d 3b 20 | 74 68 65 20 53 43 43 20 |tains.; |the SCC |
|00005ed0| 62 61 73 65 20 72 65 61 | 64 20 43 74 6c 20 61 64 |base rea|d Ctl ad|
|00005ee0| 64 72 65 73 73 0d 3b 20 | 61 6e 64 20 41 31 20 63 |dress.; |and A1 c|
|00005ef0| 6f 6e 74 61 69 6e 73 20 | 74 68 65 20 53 43 43 20 |ontains |the SCC |
|00005f00| 62 61 73 65 20 77 72 69 | 74 65 20 43 74 6c 20 61 |base wri|te Ctl a|
|00005f10| 64 64 72 65 73 73 0d 3b | 20 66 6f 72 20 74 68 69 |ddress.;| for thi|
|00005f20| 73 20 63 68 61 6e 6e 65 | 6c 2e 0d 3b 20 54 68 65 |s channe|l..; The|
|00005f30| 20 64 61 74 61 20 61 64 | 64 72 65 73 73 65 73 20 | data ad|dresses |
|00005f40| 61 72 65 20 6f 66 66 73 | 65 74 20 62 79 20 34 20 |are offs|et by 4 |
|00005f50| 66 72 6f 6d 20 74 68 65 | 20 63 6f 6e 74 72 6f 6c |from the| control|
|00005f60| 0d 3b 20 61 64 64 72 65 | 73 73 65 73 2e 20 20 44 |.; addre|sses. D|
|00005f70| 30 2d 44 33 2f 41 30 2d | 41 33 20 61 72 65 20 61 |0-D3/A0-|A3 are a|
|00005f80| 6c 72 65 61 64 79 20 70 | 72 65 73 65 72 76 65 64 |lready p|reserved|
|00005f90| 2c 20 73 6f 0d 3b 20 74 | 68 65 79 20 6d 61 79 20 |, so.; t|hey may |
|00005fa0| 62 65 20 75 73 65 64 20 | 66 72 65 65 6c 79 2e 0d |be used |freely..|
|00005fb0| 0d 53 74 75 62 42 0d 09 | 09 09 4f 52 49 09 09 09 |.StubB..|..ORI...|
|00005fc0| 23 24 30 33 30 30 2c 53 | 52 09 09 3b 20 44 69 73 |#$0300,S|R..; Dis|
|00005fd0| 61 62 6c 65 20 69 6e 74 | 65 72 72 75 70 74 73 0d |able int|errupts.|
|00005fe0| 09 09 09 4d 4f 56 45 2e | 42 09 09 23 25 30 30 31 |...MOVE.|B..#%001|
|00005ff0| 31 30 30 30 30 2c 28 41 | 31 29 09 3b 20 52 65 73 |10000,(A|1).; Res|
|00006000| 65 74 20 45 72 72 6f 72 | 0d 09 09 09 4d 4f 56 45 |et Error|....MOVE|
|00006010| 2e 4c 09 09 28 53 50 29 | 2c 28 53 50 29 09 09 3b |.L..(SP)|,(SP)..;|
|00006020| 20 20 44 65 6c 61 79 0d | 09 09 09 41 4e 44 49 09 | Delay.|...ANDI.|
|00006030| 09 23 24 46 38 46 46 2c | 53 52 09 09 3b 20 52 65 |.#$F8FF,|SR..; Re|
|00006040| 73 74 6f 72 65 20 69 6e | 74 65 72 72 75 70 74 73 |store in|terrupts|
|00006050| 0d 09 09 09 52 54 53 0d | 0d 3b 20 54 68 65 73 65 |....RTS.|.; These|
|00006060| 20 61 72 65 20 74 68 65 | 20 72 6f 75 74 69 6e 65 | are the| routine|
|00006070| 73 20 66 6f 72 20 74 68 | 65 20 63 6f 75 6e 74 65 |s for th|e counte|
|00006080| 72 20 79 6f 75 20 63 61 | 6e 20 75 73 65 20 66 6f |r you ca|n use fo|
|00006090| 72 0d 3b 20 74 69 6d 65 | 2d 73 74 61 6d 70 69 6e |r.; time|-stampin|
|000060a0| 67 20 74 68 65 20 69 6e | 63 6f 6d 69 6e 67 20 4d |g the in|coming M|
|000060b0| 49 44 49 20 64 61 74 61 | 2e 20 20 54 68 69 73 20 |IDI data|. This |
|000060c0| 69 73 20 75 73 65 66 75 | 6c 0d 3b 20 66 6f 72 20 |is usefu|l.; for |
|000060d0| 77 72 69 74 69 6e 67 20 | 73 65 71 75 65 6e 63 65 |writing |sequence|
|000060e0| 72 20 74 79 70 65 20 61 | 70 70 6c 69 63 61 74 69 |r type a|pplicati|
|000060f0| 6f 6e 73 2e 0d 3b 20 54 | 68 65 20 74 69 6d 65 2d |ons..; T|he time-|
|00006100| 73 74 61 6d 70 69 6e 67 | 20 69 73 20 64 6f 6e 65 |stamping| is done|
|00006110| 20 6f 6e 20 61 6e 20 69 | 74 65 72 72 75 70 74 20 | on an i|terrupt |
|00006120| 6c 65 76 65 6c 2c 0d 3b | 20 69 73 20 65 78 74 72 |level,.;| is extr|
|00006130| 65 6d 65 6c 79 20 61 63 | 63 75 72 61 74 65 2c 0d |emely ac|curate,.|
|00006140| 3b 20 61 6e 64 20 75 73 | 65 73 20 74 68 65 20 56 |; and us|es the V|
|00006150| 49 41 20 74 69 6d 65 72 | 20 23 31 2e 20 20 54 68 |IA timer| #1. Th|
|00006160| 69 73 20 6d 65 61 6e 73 | 20 74 68 61 74 20 79 6f |is means| that yo|
|00006170| 75 20 63 61 6e 27 74 0d | 3b 20 75 73 65 20 61 6e |u can't.|; use an|
|00006180| 79 20 6f 66 20 74 68 65 | 20 53 6f 75 6e 64 20 4d |y of the| Sound M|
|00006190| 61 6e 61 67 65 72 20 72 | 6f 75 74 69 6e 65 73 20 |anager r|outines |
|000061a0| 62 65 63 61 75 73 65 20 | 74 68 65 79 20 75 73 65 |because |they use|
|000061b0| 0d 3b 20 74 69 6d 65 72 | 20 23 31 20 74 6f 6f 2e |.; timer| #1 too.|
|000061c0| 20 49 66 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 | If you |want to |
|000061d0| 63 72 65 61 74 65 20 61 | 20 6d 65 74 72 6f 6e 6f |create a| metrono|
|000061e0| 6d 65 20 63 6c 69 63 6b | 0d 3b 20 79 6f 75 20 68 |me click|.; you h|
|000061f0| 61 76 65 20 74 6f 20 77 | 72 69 74 65 20 79 6f 75 |ave to w|rite you|
|00006200| 72 20 6f 77 6e 20 63 6f | 64 65 20 74 68 61 74 20 |r own co|de that |
|00006210| 61 63 63 65 73 73 65 73 | 0d 3b 20 74 68 65 20 73 |accesses|.; the s|
|00006220| 6f 75 6e 64 20 68 61 72 | 64 77 61 72 65 20 64 69 |ound har|dware di|
|00006230| 72 65 63 74 6c 79 20 77 | 69 74 68 6f 75 74 20 75 |rectly w|ithout u|
|00006240| 73 69 6e 67 20 74 69 6d | 65 72 20 23 31 2e 0d 3b |sing tim|er #1..;|
|00006250| 20 49 6e 69 74 54 69 6d | 65 72 20 61 6e 64 20 4c | InitTim|er and L|
|00006260| 6f 61 64 54 69 6d 65 72 | 20 65 78 70 65 63 74 20 |oadTimer| expect |
|00006270| 61 20 77 6f 72 64 20 6f | 6e 20 74 68 65 20 73 74 |a word o|n the st|
|00006280| 61 63 6b 0d 3b 20 74 6f | 20 6c 6f 61 64 20 74 68 |ack.; to| load th|
|00006290| 65 20 74 69 6d 65 72 2e | 0d 3b 20 54 6f 20 69 6e |e timer.|.; To in|
|000062a0| 63 72 65 6d 65 6e 74 20 | 74 68 65 20 63 6f 75 6e |crement |the coun|
|000062b0| 74 65 72 20 65 76 65 72 | 79 20 6d 69 6c 6c 69 73 |ter ever|y millis|
|000062c0| 65 63 6f 6e 64 2c 20 6c | 6f 61 64 20 74 68 65 0d |econd, l|oad the.|
|000062d0| 3b 20 74 69 6d 65 72 20 | 77 69 74 68 20 64 65 63 |; timer |with dec|
|000062e0| 69 6d 61 6c 20 37 38 32 | 2e 20 20 49 66 20 79 6f |imal 782|. If yo|
|000062f0| 75 20 61 72 65 6e 27 74 | 20 67 6f 69 6e 67 20 74 |u aren't| going t|
|00006300| 6f 20 75 73 65 0d 3b 20 | 74 69 6d 65 2d 73 74 61 |o use.; |time-sta|
|00006310| 6d 70 69 6e 67 20 79 6f | 75 20 63 61 6e 20 69 67 |mping yo|u can ig|
|00006320| 6e 6f 72 65 20 74 68 65 | 73 65 20 72 6f 75 74 69 |nore the|se routi|
|00006330| 6e 65 73 2e 0d 0d 3b 20 | 20 20 20 20 20 50 52 4f |nes...; | PRO|
|00006340| 43 45 44 55 52 45 20 49 | 6e 69 74 54 69 6d 65 72 |CEDURE I|nitTimer|
|00006350| 20 28 20 54 69 6d 72 56 | 61 6c 75 65 20 3a 20 69 | ( TimrV|alue : i|
|00006360| 6e 74 65 67 65 72 29 3b | 0d 3b 20 4f 6e 6c 79 20 |nteger);|.; Only |
|00006370| 63 61 6c 6c 20 49 6e 69 | 74 54 69 6d 65 72 20 6f |call Ini|tTimer o|
|00006380| 6e 63 65 20 61 74 20 74 | 68 65 20 62 65 67 69 6e |nce at t|he begin|
|00006390| 6e 69 6e 67 0d 3b 20 6f | 66 20 79 6f 75 72 20 61 |ning.; o|f your a|
|000063a0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 31 20 6d 69 6c |pplicati|on 1 mil|
|000063b0| 6c 69 73 65 63 6f 6e 64 | 20 69 73 20 64 65 63 69 |lisecond| is deci|
|000063c0| 6d 61 6c 20 37 38 32 2e | 0d 0d 49 6e 69 74 54 69 |mal 782.|..InitTi|
|000063d0| 6d 65 72 0d 09 09 09 4c | 49 4e 4b 09 09 41 36 2c |mer....L|INK..A6,|
|000063e0| 23 30 09 09 09 3b 20 73 | 65 74 20 66 72 61 6d 65 |#0...; s|et frame|
|000063f0| 20 70 6f 69 6e 74 65 72 | 0d 09 09 09 4d 4f 56 45 | pointer|....MOVE|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.