update
This commit is contained in:
@ -28,9 +28,11 @@
|
||||
; C Prototyp: void Coroutine_start (struct CoroutineState* regs);
|
||||
|
||||
;; Coroutine_start is called with one arg: CoroutineState* regs, so the main stack looks like this:
|
||||
;; NOTE: Since this assembly is not generated by the compiler, there is no ebp prelude.
|
||||
;; To address parameters we use esp.
|
||||
;; == High address ==
|
||||
;; *REGS
|
||||
;; SP: RET ADDR
|
||||
;; ESP: RET ADDR
|
||||
;; == Low address ==
|
||||
Coroutine_start:
|
||||
; *
|
||||
|
||||
@ -25,7 +25,7 @@ void CoroutineDemo::main() {
|
||||
* Die 3 Koroutinen einrichten, verketten und die 1. starten
|
||||
*
|
||||
*/
|
||||
unsigned int(*stack)[1024] = new unsigned int[3][1024];
|
||||
unsigned int(*stack)[1024] = new unsigned int[3][1024]; // No delete since it is never returned
|
||||
|
||||
CoroutineLoop corout1(stack[0] + 1024, 0);
|
||||
CoroutineLoop corout2(stack[1] + 1024, 1);
|
||||
|
||||
Reference in New Issue
Block a user