Skip to content
Snippets Groups Projects
Commit c6f964b9 authored by j284-smith's avatar j284-smith
Browse files

updated

parent 6da62ef3
Branches
No related tags found
1 merge request!1Jamie branch
main 0 → 100755
File added
...@@ -19,13 +19,17 @@ int main(){ ...@@ -19,13 +19,17 @@ int main(){
// sp is a pointer to characters // sp is a pointer to characters
// set sp to be data PLUS 4096 // set sp to be data PLUS 4096
Context c;
set_context(&c) = foo();
};
Context c = {};
c.rip = (void*)foo;
c.rsp = sp;
// create an empty context c
// set rip of c to foo;
// set rsp of c to sp;
set_context(&c);
// create an empty context c // create an empty context c
// set rip of c to foo; // set rip of c to foo;
// set rsp of c to sp; // set rsp of c to sp;
// call set_context with c // call set_context with c
};
main.o 0 → 100644
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment