Hi @wangbengang ,
I recommend you in order to have a better understanding of what is happening you can check register by register why is the value on the example code, you can use the MC9S08DZ60 Data sheet in order to do so.
For example, taking the first line IRQSCinit: equ $10, you can go to the IRQSC register and see what that value does.


With this you can see that this line do is enable IRQ pin function as the comment in the application note says.
Also, to know what asm instruction do, you can see section 7.5 HCS08 Instruction Set Summary of the MC9S08DZ60 Data sheet
Hope it helps you!