@@ -1,10 +1,54 @@
#
+#include <em_abs.h>
+
mes 2,EM_WSIZE,EM_PSIZE
+.1
+ bss EM_PSIZE,0,0
+.2
+ bss EM_WSIZE,0,0
+ pro $ctch,0
+ lol 0
+ loc EHEAP
+ beq *1
+ lae .1
+ loi EM_PSIZE
+ sig
+ asp EM_PSIZE
+ trp
+ rtt
+1
+ loc 1
+ ste .2
+ end
exp $brk
pro $brk,0
lal 0
loi EM_PSIZE
- str 2 ; The - possibly - occurring traps should be caught
+ lpi $ctch
+ sti EM_PSIZE
+ loc 0
+ str 2 ; The - possibly - occurring trap is caught
+ loe .2
+ zgt *1
zer EM_PSIZE
ret EM_PSIZE
+ loc -1
+ loc EM_WSIZE
+ loc EM_PSIZE
+ cii
+ ret EM_PSIZE
end
@@ -1,11 +1,56 @@
exp $sbrk
pro $sbrk,0
lor 2
lol 0
ads EM_WSIZE