我试图在汇编中创建一个中断服务例程,它返回的不是中断被调用的位置,而是一个标签。
我应该直接跳到标签而不使用iret
(以及任何其他与中断相关的指令),还是有一个特定的方法来做到这一点?
举例来说:
[org 0x7c00]
; setting up ISR for int 69h (isr69h is the ISR)
; (i did it already, and worked fine with IRET, but i dont want to return to the caller)
; ...
int 69h ; test
; don't continue code from here
; some more code...
continue_from_here:
jmp $
isr69h:
; do something
jmp continue_from_here ; is it enough, or should i place here more code? (for example: restoring FLAGS etc.)
times 510-($-$$) db 0 ; padding
dw 0xAA55 ; boot signature
(我用的是Netwide汇编程序)
1条答案
按热度按时间lbsnaicq1#
当然,没有规则说你必须进行IRET。一旦进入中断处理程序,它就控制了CPU,可以做任何它喜欢的事情。
只是几个提示: