1
This commit is contained in:
2022-05-23 09:51:54 +02:00
parent f2646300d8
commit 0fd0ff54e6
2 changed files with 4 additions and 2 deletions

View File

@ -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:
; *

View File

@ -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);