implement newOrNil, changes to stdlib
- newOrNil works like new, but sets the variable to nil if the heap allocation failed - change stdlib to use newOrNil in openfile and openvolumeid - changes to programs that use openvolumeid
This commit is contained in:
parent
165517a9c8
commit
14d6de059d
10 changed files with 68 additions and 48 deletions
|
|
@ -612,6 +612,9 @@ WAIT1LOOP:
|
|||
; length must be multiple of wordsize.
|
||||
; if it is not, the last (partial) word is not cleared.
|
||||
_CLEARMEM:
|
||||
OVER ; check for null pointer
|
||||
CBRANCH.Z CLEARMEM_X
|
||||
|
||||
SHR
|
||||
SHR ; calculate length in words
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue