📄 _ipc.s
字号:
.sect .text; .sect .rom; .sect .data; .sect .bss.define __notify, __send, __senda, __sendnb, __receive, __sendrec ! See src/kernel/ipc.h for C definitionsSEND = 1RECEIVE = 2SENDREC = 3 NOTIFY = 4SENDNB = 5SENDA = 16SYSVEC = 33 ! trap to kernel SRC_DST = 8 ! source/ destination process MSGTAB = 8 ! message tableMESSAGE = 12 ! message pointer TABCOUNT = 12 ! number of entries in message table!*========================================================================*! IPC assembly routines *!*========================================================================*! all message passing routines save ebp, but destroy eax and ecx..sect .text__send: push ebp mov ebp, esp push ebx mov eax, SRC_DST(ebp) ! eax = dest-src mov ebx, MESSAGE(ebp) ! ebx = message pointer mov ecx, SEND ! _send(dest, ptr) int SYSVEC ! trap to the kernel pop ebx pop ebp ret__receive: push ebp mov ebp, esp push ebx mov eax, SRC_DST(ebp) ! eax = dest-src mov ebx, MESSAGE(ebp) ! ebx = message pointer mov ecx, RECEIVE ! _receive(src, ptr) int SYSVEC ! trap to the kernel pop ebx pop ebp ret__sendrec: push ebp mov ebp, esp push ebx mov eax, SRC_DST(ebp) ! eax = dest-src mov ebx, MESSAGE(ebp) ! ebx = message pointer mov ecx, SENDREC ! _sendrec(srcdest, ptr) int SYSVEC ! trap to the kernel pop ebx pop ebp ret__notify: push ebp mov ebp, esp push ebx mov eax, SRC_DST(ebp) ! ebx = destination mov ecx, NOTIFY ! _notify(srcdst) int SYSVEC ! trap to the kernel pop ebx pop ebp ret__sendnb: push ebp mov ebp, esp push ebx mov eax, SRC_DST(ebp) ! eax = dest-src mov ebx, MESSAGE(ebp) ! ebx = message pointer mov ecx, SENDNB ! _sendnb(dest, ptr) int SYSVEC ! trap to the kernel pop ebx pop ebp ret__senda: push ebp mov ebp, esp push ebx mov eax, TABCOUNT(ebp) ! eax = count mov ebx, MSGTAB(ebp) ! ebx = table mov ecx, SENDA ! _senda(table, count) int SYSVEC ! trap to the kernel pop ebx pop ebp ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -