Last active
March 9, 2018 16:35
-
-
Save digarok/f8899620711f0ef140c7bc66d8c176ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| org $300 | |
| clc | |
| xce | |
| rep #$30 ; full 16 bit registers | |
| pea #$000B ; push literal "000B" on stack | |
| ldx #$2303 ; set toolcall | |
| jsl E10000 ; call tool "03" = Misc. Tools, function "23" = IntSource | |
| * We have just made a call to the IIgs toolbox routine called IntSource. | |
| * IntSource enables or disables interrupts based on the bit pattern we | |
| * pushed on the stack. (000B) This is called the srcRefNum | |
| * To see what a srcRefNum of 000B indicates we have to look at Toolbox | |
| * Reference Volume I. I won't put the whole table here, but I will | |
| * tell you that 000B is adbDisable, which disables ADB Data Interrupts. | |
| * That matches what we were told about this patch disabling an interrupt | |
| * to avoid conflict with Mockingboard/Phasor playback. | |
| * Let's continue. | |
| pea #$0004 ; push literal "0004" on the stack | |
| pea #$0000 ; push literal "0000" on the stack | |
| pea #$0300 ; push literal "0300" on the stack | |
| ldx #$1003 ; set toolcal | |
| jsl E10000 ; call tool "03" = Misc. Tools, function "10" = SetVector | |
| * This makes a second tool call to the SetVector routine. | |
| * While it looks like we push 3 parameters on the stack, it's actually 2. | |
| * parameter 1 (word) vectorRefNum 0004 = Interrupt Vector (makes sense) | |
| * parameter 2 (long) vectorPtr 00000300 = Pointer to the handler | |
| sec | |
| xce | |
| sep #$30 ; turn off 16-bit | |
| rts ; so we can safely return to BASIC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment