Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Task_Init() {
- // AX operates in this context all the time
- // 0010 1302 sbset #0x02
- // 0011 1303 sbset #0x03
- // 0012 1204 sbclr #0x04
- // 0013 1305 sbset #0x05
- // 0014 1306 sbset #0x06
- // 0015 8e00 set16
- // 0016 8c00 clr15
- // 0017 8b00 m0
- // 0018 0092 00ff lri $CR, #0x00ff
- // 001a 8100 clr $ACC0
- // 001b 8900 clr $ACC1
- // 001c 009e 0e80 lri $AC0.M, #0x0e80
- // 001e 00fe 0e1b sr @0x0e1b, $AC0.M
- // 0020 8100 clr $ACC0
- // 0021 00fe 0e31 sr @0x0e31, $AC0.M
- ACC0 = ACC1 = 0
- *0x0e1b = 0xe80
- *0x0e31 = 0
- // Send DSP_INIT mail
- // 0023 16fc dcd1 si @DMBH, #0xdcd1
- // 0025 16fd 0000 si @DMBL, #0x0000
- // 0027 16fb 0001 si @DIRQ, #0x0001
- DMB = 0xdcd10000
- // 0029 26fc lrs $AC0.M, @DMBH
- // 002a 02a0 8000 andf $AC0.M, #0x8000
- // 002c 029c 0029 jlnz 0x0029
- while (DMBH & 0x8000 != 0);
- // 002e 029f 0045 jmp 0x0045
- goto GetNextCommand;
- }
- void Task_Resume() {
- // Ensure sane context
- // 0030 1302 sbset #0x02
- // 0031 1303 sbset #0x03
- // 0032 1204 sbclr #0x04
- // 0033 1305 sbset #0x05
- // 0034 1306 sbset #0x06
- // 0035 8e00 set16
- // 0036 8c00 clr15
- // 0037 8b00 m0
- // 0038 0092 00ff lri $CR, #0x00ff
- // Send DSP_RESUME mail
- // 003a 16fc dcd1 si @DMBH, #0xdcd1
- // 003c 16fd 0001 si @DMBL, #0x0001
- // 003e 16fb 0001 si @DIRQ, #0x0001
- DMB = 0xdcd10001
- // 0040 26fc lrs $AC0.M, @DMBH
- // 0041 02a0 8000 andf $AC0.M, #0x8000
- // 0043 029c 0040 jlnz 0x0040
- while (@DMBH & 0x8000 != 0);
- GetNextCommand:
Add Comment
Please, Sign In to add comment