Add library function for null pointer checking.
This is used by the new ORCA/C debugging option to check for illegal use of null pointers. It is similar to an existing routine in PasLib used by ORCA/Pascal's similar checks.
This commit is contained in:
parent
3551644355
commit
74de206058
18
cc.asm
18
cc.asm
|
@ -433,6 +433,24 @@ ret tya store return value in result space
|
|||
rtl return to original caller
|
||||
end
|
||||
|
||||
****************************************************************
|
||||
*
|
||||
* ~CheckPtrC - check a pointer to insure it is not null
|
||||
*
|
||||
* Inputs:
|
||||
* 1,S - return address
|
||||
* 4,S - pointer
|
||||
*
|
||||
****************************************************************
|
||||
*
|
||||
~CheckPtrC start
|
||||
lda 4,S
|
||||
ora 5,S
|
||||
bne lb1
|
||||
error #1 subrange exceeded
|
||||
lb1 rtl
|
||||
end
|
||||
|
||||
****************************************************************
|
||||
*
|
||||
* ~CUMul2 - unsigned multiply
|
||||
|
|
Loading…
Reference in New Issue