.ORG 30 | |
.WORD MYEMT ; in other words, we want this MYEMT label below, that value to be loaded into location 30 when our program is loaded into memory | |
.WORD 0 ; most bits unimportant, but mustn't raise priority | |
.ORG 2000 ; or wherever it belongs, but not among the trap vectors | |
MYEMT: | MOV R1, -(R6) |
MOV R2, -(R6) | |
MOV 6(R6), R2 ; the return PC (6 skips the pushed PSW and two register saves) | |
CLR R1 | |
DIV (R2)+, R0 | |
MOV R2, 6(R6) ; adjust return PC to skip operand | |
MOV (R6)+, R2 | |
MOV (R6)+, R1 | |
RTI |