| DIWSTRT␉= 0x8E␊ |
| DIWSTOP␉= 0x90␊ |
| ␊ |
| SERDAT␉= 0x30␊ |
| SERDATR␉= 0x18␊ |
| SERPER␉= 0x32␊ |
| ␊ |
| INTVEC5 = 0x60+4*5␉␉|Vector for level 5 interrupt␊ |
| ␊ |
| CopList␉␉= 0x20000␉␉|We'll put our copper list here␊ |
|
| ␉#buffer full...␊ |
| ␉move.l␉#0,ExecAddress␊ |
| ␉move.l␉#0,ReceiveState␊ |
| ␉move.w␉#0xB8,SERPER(a6)␉|19200 baud (maybe 0xB9?)␊ |
| ␉move.l␉#IntLevel5,INTVEC5␊ |
| ␉move.w␉#0x8800,INTENA(a6)␊ |
| ␊ |
|
| ␉␉bra␉ExitI5␊ |
| ␊ |
| ␉␉#State 1 = Receiving ReceiveCount bytes of data and storing␊ |
| ␉␉# at RecieveCount. If ReceivePendCmd > 0 then when␊ |
| ␉␉# at ReceiveCount. If ReceivePendCmd > 0 then when␊ |
| ␉␉# all the bytes have been received, that command␊ |
| ␉␉# should be processed.␊ |
| State1:␉␉move.l␉ReceivePtr,a0␊ |
| ␉␉move.l␉RecieveCount,d1␊ |
| ␉␉move.l␉ReceiveCount,d1␊ |
| ␉␉or.l␉d1,d1␊ |
| ␉␉beq␉ExitI5␊ |
| ␉␉move.b␉d0,(a0)+␊ |
|
| ␉␉bra␉ExitI5␊ |
| ␊ |
| NotEnd:␉␉move.l␉a0,ReceivePtr␊ |
| ␉␉move.l␉d1,RecieveCount␊ |
| ␉␉move.l␉d1,ReceiveCount␊ |
| ␉␉bra␉ExitI5␊ |
| ␊ |
| ␉␉#State 0 = waiting for a command byte, 1-n␊ |
|
| Cmd1:␉␉move.l␉#1,ReceivePendCmd␊ |
| ␉␉move.l␉#1,ReceiveState␊ |
| ␉␉move.l␉#8,ReceiveCount␊ |
| ␉␉move.l␉#ReceiveButter,ReceivePtr␊ |
| ␉␉move.l␉#ReceiveBuffer,ReceivePtr␊ |
| ␊ |
| ExitI5:␉␉movem.l␉(a7)+,d0-d7/a0-a6␊ |
| ␉␉rts␊ |